예제 #1
0
파일: test_nova.py 프로젝트: wzhmei/manila
    def setUp(self):
        super(NovaApiTestCase, self).setUp()

        self.api = nova.API()
        self.novaclient = FakeNovaClient()
        self.ctx = context.get_admin_context()
        self.mock_object(nova, 'novaclient',
                         mock.Mock(return_value=self.novaclient))
        self.mock_object(nova, '_untranslate_server_summary_view',
                         lambda server: server)
예제 #2
0
 def __init__(self, config_group_name=None, db_driver=None, label=None):
     super(NovaNetworkPlugin, self).__init__(db_driver=db_driver)
     self.config_group_name = config_group_name or 'DEFAULT'
     self._label = label or 'user'
     self.admin_context = manila.context.get_admin_context()
     self.nova_api = nova.API()