Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from keystoneauth1.identity.v3 import Password
- from keystoneauth1.identity.v3 import PasswordMethod
- class PasswordSerialization(Password):
- """An extension to openstack password to allow serialization.
- :param string auth_url: Identity service endpoint for authentication.
- :param string password: Password for authentication.
- :param string username: Username for authentication.
- :param string user_id: User ID for authentication.
- :param string user_domain_id: User's domain ID for authentication.
- :param string user_domain_name: User's domain name for authentication.
- :param string trust_id: Trust ID for trust scoping.
- :param string domain_id: Domain ID for domain scoping.
- :param string domain_name: Domain name for domain scoping.
- :param string project_id: Project ID for project scoping.
- :param string project_name: Project name for project scoping.
- :param string project_domain_id: Project's domain ID for project.
- :param string project_domain_name: Project's domain name for project.
- :param bool reauthenticate: Allow fetching a new token if the current one
- is going to expire. (optional) default True
- """
- _auth_method_class = PasswordMethod
- #def __init__(self):
- # super(Password,self).__init__()
- def __getstate__(self):
- d = dict(self.__dict__)
- del d['_lock']
- return d
- def __setstate__(self, d):
- self.__dict__.update(d)
- def __setlock__(self, lock):
- self._lock = lock
- d = dict(self.__dict__)
- d['_lock'] = lock
- self.__dict__.update(d)
- def toJSON(self):
- return json.dumps(self, default=lambda o: o.__dict__,
- sort_keys=True, indent=4)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement