Esempio n. 1
0
def fetch_clusters(cloud, a_key, s_key):
    """
    Given a cloud object and appropriate credentials, retrieve a list of
    clusters associated with the given account. Return a dict of clusters'
    persistent data.
    """
    cml = CloudManLauncher(a_key, s_key, cloud)
    return cml.get_clusters_pd()
Esempio n. 2
0
def fetch_clusters(cloud, a_key, s_key):
    """
    Given a cloud object and appropriate credentials, retrieve a list of
    clusters associated with the given account. Return a dict of clusters'
    persistent data.
    """
    cml = CloudManLauncher(a_key, s_key, cloud)
    return cml.get_clusters_pd()
Esempio n. 3
0
    def get_saved_clusters(self, obj):
        """
        Fetch a list of saved CloudMan clusters from AWS.

        This only fetches saved clusters that used AWS since it appears that
        was the only place this feature was actively used.
        """
        provider = view_helpers.get_cloud_provider(self.context.get('view'))
        if provider.cloud_type != 'aws':
            return []
        # Since we're only working with the AWS, there's no need to specify
        # the cloud argument as it defaults to AWS in BioBlend.
        cml = CloudManLauncher(provider.a_key, provider.s_key, None)
        return cml.get_clusters_pd().get('clusters', [])
def get_cluster_pd(a_key, s_key):
    cloud = Bunch(id='-1',
                  name="NeCTAR",
                  cloud_type='openstack',
                  bucket_default='cloudman-os',
                  region_name='NeCTAR',
                  region_endpoint='nova.rc.nectar.org.au',
                  ec2_port=8773,
                  ec2_conn_path='/services/Cloud',
                  cidr_range='115.146.92.0/22',
                  is_secure=True,
                  s3_host='swift.rc.nectar.org.au',
                  s3_port=8888,
                  s3_conn_path='/')

    cml = CloudManLauncher(a_key, s_key, cloud)
    return cml.get_clusters_pd()