AT&T 1712 and 1802 release code

This is code from AT&T's 1712 and 1802 releases.

Change-Id: Ie1e85851e94bc66c4d9514a0226c221939531a04
Issue-ID: SO-425
Signed-off-by: Rob Daugherty <rd472p@att.com>
diff --git a/mso-api-handlers/mso-requests-db/src/main/resources/InfraActiveRequests.hbm.xml b/mso-api-handlers/mso-requests-db/src/main/resources/InfraActiveRequests.hbm.xml
index 8ee3ddd..fcc6b28 100644
--- a/mso-api-handlers/mso-requests-db/src/main/resources/InfraActiveRequests.hbm.xml
+++ b/mso-api-handlers/mso-requests-db/src/main/resources/InfraActiveRequests.hbm.xml
@@ -128,7 +128,7 @@
             <column name="SERVICE_INSTANCE_NAME" length="80"/>
         </property>
         <property name="requestScope" type="string">
-            <column name="REQUEST_SCOPE" length="20"/>
+            <column name="REQUEST_SCOPE" length="45"/>
         </property>
         <property name="requestAction" type="string">
             <column name="REQUEST_ACTION" length="45" not-null="true"/>
@@ -145,5 +145,17 @@
         <property name="requestorId" type="string">
             <column name="REQUESTOR_ID" length="80"/>
         </property>
+        <property name="configurationId" type="string">
+            <column name="CONFIGURATION_ID" length="45"/>
+        </property>
+        <property name="configurationName" type="string">
+            <column name="CONFIGURATION_NAME" length="200"/>
+        </property>
+         <property name="operationalEnvId" type="string">
+            <column name="OPERATIONAL_ENV_ID" length="45"/>
+        </property>
+        <property name="operationalEnvName" type="string">
+            <column name="OPERATIONAL_ENV_NAME" length="200"/>
+        </property>
     </class>
 </hibernate-mapping>
diff --git a/mso-api-handlers/mso-requests-db/src/main/resources/OperationStatus.hbm.xml b/mso-api-handlers/mso-requests-db/src/main/resources/OperationStatus.hbm.xml
index d4eccda..8d80f76 100644
--- a/mso-api-handlers/mso-requests-db/src/main/resources/OperationStatus.hbm.xml
+++ b/mso-api-handlers/mso-requests-db/src/main/resources/OperationStatus.hbm.xml
@@ -24,24 +24,23 @@
 <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
 
 <hibernate-mapping package="org.openecomp.mso.requestsdb">
-   <class name="OperationStatus" table="OPERATION_STATUS">
-      <meta attribute="class-description">
-         This class describes a operation status
-      </meta>
-        <composite-id>
-             <key-property name="serviceId" type="string" column="SERVICE_ID"/>
-             <key-property name="operationId" column="OPERATION_ID" type="string" length="256"/>
-        </composite-id>
-        <property name="serviceName" column="SERVICE_NAME" type="string" length="256"/>
-        <property name="operation" column="OPERATION_TYPE" type="string" length="256"/>
-        <property name="userId" column="USER_ID" type="string" length="256"/>
-        <property name="result" column="RESULT" type="string" length="256"/>
-        <property name="operationContent" column="OPERATION_CONTENT" type="string" length="256"/>
-        <property name="progress" column="PROGRESS" type="string" length="256"/>
-        <property name="reason" column="REASON" type="string" length="256"/>
-        <property name="operateAt" type="timestamp">
-          <column name="OPERATE_AT"/>
+	<class name="OperationStatus" table="OPERATION_STATUS">
+		<meta attribute="class-description">
+			This class describes a operation status
+		</meta>
+        <composite-id>  
+             <key-property name="serviceId" type="string" column="SERVICE_ID"/>  
+             <key-property name="operationId" column="OPERATION_ID" type="string" length="256"/>  
+        </composite-id> 
+		<property name="operation" column="OPERATION_TYPE" type="string" length="256"/>		
+		<property name="userId" column="USER_ID" type="string" length="256"/>		
+		<property name="result" column="RESULT" type="string" length="256"/>
+		<property name="operationContent" column="OPERATION_CONTENT" type="string" length="256"/>
+		<property name="progress" column="PROGRESS" type="string" length="256"/>
+		<property name="reason" column="REASON" type="string" length="256"/>
+		<property name="operateAt" type="timestamp" generated="insert" insert="false" update="false" not-null="true">
+          <column name="OPERATE_AT" default="CURRENT_TIMESTAMP"/>
         </property>
-        <property name="finishedAt" column="FINISHED_AT" type="timestamp" />
-   </class>
+		<property name="finishedAt" column="FINISHED_AT" type="timestamp" generated="always" insert="false" update="false"/>	
+	</class>
 </hibernate-mapping>
diff --git a/mso-api-handlers/mso-requests-db/src/main/resources/OperationalEnvDistributionStatus.hbm.xml b/mso-api-handlers/mso-requests-db/src/main/resources/OperationalEnvDistributionStatus.hbm.xml
new file mode 100644
index 0000000..08e60b2
--- /dev/null
+++ b/mso-api-handlers/mso-requests-db/src/main/resources/OperationalEnvDistributionStatus.hbm.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0"?>
+<!--
+  ============LICENSE_START=======================================================
+  ECOMP MSO
+  ================================================================================
+  Copyright (C) 2017 AT&T 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=========================================================
+  -->
+
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<!-- Generated Jul 27, 2015 3:05:00 PM by Hibernate Tools 3.4.0.CR1 -->
+<hibernate-mapping>
+    <class name="org.openecomp.mso.requestsdb.OperationalEnvDistributionStatus" table="ACTIVATE_OPERATIONAL_ENV_PER_DISTRIBUTIONID_STATUS">
+      
+        <id name="distributionId" type="string">
+        	<column name="DISTRIBUTION_ID" length="45"/>
+        	<generator class="assigned"/>
+		</id>
+        
+		<property name="operationalEnvId" type="string">
+            <column name="OPERATIONAL_ENV_ID" length="45"/>
+        </property>
+        <property name="serviceModelVersionId" type="string">
+            <column name="SERVICE_MODEL_VERSION_ID" length="45"/>
+        </property>
+        <property name="distributionIdStatus" type="string">
+            <column name="DISTRIBUTION_ID_STATUS" length="45" />
+        </property>
+        <property name="distributionIdErrorReason" type="string">
+            <column name="DISTRIBUTION_ID_ERROR_REASON" length="250" />
+        </property>
+        <property name="requestId" type="string">
+            <column name="REQUEST_ID" length="45" />
+        </property>
+        <property name="createTime" type="timestamp">
+            <column name="CREATE_TIME"/>
+        </property>
+        <property name="modifyTime" type="timestamp">
+            <column name="MODIFY_TIME"/>
+        </property>
+
+    </class>
+</hibernate-mapping>
\ No newline at end of file
diff --git a/mso-api-handlers/mso-requests-db/src/main/resources/OperationalEnvServiceModelStatus.hbm.xml b/mso-api-handlers/mso-requests-db/src/main/resources/OperationalEnvServiceModelStatus.hbm.xml
new file mode 100644
index 0000000..99a6232
--- /dev/null
+++ b/mso-api-handlers/mso-requests-db/src/main/resources/OperationalEnvServiceModelStatus.hbm.xml
@@ -0,0 +1,54 @@
+<?xml version="1.0"?>
+<!--
+  ============LICENSE_START=======================================================
+  ECOMP MSO
+  ================================================================================
+  Copyright (C) 2017 AT&T 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=========================================================
+  -->
+
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<!-- Generated Jul 27, 2015 3:05:00 PM by Hibernate Tools 3.4.0.CR1 -->
+<hibernate-mapping>
+    <class name="org.openecomp.mso.requestsdb.OperationalEnvServiceModelStatus" table="ACTIVATE_OPERATIONAL_ENV_SERVICE_MODEL_DISTRIBUTION_STATUS">
+      
+        <composite-id>
+			<key-property name="operationalEnvId" 	column="OPERATIONAL_ENV_ID" 		type="string" 	length="45" />
+			<key-property name="serviceModelVersionId" 	column="SERVICE_MODEL_VERSION_ID" 	type="string" 	length="45"/>
+			<key-property name="requestId" 	column="REQUEST_ID" 	type="string" 	length="45"/>
+		</composite-id> 
+		
+        <property name="serviceModelVersionDistrStatus" type="string">
+            <column name="SERVICE_MOD_VER_FINAL_DISTR_STATUS" length="45"/>
+        </property>
+        <property name="recoveryAction" type="string">
+            <column name="RECOVERY_ACTION" length="30" />
+        </property>
+        <property name="retryCount" type="integer">
+            <column name="RETRY_COUNT_LEFT"/>
+        </property>
+        <property name="workloadContext" type="string">
+            <column name="WORKLOAD_CONTEXT" length="80" />
+        </property>
+        <property name="createTime" type="timestamp">
+            <column name="CREATE_TIME"/>
+        </property>
+        <property name="modifyTime" type="timestamp">
+            <column name="MODIFY_TIME"/>
+        </property>
+
+    </class>
+</hibernate-mapping>
\ No newline at end of file
diff --git a/mso-api-handlers/mso-requests-db/src/main/resources/WatchdogComponentDistributionStatus.hbm.xml b/mso-api-handlers/mso-requests-db/src/main/resources/WatchdogComponentDistributionStatus.hbm.xml
new file mode 100644
index 0000000..ea66153
--- /dev/null
+++ b/mso-api-handlers/mso-requests-db/src/main/resources/WatchdogComponentDistributionStatus.hbm.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<!--
+  ============LICENSE_START=======================================================
+  ECOMP MSO
+  ================================================================================
+  Copyright (C) 2017 AT&T 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=========================================================
+  -->
+
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<!-- Generated Jul 27, 2015 3:05:00 PM by Hibernate Tools 3.4.0.CR1 -->
+<hibernate-mapping>
+    <class name="org.openecomp.mso.requestsdb.WatchdogComponentDistributionStatus" table="WATCHDOG_PER_COMPONENT_DISTRIBUTION_STATUS">
+      
+        <composite-id>
+			<key-property name="distributionId" 	column="DISTRIBUTION_ID" 		type="string" 	length="45" />
+			<key-property name="componentName" 	column="COMPONENT_NAME" 	type="string" 	length="45"/>
+		</composite-id> 
+        
+        <property name="componentDistributionStatus" type="string">
+            <column name="COMPONENT_DISTRIBUTION_STATUS" length="45" />
+        </property>
+        
+        <property name="createTime" type="timestamp">
+            <column name="CREATE_TIME"/>
+        </property>
+        
+        <property name="modifyTime" type="timestamp">
+            <column name="MODIFY_TIME"/>
+        </property>
+
+    </class>
+</hibernate-mapping>
\ No newline at end of file
diff --git a/mso-api-handlers/mso-requests-db/src/main/resources/WatchdogDistributionStatus.hbm.xml b/mso-api-handlers/mso-requests-db/src/main/resources/WatchdogDistributionStatus.hbm.xml
new file mode 100644
index 0000000..2da3071
--- /dev/null
+++ b/mso-api-handlers/mso-requests-db/src/main/resources/WatchdogDistributionStatus.hbm.xml
@@ -0,0 +1,46 @@
+<?xml version="1.0"?>
+<!--
+  ============LICENSE_START=======================================================
+  ECOMP MSO
+  ================================================================================
+  Copyright (C) 2017 AT&T 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=========================================================
+  -->
+
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<!-- Generated Jul 27, 2015 3:05:00 PM by Hibernate Tools 3.4.0.CR1 -->
+<hibernate-mapping>
+    <class name="org.openecomp.mso.requestsdb.WatchdogDistributionStatus" table="WATCHDOG_DISTRIBUTIONID_STATUS">
+      
+        <id name="distributionId" type="string">
+        	<column name="DISTRIBUTION_ID" length="45"/>
+        	<generator class="assigned"/>
+		</id>
+        
+        <property name="distributionIdStatus" type="string">
+            <column name="DISTRIBUTION_ID_STATUS" length="45" />
+        </property>
+        
+        <property name="createTime" type="timestamp">
+            <column name="CREATE_TIME"/>
+        </property>
+        
+        <property name="modifyTime" type="timestamp">
+            <column name="MODIFY_TIME"/>
+        </property>
+
+    </class>
+</hibernate-mapping>
\ No newline at end of file
diff --git a/mso-api-handlers/mso-requests-db/src/main/resources/WatchdogServiceModVerIdLookup.hbm.xml b/mso-api-handlers/mso-requests-db/src/main/resources/WatchdogServiceModVerIdLookup.hbm.xml
new file mode 100644
index 0000000..b6b1d9b
--- /dev/null
+++ b/mso-api-handlers/mso-requests-db/src/main/resources/WatchdogServiceModVerIdLookup.hbm.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0"?>
+<!--
+  ============LICENSE_START=======================================================
+  ECOMP MSO
+  ================================================================================
+  Copyright (C) 2017 AT&T 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=========================================================
+  -->
+
+<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
+        "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
+<!-- Generated Jul 27, 2015 3:05:00 PM by Hibernate Tools 3.4.0.CR1 -->
+<hibernate-mapping>
+    <class name="org.openecomp.mso.requestsdb.WatchdogServiceModVerIdLookup" table="WATCHDOG_SERVICE_MOD_VER_ID_LOOKUP">
+      
+        <composite-id>
+			<key-property name="distributionId" 	column="DISTRIBUTION_ID" 		type="string" 	length="45" />	
+			<key-property name="serviceModelVersionId" 	column="SERVICE_MODEL_VERSION_ID" 	type="string" 	length="45"/>	
+		</composite-id> 
+        
+        <property name="createTime" type="timestamp">
+            <column name="CREATE_TIME"/>
+        </property>
+
+    </class>
+</hibernate-mapping>
\ No newline at end of file
diff --git a/mso-api-handlers/mso-requests-db/src/main/resources/hibernate-requests-core-mysql.cfg.xml b/mso-api-handlers/mso-requests-db/src/main/resources/hibernate-requests-core-mysql.cfg.xml
index edf8333..1305dfb 100644
--- a/mso-api-handlers/mso-requests-db/src/main/resources/hibernate-requests-core-mysql.cfg.xml
+++ b/mso-api-handlers/mso-requests-db/src/main/resources/hibernate-requests-core-mysql.cfg.xml
@@ -32,8 +32,13 @@
 <!-- 		<property name="hibernate.hbm2ddl.auto">create</property> -->
 
         <mapping resource="InfraActiveRequests.hbm.xml"></mapping>
-        <mapping resource="SiteStatus.hbm.xml"></mapping>
+        <mapping resource="OperationalEnvServiceModelStatus.hbm.xml"></mapping>
+        <mapping resource="OperationalEnvDistributionStatus.hbm.xml"></mapping>
         <mapping resource="OperationStatus.hbm.xml"></mapping>
         <mapping resource="ResourceOperationStatus.hbm.xml"></mapping>
+        <mapping resource="SiteStatus.hbm.xml"></mapping>
+        <mapping resource="WatchdogDistributionStatus.hbm.xml"></mapping>
+        <mapping resource="WatchdogComponentDistributionStatus.hbm.xml"></mapping>
+        <mapping resource="WatchdogServiceModVerIdLookup.hbm.xml"></mapping>
     </session-factory>
 </hibernate-configuration>