예제 #1
0
 def _get_private_region_flavors(self, region):
     token = session['token_keystone']
     infrastructure = self.database_manager.get_infrastructure(region)
     openstack_manager = OpenStackManager(region, token)
     openstack_flavors = openstack_manager.get_flavors()
     #TODO review how to manage the infrastructure to be aligned with the data base definition.
     return FlavorCollection.from_openstack_flavor_list(openstack_flavors, infrastructure)
예제 #2
0
 def _get_private_flavors(self):
     infrastructure = self.database_manager.get_infrastructure('Mordor')
     openstack_manager = OpenStackManager(infrastructure)
     openstack_flavors = openstack_manager.get_flavors()
     return FlavorCollection.from_openstack_flavor_list(openstack_flavors, infrastructure)