def purge(name):
    """Removes instance types from database."""
    try:
        assert name is not None
        db.instance_type_purge(context.get_admin_context(), name)
    except (AssertionError, exception.NotFound):
        LOG.exception(_("Instance type %s not found for purge") % name)
        raise exception.InstanceTypeNotFoundByName(instance_type_name=name)
Exemple #2
0
def purge(name):
    """Removes instance types from database."""
    try:
        assert name is not None
        db.instance_type_purge(context.get_admin_context(), name)
    except (AssertionError, exception.NotFound):
        LOG.exception(_('Instance type %s not found for purge') % name)
        raise exception.InstanceTypeNotFoundByName(instance_type_name=name)
Exemple #3
0
 def tearDown(self):
     # Remove the instance type from the database
     db.instance_type_purge(self.context, "cg1.4xlarge")
     super(InstanceTypeExtraSpecsTestCase, self).tearDown()