diff options
author | eeginux <henry.xie@est.tech> | 2019-04-02 14:11:08 +0100 |
---|---|---|
committer | eeginux <henry.xie@est.tech> | 2019-04-03 10:52:15 +0100 |
commit | fccb6eccf467f254a7b3df8a0c96ed7f6d38779e (patch) | |
tree | db983d44cda7db90d41c7341b3611fd05b4e8840 /mso-catalog-db/src | |
parent | 0ea204d5d1db87a34be2581d8ea4790d0dfacb8b (diff) |
skip post instantiation configuration
Update the schema to include new column
Ingest the property from tosca to DB
https://jira.onap.org/browse/SO-1671
Issue-ID: SO-1671
Change-Id: Ic6d8d2cfccaa24ba1f9320e4fc2f4255d532fb08
Signed-off-by: eeginux <henry.xie@est.tech>
Diffstat (limited to 'mso-catalog-db/src')
4 files changed, 25 insertions, 0 deletions
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/PnfResourceCustomization.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/PnfResourceCustomization.java index b2d40b8409..0c236897cb 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/PnfResourceCustomization.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/PnfResourceCustomization.java @@ -85,6 +85,9 @@ public class PnfResourceCustomization implements Serializable { @Column(name = "CDS_BLUEPRINT_VERSION") private String blueprintVersion; + @Column(name = "SKIP_POST_INSTANTIATION_CONFIGURATION") + private Boolean skipPostInstConf; + @Override public String toString() { return new ToStringBuilder(this).append("modelCustomizationUUID", modelCustomizationUUID) @@ -217,4 +220,12 @@ public class PnfResourceCustomization implements Serializable { this.blueprintVersion = blueprintVersion; } + public Boolean isSkipPostInstConf() { + return skipPostInstConf; + } + + public void setSkipPostInstConf(Boolean skipPostInstConf) { + this.skipPostInstConf = skipPostInstConf; + } + } diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfResourceCustomization.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfResourceCustomization.java index e569c3b994..1cbc7b561f 100644 --- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfResourceCustomization.java +++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/VnfResourceCustomization.java @@ -122,6 +122,9 @@ public class VnfResourceCustomization implements Serializable { @Column(name = "CDS_BLUEPRINT_VERSION") private String blueprintVersion; + @Column(name = "SKIP_POST_INSTANTIATION_CONFIGURATION") + private Boolean skipPostInstConf; + @Override public boolean equals(final Object other) { if (!(other instanceof VnfResourceCustomization)) { @@ -318,4 +321,11 @@ public class VnfResourceCustomization implements Serializable { this.blueprintVersion = blueprintVersion; } + public Boolean isSkipPostInstConf() { + return skipPostInstConf; + } + + public void setSkipPostInstConf(Boolean skipPostInstConf) { + this.skipPostInstConf = skipPostInstConf; + } } diff --git a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/PnfCustomizationRepositoryTest.java b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/PnfCustomizationRepositoryTest.java index 7ac80e222f..4ba344c845 100644 --- a/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/PnfCustomizationRepositoryTest.java +++ b/mso-catalog-db/src/test/java/org/onap/so/db/catalog/data/repository/PnfCustomizationRepositoryTest.java @@ -21,6 +21,7 @@ package org.onap.so.db.catalog.data.repository; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; import org.junit.Test; import org.onap.so.db.catalog.BaseTest; @@ -46,6 +47,7 @@ public class PnfCustomizationRepositoryTest extends BaseTest { assertEquals("modelInstanceName", "PNF routing", pnfResourceCustomization.getModelInstanceName()); assertEquals("blueprintName", "test_configuration_restconf", pnfResourceCustomization.getBlueprintName()); assertEquals("blueprintVersion", "1.0.0", pnfResourceCustomization.getBlueprintVersion()); + assertTrue("skip post instantiation configuration", pnfResourceCustomization.isSkipPostInstConf()); PnfResource pnfResource = pnfResourceCustomization.getPnfResources(); assertNotNull(pnfResource); diff --git a/mso-catalog-db/src/test/resources/schema.sql b/mso-catalog-db/src/test/resources/schema.sql index e61f5fc553..9002c92172 100644 --- a/mso-catalog-db/src/test/resources/schema.sql +++ b/mso-catalog-db/src/test/resources/schema.sql @@ -1110,6 +1110,7 @@ CREATE TABLE `vnf_resource_customization` ( `RESOURCE_INPUT` varchar(20000) DEFAULT NULL, `CDS_BLUEPRINT_NAME` varchar(200) default null, `CDS_BLUEPRINT_VERSION` varchar(20) default null, + `SKIP_POST_INSTANTIATION_CONFIGURATION` boolean default true, `CREATION_TIMESTAMP` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, `VNF_RESOURCE_MODEL_UUID` varchar(200) NOT NULL, `SERVICE_MODEL_UUID` varchar(200) NOT NULL, @@ -1191,6 +1192,7 @@ CREATE TABLE IF NOT EXISTS `pnf_resource_customization` ( `RESOURCE_INPUT` varchar(2000) DEFAULT NULL, `CDS_BLUEPRINT_NAME` varchar(200) DEFAULT NULL, `CDS_BLUEPRINT_VERSION` varchar(20) DEFAULT NULL, + `SKIP_POST_INSTANTIATION_CONFIGURATION` boolean default true, PRIMARY KEY (`MODEL_CUSTOMIZATION_UUID`), KEY `fk_pnf_resource_customization__pnf_resource1_idx` (`PNF_RESOURCE_MODEL_UUID`), CONSTRAINT `fk_pnf_resource_customization__pnf_resource1` FOREIGN KEY (`PNF_RESOURCE_MODEL_UUID`) REFERENCES `pnf_resource` (`MODEL_UUID`) ON DELETE CASCADE ON UPDATE CASCADE |