aboutsummaryrefslogtreecommitdiffstats
path: root/mso-catalog-db
diff options
context:
space:
mode:
authorBenjamin, Max (mb388a) <mb388a@us.att.com>2018-11-16 12:23:48 -0500
committerRob Daugherty <rd472p@att.com>2018-11-21 16:06:04 +0000
commit37547ac7b149381f92afe782f6682d8ffa7acc7a (patch)
treed0ca9319da57135fc5e3317c5015d95db73d3387 /mso-catalog-db
parent4bae647a66bd08422ae2d9b8dec226434270eb5c (diff)
Add Keystone V3 Support
update JEL with explicit getVariable call set project object into scope object add camunda properties as defaults in application.yaml added exception handling to keystone v3 case added in password method to identity object initial commit of keystone v3 auth support updated json property values with "_name" added new columns to cloud identity Change-Id: Ie08e9893c34d7199197efdb21fe4dd5413b25f44 Issue-ID: SO-1225 Signed-off-by: Benjamin, Max (mb388a) <mb388a@us.att.com>
Diffstat (limited to 'mso-catalog-db')
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CloudIdentity.java31
-rw-r--r--mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ServerType.java2
-rw-r--r--mso-catalog-db/src/test/resources/data.sql2
-rw-r--r--mso-catalog-db/src/test/resources/schema.sql2
4 files changed, 34 insertions, 3 deletions
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CloudIdentity.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CloudIdentity.java
index b1c81cf8d8..820b47a2db 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CloudIdentity.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/CloudIdentity.java
@@ -70,6 +70,16 @@ public class CloudIdentity {
@Column(name = "MSO_PASS")
private String msoPass;
+ @JsonProperty("project_domain_name")
+ @BusinessKey
+ @Column(name = "PROJECT_DOMAIN_NAME")
+ private String projectDomainName;
+
+ @JsonProperty("user_domain_name")
+ @BusinessKey
+ @Column(name = "USER_DOMAIN_NAME")
+ private String userDomainName;
+
@JsonProperty("admin_tenant")
@BusinessKey
@Column(name = "ADMIN_TENANT")
@@ -224,6 +234,21 @@ public class CloudIdentity {
this.identityAuthenticationType = identityAuthenticationType;
}
+ public String getProjectDomainName() {
+ return projectDomainName;
+ }
+
+ public void setProjectDomainName(String projectDomainName) {
+ this.projectDomainName = projectDomainName;
+ }
+
+ public String getUserDomainName() {
+ return userDomainName;
+ }
+
+ public void setUserDomainName(String userDomainName) {
+ this.userDomainName = userDomainName;
+ }
@Override
public CloudIdentity clone() {
CloudIdentity cloudIdentityCopy = new CloudIdentity();
@@ -237,6 +262,8 @@ public class CloudIdentity {
cloudIdentityCopy.tenantMetadata = this.tenantMetadata;
cloudIdentityCopy.identityServerType = this.identityServerType;
cloudIdentityCopy.identityAuthenticationType = this.identityAuthenticationType;
+ cloudIdentityCopy.projectDomainName = this.projectDomainName;
+ cloudIdentityCopy.userDomainName = this.userDomainName;
return cloudIdentityCopy;
}
@@ -245,6 +272,7 @@ public class CloudIdentity {
public String toString() {
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).append("id", getId())
.append("identityUrl", getIdentityUrl()).append("msoId", getMsoId())
+ .append("projectDomain", getProjectDomainName()).append("userDomain", getUserDomainName())
.append("adminTenant", getAdminTenant()).append("memberRole", getMemberRole())
.append("tenantMetadata", getTenantMetadata()).append("identityServerType", getIdentityServerType())
.append("identityAuthenticationType", getIdentityAuthenticationType()).toString();
@@ -262,6 +290,7 @@ public class CloudIdentity {
return new EqualsBuilder().append(getId(), castOther.getId())
.append(getIdentityUrl(), castOther.getIdentityUrl()).append(getMsoId(), castOther.getMsoId())
.append(getMsoPass(), castOther.getMsoPass()).append(getAdminTenant(), castOther.getAdminTenant())
+ .append(getProjectDomainName(), castOther.getProjectDomainName()).append(getUserDomainName(), castOther.getUserDomainName())
.append(getMemberRole(), castOther.getMemberRole())
.append(getTenantMetadata(), castOther.getTenantMetadata())
.append(getIdentityServerType(), castOther.getIdentityServerType())
@@ -271,7 +300,7 @@ public class CloudIdentity {
@Override
public int hashCode() {
return new HashCodeBuilder(1, 31).append(getId()).append(getIdentityUrl()).append(getMsoId())
- .append(getMsoPass()).append(getAdminTenant()).append(getMemberRole()).append(getTenantMetadata())
+ .append(getMsoPass()).append(getProjectDomainName()).append(getUserDomainName()).append(getAdminTenant()).append(getMemberRole()).append(getTenantMetadata())
.append(getIdentityServerType()).append(getIdentityAuthenticationType()).toHashCode();
}
} \ No newline at end of file
diff --git a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ServerType.java b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ServerType.java
index d8d386db8c..194215325b 100644
--- a/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ServerType.java
+++ b/mso-catalog-db/src/main/java/org/onap/so/db/catalog/beans/ServerType.java
@@ -21,5 +21,5 @@
package org.onap.so.db.catalog.beans;
public enum ServerType {
- KEYSTONE, ORM;
+ KEYSTONE, ORM, KEYSTONE_V3;
}
diff --git a/mso-catalog-db/src/test/resources/data.sql b/mso-catalog-db/src/test/resources/data.sql
index eeb57249b7..14834ea963 100644
--- a/mso-catalog-db/src/test/resources/data.sql
+++ b/mso-catalog-db/src/test/resources/data.sql
@@ -657,7 +657,7 @@ VALUES
INSERT INTO `cloudify_managers` (`ID`, `CLOUDIFY_URL`, `USERNAME`, `PASSWORD`, `VERSION`, `LAST_UPDATED_BY`, `CREATION_TIMESTAMP`, `UPDATE_TIMESTAMP`) VALUES ('mtn13', 'http://localhost:28090/v2.0', 'm93945', '93937EA01B94A10A49279D4572B48369', NULL, 'MSO_USER', '2018-07-17 14:05:08', '2018-07-17 14:05:08');
-INSERT INTO `identity_services` (`ID`, `IDENTITY_URL`, `MSO_ID`, `MSO_PASS`, `ADMIN_TENANT`, `MEMBER_ROLE`, `TENANT_METADATA`, `IDENTITY_SERVER_TYPE`, `IDENTITY_AUTHENTICATION_TYPE`, `LAST_UPDATED_BY`, `CREATION_TIMESTAMP`, `UPDATE_TIMESTAMP`) VALUES ('MTN13', 'http://localhost:28090/v2.0', 'm93945', '93937EA01B94A10A49279D4572B48369', 'admin', 'admin', 1, 'KEYSTONE', 'USERNAME_PASSWORD', 'MSO_USER', '2018-07-17 14:02:33', '2018-07-17 14:02:33');
+INSERT INTO `identity_services` (`ID`, `IDENTITY_URL`, `MSO_ID`, `MSO_PASS`, `PROJECT_DOMAIN_NAME`, `USER_DOMAIN_NAME`, `ADMIN_TENANT`, `MEMBER_ROLE`, `TENANT_METADATA`, `IDENTITY_SERVER_TYPE`, `IDENTITY_AUTHENTICATION_TYPE`, `LAST_UPDATED_BY`, `CREATION_TIMESTAMP`, `UPDATE_TIMESTAMP`) VALUES ('MTN13', 'http://localhost:28090/v2.0', 'm93945', '93937EA01B94A10A49279D4572B48369', NULL, NULL, 'admin', 'admin', 1, 'KEYSTONE', 'USERNAME_PASSWORD', 'MSO_USER', '2018-07-17 14:02:33', '2018-07-17 14:02:33');
INSERT INTO `cloud_sites` (`ID`, `REGION_ID`, `IDENTITY_SERVICE_ID`, `CLOUD_VERSION`, `CLLI`, `CLOUDIFY_ID`, `PLATFORM`, `ORCHESTRATOR`, `LAST_UPDATED_BY`, `CREATION_TIMESTAMP`, `UPDATE_TIMESTAMP`) VALUES ('mtn13', 'mtn13', 'MTN13', '2.5', 'MDT13', 'mtn13', NULL, 'orchestrator', 'MSO_USER', '2018-07-17 14:06:28', '2018-07-17 14:06:28');
diff --git a/mso-catalog-db/src/test/resources/schema.sql b/mso-catalog-db/src/test/resources/schema.sql
index 6eaad260ea..b7d0061e65 100644
--- a/mso-catalog-db/src/test/resources/schema.sql
+++ b/mso-catalog-db/src/test/resources/schema.sql
@@ -837,6 +837,8 @@ CREATE TABLE IF NOT EXISTS `identity_services` (
`IDENTITY_URL` varchar(200) DEFAULT NULL,
`MSO_ID` varchar(255) DEFAULT NULL,
`MSO_PASS` varchar(255) DEFAULT NULL,
+ `PROJECT_DOMAIN_NAME` varchar(255) DEFAULT NULL,
+ `USER_DOMAIN_NAME` varchar(255) DEFAULT NULL,
`ADMIN_TENANT` varchar(50) DEFAULT NULL,
`MEMBER_ROLE` varchar(50) DEFAULT NULL,
`TENANT_METADATA` tinyint(1) DEFAULT 0,