summaryrefslogtreecommitdiffstats
path: root/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncVFModel.java
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2017-07-18 20:32:15 -0400
committerDan Timoney <dtimoney@att.com>2017-08-01 15:10:25 -0400
commitea5bf0a1c8a4e525d2cee03841b8e8f9b3563ed0 (patch)
tree5b85db0e570d86a2d3a7f5db5880196e45d8fe6f /ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncVFModel.java
parentb658ce359742d141428a068ba5ebff876ada3d0a (diff)
[CCSDK-6] Populate seed code
Add seed code for sli/northbound repository Update groupId to org.onap.ccsdk.sli.northbound Update to use CCSDK version of sli core Change-Id: Id3a154a53150a74f4b65060544e76f3e0cad932e Signed-off-by: Dan Timoney <dtimoney@att.com>
Diffstat (limited to 'ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncVFModel.java')
-rw-r--r--ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncVFModel.java56
1 files changed, 56 insertions, 0 deletions
diff --git a/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncVFModel.java b/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncVFModel.java
new file mode 100644
index 000000000..4e95e46ba
--- /dev/null
+++ b/ueb-listener/src/main/java/org/openecomp/sdnc/uebclient/SdncVFModel.java
@@ -0,0 +1,56 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * openECOMP : SDN-C
+ * ================================================================================
+ * Copyright (C) 2017 ONAP Intellectual Property. All rights
+ * reserved.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ * ============LICENSE_END=========================================================
+ */
+
+package org.openecomp.sdnc.uebclient;
+
+import org.openecomp.sdc.tosca.parser.api.ISdcCsarHelper;
+import org.openecomp.sdc.tosca.parser.impl.SdcPropertyNames;
+import org.openecomp.sdc.toscaparser.api.Metadata;
+import org.openecomp.sdc.toscaparser.api.NodeTemplate;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class SdncVFModel extends SdncBaseModel {
+
+ private static final Logger LOG = LoggerFactory
+ .getLogger(SdncVFModel.class);
+
+ public SdncVFModel(ISdcCsarHelper sdcCsarHelper, NodeTemplate nodeTemplate) {
+
+ super(sdcCsarHelper, nodeTemplate);
+
+ // extract metadata
+ Metadata metadata = nodeTemplate.getMetadata();
+ addParameter("name", extractValue(metadata, SdcPropertyNames.PROPERTY_NAME_NAME));
+ addParameter("vendor", extractValue (metadata, SdcPropertyNames.PROPERTY_NAME_RESOURCEVENDOR));
+ addParameter("vendor_version", extractValue (metadata, SdcPropertyNames.PROPERTY_NAME_RESOURCEVENDORRELEASE));
+
+ // extract properties
+ addParameter("ecomp_generated_naming", extractBooleanValue(nodeTemplate, SdcPropertyNames.PROPERTY_NAME_VNFECOMPNAMING_ECOMPGENERATEDNAMING));
+ addParameter("naming_policy", extractValue(nodeTemplate, SdcPropertyNames.PROPERTY_NAME_VNFECOMPNAMING_NAMINGPOLICY));
+ addParameter("nf_type", extractValue(nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NFTYPE));
+ addParameter("nf_role", extractValue(nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NFROLE));
+ addParameter("nf_code", extractValue( nodeTemplate, "nf_naming_code"));
+ addParameter("nf_function", extractValue(nodeTemplate, SdcPropertyNames.PROPERTY_NAME_NFFUNCTION));
+ addParameter("avail_zone_max_count", extractValue(nodeTemplate, SdcPropertyNames.PROPERTY_NAME_AVAILABILITYZONEMAXCOUNT));
+ }
+
+}