def _create_instance(self): self.context = TroveContext(is_admin=True) self.tenant_id = 999 self.db_info = DBInstance.create(name="instance", flavor_id=1, tenant_id=self.tenant_id, volume_size=None, service_type='mysql', task_status=InstanceTasks.NONE) self.server = self.mock.CreateMock(Server) self.instance = imodels.Instance(self.context, self.db_info, self.server, service_status="ACTIVE")
def _create_instance(self): self.context = TroveContext(is_admin=True) self.tenant_id = 999 self.db_info = DBInstance.create( id="inst-id-1", name="instance", flavor_id=1, datastore_version_id=test_config.dbaas_datastore_version_id, tenant_id=self.tenant_id, volume_size=None, task_status=InstanceTasks.NONE) self.server = self.mock.CreateMock(Server) self.instance = imodels.Instance( self.context, self.db_info, self.server, datastore_status=imodels.InstanceServiceStatus( tr_instance.ServiceStatuses.RUNNING))