diff options
author | Boslet, Cory <cory.boslet@att.com> | 2020-09-16 16:00:29 -0400 |
---|---|---|
committer | Benjamin, Max (mb388a) <mb388a@att.com> | 2020-09-16 16:00:30 -0400 |
commit | 507a91a7871e29fe92186ee64173279f99bbf3f1 (patch) | |
tree | 276644a61f736836552b3ac165c41497c9f323f3 /adapters | |
parent | 8c4ec24f8e515b330fce079b4a91dc144b0e0317 (diff) |
Heat bridge cron 2.0, changes due to cloud and
Heat bridge cron 2.0, changes due to cloud and tenant privs
Removed unness repeat calls to token and loop.
Issue-ID: SO-3245
Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com>
Change-Id: If8fbc2be2f227b236c8b934a6cfc665a2600348f
Diffstat (limited to 'adapters')
-rw-r--r-- | adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/authentication/AuthenticationMethodFactory.java | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/authentication/AuthenticationMethodFactory.java b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/authentication/AuthenticationMethodFactory.java index c7f4509237..ab0239057a 100644 --- a/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/authentication/AuthenticationMethodFactory.java +++ b/adapters/mso-adapter-utils/src/main/java/org/onap/so/cloud/authentication/AuthenticationMethodFactory.java @@ -90,4 +90,31 @@ public final class AuthenticationMethodFactory { return v3Auth; } + public final com.woorea.openstack.keystone.v3.model.Authentication getAuthenticationForV3ByName( + CloudIdentity cloudIdentity, String name) { + Identity identity = new Identity(); + Password password = new Password(); + User user = new User(); + Domain userDomain = new Domain(); + Scope scope = new Scope(); + Project project = new Project(); + Project.Domain projectDomain = new Project.Domain(); + userDomain.setName(cloudIdentity.getUserDomainName()); + projectDomain.setName(cloudIdentity.getProjectDomainName()); + user.setName(cloudIdentity.getMsoId()); + user.setPassword(CryptoUtils.decryptCloudConfigPassword(cloudIdentity.getMsoPass())); + user.setDomain(userDomain); + password.setUser(user); + project.setDomain(projectDomain); + project.setName(name); + scope.setProject(project); + identity.setPassword(password); + identity.setMethods(Collections.singletonList("password")); + com.woorea.openstack.keystone.v3.model.Authentication v3Auth = + new com.woorea.openstack.keystone.v3.model.Authentication(); + v3Auth.setIdentity(identity); + v3Auth.setScope(scope); + return v3Auth; + } + } |