2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 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=========================================================
21 package org.openecomp.vid.model;
23 import org.openecomp.vid.asdc.beans.tosca.Group;
26 * The Class VolumeGroup.
28 public class VolumeGroup {
33 /** The invariant uuid. */
34 private String invariantUuid;
36 /** The description. */
37 private String description;
43 private String version;
46 * Instantiates a new volume group.
48 public VolumeGroup() {}
55 public String getUuid() {
60 * Gets the invariant uuid.
62 * @return the invariant uuid
64 public String getInvariantUuid() {
69 * Gets the description.
71 * @return the description
73 public String getDescription() {
82 public String getName() {
91 public String getVersion() {
98 * @param uuid the new uuid
100 public void setUuid(String uuid) {
105 * Sets the invariant uuid.
107 * @param invariantUuid the new invariant uuid
109 public void setInvariantUuid(String invariantUuid) {
110 this.invariantUuid = invariantUuid;
114 * Sets the description.
116 * @param description the new description
118 public void setDescription(String description) {
119 this.description = description;
125 * @param name the new name
127 public void setName(String name) {
134 * @param version the new version
136 public void setVersion(String version) {
137 this.version = version;
141 * Extract volume group.
143 * @param group the group
144 * @return the volume group
146 public static VolumeGroup extractVolumeGroup(Group group) {
147 final VolumeGroup volumeGroup = new VolumeGroup();
149 volumeGroup.setUuid(group.getMetadata().getVfModuleModelUUID());
150 volumeGroup.setInvariantUuid(group.getMetadata().getVfModuleModelInvariantUUID());
151 volumeGroup.setDescription(group.getMetadata().getDescription());
152 volumeGroup.setName(group.getMetadata().getVfModuleModelName());
153 volumeGroup.setVersion(group.getMetadata().getVfModuleModelVersion());