summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/developer_info/Cxf_Logging.rst210
-rw-r--r--docs/developer_info/developer_information.rst1
-rw-r--r--docs/developer_info/mso_adapter_restinterface.rst288
-rw-r--r--docs/images/module_structure.pngbin0 -> 48237 bytes
-rw-r--r--docs/images/msoexception.pngbin0 -> 21299 bytes
-rw-r--r--docs/images/nwrest.pngbin0 -> 33101 bytes
-rw-r--r--docs/images/tenantrest.pngbin0 -> 18497 bytes
-rw-r--r--docs/images/vnfrest.pngbin0 -> 28088 bytes
8 files changed, 499 insertions, 0 deletions
diff --git a/docs/developer_info/Cxf_Logging.rst b/docs/developer_info/Cxf_Logging.rst
new file mode 100644
index 0000000000..ea2bbf56ce
--- /dev/null
+++ b/docs/developer_info/Cxf_Logging.rst
@@ -0,0 +1,210 @@
+.. This work is licensed under a Creative Commons Attribution 4.0 International License.
+.. http://creativecommons.org/licenses/by/4.0
+.. Copyright 2020 Huawei Technologies Co., Ltd.
+
+CXF-logging:
+=============
+It is a logging framework from SO. Here basically we are having 2 interceptors which extends AbstractSoapInterceptor.
+
+SOAPLoggingInInterceptor:
++++++++++++++++++++++++++++
+
+* This interceptor is responsible for Capturing requestId , client ip address , invocation id, service name, instance id, entry timestamp , log timestamp, Elapsed time for each request and update the MDC logger with staus In-progress.
+
+SOAPLoggingOutInterceptor:
+++++++++++++++++++++++++++++
+* This interceptor is responsible for log timestamp , elapsed time for each request and checks for if there is any exception update the MDC loggers with 500 response code otherwise update the status as completed.
+
+
+cxf-logging Used By below components of SO:
+++++++++++++++++++++++++++++++++++++++++++++
+The cxf-logging framework is used by below components of so.
+
+mso-openstack-adapter.
+mso-requests-db-adapter.
+mso-sdnc-adapter.
+mso-infrastructure-bpmn.
+
+cxf-logging dependency for using in other components:
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
+
+ <dependency>
+ <groupId>org.onap.so</groupId>
+ <artifactId>cxf-logging</artifactId>
+ <version>${project.version}</version>
+
+ </dependency>
+
+pom.xml:
++++++++++
+<?xml version="1.0"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
+ 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>
+ <parent>
+
+ <groupId>org.onap.so</groupId>
+ <artifactId>so</artifactId>
+ <version>1.6.0-SNAPSHOT</version>
+
+ </parent>
+ <name>CXFLogging</name>
+ <description>Common CXF Logging Classes</description>
+ <dependencies>
+
+ <dependency>
+
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-rs-client</artifactId>
+ <version>${cxf.version}</version>
+
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-bindings-soap</artifactId>
+ <version>${cxf.version}</version>
+
+ </dependency>
+
+ <dependency>
+
+ <groupId>org.apache.cxf</groupId>
+ <artifactId>cxf-rt-transports-http</artifactId>
+ <version>${cxf.version}</version>
+
+ </dependency>
+
+ <dependency>
+
+ <groupId>javax.servlet</groupId>
+ <artifactId>javax.servlet-api</artifactId>
+
+ </dependency>
+
+ <dependency>
+
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-ext</artifactId>
+
+ </dependency>
+
+ <dependency>
+
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>true</filtering>
+
+ </resource>
+
+ <resource>
+
+ <directory>src/main/java</directory>
+
+ <includes>
+
+ <include>*.java</include>
+
+ </includes>
+
+ </resource>
+
+ </resources>
+
+ </build>
+
+ <artifactId>cxf-logging</artifactId>
+
+</project>
+
+Configuration file:
+++++++++++++++++++++
+Here we can do configure the logger properties for the cxf-logging.
+
+<configuration>
+
+ <property name="p_tim" value="%d{&quot;yyyy-MM-dd'T'HH:mm:ss.SSSXXX&quot;, UTC}"/>
+
+ <property name="p_lvl" value="%level"/>
+
+ <property name="p_log" value="%logger"/>
+
+ <property name="p_mdc" value="%replace(%replace(%mdc){'\t','\\\\t'}){'\n', '\\\\n'}"/>
+
+ <property name="p_msg" value="%replace(%replace(%msg){'\t', '\\\\t'}){'\n','\\\\n'}"/>
+
+ <property name="p_exc" value="%replace(%replace(%rootException){'\t', '\\\\t'}){'\n','\\\\n'}"/>
+
+ <property name="p_mak" value="%replace(%replace(%marker){'\t', '\\\\t'}){'\n','\\\\n'}"/>
+
+ <property name="p_thr" value="%thread"/>
+
+ <property name="pattern" value="%nopexception${p_tim}\t${p_thr}\t${p_lvl}\t${p_log}\t${p_mdc}\t${p_msg}\t${p_exc}\t${p_mak}\t%n"/>
+
+ <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+
+ <encoder>
+
+ <pattern>${pattern}</pattern>
+
+ </encoder>
+
+ </appender>
+
+ <appender name="test"
+ class="org.onap.so.utils.TestAppender" />
+
+ <logger name="com.att.ecomp.audit" level="info" additivity="false">
+
+ <appender-ref ref="STDOUT" />
+
+ </logger>
+
+ <logger name="com.att.eelf.metrics" level="info" additivity="false">
+
+ <appender-ref ref="STDOUT" />
+
+ </logger>
+
+ <logger name="com.att.eelf.error" level="WARN" additivity="false">
+
+ <appender-ref ref="STDOUT" />
+
+ </logger>
+
+ <logger name="org.onap" level="${so.log.level:-DEBUG}" additivity="false">
+ <appender-ref ref="STDOUT" />
+
+ <appender-ref ref="test" />
+
+ </logger>
+
+ <logger name="org.flywaydb" level="DEBUG" additivity="false">
+ <appender-ref ref="STDOUT" />
+
+ </logger>
+
+ <logger name="ch.vorburger" level="WARN" additivity="false">
+ <appender-ref ref="STDOUT" />
+
+ </logger>
+
+ <root level="WARN">
+ <appender-ref ref="STDOUT" />
+ <appender-ref ref="test" />
+
+ </root>
+
+</configuration>
+
diff --git a/docs/developer_info/developer_information.rst b/docs/developer_info/developer_information.rst
index 1b9e83b840..a060da60b0 100644
--- a/docs/developer_info/developer_information.rst
+++ b/docs/developer_info/developer_information.rst
@@ -21,5 +21,6 @@ SO Developer Information
BPMN_Project_Deployment_Strategy.rst
BPMN-INFRA_Workflow_Understanding.rst
Mso_Openstack_Adapter.rst
+ Cxf_Logging.rst
instantiate/index.rst
FAQs.rst
diff --git a/docs/developer_info/mso_adapter_restinterface.rst b/docs/developer_info/mso_adapter_restinterface.rst
new file mode 100644
index 0000000000..49a9cadba4
--- /dev/null
+++ b/docs/developer_info/mso_adapter_restinterface.rst
@@ -0,0 +1,288 @@
+Mso-adapters-rest-interface
+---------------------------
+.. image:: ../images/module_structure.png
+
+It mainly contains the payload that is provided to different rest calls in SO
+
+Network
+--------
+# 1. Network contain beans( classes with multiple attributes and thier setters and getters) and their corresponding mappers which will be used by the network adapter of SO. Contrail networking is used for cloud network automation
+
+Beans
+-----
+ # a. ContrailPolicyRef : this class has following attribute
+ private ContrailPolicyRefSeq seq;
+
+ Usage: adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java- while creating network in openstack, network stack is created depending on stackParams. So if pFqdns(FQDN address object is used in order to use DNS names in firewall policies) are there in the inputrequest to createNetwork, then mergePolicyRefs method is called, where for each input pFqdns, a new ContrailPolicyRef is created and appended to a list. Then this is added as value to stackParams with policy_refsdata as key.
+
+ # b. ContrailPolicyRefSeq : Attributes are
+ private String major;
+
+ private String minor ;
+
+ Usage: adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java- As this is an attribute to the ContrailPolicyRef explained above. So when a new ContrailPolicyRef() is created in mergePolicyRefs method, correspondingly a new ContrailPolicyRefSeq should be created.
+
+ # c. ContrailSubnet – Its a subnetwork having attributes
+ private ContrailSubnetIp subnet = new ContrailSubnetIp();
+
+ private String defaultGateway;
+
+ private String subnetName;
+
+ private Boolean enableDhcp(dynamic host config);
+
+ private Boolean addrFromStart = true;
+
+ private List<ContrailSubnetPool> allocationPools = new ArrayList<>();
+
+ private ContrailSubnetHostRoutes hostRoutes = new ContrailSubnetHostRoutes();
+
+ Usage : adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java- While creating network mergeSubnetsAIC3 is called if a list of subnets are present. The subnets are mapped to ContrailSubnet using ContrailSubnetMapper, and then are added to the heat template and stackparams which are used for network creation in openstack.
+
+ # d. ContrailSubnetHostRoute : This is an attribute defined in contrailsubnet and has following attributes
+ private String prefix;
+
+ private String nextHop;
+
+ Usage : This is an attribute of ContrailSubnetHostRoutes , which is used within the contrailSubnet and thus is used in network creation and updation.
+
+ # e. ContrailSubnetHostRoutes : This class is used to store an list of ContrailSubnetHostRoute
+
+ private List<ContrailSubnetHostRoute> hostRoutes = new ArrayList<>();
+
+ Usage : attribute of contrailSubnet
+
+ # f. ContrailSubnetIp : attributes are
+ private String ipPrefix;
+
+ private String ipPrefixLen;
+
+ This class is used to store the cidr value , which is used as a interrouting table, taking as ipaddress/total no . Eg : 10.0.0.0/24 means starting ip is 10.0.0.0, and total no of ip address possible here is 256 (2^(32-24)), the last address being 10.0.0.255.
+
+ Usage : important attribute of contrailSubnet
+
+ # g. ContrailSubnetPool : attributes are starting and ending ip address of the subnet
+ private String start;
+
+ private String end;
+
+ Usage: a list of ContrailSubnetPool forms an important attribute of contrailSubnet
+
+Mappers
+-------
+
+ # a. ContrailSubnetMapper : It is used to map the inputsubnet to a contrailSubnet
+ public ContrailSubnetMapper(Subnet inputSubnet) {
+ this.inputSubnet = inputSubnet;
+
+ }
+
+ The map method within is used for the mapping. Here first a contrailSubnet is created, and depending on whether the subnet has name or id, the contrailSubnet’s name is initialized, then if it has cidr , then a contrailSubnetIp is created, and is added into it, which is then added to contrailSubnet created before. Depending on whether input has allocationpool or hostroutes, these are casted into ContrailSubnetPool and ContrailSubnetHostRoute using ContrailSubnetPoolMapper and ContrailSubnetPoolMapper respectively.
+
+ Usage: adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/network/MsoNetworkAdapterImpl.java :The subnets are mapped to ContrailSubnet using ContrailSubnetMapper, and then are added to the heat template and stackparams which are used for network creation
+
+ # b. ContrailSubnetPoolMapper : It is used to map the pool within the subnets to contrailSubnetPool. Used within contrailSubnetMapper. Here, the particular pool is added only if it has both the start and end ip address.
+
+ # c. ContrailSubnetHostRoute : It is used to map the host routes within the subnets to contrailSubnetHostRoute. Used within contrailSubnetMapper. Here, the particular host route is added if either of the next hop or ip prefix is defined.
+
+Network request
+---------------
+
+#2. Network request : It contains the payloads for different types of network requests
+
+ # a. ContrailNetwork :
+ private String shared = "false";
+
+ private String external = "false";
+
+ private List<RouteTarget> routeTargets;
+
+ private List<String> policyFqdns;
+
+ private List<String> routeTableFqdns;
+
+ Usage: contrailNetwork is an important attribute of CreateNetworkRequest, So is to be used where all the request to createNetwork is required.
+
+ # 1. adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tasks/orchestration/StackService.java : Here the input to createNetwork requires contrailNetwork parameter, so here it checks whether contrailNetwork is already present, if not a new is created.
+
+ # 2.bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapper.java : Here in createNetworkRequestMapper, createNetworkRequest is formed where in buildContrailNetwork, a new contrailNetwork is created and initialized. This request is used to create a network and set the corresponding execution variable
+
+ # b. CreateNetworkError: It extends NetworkExceptionResponse. And is used when an error occurs during network creation
+
+ # c. NetworkExceptionResponse : it extends NetworkResponseCommon. Attributes are
+ private String message;
+
+ private MsoExceptionCategory category;
+
+ private Boolean rolledBack;
+
+ # d. NetworkResponseCommon: Attribute is
+ private String messageId;
+
+ # e. CreateNetworkRequest: extends NetworkRequestCommon
+ private String cloudSiteId;
+
+ private String tenantId;
+
+ private String networkId;
+
+ private String networkName;
+
+ private String networkType;
+
+ private String networkTypeVersion;
+
+ private String modelCustomizationUuid;
+
+ private String networkTechnology = "NEUTRON";
+
+ private List<Subnet> subnets;
+
+ private ProviderVlanNetwork providerVlanNetwork;
+
+ private ContrailNetwork contrailNetwork;
+
+ private Boolean failIfExists = false;
+
+ private Boolean backout = true;
+
+ private Map<String, String> networkParams = new HashMap<>();
+
+ private MsoRequest msoRequest = new MsoRequest();
+
+ private boolean contrailRequest;
+
+ Usage :
+ #1) bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIQueryTasks.java: Here in getNetworkVpnBinding, where VPN Binding data from AAI result is extracted. There in routeTargets is got, and is updated in the execution variable(“createNetworkRequest”).
+
+ #2)bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/network/tasks/NetworkAdapterCreateTasks.java – Here in createnetwork returns a CreateNetworkRequest which is updated in execution variable(“networkAdapterRequest”)
+
+ #3)bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/flowspecific/tasks/CreateNetwork.java -
+ Here in createnetwork returns a CreateNetworkRequest which is updated in execution variable(“createNetworkRequest”)
+
+ #4) bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/NetworkAdapterClientImpl.java -Here createNetwork request is processed as a restclient post process with CreateNetworkRequest as input.
+
+ # f. CreateNetworkResponse : extends NetworkResponseCommon
+ private String networkId;
+
+ private String neutronNetworkId;
+
+ private String networkStackId;
+
+ private String networkFqdn;
+
+ private Boolean networkCreated;
+
+ private Map<String, String> subnetMap;
+
+ private NetworkRollback rollback = new NetworkRollback();
+
+ Usage:
+ #1)bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/aai/tasks/AAIUpdateTasks.java :here after the network is created, the l3 network is updated with those parameters which come from execution variable("createNetworkResponse")
+
+ #2)bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/network/tasks/NetworkAdapterCreateTasks.java – depending on variable networkCreated of response, networkAdapterCreateRollback is set to true.
+
+ #3)bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/NetworkAdapterClientImpl.java -Here createNetwork request is processed as a restclient post process with CreateNetworkRequest as input and CreateNetworkResponse as output
+
+ # g.DeleteNetworkError : extends NetworkExceptionResponse
+
+ # h. DeleteNetworkRequest:extends NetworkRequestCommon
+ private String cloudSiteId;
+
+ private String tenantId;
+
+ private String networkId;
+
+ private String networkStackId;
+
+ private String networkType;
+
+ private String modelCustomizationUuid;
+
+ private MsoRequest msoRequest = new MsoRequest();
+
+ Usage:
+ #1)bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/network/tasks/NetworkAdapterDeleteTasks.java – deleteNetworkRequestMapper returns a DeleteNetworkRequest, which is set to the execution variable(“networkAdapterRequest”)
+
+ #2)bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/NetworkAdapterClientImpl.java - Here deleteNetwork request is processed as a restclient delete process with DeleteNetworkRequest as input.
+
+ #3)bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/network/mapper/NetworkAdapterObjectMapper.java – Here the deleteNetworkRequestMapper forms DeleteNetworkRequest object
+
+ Similarly others are also implemented and used
+
+.. image:: ../images/nwrest.png
+
+Sdnc request
+------------
+
+#3. Sdnc request -These are required by the mso-sdnc-adapter
+
+ # a. RequestInformation – This is an important parameter of SDNCServiceRequest. Thud is used during the conversion of SDNCServiceRequest to XMLstring.
+
+ # b. ServiceInformation – This stores the important information like serviceId, servicetype and SubscriberName. Its parameter of SDNCServiceRequest.
+
+ # c. SDNCErrorCommon – it extends SDNCResponseCommon .
+
+ Usage : adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestConnector.java – catching exception if any happens during request creation and a new SDNCErrorCommon is created.
+
+ # d. SDNCRequestCommon – SDNCServiceRequest extends SDNCRequestCommon. It has some attributes like bpNotificationUrl(Endpoint on which BPMN can receive notifications from the SDNC adapter), bpTimeout ans sdncrequestId.
+
+ # e. SDNCServiceRequest
+ Usage: adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java – Here the runRequest is happening, where we are posting this request using a restclient call with SDNCServiceRequest as input.
+
+ # f. SDNCServiceResponse and SDNCServiceError
+ Usage:adapters/mso-sdnc-adapter/src/main/java/org/onap/so/adapters/sdnc/sdncrest/SDNCServiceRequestTask.java – Here if the above runRequest returns a 2xx response code then a corresponding SDNCServiceResponse is created and returned or else SDNCServiceError is created and returned
+
+Tenant request
+---------------
+
+#4. These provide classes to be used by the so-adapters.tenant.
+
+The operator of a cloud can present unchangeable networks to the users, or give users the option to create, delete, connect and generally manipulate networks. The latter type of networks is called “tenant networks”.
+
+Used in adapters/mso-openstack-adapters/src/main/java/org/onap/so/adapters/tenant/TenantAdapterRest.java
+
+The implementation and usage is similiar to the above classes
+
+.. image:: ../images/tenantrest.png
+
+VDU
+---
+
+#5. Vdu – these are used for the deployment and management of (cloud-agnostic) VDU . The abstract classes for instantiation of vdu, query vdu, delete vdu, update vdu are defined in here.
+
+These are implemented in adapters/mso-adapter-utils/src/main/java/org/onap/so/cloudify/utils/MsoCloudifyUtils.java and adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoHeatUtils.java
+
+Vnfrest
+-------
+
+#6. Vnfrest – These are used to manage vnfs and vgs.
+These are used in the project similiar to networkrest
+Foreg : Usage of DeleteVfModuleRequest:
+
+1)bpmn/so-bpmn-tasks/src/main/java/org/onap/so/bpmn/infrastructure/adapter/vnf/tasks/VnfAdapterDeleteTasks.java – Here in deleteVfModuleRequestMapper creates a new DeleteVfModuleRequest, and is set to the execution variable(“VNFREST_REQUEST” ) and “deleteVfModuleRequest” execution variable is set true
+
+2)bpmn/so-bpmn-tasks/src/main/java/org/onap/so/client/adapter/vnf/VnfAdapterClientImpl.java - Here a delete rest request is send
+
+.. image:: ../images/vnfrest.png
+
+
+OPENSTACK
+---------
+Openstack is classified into beans, exceptions, and mappers
+
+MAPPERS
+-------
+ # 1) JAXBContext: It is used to convert a object to xml(marshalling) and to convert xml to object (unmarshalling) . These marshalling and unmarshalling are overriden in the map adapters in mappers.
+
+ # 2)NetworkInfoMapper – used to Capture the data from a Neutron Network object and cast it into a networkInfo( present in beans of openstack). Here in vlan information is located depending on network.getProviderNetworkType() , and if not then the segments within the network is iterated and is checked for the same.
+ Usage: It is used in adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils/MsoNeutronUtils.java , where on createNetwork, queryNetwork and updateNetwork , the network is mapped by NetworkInfoMapper into networkInfo and returned.
+
+ # 3) StackInfoMapper – used to Capture the data from a Stack object and cast it into a stackInfo( present in beans of openstack).
+ Usage: It is used in adapters/mso-adapter-utils/src/main/java/org/onap/so/openstack/utils , where all createStack, queryStack, updateStack, deleteStack is done, a new instance of stackInfo is returned
+
+Exceptions
+----------
+These are set of msoexceptions provided, and would be used depending on what exception needs to be handled
+
+.. image:: ../images/msoexception.png
diff --git a/docs/images/module_structure.png b/docs/images/module_structure.png
new file mode 100644
index 0000000000..c25441bd8e
--- /dev/null
+++ b/docs/images/module_structure.png
Binary files differ
diff --git a/docs/images/msoexception.png b/docs/images/msoexception.png
new file mode 100644
index 0000000000..b9d2dfd5da
--- /dev/null
+++ b/docs/images/msoexception.png
Binary files differ
diff --git a/docs/images/nwrest.png b/docs/images/nwrest.png
new file mode 100644
index 0000000000..58b66d59e0
--- /dev/null
+++ b/docs/images/nwrest.png
Binary files differ
diff --git a/docs/images/tenantrest.png b/docs/images/tenantrest.png
new file mode 100644
index 0000000000..ec1c77e61b
--- /dev/null
+++ b/docs/images/tenantrest.png
Binary files differ
diff --git a/docs/images/vnfrest.png b/docs/images/vnfrest.png
new file mode 100644
index 0000000000..f61720708d
--- /dev/null
+++ b/docs/images/vnfrest.png
Binary files differ