diff options
37 files changed, 449 insertions, 168 deletions
diff --git a/.gitignore b/.gitignore index d5ce522828..c631ed2376 100644 --- a/.gitignore +++ b/.gitignore @@ -167,4 +167,5 @@ sdc-os-chef/sdc-sanity/chef-repo/cookbooks/sdc-sanity/files/default/testSuites/* /common/openecomp-common-configuration-management/openecomp-configuration-management-cli/dependency-reduced-pom.xml -/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/files/default/tools/*
\ No newline at end of file +/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/files/default/tools/* +/sdc-os-chef/sdc-cassandra/chef-repo/cookbooks/cassandra-actions/attributes/default.rb diff --git a/asdc-tests/pom.xml b/asdc-tests/pom.xml index e9972bd647..bfb7920d51 100644 --- a/asdc-tests/pom.xml +++ b/asdc-tests/pom.xml @@ -10,6 +10,10 @@ <artifactId>sdc-main</artifactId> <version>1.2.0-SNAPSHOT</version> </parent> + + <properties> + <sonar.skip>true</sonar.skip> + </properties> <dependencies> diff --git a/catalog-be/pom.xml b/catalog-be/pom.xml index f4a2c30d99..5b13e028d8 100644 --- a/catalog-be/pom.xml +++ b/catalog-be/pom.xml @@ -611,41 +611,6 @@ </plugin> <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <executions> - <execution> - <id>copy-dependencies</id> - <phase>package</phase> - <goals> - <goal>copy-dependencies</goal> - </goals> - <configuration> - <includeScope>compile</includeScope> - </configuration> - </execution> - <execution> - <id>copy-installed</id> - <phase>install</phase> - <goals> - <goal>copy</goal> - </goals> - <configuration> - <artifactItems> - <artifactItem> - <groupId>${project.groupId}</groupId> - <artifactId>${project.artifactId}</artifactId> - <version>${project.version}</version> - <type>${project.packaging}</type> - </artifactItem> - </artifactItems> - <outputDirectory>${project.parent.basedir}/sdc-os-chef/sdc-backend/</outputDirectory> - </configuration> - </execution> - </executions> - </plugin> - - <plugin> <groupId>com.jcabi</groupId> <artifactId>jcabi-maven-plugin</artifactId> <version>${jcabi.plugin.version}</version> @@ -662,25 +627,6 @@ <artifactId>maven-resources-plugin</artifactId> <version>2.6</version> <executions> - <execution> - <id>copy-normatives</id> - <phase>install</phase> - <goals> - <goal>copy-resources</goal> - </goals> - <configuration> - <outputDirectory>${project.parent.basedir}/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-normatives/files/default</outputDirectory> - <resources> - <resource> - <directory>./target</directory> - <includes> - <include>normatives.tar.gz</include> - </includes> - </resource> - </resources> - </configuration> - </execution> - <execution> <id>copy-tosca-folder</id> <!-- here the phase you need --> diff --git a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java index ba26576648..0ae546479a 100644 --- a/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java +++ b/catalog-be/src/main/java/org/openecomp/sdc/be/components/impl/ResourceBusinessLogic.java @@ -1869,27 +1869,25 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { log.debug("************* Going to create all nodes {}", yamlName); Either<Map<String, Resource>, ResponseFormat> createdResourcesFromdNodeTypeMap = this.handleNodeTypes(yamlName, resource, topologyTemplateYaml, false, nodeTypesArtifactsToCreate, nodeTypesNewCreatedArtifacts, nodeTypesInfo, csarInfo, nodeName); - log.debug("************* Finished to create all nodes {}", yamlName); if (createdResourcesFromdNodeTypeMap.isRight()) { log.debug("failed to resources from node types status is {}", createdResourcesFromdNodeTypeMap.right().value()); return Either.right(createdResourcesFromdNodeTypeMap.right().value()); } + log.debug("************* Finished to create all nodes {}", yamlName); log.debug("************* Going to create all resource instances {}", yamlName); createResourcesInstancesEither = createResourceInstances(csarInfo.getModifier(), yamlName, resource, uploadComponentInstanceInfoMap, true, false, csarInfo.getCreatedNodes()); - log.debug("************* Finished to create all resource instances {}", yamlName); if (createResourcesInstancesEither.isRight()) { log.debug("failed to create resource instances status is {}", createResourcesInstancesEither.right().value()); result = createResourcesInstancesEither; return createResourcesInstancesEither; } + log.debug("************* Finished to create all resource instances for {}", yamlName); resource = createResourcesInstancesEither.left().value(); log.debug("************* Going to create all relations {}", yamlName); createResourcesInstancesEither = createResourceInstancesRelations(csarInfo.getModifier(), yamlName, resource, uploadComponentInstanceInfoMap); - log.debug("************* Finished to create all relations {}", yamlName); - if (createResourcesInstancesEither.isRight()) { log.debug("failed to create relation between resource instances status is {}", createResourcesInstancesEither.right().value()); result = createResourcesInstancesEither; @@ -1897,6 +1895,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { } else { resource = createResourcesInstancesEither.left().value(); } + log.debug("************* Finished to create all relations {}", yamlName); log.debug("************* Going to create positions {}", yamlName); Either<List<ComponentInstance>, ResponseFormat> eitherSetPosition = compositionBusinessLogic.setPositionsForComponentInstances(resource, csarInfo.getModifier().getUserId()); @@ -4265,7 +4264,6 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { return Either.left(validRegDef); } - @SuppressWarnings("unchecked") public Either<ParsedToscaYamlInfo, ResponseFormat> parseResourceInfoFromYaml(String yamlFileName, Resource resource, String resourceYml, Map<String, String> createdNodesToscaResourceNames, Map<String, NodeTypeInfo> nodeTypesInfo, String nodeName) { Map<String, Object> mappedToscaTemplate; @@ -4319,7 +4317,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { Map<String, Resource> nodeNamespaceMap) { Either<Resource, ResponseFormat> eitherResource = null; - log.debug("createResourceInstances is {} - going to create resource instanse from CSAR", yamlName); + log.debug("{} - going to create resource instanse from CSAR", yamlName); if (uploadResInstancesMap == null || uploadResInstancesMap.isEmpty()) { ResponseFormat responseFormat = componentsUtils.getResponseFormat(ActionStatus.NOT_TOPOLOGY_TOSCA_TEMPLATE); @@ -4334,13 +4332,13 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { Iterator<Entry<String, UploadComponentInstanceInfo>> nodesInfoValue = uploadResInstancesMap.entrySet().iterator(); Map<ComponentInstance, Resource> resourcesInstancesMap = new HashMap<>(); while (nodesInfoValue.hasNext()) { - log.debug("*************Going to create resource instances {}", yamlName); + log.debug("*************Going to create resource instances from {}", yamlName); Entry<String, UploadComponentInstanceInfo> uploadComponentInstanceInfoEntry = nodesInfoValue.next(); UploadComponentInstanceInfo uploadComponentInstanceInfo = uploadComponentInstanceInfoEntry.getValue(); // updating type if the type is node type name - we need to take the // updated name - log.debug("*************Going to create resource instances {}", uploadComponentInstanceInfo.getName()); + log.debug("*************Going to create resource instance {}", uploadComponentInstanceInfo.getName()); if (nodeNamespaceMap.containsKey(uploadComponentInstanceInfo.getType())) { uploadComponentInstanceInfo.setType(nodeNamespaceMap.get(uploadComponentInstanceInfo.getType()).getToscaResourceName()); } @@ -4357,17 +4355,19 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { ComponentTypeEnum containerComponentType = resource.getComponentType(); NodeTypeEnum containerNodeType = containerComponentType.getNodeType(); - - if (containerNodeType.equals(NodeTypeEnum.Resource) && uploadComponentInstanceInfo.getCapabilities() != null) { - Either<Map<String, List<CapabilityDefinition>>, ResponseFormat> getValidComponentInstanceCapabilitiesRes = getValidComponentInstanceCapabilities(refResource.getCapabilities(), uploadComponentInstanceInfo.getCapabilities()); + //************ + if (containerNodeType.equals(NodeTypeEnum.Resource) && MapUtils.isNotEmpty(uploadComponentInstanceInfo.getCapabilities()) && MapUtils.isNotEmpty(refResource.getCapabilities())) { + setCapabilityNamesTypes(refResource.getCapabilities(), uploadComponentInstanceInfo.getCapabilities()); + Either<Map<String, List<CapabilityDefinition>>, ResponseFormat> getValidComponentInstanceCapabilitiesRes = getValidComponentInstanceCapabilities(refResource.getUniqueId(), refResource.getCapabilities(), uploadComponentInstanceInfo.getCapabilities()); if (getValidComponentInstanceCapabilitiesRes.isRight()) { return Either.right(getValidComponentInstanceCapabilitiesRes.right().value()); } else { componentInstance.setCapabilities(getValidComponentInstanceCapabilitiesRes.left().value()); } } + //*********************** if (!existingnodeTypeMap.containsKey(uploadComponentInstanceInfo.getType())) { - log.debug("createResourceInstances - not found lates version for resource instance with name {} and type ", uploadComponentInstanceInfo.getName(), uploadComponentInstanceInfo.getType()); + log.debug("createResourceInstances - not found latest version for resource instance with name {} and type ", uploadComponentInstanceInfo.getName(), uploadComponentInstanceInfo.getType()); ResponseFormat responseFormat = componentsUtils.getResponseFormat(ActionStatus.INVALID_NODE_TEMPLATE, yamlName, uploadComponentInstanceInfo.getName(), uploadComponentInstanceInfo.getType()); return Either.right(responseFormat); } @@ -4417,16 +4417,30 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { return Either.left(eitherGerResource.left().value()); } + + private void setCapabilityNamesTypes(Map<String, List<CapabilityDefinition>> originCapabilities, Map<String, List<UploadCapInfo>> uploadedCapabilities) { + for(Entry<String, List<UploadCapInfo>> currEntry : uploadedCapabilities.entrySet()){ + if(originCapabilities.containsKey(currEntry.getKey())){ + currEntry.getValue().stream().forEach(cap -> cap.setType(currEntry.getKey())); + } + } + + for(Map.Entry<String, List<CapabilityDefinition>> capabilities : originCapabilities.entrySet()){ + capabilities.getValue().stream().forEach(cap -> {if(uploadedCapabilities.containsKey(cap.getName())){uploadedCapabilities.get(cap.getName()).stream().forEach(c -> {c.setName(cap.getName());c.setType(cap.getType());});};}); + } + } + + private Either<Resource, ResponseFormat> validateResourceInstanceBeforeCreate(String yamlName, UploadComponentInstanceInfo uploadComponentInstanceInfo, Map<String, Resource> nodeNamespaceMap) { - log.debug("validateResourceInstanceBeforeCreate - going to validate resource instance with name {} and type before create", uploadComponentInstanceInfo.getName(), uploadComponentInstanceInfo.getType()); + log.debug("going to validate resource instance with name {} and type {} before create", uploadComponentInstanceInfo.getName(), uploadComponentInstanceInfo.getType()); Resource refResource = null; if (nodeNamespaceMap.containsKey(uploadComponentInstanceInfo.getType())) { refResource = nodeNamespaceMap.get(uploadComponentInstanceInfo.getType()); } else { Either<Resource, StorageOperationStatus> findResourceEither = toscaOperationFacade.getLatestCertifiedNodeTypeByToscaResourceName(uploadComponentInstanceInfo.getType()); if (findResourceEither.isRight()) { - log.debug("validateResourceInstanceBeforeCreate - not found lates version for resource instance with name {} and type ", uploadComponentInstanceInfo.getName(), uploadComponentInstanceInfo.getType()); + log.debug("not found lates version for resource instance with name {} and type {}", uploadComponentInstanceInfo.getName(), uploadComponentInstanceInfo.getType()); ResponseFormat responseFormat = componentsUtils.getResponseFormat(componentsUtils.convertFromStorageResponse(findResourceEither.right().value())); return Either.right(responseFormat); } @@ -4435,16 +4449,17 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { } String componentState = refResource.getComponentMetadataDefinition().getMetadataDataDefinition().getState(); if (componentState.equals(LifecycleStateEnum.NOT_CERTIFIED_CHECKOUT.name())) { - log.debug("validateResourceInstanceBeforeCreate - component instance of component {} can not be created because the component is in an illegal state {}.", refResource.getName(), componentState); + log.debug("component instance of component {} can not be created because the component is in an illegal state {}.", refResource.getName(), componentState); ResponseFormat responseFormat = componentsUtils.getResponseFormat(ActionStatus.ILLEGAL_COMPONENT_STATE, refResource.getComponentType().getValue(), refResource.getName(), componentState); return Either.right(responseFormat); } if (!ToscaUtils.isAtomicType(refResource) && refResource.getResourceType() != ResourceTypeEnum.CVFC) { - log.debug("validateResourceInstanceBeforeCreate - ref resource type is ", refResource.getResourceType()); + log.debug("ref resource type is {}", refResource.getResourceType()); ResponseFormat responseFormat = componentsUtils.getResponseFormat(ActionStatus.INVALID_NODE_TEMPLATE, yamlName, uploadComponentInstanceInfo.getName(), uploadComponentInstanceInfo.getType()); return Either.right(responseFormat); } + log.debug("validate resource instance with name {} and type {} before create, successful",uploadComponentInstanceInfo.getName(), uploadComponentInstanceInfo.getType()); return Either.left(refResource); } @@ -7021,7 +7036,7 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { return null; } - private Either<Map<String, List<CapabilityDefinition>>, ResponseFormat> getValidComponentInstanceCapabilities(Map<String, List<CapabilityDefinition>> defaultCapabilities, Map<String, List<UploadCapInfo>> uploadedCapabilities) { + private Either<Map<String, List<CapabilityDefinition>>, ResponseFormat> getValidComponentInstanceCapabilities(String resourceId, Map<String, List<CapabilityDefinition>> defaultCapabilities, Map<String, List<UploadCapInfo>> uploadedCapabilities) { ResponseFormat responseFormat; Map<String, List<CapabilityDefinition>> validCapabilitiesMap = new HashMap<>(); @@ -7031,14 +7046,33 @@ public class ResourceBusinessLogic extends ComponentBusinessLogic { responseFormat = componentsUtils.getResponseFormat(ActionStatus.MISSING_CAPABILITY_TYPE, capabilityType); return Either.right(responseFormat); } else { - CapabilityDefinition delaultCapability = defaultCapabilities.get(capabilityType).get(0); - Either<Boolean, String> validationRes = validateUniquenessUpdateUploadedComponentInstanceCapability(delaultCapability, uploadedCapabilitiesEntry.getValue().get(0)); - if (validationRes.isRight()) { - responseFormat = componentsUtils.getResponseFormat(ActionStatus.PROPERTY_NAME_ALREADY_EXISTS, validationRes.right().value()); + CapabilityDefinition defaultCapability; + if(CollectionUtils.isNotEmpty(defaultCapabilities.get(capabilityType).get(0).getProperties())){ + defaultCapability = defaultCapabilities.get(capabilityType).get(0); + } else { + Either<Component, StorageOperationStatus> getFullComponentRes = toscaOperationFacade.getToscaFullElement(resourceId); + if(getFullComponentRes.isRight()){ + log.debug("Failed to get full component {}. Status is {}. ", resourceId, getFullComponentRes.right().value()); + responseFormat = componentsUtils.getResponseFormat(ActionStatus.COMPONENT_NOT_FOUND, resourceId); + return Either.right(responseFormat); + } + defaultCapability = getFullComponentRes.left().value().getCapabilities().get(capabilityType).get(0); + } + if(CollectionUtils.isEmpty(defaultCapability.getProperties()) && CollectionUtils.isNotEmpty(uploadedCapabilitiesEntry.getValue().get(0).getProperties())){ + log.debug("Failed to validate capability {} of component {}. Property list is empty. ", defaultCapability.getName(), resourceId); + log.debug("Failed to update capability property values. Property list of fetched capability {} is empty. ", defaultCapability.getName()); + responseFormat = componentsUtils.getResponseFormat(ActionStatus.PROPERTY_NOT_FOUND, resourceId); return Either.right(responseFormat); } + if(CollectionUtils.isNotEmpty(defaultCapability.getProperties()) && CollectionUtils.isNotEmpty(uploadedCapabilitiesEntry.getValue().get(0).getProperties())){ + Either<Boolean, String> validationRes = validateUniquenessUpdateUploadedComponentInstanceCapability(defaultCapability, uploadedCapabilitiesEntry.getValue().get(0)); + if (validationRes.isRight()) { + responseFormat = componentsUtils.getResponseFormat(ActionStatus.PROPERTY_NAME_ALREADY_EXISTS, validationRes.right().value()); + return Either.right(responseFormat); + } + } List<CapabilityDefinition> validCapabilityList = new ArrayList<>(); - validCapabilityList.add(delaultCapability); + validCapabilityList.add(defaultCapability); validCapabilitiesMap.put(uploadedCapabilitiesEntry.getKey(), validCapabilityList); } } diff --git a/catalog-be/src/main/resources/config/configuration.yaml b/catalog-be/src/main/resources/config/configuration.yaml index 5242652188..2ae2cccb77 100644 --- a/catalog-be/src/main/resources/config/configuration.yaml +++ b/catalog-be/src/main/resources/config/configuration.yaml @@ -133,6 +133,7 @@ artifactTypes: - SNMP_POLL - SNMP_TRAP - GUIDE + - PLAN licenseTypes: - User @@ -322,6 +323,14 @@ serviceDeploymentArtifacts: - xml OTHER: acceptedTypes: + +#PLAN + PLAN: + acceptedTypes: + - xml + validForResourceTypes: + - VF + - VFC resourceDeploymentArtifacts: HEAT: @@ -439,6 +448,11 @@ resourceDeploymentArtifacts: SNMP_TRAP: acceptedTypes: validForResourceTypes: *allResourceTypes + +#PLAN + PLAN: + acceptedTypes: + - xml resourceInstanceDeploymentArtifacts: HEAT_ENV: @@ -476,6 +490,11 @@ resourceInstanceDeploymentArtifacts: SNMP_TRAP: acceptedTypes: validForResourceTypes: *allResourceTypes + +#PLAN + PLAN: + acceptedTypes: + - xml resourceInformationalArtifacts: CHEF: diff --git a/catalog-fe/pom.xml b/catalog-fe/pom.xml index 757e543dcb..d79d6aab47 100644 --- a/catalog-fe/pom.xml +++ b/catalog-fe/pom.xml @@ -323,42 +323,7 @@ </webResources> </configuration> </plugin> - - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <executions> - <execution> - <id>copy-dependencies</id> - <phase>package</phase> - <goals> - <goal>copy-dependencies</goal> - </goals> - <configuration> - <includeScope>compile</includeScope> - </configuration> - </execution> - <execution> - <id>copy-installed</id> - <phase>install</phase> - <goals> - <goal>copy</goal> - </goals> - <configuration> - <artifactItems> - <artifactItem> - <groupId>${project.groupId}</groupId> - <artifactId>${project.artifactId}</artifactId> - <version>${project.version}</version> - <type>${project.packaging}</type> - </artifactItem> - </artifactItems> - <outputDirectory>${project.parent.basedir}/sdc-os-chef/sdc-frontend/</outputDirectory> - </configuration> - </execution> - </executions> - </plugin> - + <plugin> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-maven-plugin</artifactId> diff --git a/common-app-api/src/main/java/org/openecomp/sdc/common/api/ArtifactTypeEnum.java b/common-app-api/src/main/java/org/openecomp/sdc/common/api/ArtifactTypeEnum.java index f13984bc67..6beec9de54 100644 --- a/common-app-api/src/main/java/org/openecomp/sdc/common/api/ArtifactTypeEnum.java +++ b/common-app-api/src/main/java/org/openecomp/sdc/common/api/ArtifactTypeEnum.java @@ -37,8 +37,10 @@ public enum ArtifactTypeEnum { DCAE_INVENTORY_POLICY("DCAE_INVENTORY_POLICY"), DCAE_INVENTORY_DOC("DCAE_INVENTORY_DOC"), DCAE_INVENTORY_BLUEPRINT("DCAE_INVENTORY_BLUEPRINT"), DCAE_INVENTORY_EVENT("DCAE_INVENTORY_EVENT"), // AAI Artifacts AAI_SERVICE_MODEL("AAI_SERVICE_MODEL"), AAI_VF_MODEL("AAI_VF_MODEL"), AAI_VF_MODULE_MODEL("AAI_VF_MODULE_MODEL"), AAI_VF_INSTANCE_MODEL("AAI_VF_INSTANCE_MODEL"), - // MIB artifacts - SNMP_POLL ("SNMP_POLL"), SNMP_TRAP("SNMP_TRAP"), GUIDE("GUIDE"); + // MIB Artifacts + SNMP_POLL ("SNMP_POLL"), SNMP_TRAP("SNMP_TRAP"), GUIDE("GUIDE"), + // PLAN Artifacts + PLAN("PLAN"); ArtifactTypeEnum(String type) { this.type = type; diff --git a/common/openecomp-common-configuration-management/openecomp-configuration-management-api/pom.xml b/common/openecomp-common-configuration-management/openecomp-configuration-management-api/pom.xml index 22fdd2cdf4..0a06aa3f4e 100644 --- a/common/openecomp-common-configuration-management/openecomp-configuration-management-api/pom.xml +++ b/common/openecomp-common-configuration-management/openecomp-configuration-management-api/pom.xml @@ -2,7 +2,6 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> - <groupId>org.openecomp.sdc.common</groupId> <name>openecomp-configuration-management-api</name> <artifactId>openecomp-configuration-management-api</artifactId> @@ -13,36 +12,4 @@ <relativePath>..</relativePath> </parent> - <dependencies> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-install-plugin</artifactId> - <version>${mvn.install.version}</version> - <executions> - <execution> - <id>install-mallet</id> - <phase>install</phase> - <goals> - <goal>install-file</goal> - </goals> - <configuration> - <file>${java.home}/../lib/tools.jar</file> - <groupId>tools</groupId> - <artifactId>tools</artifactId> - <version>1.8</version> - <packaging>jar</packaging> - <createChecksum>true</createChecksum> - <generatePom>true</generatePom> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> - - </project> diff --git a/common/openecomp-common-configuration-management/pom.xml b/common/openecomp-common-configuration-management/pom.xml index 0d28746e9a..001b719ef1 100644 --- a/common/openecomp-common-configuration-management/pom.xml +++ b/common/openecomp-common-configuration-management/pom.xml @@ -17,7 +17,6 @@ <modules> <module>openecomp-configuration-management-api</module> <module>openecomp-configuration-management-core</module> - <module>openecomp-configuration-management-cli</module> <module>openecomp-configuration-management-test</module> </modules> diff --git a/docs/index.rst b/docs/index.rst index 833e1aa969..b4ceb80ea6 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,8 +1,10 @@ .. This work is licensed under a Creative Commons Attribution 4.0 International License. -TODO Add files to toctree and delete this header ------------------------------------------------- -.. toctree:: - :maxdepth: 1 +SDC Documentation +================= +.. toctree:: + :maxdepth: 2 + releases/index + onap-developer/index diff --git a/docs/onap-developer/docs-templates-platform-component-administration.rst b/docs/onap-developer/docs-templates-platform-component-administration.rst new file mode 100644 index 0000000000..1d512cf020 --- /dev/null +++ b/docs/onap-developer/docs-templates-platform-component-administration.rst @@ -0,0 +1,19 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 + + +Administration +-------------- +Describe expected changes and the processes and actions taken for each. + + +Processes ++++++++++ +* Process 1 +* Process 2 + +Actions ++++++++ +* Action X +* Action Y + diff --git a/docs/onap-developer/docs-templates-platform-component-architecture.rst b/docs/onap-developer/docs-templates-platform-component-architecture.rst new file mode 100644 index 0000000000..fd46637fd1 --- /dev/null +++ b/docs/onap-developer/docs-templates-platform-component-architecture.rst @@ -0,0 +1,7 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 + + +Architecture +------------ +Describe the architecture and design of the platform component. diff --git a/docs/onap-developer/docs-templates-platform-component-configuration.rst b/docs/onap-developer/docs-templates-platform-component-configuration.rst new file mode 100644 index 0000000000..c0c969f854 --- /dev/null +++ b/docs/onap-developer/docs-templates-platform-component-configuration.rst @@ -0,0 +1,19 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 + +Configuration +------------- +Describe configurations how to provide parameters and value + +Basic Setup ++++++++++++ + +You can provide the following in ``basic.conf`` + +``host=ADDRESS`` + The address of the host + +``port=PORT`` + The port used for signaling + + Optional. Default: ``8080`` diff --git a/docs/onap-developer/docs-templates-platform-component-consumedapis.rst b/docs/onap-developer/docs-templates-platform-component-consumedapis.rst new file mode 100644 index 0000000000..c4309cdb12 --- /dev/null +++ b/docs/onap-developer/docs-templates-platform-component-consumedapis.rst @@ -0,0 +1,8 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 + +Consumed APIs +============= +References to APIs offered by other components + + diff --git a/docs/onap-developer/docs-templates-platform-component-delivery.rst b/docs/onap-developer/docs-templates-platform-component-delivery.rst new file mode 100644 index 0000000000..cfcab0449b --- /dev/null +++ b/docs/onap-developer/docs-templates-platform-component-delivery.rst @@ -0,0 +1,31 @@ +Delivery +-------- +Describe how functions are packaged into run-time components. +For some components a block diagram may be useful. + +.. blockdiag:: + + + blockdiag layers { + orientation = portrait + a -> m; + b -> n; + c -> x; + m -> y; + m -> z; + group l1 { + color = blue; + x; y; z; + } + group l2 { + color = yellow; + m; n; + } + group l3 { + color = orange; + a; b; c; + } + + } + + diff --git a/docs/onap-developer/docs-templates-platform-component-humaninterfaces.rst b/docs/onap-developer/docs-templates-platform-component-humaninterfaces.rst new file mode 100644 index 0000000000..03cc875edf --- /dev/null +++ b/docs/onap-developer/docs-templates-platform-component-humaninterfaces.rst @@ -0,0 +1,19 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 + +Human Interfaces +---------------- +Provide info on the targeted user, interface types, ports/protocols to access, etc. + +Target Users +++++++++++++ + +Interface Type +++++++++++++++ + +Access +++++++ + + + + diff --git a/docs/onap-developer/docs-templates-platform-component-index.rst b/docs/onap-developer/docs-templates-platform-component-index.rst new file mode 100644 index 0000000000..d5db511f1e --- /dev/null +++ b/docs/onap-developer/docs-templates-platform-component-index.rst @@ -0,0 +1,20 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 + +Platform Component +================== +Provide an overview of the ONAP Platform component capabilities here. +Add or remove sections below as appropriate for the platform component. + +.. toctree:: + :maxdepth: 1 + + architecture.rst + offeredapis.rst + consumedapis.rst + delivery.rst + logging.rst + installation.rst + configuration.rst + administration.rst + humaninterfaces.rst diff --git a/docs/onap-developer/docs-templates-platform-component-installation.rst b/docs/onap-developer/docs-templates-platform-component-installation.rst new file mode 100644 index 0000000000..3238236c43 --- /dev/null +++ b/docs/onap-developer/docs-templates-platform-component-installation.rst @@ -0,0 +1,14 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 + +Installation +------------ +Describe the environment and steps to install. + + +Environment ++++++++++++ + + +Steps ++++++ diff --git a/docs/onap-developer/docs-templates-platform-component-logging.rst b/docs/onap-developer/docs-templates-platform-component-logging.rst new file mode 100644 index 0000000000..8d480e2832 --- /dev/null +++ b/docs/onap-developer/docs-templates-platform-component-logging.rst @@ -0,0 +1,14 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 + +Logging & Diagnostic Information +-------------------------------- +Description of how to interact with and diagnose problems with the components +as delivered. + +Where to Access Information ++++++++++++++++++++++++++++ + + +Error / Warning Messages +++++++++++++++++++++++++ diff --git a/docs/onap-developer/docs-templates-platform-component-offeredapis.rst b/docs/onap-developer/docs-templates-platform-component-offeredapis.rst new file mode 100644 index 0000000000..55e58bd9b3 --- /dev/null +++ b/docs/onap-developer/docs-templates-platform-component-offeredapis.rst @@ -0,0 +1,29 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 + + +Offered APIs +============ +List APIs offered. One or more of the following examples may be appropriate. + +Example Swagger Displayed with swaggerv2doc directive +----------------------------------------------------- + +.. swaggerv2doc:: https://gerrit.onap.org/r/gitweb?p=vfc/nfvo/lcm.git;a=blob_plain;f=lcm/swagger/vfc.nslcm.swagger.json + + +Example documenting a REST interface with Sphinx httpdomain directive +--------------------------------------------------------------------- + +.. http:get:: path + + For more information see `<https://pythonhosted.org/sphinxcontrib-httpdomain>`_ + + +Word Document Converted to RST using Pandocs +-------------------------------------------- + +.. toctree:: + :maxdepth: 1 + + ../../submodules/appc.git/docs/APPC API Guide/APPC API Guide diff --git a/docs/releases/docs-templates-release-notes-bug-fixes.rst b/docs/releases/docs-templates-release-notes-bug-fixes.rst new file mode 100644 index 0000000000..ee4ff9faf2 --- /dev/null +++ b/docs/releases/docs-templates-release-notes-bug-fixes.rst @@ -0,0 +1,5 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. + +Bug Fixes +--------- + diff --git a/docs/releases/docs-templates-release-notes-deprecation-notes.rst b/docs/releases/docs-templates-release-notes-deprecation-notes.rst new file mode 100644 index 0000000000..e954e8764c --- /dev/null +++ b/docs/releases/docs-templates-release-notes-deprecation-notes.rst @@ -0,0 +1,5 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. + +Deprecation Notes +----------------- + diff --git a/docs/releases/docs-templates-release-notes-index.rst b/docs/releases/docs-templates-release-notes-index.rst new file mode 100644 index 0000000000..adc76f935c --- /dev/null +++ b/docs/releases/docs-templates-release-notes-index.rst @@ -0,0 +1,15 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. + +Release Notes +============= + +.. toctree:: + :maxdepth: 2 + + new-features.rst + bug-fixes.rst + known-issues.rst + security-issues.rst + upgrade-notes.rst + deprecation-notes.rst + other.rst diff --git a/docs/releases/docs-templates-release-notes-known-issues.rst b/docs/releases/docs-templates-release-notes-known-issues.rst new file mode 100644 index 0000000000..01c93d124a --- /dev/null +++ b/docs/releases/docs-templates-release-notes-known-issues.rst @@ -0,0 +1,5 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. + +Known Issues +------------ + diff --git a/docs/releases/docs-templates-release-notes-new-features.rst b/docs/releases/docs-templates-release-notes-new-features.rst new file mode 100644 index 0000000000..ab86bb9497 --- /dev/null +++ b/docs/releases/docs-templates-release-notes-new-features.rst @@ -0,0 +1,5 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. + +New Features +------------ + diff --git a/docs/releases/docs-templates-release-notes-other.rst b/docs/releases/docs-templates-release-notes-other.rst new file mode 100644 index 0000000000..2ce683b5bf --- /dev/null +++ b/docs/releases/docs-templates-release-notes-other.rst @@ -0,0 +1,5 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. + +Other +----- + diff --git a/docs/releases/docs-templates-release-notes-security-issues.rst b/docs/releases/docs-templates-release-notes-security-issues.rst new file mode 100644 index 0000000000..96e1fe95e0 --- /dev/null +++ b/docs/releases/docs-templates-release-notes-security-issues.rst @@ -0,0 +1,5 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. + +Security Issues +--------------- + diff --git a/docs/releases/docs-templates-release-notes-upgrade-notes.rst b/docs/releases/docs-templates-release-notes-upgrade-notes.rst new file mode 100644 index 0000000000..f31c74a696 --- /dev/null +++ b/docs/releases/docs-templates-release-notes-upgrade-notes.rst @@ -0,0 +1,5 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. + +Upgrade Notes +------------- + diff --git a/docs/releases/index.rst b/docs/releases/index.rst new file mode 100644 index 0000000000..eabde3a24e --- /dev/null +++ b/docs/releases/index.rst @@ -0,0 +1,32 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. + + +Releases +======== +ONAP is developed and released around 6 month cycles. After an initial major release, additional +stable point releases may be created. + +Major Releases +-------------- + +.. csv-table:: + :align: left + :header-rows: 0 + :header: "Release", "Status", "Initial Release Date", "Next Phase", "EOL Date" + :widths: 15, 10, 10, 15, 10 + + "Amsterdam", "Under Development", "TBD", "", "" + "R1.0.0 Seed Code", "EOL", "2017-04-XX", "", "" + + +.. include:: repolist.rst + + +Cryptographic Signatures +------------------------ + + +References +---------- + + diff --git a/onboarding/pom.xml b/onboarding/pom.xml index b3aa4d6493..5bd0f3a106 100644 --- a/onboarding/pom.xml +++ b/onboarding/pom.xml @@ -112,7 +112,7 @@ <executions> <execution> <id>jxr-generation</id> - <phase>validate</phase> + <phase>verify</phase> <goals> <goal>jxr</goal> <goal>test-jxr</goal> @@ -135,7 +135,7 @@ <executions> <execution> <id>pmd-check</id> - <phase>validate</phase> + <phase>verify</phase> <goals> <!-- violations fail build --> <goal>check</goal> @@ -123,7 +123,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> - <version>2.10.4</version> + <version>3.0.0-M1</version> <configuration> <failOnError>false</failOnError> <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet> @@ -272,7 +272,6 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-site-plugin</artifactId> - <version>3.4</version> <dependencies> <dependency> <groupId>org.apache.maven.wagon</groupId> diff --git a/sdc-os-chef/pom.xml b/sdc-os-chef/pom.xml index 3ad8a4b811..a4c8036214 100644 --- a/sdc-os-chef/pom.xml +++ b/sdc-os-chef/pom.xml @@ -4,6 +4,8 @@ <modelVersion>4.0.0</modelVersion> <artifactId>sdc-os-chef</artifactId> + <packaging>pom</packaging> + <parent> <groupId>org.openecomp.sdc</groupId> @@ -32,24 +34,47 @@ <configuration> <filesets> <fileset> - <directory> - ${project.basedir}\sdc-cassandra\chef-repo\cookbooks\cassandra-actions\attributes\ - </directory> + <directory>${project.basedir}\sdc-cassandra\chef-repo\cookbooks\cassandra-actions\attributes\</directory> <followSymlinks>false</followSymlinks> <includes> <include>**/default.rb</include> </includes> </fileset> - <!-- static configuration files --> - <fileset> - <directory>${project.parent.basedir}/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/files/default</directory> - <includes> + <!-- static configuration files --> + <fileset> + <directory>${project.parent.basedir}/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/files/default</directory> + <followSymlinks>false</followSymlinks> + <includes> <include>Artifact-Generator.properties</include> <include>error-configuration.yaml</include> <include>ecomp-error-configuration.yaml</include> <include>logback.xml</include> </includes> </fileset> + <!-- BE WAR's --> + <fileset> + <directory>${project.parent.basedir}/sdc-os-chef/sdc-backend</directory> + <followSymlinks>false</followSymlinks> + <includes> + <include>*.war</include> + </includes> + </fileset> + <!-- FE WAR's --> + <fileset> + <directory>${project.parent.basedir}/sdc-os-chef/sdc-frontend/</directory> + <followSymlinks>false</followSymlinks> + <includes> + <include>*.war</include> + </includes> + </fileset> + <fileset> + <directory>${project.basedir}/sdc-backend/chef-repo/cookbooks/sdc-normatives/files/default</directory> + <followSymlinks>false</followSymlinks> + <includes> + <include>normatives.tar.gz</include> + </includes> + </fileset> + </filesets> </configuration> </execution> @@ -157,6 +182,12 @@ <configuration> <outputDirectory>${basedir}/sdc-backend</outputDirectory> <resources> + <resource> + <directory>${project.parent.basedir}/catalog-be/target</directory> + <includes> + <include>catalog-be-${project.version}.war</include> + </includes> + </resource> <resource> <directory> ${project.parent.basedir}/openecomp-be/api/openecomp-sdc-rest-webapp/onboarding-rest-war/target @@ -168,6 +199,7 @@ </resources> </configuration> </execution> + <execution> <id>copy-resources-fe</id> <phase>validate</phase> @@ -177,6 +209,12 @@ <configuration> <outputDirectory>${basedir}/sdc-frontend</outputDirectory> <resources> + <resource> + <directory>${project.parent.basedir}/catalog-fe/target</directory> + <includes> + <include>catalog-fe-${project.version}.war</include> + </includes> + </resource> <resource> <directory>${project.parent.basedir}/openecomp-ui/target</directory> <includes> @@ -186,6 +224,7 @@ </resources> </configuration> </execution> + <execution> <id>copy-tests-suites</id> <phase>validate</phase> @@ -222,6 +261,24 @@ </resources> </configuration> </execution> + <execution> + <id>copy-normatives</id> + <phase>validate</phase> + <goals> + <goal>copy-resources</goal> + </goals> + <configuration> + <outputDirectory>${project.parent.basedir}/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-normatives/files/default</outputDirectory> + <resources> + <resource> + <directory>${project.parent.basedir}/catalog-be/target</directory> + <includes> + <include>normatives.tar.gz</include> + </includes> + </resource> + </resources> + </configuration> + </execution> </executions> </plugin> diff --git a/sdc-os-chef/sdc-backend/Dockerfile b/sdc-os-chef/sdc-backend/Dockerfile index 9052e74b52..dd38726be3 100644 --- a/sdc-os-chef/sdc-backend/Dockerfile +++ b/sdc-os-chef/sdc-backend/Dockerfile @@ -4,8 +4,6 @@ COPY chef-solo /root/chef-solo/ COPY chef-repo/cookbooks/. /root/chef-solo/cookbooks/ -#RUN python /root/chef-solo/cookbooks/sdc-normatives/files/default/get-pip.py - ADD onboarding-be-*.war ${JETTY_BASE}/webapps/ ADD catalog-be-*.war ${JETTY_BASE}/webapps/ diff --git a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb b/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb index df9e74ad51..a4be8b10d0 100644 --- a/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb +++ b/sdc-os-chef/sdc-backend/chef-repo/cookbooks/sdc-catalog-be/templates/default/BE-configuration.yaml.erb @@ -126,7 +126,7 @@ artifactTypes: - SNMP_POLL - SNMP_TRAP - GUIDE - + - PLAN licenseTypes: - User @@ -305,6 +305,11 @@ serviceDeploymentArtifacts: OTHER: acceptedTypes: +#PLAN + PLAN: + acceptedTypes: + - xml + resourceDeploymentArtifacts: HEAT: acceptedTypes: @@ -422,6 +427,14 @@ resourceDeploymentArtifacts: acceptedTypes: validForResourceTypes: *allResourceTypes +#PLAN + PLAN: + acceptedTypes: + - xml + validForResourceTypes: + - VF + - VFC + resourceInstanceDeploymentArtifacts: HEAT_ENV: acceptedTypes: @@ -459,6 +472,11 @@ resourceInstanceDeploymentArtifacts: acceptedTypes: validForResourceTypes: *allResourceTypes +#PLAN + PLAN: + acceptedTypes: + - xml + resourceInformationalArtifacts: CHEF: acceptedTypes: diff --git a/sdc-os-chef/sdc-backend/startup.sh b/sdc-os-chef/sdc-backend/startup.sh index cfdab442d4..87f4ae674d 100644 --- a/sdc-os-chef/sdc-backend/startup.sh +++ b/sdc-os-chef/sdc-backend/startup.sh @@ -6,7 +6,7 @@ cd /root/chef-solo echo "normal['HOST_IP'] = \"${HOST_IP}\"" > /root/chef-solo/cookbooks/sdc-catalog-be/attributes/default.rb chef-solo -c solo.rb -E ${CHEFNAME} -sed -i '/^set -e/aJAVA_OPTIONS=\" -XX:MaxPermSize=256m -Xmx1500m -Dconfig.home=${JETTY_BASE}\/config -Dlog.home=${JETTY_BASE}\/logs -Dlogback.configurationFile=${JETTY_BASE}\/config\/catalog-be\/logback.xml -Dconfiguration.yaml=${JETTY_BASE}\/config\/catalog-be\/configuration.yaml -Dartifactgenerator.config=${JETTY_BASE}\/config\/catalog-be\/Artifact-Generator.properties\ -Donboarding_configuration.yaml=${JETTY_BASE}\/config\/onboarding-be\/onboarding_configuration.yaml" ' /docker-entrypoint.sh +sed -i '/^set -e/aJAVA_OPTIONS=\"-Xdebug -agentlib:jdwp=transport=dt_socket,address=4000,server=y,suspend=n -XX:MaxPermSize=256m -Xmx1500m -Dconfig.home=${JETTY_BASE}\/config -Dlog.home=${JETTY_BASE}\/logs -Dlogback.configurationFile=${JETTY_BASE}\/config\/catalog-be\/logback.xml -Dconfiguration.yaml=${JETTY_BASE}\/config\/catalog-be\/configuration.yaml -Dartifactgenerator.config=${JETTY_BASE}\/config\/catalog-be\/Artifact-Generator.properties\ -Donboarding_configuration.yaml=${JETTY_BASE}\/config\/onboarding-be\/onboarding_configuration.yaml" ' /docker-entrypoint.sh sed -i '/^set -e/aTMPDIR=${JETTY_BASE}\/temp' /docker-entrypoint.sh # executiong the jetty diff --git a/test-apis-ci/pom.xml b/test-apis-ci/pom.xml index 66cef3625c..875888facc 100644 --- a/test-apis-ci/pom.xml +++ b/test-apis-ci/pom.xml @@ -11,6 +11,10 @@ <version>1.2.0-SNAPSHOT</version> </parent> + <properties> + <sonar.skip>true</sonar.skip> + </properties> + <dependencies> <dependency> <groupId>com.google.guava</groupId> diff --git a/ui-ci/pom.xml b/ui-ci/pom.xml index d55a93fb73..20597acbde 100644 --- a/ui-ci/pom.xml +++ b/ui-ci/pom.xml @@ -11,6 +11,10 @@ <artifactId>sdc-main</artifactId> <version>1.2.0-SNAPSHOT</version> </parent> + + <properties> + <sonar.skip>true</sonar.skip> + </properties> <dependencies> <dependency> |