diff options
Diffstat (limited to 'src/resource_inventory')
-rw-r--r-- | src/resource_inventory/migrations/0017_auto_20201218_1516.py (renamed from src/resource_inventory/migrations/0018_manual_change_rconfig_default_name.py) | 6 | ||||
-rw-r--r-- | src/resource_inventory/models.py | 2 | ||||
-rw-r--r-- | src/resource_inventory/resource_manager.py | 7 |
3 files changed, 10 insertions, 5 deletions
diff --git a/src/resource_inventory/migrations/0018_manual_change_rconfig_default_name.py b/src/resource_inventory/migrations/0017_auto_20201218_1516.py index b3459bf..d4884de 100644 --- a/src/resource_inventory/migrations/0018_manual_change_rconfig_default_name.py +++ b/src/resource_inventory/migrations/0017_auto_20201218_1516.py @@ -1,14 +1,18 @@ +# Generated by Django 2.2 on 2020-12-18 15:16 + from django.db import migrations, models class Migration(migrations.Migration): + dependencies = [ ('resource_inventory', '0016_auto_20201109_1947'), ] + operations = [ migrations.AlterField( model_name='resourceconfiguration', name='name', - field=models.CharField(default='opnfv-host') + field=models.CharField(default='opnfv_host', max_length=3000), ), ] diff --git a/src/resource_inventory/models.py b/src/resource_inventory/models.py index e2f2fea..7fe479a 100644 --- a/src/resource_inventory/models.py +++ b/src/resource_inventory/models.py @@ -233,7 +233,7 @@ class ResourceConfiguration(models.Model): image = models.ForeignKey("Image", on_delete=models.PROTECT) template = models.ForeignKey(ResourceTemplate, related_name="resourceConfigurations", null=True, on_delete=models.CASCADE) is_head_node = models.BooleanField(default=False) - name = models.CharField(max_length=3000, default="<Hostname>") + name = models.CharField(max_length=3000, default="opnfv_host") def __str__(self): return str(self.name) diff --git a/src/resource_inventory/resource_manager.py b/src/resource_inventory/resource_manager.py index 140cc09..9406977 100644 --- a/src/resource_inventory/resource_manager.py +++ b/src/resource_inventory/resource_manager.py @@ -64,9 +64,10 @@ class ResourceManager: # public interface def deleteResourceBundle(self, resourceBundle): - for resource in resourceBundle.get_resources(): - resource.release() - resourceBundle.delete() + raise NotImplementedError("Resource Bundle Deletion Not Implemented") + + def releaseResourceBundle(self, resourceBundle): + resourceBundle.release() def get_vlans(self, resourceTemplate): networks = {} |