forked from apache/cloudstack
-
Notifications
You must be signed in to change notification settings - Fork 0
create temp CG for consistent VM snapshot for the VM which is span across multiple flexvolumes #74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
3efaa7a
CSTACKEX:200 - added temp CG logic for VM snapshots if VM span across…
rajiv-jain-netapp 4ec7c18
CSTACKEX-200: added consistency for the VM level snapshots if CSV are…
rajiv-jain-netapp 4b482df
CSTACKEX-200: ONTAP will have snapshot always on primary, adding resp…
rajiv-jain-netapp 2724dbb
CSTACKEX-200: skip aggr space validations for existing volume operations
rajiv-jain-netapp 4d1377c
CSTACKEX-200: CG create must have SVM name and respective validations
rajiv-jain-netapp f72d5cf
CSTACKEX-200: add provisioning options
rajiv-jain-netapp 5d9639e
CSTACKEX-200 race conditions needs to be handled while taking snapsho…
rajiv-jain-netapp 26f20d7
CSTACKEX-200: state is not a valid field for CG
rajiv-jain-netapp 0d3f4b7
CSTACKEX-200: incorporate one round of review comments
rajiv-jain-netapp 605a878
CSTACKEX-200: incorporate copilot comments
rajiv-jain-netapp 61f8105
Merge branch 'main' into feature/CSTACKEX-200
rajiv-jain-netapp e1c44f5
CSTACKEX-200: fix for the issue added due to merge
rajiv-jain-netapp b4d6d72
CSTACKEX-200: incorporate review comments from team and copilot
rajiv-jain-netapp d25c9d0
CSTACKEX-200: fix to the copilot comment
rajiv-jain-netapp be6a3f2
CSTACKEX-200: missed to add new clases
rajiv-jain-netapp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
190 changes: 105 additions & 85 deletions
190
...ontap/src/main/java/org/apache/cloudstack/storage/driver/OntapPrimaryDatastoreDriver.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
99 changes: 99 additions & 0 deletions
99
...olume/ontap/src/main/java/org/apache/cloudstack/storage/feign/model/ConsistencyGroup.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one | ||
| * or more contributor license agreements. See the NOTICE file | ||
| * distributed with this work for additional information | ||
| * regarding copyright ownership. The ASF licenses this file | ||
| * to you 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 | ||
| * | ||
| * 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.apache.cloudstack.storage.feign.model; | ||
|
|
||
| import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
| import com.fasterxml.jackson.annotation.JsonInclude; | ||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
|
||
| import java.util.List; | ||
|
|
||
| /** | ||
| * Model representing an ONTAP application consistency group. | ||
| * | ||
| * <p>Maps to the ONTAP REST API resource at | ||
| * {@code /api/application/consistency-groups}.</p> | ||
| * | ||
| * @see <a href="https://docs.netapp.com/us-en/ontap-restapi/post-application-consistency-groups.html"> | ||
| * ONTAP REST API - Create Consistency Group</a> | ||
| */ | ||
| @JsonIgnoreProperties(ignoreUnknown = true) | ||
| @JsonInclude(JsonInclude.Include.NON_NULL) | ||
| public class ConsistencyGroup { | ||
|
|
||
| @JsonProperty("uuid") | ||
| private String uuid; | ||
|
|
||
| @JsonProperty("name") | ||
| private String name; | ||
|
|
||
| @JsonProperty("svm") | ||
| private Svm svm; | ||
|
|
||
| @JsonProperty("volumes") | ||
| private List<ConsistencyGroupVolume> volumes; | ||
|
|
||
| public ConsistencyGroup() { | ||
| } | ||
|
|
||
| public ConsistencyGroup(String name) { | ||
| this.name = name; | ||
| } | ||
|
|
||
| public String getUuid() { | ||
| return uuid; | ||
| } | ||
|
|
||
| public void setUuid(String uuid) { | ||
| this.uuid = uuid; | ||
| } | ||
|
|
||
| public String getName() { | ||
| return name; | ||
| } | ||
|
|
||
| public void setName(String name) { | ||
| this.name = name; | ||
| } | ||
|
|
||
| public Svm getSvm() { | ||
| return svm; | ||
| } | ||
|
|
||
| public void setSvm(Svm svm) { | ||
| this.svm = svm; | ||
| } | ||
|
|
||
| public List<ConsistencyGroupVolume> getVolumes() { | ||
| return volumes; | ||
| } | ||
|
|
||
| public void setVolumes(List<ConsistencyGroupVolume> volumes) { | ||
| this.volumes = volumes; | ||
| } | ||
|
|
||
| @Override | ||
| public String toString() { | ||
| return "ConsistencyGroup{" + | ||
| "uuid='" + uuid + '\'' + | ||
| ", name='" + name + '\'' + | ||
| ", volumes=" + (volumes != null ? volumes.size() : 0) + | ||
| '}'; | ||
| } | ||
| } |
149 changes: 149 additions & 0 deletions
149
...tap/src/main/java/org/apache/cloudstack/storage/feign/model/ConsistencyGroupSnapshot.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,149 @@ | ||
| /* | ||
| * Licensed to the Apache Software Foundation (ASF) under one | ||
| * or more contributor license agreements. See the NOTICE file | ||
| * distributed with this work for additional information | ||
| * regarding copyright ownership. The ASF licenses this file | ||
| * to you 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 | ||
| * | ||
| * 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.apache.cloudstack.storage.feign.model; | ||
|
|
||
| import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | ||
| import com.fasterxml.jackson.annotation.JsonInclude; | ||
| import com.fasterxml.jackson.annotation.JsonProperty; | ||
|
|
||
| /** | ||
| * Model representing an ONTAP consistency group snapshot. | ||
| * | ||
| * <p>Maps to the ONTAP REST API resource at | ||
| * {@code /api/application/consistency-groups/{consistency_group.uuid}/snapshots}.</p> | ||
| * | ||
| * @see <a href="https://docs.netapp.com/us-en/ontap-restapi/get-application-consistency-groups-snapshots.html"> | ||
| * ONTAP REST API - Consistency Group Snapshots</a> | ||
| */ | ||
| @JsonIgnoreProperties(ignoreUnknown = true) | ||
| @JsonInclude(JsonInclude.Include.NON_NULL) | ||
| public class ConsistencyGroupSnapshot { | ||
|
|
||
| @JsonProperty("uuid") | ||
| private String uuid; | ||
|
|
||
| @JsonProperty("name") | ||
| private String name; | ||
|
|
||
| @JsonProperty("create_time") | ||
| private String createTime; | ||
|
|
||
| @JsonProperty("comment") | ||
| private String comment; | ||
|
|
||
| @JsonProperty("consistency_type") | ||
| private String consistencyType; | ||
|
|
||
| @JsonProperty("snapmirror_label") | ||
| private String snapmirrorLabel; | ||
|
|
||
| @JsonProperty("action") | ||
| private String action; | ||
|
|
||
| @JsonProperty("consistency_group") | ||
| private VolumeConcise consistencyGroup; | ||
|
|
||
| public ConsistencyGroupSnapshot() { | ||
| // default constructor for Jackson | ||
| } | ||
|
|
||
| public ConsistencyGroupSnapshot(String name) { | ||
| this.name = name; | ||
| } | ||
|
|
||
| public ConsistencyGroupSnapshot(String name, String action) { | ||
| this.name = name; | ||
| this.action = action; | ||
| } | ||
|
|
||
| public String getUuid() { | ||
| return uuid; | ||
| } | ||
|
|
||
| public void setUuid(String uuid) { | ||
| this.uuid = uuid; | ||
| } | ||
|
|
||
| public String getName() { | ||
| return name; | ||
| } | ||
|
|
||
| public void setName(String name) { | ||
| this.name = name; | ||
| } | ||
|
|
||
| public String getCreateTime() { | ||
| return createTime; | ||
| } | ||
|
|
||
| public void setCreateTime(String createTime) { | ||
| this.createTime = createTime; | ||
| } | ||
|
|
||
| public String getComment() { | ||
| return comment; | ||
| } | ||
|
|
||
| public void setComment(String comment) { | ||
| this.comment = comment; | ||
| } | ||
|
|
||
| public String getConsistencyType() { | ||
| return consistencyType; | ||
| } | ||
|
|
||
| public void setConsistencyType(String consistencyType) { | ||
| this.consistencyType = consistencyType; | ||
| } | ||
|
|
||
| public String getSnapmirrorLabel() { | ||
| return snapmirrorLabel; | ||
| } | ||
|
|
||
| public void setSnapmirrorLabel(String snapmirrorLabel) { | ||
| this.snapmirrorLabel = snapmirrorLabel; | ||
| } | ||
|
|
||
| public String getAction() { | ||
| return action; | ||
| } | ||
|
|
||
| public void setAction(String action) { | ||
| this.action = action; | ||
| } | ||
|
|
||
| public VolumeConcise getConsistencyGroup() { | ||
| return consistencyGroup; | ||
| } | ||
|
|
||
| public void setConsistencyGroup(VolumeConcise consistencyGroup) { | ||
| this.consistencyGroup = consistencyGroup; | ||
| } | ||
|
|
||
| @Override | ||
| public String toString() { | ||
| return "ConsistencyGroupSnapshot{" + | ||
| "uuid='" + uuid + '\'' + | ||
| ", name='" + name + '\'' + | ||
| ", createTime='" + createTime + '\'' + | ||
| ", comment='" + comment + '\'' + | ||
| ", consistencyType='" + consistencyType + '\'' + | ||
| '}'; | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.