@@ -30,10 +30,11 @@ class OAuthScopes:
3030 Lists of OAuth Scopes are accepted when calling the :any:`generate_login_url`
3131 method of the :any:`LinodeLoginClient`.
3232
33- All contained enumerations of OAuth Scopes have two levels, "read_only" and
33+ Most contained enumerations of OAuth Scopes have two levels, "read_only" and
3434 "read_write". "read_only" access grants you the ability to get resources and
3535 of that type, but not to change, create, or delete them. "read_write" access
36- allows to full access to resources of the requested type. In the above
36+ allows to full access to resources of the requested type. :any:`OAuthScopes.VPC`
37+ is the exception and exposes only "read_write" and "all". In the above
3738 example, you are requesting access to view, modify, create, and delete
3839 Linodes, and to view Domains.
3940 """
@@ -268,6 +269,33 @@ def __repr__(self):
268269 return "images:*"
269270 return "images:{}" .format (self .name )
270271
272+ class Databases (Enum ):
273+ """
274+ Access to Managed Databases
275+ """
276+
277+ read_only = 0
278+ read_write = 1
279+ all = 2
280+
281+ def __repr__ (self ):
282+ if self .name == "all" :
283+ return "databases:*"
284+ return "databases:{}" .format (self .name )
285+
286+ class VPC (Enum ):
287+ """
288+ Access to VPCs and subnets
289+ """
290+
291+ read_write = 1
292+ all = 2
293+
294+ def __repr__ (self ):
295+ if self .name == "all" :
296+ return "vpc:*"
297+ return "vpc:{}" .format (self .name )
298+
271299 _scope_families = {
272300 "linodes" : Linodes ,
273301 "domains" : Domains ,
@@ -286,6 +314,8 @@ def __repr__(self):
286314 "nodebalancers" : NodeBalancers ,
287315 "longview" : Longview ,
288316 "images" : Images ,
317+ "databases" : Databases ,
318+ "vpc" : VPC ,
289319 }
290320
291321 @staticmethod
0 commit comments