Пример #1
0
 def initialize():
     for id in _creds_dictionary.keys():
         try:
             cdb.add_credential(TENANT, id,
                                _creds_dictionary[id][const.USERNAME],
                                _creds_dictionary[id][const.PASSWORD])
         except cexc.CredentialAlreadyExists:
             # We are quietly ignoring this, since it only happens
             # if this class module is loaded more than once, in which
             # case, the credentials are already populated
             pass
Пример #2
0
 def initialize():
     for id in _creds_dictionary.keys():
         try:
             cdb.add_credential(TENANT, id,
                                _creds_dictionary[id][const.USERNAME],
                                _creds_dictionary[id][const.PASSWORD])
         except cexc.CredentialAlreadyExists:
             # We are quietly ignoring this, since it only happens
             # if this class module is loaded more than once, in which
             # case, the credentials are already populated
             pass
Пример #3
0
 def initialize():
     for keys in _nexus_dict.keys():
         if keys[1] == const.USERNAME:
             try:
                 cdb.add_credential(TENANT, keys[0],
                                    _nexus_dict[keys[0], const.USERNAME],
                                    _nexus_dict[keys[0], const.PASSWORD])
             except cexc.CredentialAlreadyExists:
                 # We are quietly ignoring this, since it only happens
                 # if this class module is loaded more than once, in which
                 # case, the credentials are already populated
                 pass
Пример #4
0
 def initialize():
     for keys in _nexus_dict.keys():
         if keys[1] == const.USERNAME:
             try:
                 cdb.add_credential(TENANT, keys[0],
                                    _nexus_dict[keys[0], const.USERNAME],
                                    _nexus_dict[keys[0], const.PASSWORD])
             except cexc.CredentialAlreadyExists:
                 # We are quietly ignoring this, since it only happens
                 # if this class module is loaded more than once, in which
                 # case, the credentials are already populated
                 pass
Пример #5
0
 def create_credential(self, tenant_id, credential_name, user_name,
                       password):
     """Create a new credential"""
     LOG.debug(_("create_credential() called"))
     credential = cdb.add_credential(tenant_id, credential_name,
                                     user_name, password)
     return credential
Пример #6
0
 def create_credential(self, tenant_id, credential_name, user_name,
                       password):
     """Create a new credential"""
     LOG.debug(_("create_credential() called"))
     credential = cdb.add_credential(tenant_id, credential_name, user_name,
                                     password)
     return credential
Пример #7
0
 def put_credential(cred_name, username, password):
     """Set the username and password."""
     cdb.add_credential(TENANT, cred_name, username, password)
Пример #8
0
 def put_credential(cred_name, username, password):
     """Set the username and password."""
     cdb.add_credential(TENANT, cred_name, username, password)