예제 #1
0
 def get_initial(self):
     id = self.kwargs["cloud_id"]
     cloud = tenantclouds.objects(id = id).first()
     username = cloud.cloud_meta['publickey']
     cloudname = cloud.name
     platform = cloud.platform
     password = encode_decode(cloud.cloud_meta['privatekey'],"decode")
     endpoint = cloud.cloud_meta['endpoint']
     cloud_type = cloud.cloud_type
     return {'id':id,'username1':username,'cloudname1':cloudname,'password1':password,'endpoint1':endpoint}
예제 #2
0
    def get_myclouds_data(self):
        obj = tenantclouds.objects(tenantid=self.request.user.tenantid.id)
        clouds = []

        for cloud in obj:
            cld_obj = CloudObj(cloud.id,cloud.name,cloud.platform,\
                                cloud.tenantid.name,cloud.cloud_meta['endpoint'],\
                                cloud.cloud_type,cloud.cloud_meta['publickey'])
            clouds.append(cld_obj)

        return clouds
예제 #3
0
 def get_myclouds_data(self):
     obj = tenantclouds.objects(tenantid=self.request.user.tenantid.id)
     clouds = []
    
     for cloud in obj:
         cld_obj = CloudObj(cloud.id,cloud.name,cloud.platform,\
                             cloud.tenantid.name,cloud.cloud_meta['endpoint'],\
                             cloud.cloud_type,cloud.cloud_meta['publickey'])
         clouds.append(cld_obj)
    
     return clouds