(cls, instance_config)
return identity
Parse user identity out of init_config

        To guarantee a uniquely identifiable user, expects
        {"user": {"name": "my_username", "password": "my_password",
                  "domain": {"id": "my_domain_id"}
                  }
        }
Parse user identity out of init_config
Parse user identity out of init_config
def get_user_identity(cls, instance_config):
        """
        Parse user identity out of init_config

        To guarantee a uniquely identifiable user, expects
        {"user": {"name": "my_username", "password": "my_password",
                  "domain": {"id": "my_domain_id"}
                  }
        }
        """
        user = instance_config.get('user')

        if not (
            user and user.get('name') and user.get('password') and user.get("domain") and user.get("domain").get("id")
        ):
            raise IncompleteIdentity()

        identity = {"methods": ['password'], "password": {"user": user}}
        return identity
def get_user_identity ( cls , instance_config ) : user = instance_config . get ( 'user' ) if not ( user and user . get ( 'name' ) and user . get ( 'password' ) and user . get ( "domain" ) and user . get ( "domain" ) . get ( "id" ) ) : raise IncompleteIdentity ( ) identity = { "methods" : [ 'password' ] , "password" : { "user" : user } } return identity