コード例 #1
0

'''

class CredentialFromMongo(UserBaseClass):

    def __init__(self, user, cloud, datasource=None):
        """data source is a collectionname in cloudmesh_server.yaml"""
        """if day=tasource is none than use the default on which is ?"""
        raise NotImplementedError()
'''

if __name__ == "__main__":

    # -------------------------------------------------------------------------
    banner("YAML read test")
    # -------------------------------------------------------------------------
    user = UserFromYaml("gvonlasz")
    pprint(user)

    store = UserDictStore(UserFromYaml, password="******")
    store.set("gvonlasz", "~/.futuregrid/cloudmesh.yaml", password="******")

    banner("credentialstore")
    pprint(store)

    # banner("gvonlasz - hp")
    # -------------------------------------------------------------------------
    # cred = store.credential("gvonlasz", "hp", password="******")

    # pprint (cred)
コード例 #2
0
                credential['EC2_ACCESS_KEY'] = access_key
                credential['EC2_SECERT_KEY'] = secret_key
        return credential


class CredentialFromMongo(CredentialBaseClass):
    def __init__(self, user, cloud, datasource=None):
        """data source is a collectionname in cloudmesh_server.yaml"""
        """if day=tasource is none than use the default on which is ?"""
        raise NotImplementedError()


if __name__ == "__main__":

    # -------------------------------------------------------------------------
    banner("YAML read test")
    # -------------------------------------------------------------------------
    banner("gvonlasz - sierra_openstack_grizzly - old")
    # -------------------------------------------------------------------------
    credential = CredentialFromYaml("gvonlasz", "sierra_openstack_grizzly")
    pprint(credential)

    banner("gvonlasz - sierra_openstack_grizzly - new")
    # -------------------------------------------------------------------------
    credential = CredentialFromYaml("gvonlasz",
                                    "sierra_openstack_grizzly",
                                    style=3.0)
    pprint(credential)

    print credential['credentials']['OS_USERNAME']
コード例 #3
0
                secrest_key = self.decrypt_value(username, cloud, 'EC2_SECRET_KEY')
                credential['EC2_ACCESS_KEY'] = access_key
                credential['EC2_SECERT_KEY'] = secret_key
        return credential

class CredentialFromMongo(CredentialBaseClass):

    def __init__(self, user, cloud, datasource=None):
        """data source is a collectionname in cloudmesh_server.yaml"""
        """if day=tasource is none than use the default on which is ?"""
        raise NotImplementedError()

if __name__ == "__main__":

    # -------------------------------------------------------------------------
    banner("YAML read test")
    # -------------------------------------------------------------------------
    banner("gvonlasz - sierra_openstack_grizzly - old")
    # -------------------------------------------------------------------------
    credential = CredentialFromYaml("gvonlasz", "sierra_openstack_grizzly")
    pprint (credential)

    banner("gvonlasz - sierra_openstack_grizzly - new")
    # -------------------------------------------------------------------------
    credential = CredentialFromYaml("gvonlasz", "sierra_openstack_grizzly", style=3.0)
    pprint (credential)

    print credential['credentials']['OS_USERNAME']

    print credential.keys()
コード例 #4
0

'''

class CredentialFromMongo(UserBaseClass):

    def __init__(self, user, cloud, datasource=None):
        """data source is a collectionname in cloudmesh_server.yaml"""
        """if day=tasource is none than use the default on which is ?"""
        raise NotImplementedError()
'''

if __name__ == "__main__":

    # -------------------------------------------------------------------------
    banner("YAML read test")
    # -------------------------------------------------------------------------
    user = UserFromYaml("gvonlasz")
    pprint (user)


    store = UserDictStore(UserFromYaml, password="******")
    store.set("gvonlasz", "~/.futuregrid/cloudmesh.yaml", password="******")

    banner("credentialstore")
    pprint (store)

    # banner("gvonlasz - hp")
    # -------------------------------------------------------------------------
    # cred = store.credential("gvonlasz", "hp", password="******")