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)
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()