Replaced all tabs with spaces in java and pom.xml
[so.git] / adapters / mso-openstack-adapters / src / main / java / org / onap / so / heatbridge / factory / MsoCloudClientFactoryImpl.java
index b70b32a..bd74bf6 100644 (file)
@@ -1,17 +1,14 @@
 /*
  * Copyright (C) 2018 Bell Canada. 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
+ * 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
+ * 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.
+ * 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.
  */
 package org.onap.so.heatbridge.factory;
 
@@ -29,10 +26,9 @@ import org.onap.so.heatbridge.openstack.factory.OpenstackClientFactory;
 import org.onap.so.utils.CryptoUtils;
 
 /**
- * This class implements {@link MsoCloudClientFactory}
- * It loads the cloud configuration from SO and uses it to authenticate with keystone.
- * As a result of authentication with keystone, it returns the Openstack client with the auth token so that
- * subsequent API calls to Openstack can be made.
+ * This class implements {@link MsoCloudClientFactory} It loads the cloud configuration from SO and uses it to
+ * authenticate with keystone. As a result of authentication with keystone, it returns the Openstack client with the
+ * auth token so that subsequent API calls to Openstack can be made.
  */
 public class MsoCloudClientFactoryImpl implements MsoCloudClientFactory {
 
@@ -42,23 +38,23 @@ public class MsoCloudClientFactoryImpl implements MsoCloudClientFactory {
         Objects.requireNonNull(openstackClientFactory, "Null OpenstackClientFactory object");
         this.openstackClientFactory = openstackClientFactory;
     }
+
     @Override
-    public OpenstackClient getOpenstackClient(@Nonnull String url, @Nonnull String msoId, @Nonnull String msoPass, @Nonnull String cloudRegionId, @Nonnull String tenantId) throws
-        HeatBridgeException {
+    public OpenstackClient getOpenstackClient(@Nonnull String url, @Nonnull String msoId, @Nonnull String msoPass,
+            @Nonnull String cloudRegionId, @Nonnull String tenantId) throws HeatBridgeException {
         Objects.requireNonNull(url, "Null openstack url!");
         Objects.requireNonNull(msoId, "Null openstack user id!");
         Objects.requireNonNull(msoPass, "Null openstack password!");
         Objects.requireNonNull(cloudRegionId, "Null cloud-region ID!");
         Objects.requireNonNull(tenantId, "Null tenant ID!");
         try {
-            final OpenstackAccess osAccess = new OpenstackAccessBuilder()
-                .setBaseUrl(url) // keystone URL
-                .setUser(msoId) // keystone username
-                .setPassword(CryptoUtils.decryptCloudConfigPassword(msoPass)) // keystone decrypted password
-                .setRegion(cloudRegionId) // openstack region
-                .setDomainName(HeatBridgeConstants.OS_DEFAULT_DOMAIN_NAME) // hardcode to "default"
-                .setTenantId(tenantId) // tenantId
-                .build();
+            final OpenstackAccess osAccess = new OpenstackAccessBuilder().setBaseUrl(url) // keystone URL
+                    .setUser(msoId) // keystone username
+                    .setPassword(CryptoUtils.decryptCloudConfigPassword(msoPass)) // keystone decrypted password
+                    .setRegion(cloudRegionId) // openstack region
+                    .setDomainName(HeatBridgeConstants.OS_DEFAULT_DOMAIN_NAME) // hardcode to "default"
+                    .setTenantId(tenantId) // tenantId
+                    .build();
 
             // Identify the Keystone version
             String version = new URL(url).getPath().replace("/", "");