2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 - 2018 AT&T Intellectual Property. All rights reserved.
6 * ================================================================================
7 * Licensed under the Apache License, Version 2.0 (the "License");
8 * you may not use this file except in compliance with the License.
9 * You may obtain a copy of the License at
11 * http://www.apache.org/licenses/LICENSE-2.0
13 * Unless required by applicable law or agreed to in writing, software
14 * distributed under the License is distributed on an "AS IS" BASIS,
15 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 * See the License for the specific language governing permissions and
17 * limitations under the License.
18 * ============LICENSE_END=========================================================
23 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
24 import com.fasterxml.jackson.annotation.JsonProperty;
25 import org.onap.so.db.catalog.beans.CloudIdentity;
26 import org.onap.so.db.catalog.beans.CloudSite;
27 import org.onap.so.db.catalog.beans.CloudifyManager;
28 import java.util.HashMap;
32 * @deprecated This class is introduced as deprecated as its only purpose is for migration of cloud config data. It
33 * shouldnt be used elsewhere.
37 @JsonIgnoreProperties(ignoreUnknown = true)
38 public class CloudConfig {
39 @JsonProperty("identity_services")
40 private Map<String, CloudIdentity> identityServices = new HashMap<>();
42 @JsonProperty("cloud_sites")
43 private Map<String, CloudSite> cloudSites = new HashMap<>();
45 @JsonProperty("cloudify_managers")
46 private Map<String, CloudifyManager> cloudifyManagers = new HashMap<>();
49 public Map<String, CloudIdentity> getIdentityServices() {
50 return identityServices;
53 public void setIdentityServices(Map<String, CloudIdentity> identityServices) {
54 this.identityServices = identityServices;
57 public Map<String, CloudSite> getCloudSites() {
61 public void setCloudSites(Map<String, CloudSite> cloudSites) {
62 this.cloudSites = cloudSites;
65 public Map<String, CloudifyManager> getCloudifyManagers() {
66 return cloudifyManagers;
69 public void setCloudifyManagers(Map<String, CloudifyManager> cloudifyManagers) {
70 this.cloudifyManagers = cloudifyManagers;
73 public void populateId() {
74 for (Map.Entry<String, CloudIdentity> entry : identityServices.entrySet()) {
75 entry.getValue().setId(entry.getKey());
78 for (Map.Entry<String, CloudSite> entry : cloudSites.entrySet()) {
79 entry.getValue().setId(entry.getKey());
82 for (Map.Entry<String, CloudifyManager> entry : cloudifyManagers.entrySet()) {
83 entry.getValue().setId(entry.getKey());