Refactor homing flows for OOF/HPA

1. Split Homing into OOF and SNIRO versions

2. Added OOF API interactions

3. Added Unit tests for OOF Homing Code

Issue-ID: SO-404
Change-Id: Ifeeeec9ea450d8b330110a565208ed89a1e18cde
Signed-off-by: Marcus G K Williams <marcus.williams@intel.com>
diff --git a/bpmn/MSOCommonBPMN/src/test/resources/mso.bpmn.urn.properties b/bpmn/MSOCommonBPMN/src/test/resources/mso.bpmn.urn.properties
index 049fc7c..539d365 100644
--- a/bpmn/MSOCommonBPMN/src/test/resources/mso.bpmn.urn.properties
+++ b/bpmn/MSOCommonBPMN/src/test/resources/mso.bpmn.urn.properties
@@ -1,131 +1,137 @@
-# Default URN Mappings for unit tests

-

-mso.rollback=true

-

-canopi.auth=757A94191D685FD2092AC1490730A4FC

-csi.aots.addincidentmanagement.endpoint=http://localhost:28090/AddIncidentManagementTicketRequest

-csi.networkstatus.endpoint=http://localhost:28090/SendManagedNetworkStatusNotification

-mso.csi.pwd=4EA237303511EFBBC37F17A351562131

-mso.csi.usrname=mso

-mso.msoKey=07a7159d3bf51a0e53be7a8f89699be7

-

-mso.healthcheck.log.debug=false

-

-mso.adapters.completemsoprocess.endpoint=http://localhost:28090/CompleteMsoProcess

-

-mso.adapters.db.endpoint=http://localhost:28090/dbadapters/RequestsDbAdapter

-mso.adapters.openecomp.db.endpoint=http://localhost:28090/dbadapters/RequestsDbAdapter

-mso.adapters.db.auth=757A94191D685FD2092AC1490730A4FC

-

-mso.adapters.network.endpoint=http://localhost:28090/networks/NetworkAdapter

-mso.adapters.network.rest.endpoint=http://localhost:28090/networks/rest/v1/networks

-

-mso.adapters.po.auth=757A94191D685FD2092AC1490730A4FC

-mso.adapters.po.password=3141634BF7E070AA289CF2892C986C0B

-mso.po.timeout=PT60S

-mso.default.adapter.namespace=http://org.openecomp.mso

-mso.adapters.workflow.message.endpoint=http://localhost:28090/workflows/messages/message

-

-aai.auth=26AFB797A6A57960D5D718491925C50F77CDC22AC394B3DBA09950D8FD1C0764

-

-policy.endpoint=https://mtanjvsgcvm02.nvp.cip.att.com:8081/pdp/api/

-policy.client.auth=Basic bTAzNzQzOnBvbGljeVIwY2sk

-policy.auth=Basic dGVzdHBkcDphbHBoYTEyMw==

-policy.environment=TEST

-

-appc.topic.read=APPC-TEST-AMDOCS2

-appc.topic.write=APPC-TEST-AMDOCS1-DEV3

-appc.topic.read.timeout=120000

-appc.client.response.timeout=120000

-appc.service=ueb

-appc.poolMembers=uebsb93kcdc.it.att.com:3904,uebsb92kcdc.it.att.com:3904,uebsb91kcdc.it.att.com:3904

-appc.client.key=iaEMAfjsVsZnraBP

-appc.client.secret=wcivUjsjXzmGFBfxMmyJu9dz

-

-mso.adapters.sdnc.endpoint=http://localhost:28090/SDNCAdapter

-mso.adapters.sdnc.rest.endpoint=http://localhost:28090/SDNCAdapter/v1/sdnc

-mso.adapters.sdnc.timeout=PT60S

-mso.sdnc.firewall.yang.model=http://com/openecomp/svc/mis/firewall-lite-gui

-mso.sdnc.firewall.yang.model.version=2015-05-15

-mso.sdnc.password=3141634BF7E070AA289CF2892C986C0B

-mso.sdnc.timeout.firewall.minutes=20

-mso.callbackRetryAttempts=5

-mso.sdnc.timeout=PT10S

-mso.sdnc.timeout.ucpe.async.hours=120

-mso.sdnc.timeout.ucpe.async.minutes=5

-mso.workflow.message.endpoint=http://localhost:28080/mso/WorkflowMesssage

-mso.workflow.sdncadapter.callback=http://localhost:28080/mso/SDNCAdapterCallbackService

-

-mso.sniro.auth=test:testpwd

-mso.sniro.timeout=PT30M

-mso.sniro.policies.dhv.2vvig=SNIRO.DistanceToLocationPolicy_vhngw,SNIRO.VNFPolicy_vhngatewayprimary1_v1,SNIRO.ResourceInstancePolicy_hngateway,SNIRO.ResourceRegionPolicy_hngateway_v1,SNIRO.VNFPolicy_vhngatewaysecondary1_v1,SNIRO.ZonePolicy_vhngw,SNIRO.PlacementOptimizationPolicy_dhv_v3,SNIRO.VNFPolicy_vhnportal_primary1_v1,SNIRO.ResourceInstancePolicy_vhnportal_v3,SNIRO.ResourceRegionPolicy_vhnportal_v1,SNIRO.VNFPolicy_vhnportalsecondary1_v1,SNIRO.ZonePolicy_vhnportal,SNIRO.DistanceToLocationPolicy_vvig,SNIRO.InventoryGroupPolicy_vvig,SNIRO.VNFPolicy_vvigprimary1_v1,SNIRO.ResourceInstancePolicy_vvig,SNIRO.VNFPolicy_vvigsecondary1_v1

-mso.sniro.policies.dhv.4vvig=SNIRO.DistanceToLocationPolicy_vhngw,SNIRO.VNFPolicy_vhngatewayprimary1_v1,SNIRO.ResourceInstancePolicy_hngateway,SNIRO.ResourceRegionPolicy_hngateway_v1,SNIRO.VNFPolicy_vhngatewaysecondary1_v1,SNIRO.ZonePolicy_vhngw,SNIRO.PlacementOptimizationPolicy_dhv_v3,SNIRO.VNFPolicy_vhnportal_primary1_v1,SNIRO.ResourceInstancePolicy_vhnportal_v3,SNIRO.ResourceRegionPolicy_vhnportal_v1,SNIRO.VNFPolicy_vhnportalsecondary1_v1,SNIRO.ZonePolicy_vhnportal,SNIRO.VNFPolicy_vvigprimary2_v1,SNIRO.VNFPolicy_vvigsecondary2_v1,SNIRO.DistanceToLocationPolicy_vvig,SNIRO.InventoryGroupPolicy_vvig,SNIRO.VNFPolicy_vvigprimary1_v1,SNIRO.ResourceInstancePolicy_vvig,SNIRO.VNFPolicy_vvigsecondary1_v1

-

-mso.service.agnostic.sniro.host=http://localhost:28090

-mso.service.agnostic.sniro.endpoint=/sniro/api/v2/placement

-

-mso.catalog.db.endpoint=http://localhost:28090/

-

-ruby.create-ticket-request.dmaap.username=m04768@mso.ecomp.att.com

-ruby.create-ticket-request.dmaap.password=eHQ1cUJrOUc

-ruby.create-ticket-request.publisher.topic=com.att.pdas.st1.msoCMFallout-v1

-

-

-mso.adapters.tenant.endpoint=http://localhost:28090/tenantAdapterMock

-mso.adapters.vnf-async.endpoint=http://localhost:28090/vnfs/VnfAdapterAsync

-mso.adapters.vnf.endpoint=http://localhost:28090/vnfs/VnfAdapter

-mso.adapters.vnf.rest.endpoint=http://localhost:28090/vnfs/rest/v1/vnfs

-mso.workflow.vnfadapter.create.callback=http://localhost:28080/mso/vnfAdapterNotify

-mso.workflow.vnfadapter.delete.callback=http://localhost:28080/mso/vnfAdapterNotify

-mso.workflow.vnfadapter.query.callback=http://localhost:28080/mso/services/VNFAdapterQuerCallbackV1

-mso.workflow.vnfadapter.rollback.callback=http://localhost:28080/mso/vnfAdapterNotify

-mso.workflow.createvce.delay.seconds=1

-mso.infra.customer.id=testCustIdInfra

-

-aai.endpoint=http://localhost:28090

-

-# AAI version mappings

-

-# Example to override default version for a resource:

-#mso.workflow.default.aai.vce.version=6

-#mso.workflow.default.aai.v6.vce.uri=/aai/v6/network/vces/vce

-mso.workflow.global.default.aai.namespace=http://org.openecomp.aai.inventory/

-mso.workflow.global.default.aai.version=8

-mso.workflow.default.aai.cloud-region.version=9

-mso.workflow.default.aai.generic-vnf.version=9

-

-mso.workflow.default.aai.v9.cloud-region.uri=/aai/v9/cloud-infrastructure/cloud-regions/cloud-region/att-aic

-mso.workflow.default.aai.v8.customer.uri=/aai/v8/business/customers/customer

-mso.workflow.default.aai.v8.generic-query.uri=/aai/v8/search/generic-query

-mso.workflow.default.aai.v9.generic-vnf.uri=/aai/v9/network/generic-vnfs/generic-vnf

-mso.workflow.default.aai.v8.l3-network.uri=/aai/v8/network/l3-networks/l3-network

-mso.workflow.default.aai.v8.network-policy.uri=/aai/v8/network/network-policies/network-policy

-mso.workflow.default.aai.v8.nodes-query.uri=/aai/v8/search/nodes-query

-mso.workflow.default.aai.v8.route-table-reference.uri=/aai/v8/network/route-table-references/route-table-reference

-mso.workflow.default.aai.v8.tenant.uri=/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant

-mso.workflow.default.aai.v8.vce.uri=/aai/v8/network/vces/vce

-mso.workflow.default.aai.v8.vpn-binding.uri=/aai/v8/network/vpn-bindings/vpn-binding

-mso.workflow.notification.name=GenericNotificationService

-mso.bpmn.optimisticlockingexception.retrycount=3

-

-log.debug.CompleteMsoProcess=true

-log.debug.CreateNetworkInstanceInfra=true

-log.debug.CreateServiceInstanceInfra=true

-log.debug.DeleteNetworkInstanceInfra=true

-log.debug.FalloutHandler=true

-log.debug.GenericGetService=true

-log.debug.sdncAdapter=true

-log.debug.UpdateNetworkInstanceInfra=true

-log.debug.VnfAdapterRestV1=true

-log.debug.GenericGetNetwork=true

-log.debug.GenericGetVnf=true

-log.debug.GenericDeleteService=true

-log.debug.GenericDeleteNetwork=true

-log.debug.GenericDeleteVnf=true

-log.debug.vnfAdapterCreateV1=true

-log.debug.vnfAdapterRestV1=true

-

-sdno.health-check.dmaap.username=m04768@mso.ecomp.att.com

-sdno.health-check.dmaap.password=eHQ1cUJrOUc

-sdno.health-check.dmaap.subscriber.topic=com.att.sdno.test-health-diagnostic-v02

+# Default URN Mappings for unit tests
+
+mso.rollback=true
+
+canopi.auth=757A94191D685FD2092AC1490730A4FC
+csi.aots.addincidentmanagement.endpoint=http://localhost:28090/AddIncidentManagementTicketRequest
+csi.networkstatus.endpoint=http://localhost:28090/SendManagedNetworkStatusNotification
+mso.csi.pwd=4EA237303511EFBBC37F17A351562131
+mso.csi.usrname=mso
+mso.msoKey=07a7159d3bf51a0e53be7a8f89699be7
+
+mso.healthcheck.log.debug=false
+
+mso.adapters.completemsoprocess.endpoint=http://localhost:28090/CompleteMsoProcess
+
+mso.adapters.db.endpoint=http://localhost:28090/dbadapters/RequestsDbAdapter
+mso.adapters.openecomp.db.endpoint=http://localhost:28090/dbadapters/RequestsDbAdapter
+mso.adapters.db.auth=757A94191D685FD2092AC1490730A4FC
+
+mso.adapters.network.endpoint=http://localhost:28090/networks/NetworkAdapter
+mso.adapters.network.rest.endpoint=http://localhost:28090/networks/rest/v1/networks
+
+mso.adapters.po.auth=757A94191D685FD2092AC1490730A4FC
+mso.adapters.po.password=3141634BF7E070AA289CF2892C986C0B
+mso.po.timeout=PT60S
+mso.default.adapter.namespace=http://org.openecomp.mso
+mso.adapters.workflow.message.endpoint=http://localhost:28090/workflows/messages/message
+
+aai.auth=26AFB797A6A57960D5D718491925C50F77CDC22AC394B3DBA09950D8FD1C0764
+
+policy.endpoint=https://mtanjvsgcvm02.nvp.cip.att.com:8081/pdp/api/
+policy.client.auth=Basic bTAzNzQzOnBvbGljeVIwY2sk
+policy.auth=Basic dGVzdHBkcDphbHBoYTEyMw==
+policy.environment=TEST
+
+appc.topic.read=APPC-TEST-AMDOCS2
+appc.topic.write=APPC-TEST-AMDOCS1-DEV3
+appc.topic.read.timeout=120000
+appc.client.response.timeout=120000
+appc.service=ueb
+appc.poolMembers=uebsb93kcdc.it.att.com:3904,uebsb92kcdc.it.att.com:3904,uebsb91kcdc.it.att.com:3904
+appc.client.key=iaEMAfjsVsZnraBP
+appc.client.secret=wcivUjsjXzmGFBfxMmyJu9dz
+
+mso.adapters.sdnc.endpoint=http://localhost:28090/SDNCAdapter
+mso.adapters.sdnc.rest.endpoint=http://localhost:28090/SDNCAdapter/v1/sdnc
+mso.adapters.sdnc.timeout=PT60S
+mso.sdnc.firewall.yang.model=http://com/openecomp/svc/mis/firewall-lite-gui
+mso.sdnc.firewall.yang.model.version=2015-05-15
+mso.sdnc.password=3141634BF7E070AA289CF2892C986C0B
+mso.sdnc.timeout.firewall.minutes=20
+mso.callbackRetryAttempts=5
+mso.sdnc.timeout=PT10S
+mso.sdnc.timeout.ucpe.async.hours=120
+mso.sdnc.timeout.ucpe.async.minutes=5
+mso.workflow.message.endpoint=http://localhost:28080/mso/WorkflowMesssage
+mso.workflow.sdncadapter.callback=http://localhost:28080/mso/SDNCAdapterCallbackService
+
+mso.sniro.auth=test:testpwd
+mso.sniro.timeout=PT30M
+mso.sniro.policies.dhv.2vvig=SNIRO.DistanceToLocationPolicy_vhngw,SNIRO.VNFPolicy_vhngatewayprimary1_v1,SNIRO.ResourceInstancePolicy_hngateway,SNIRO.ResourceRegionPolicy_hngateway_v1,SNIRO.VNFPolicy_vhngatewaysecondary1_v1,SNIRO.ZonePolicy_vhngw,SNIRO.PlacementOptimizationPolicy_dhv_v3,SNIRO.VNFPolicy_vhnportal_primary1_v1,SNIRO.ResourceInstancePolicy_vhnportal_v3,SNIRO.ResourceRegionPolicy_vhnportal_v1,SNIRO.VNFPolicy_vhnportalsecondary1_v1,SNIRO.ZonePolicy_vhnportal,SNIRO.DistanceToLocationPolicy_vvig,SNIRO.InventoryGroupPolicy_vvig,SNIRO.VNFPolicy_vvigprimary1_v1,SNIRO.ResourceInstancePolicy_vvig,SNIRO.VNFPolicy_vvigsecondary1_v1
+mso.sniro.policies.dhv.4vvig=SNIRO.DistanceToLocationPolicy_vhngw,SNIRO.VNFPolicy_vhngatewayprimary1_v1,SNIRO.ResourceInstancePolicy_hngateway,SNIRO.ResourceRegionPolicy_hngateway_v1,SNIRO.VNFPolicy_vhngatewaysecondary1_v1,SNIRO.ZonePolicy_vhngw,SNIRO.PlacementOptimizationPolicy_dhv_v3,SNIRO.VNFPolicy_vhnportal_primary1_v1,SNIRO.ResourceInstancePolicy_vhnportal_v3,SNIRO.ResourceRegionPolicy_vhnportal_v1,SNIRO.VNFPolicy_vhnportalsecondary1_v1,SNIRO.ZonePolicy_vhnportal,SNIRO.VNFPolicy_vvigprimary2_v1,SNIRO.VNFPolicy_vvigsecondary2_v1,SNIRO.DistanceToLocationPolicy_vvig,SNIRO.InventoryGroupPolicy_vvig,SNIRO.VNFPolicy_vvigprimary1_v1,SNIRO.ResourceInstancePolicy_vvig,SNIRO.VNFPolicy_vvigsecondary1_v1
+
+mso.service.agnostic.sniro.host=http://localhost:28090
+mso.service.agnostic.sniro.endpoint=/sniro/api/v2/placement
+
+mso.oof.auth=test:testpwd
+mso.oof.endpoint=http://localhost:28090/api/oof/v1/placement
+mso.oof.timeout=PT30M
+mso.service.agnostic.oof.host=http://localhost:28090
+mso.service.agnostic.oof.endpoint=/api/oof/v1/placement
+
+mso.catalog.db.endpoint=http://localhost:28090/
+
+ruby.create-ticket-request.dmaap.username=m04768@mso.ecomp.att.com
+ruby.create-ticket-request.dmaap.password=eHQ1cUJrOUc
+ruby.create-ticket-request.publisher.topic=com.att.pdas.st1.msoCMFallout-v1
+
+
+mso.adapters.tenant.endpoint=http://localhost:28090/tenantAdapterMock
+mso.adapters.vnf-async.endpoint=http://localhost:28090/vnfs/VnfAdapterAsync
+mso.adapters.vnf.endpoint=http://localhost:28090/vnfs/VnfAdapter
+mso.adapters.vnf.rest.endpoint=http://localhost:28090/vnfs/rest/v1/vnfs
+mso.workflow.vnfadapter.create.callback=http://localhost:28080/mso/vnfAdapterNotify
+mso.workflow.vnfadapter.delete.callback=http://localhost:28080/mso/vnfAdapterNotify
+mso.workflow.vnfadapter.query.callback=http://localhost:28080/mso/services/VNFAdapterQuerCallbackV1
+mso.workflow.vnfadapter.rollback.callback=http://localhost:28080/mso/vnfAdapterNotify
+mso.workflow.createvce.delay.seconds=1
+mso.infra.customer.id=testCustIdInfra
+
+aai.endpoint=http://localhost:28090
+
+# AAI version mappings
+
+# Example to override default version for a resource:
+#mso.workflow.default.aai.vce.version=6
+#mso.workflow.default.aai.v6.vce.uri=/aai/v6/network/vces/vce
+mso.workflow.global.default.aai.namespace=http://org.openecomp.aai.inventory/
+mso.workflow.global.default.aai.version=8
+mso.workflow.default.aai.cloud-region.version=9
+mso.workflow.default.aai.generic-vnf.version=9
+
+mso.workflow.default.aai.v9.cloud-region.uri=/aai/v9/cloud-infrastructure/cloud-regions/cloud-region/att-aic
+mso.workflow.default.aai.v8.customer.uri=/aai/v8/business/customers/customer
+mso.workflow.default.aai.v8.generic-query.uri=/aai/v8/search/generic-query
+mso.workflow.default.aai.v9.generic-vnf.uri=/aai/v9/network/generic-vnfs/generic-vnf
+mso.workflow.default.aai.v8.l3-network.uri=/aai/v8/network/l3-networks/l3-network
+mso.workflow.default.aai.v8.network-policy.uri=/aai/v8/network/network-policies/network-policy
+mso.workflow.default.aai.v8.nodes-query.uri=/aai/v8/search/nodes-query
+mso.workflow.default.aai.v8.route-table-reference.uri=/aai/v8/network/route-table-references/route-table-reference
+mso.workflow.default.aai.v8.tenant.uri=/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/att-aic/AAIAIC25/tenants/tenant
+mso.workflow.default.aai.v8.vce.uri=/aai/v8/network/vces/vce
+mso.workflow.default.aai.v8.vpn-binding.uri=/aai/v8/network/vpn-bindings/vpn-binding
+mso.workflow.notification.name=GenericNotificationService
+mso.bpmn.optimisticlockingexception.retrycount=3
+
+log.debug.CompleteMsoProcess=true
+log.debug.CreateNetworkInstanceInfra=true
+log.debug.CreateServiceInstanceInfra=true
+log.debug.DeleteNetworkInstanceInfra=true
+log.debug.FalloutHandler=true
+log.debug.GenericGetService=true
+log.debug.sdncAdapter=true
+log.debug.UpdateNetworkInstanceInfra=true
+log.debug.VnfAdapterRestV1=true
+log.debug.GenericGetNetwork=true
+log.debug.GenericGetVnf=true
+log.debug.GenericDeleteService=true
+log.debug.GenericDeleteNetwork=true
+log.debug.GenericDeleteVnf=true
+log.debug.vnfAdapterCreateV1=true
+log.debug.vnfAdapterRestV1=true
+
+sdno.health-check.dmaap.username=m04768@mso.ecomp.att.com
+sdno.health-check.dmaap.password=eHQ1cUJrOUc
+sdno.health-check.dmaap.subscriber.topic=com.att.sdno.test-health-diagnostic-v02
 sdno.health-check.dmaap.publisher.topic=com.att.sdno.test-health-diagnostic-v02
\ No newline at end of file