Skip to content

Commit

Permalink
Merge branch 'lianq_0715' into lianq_0630
Browse files Browse the repository at this point in the history
  • Loading branch information
lianqiang-git committed Jun 23, 2021
2 parents e1f4348 + 50db5cc commit c70d1b7
Show file tree
Hide file tree
Showing 77 changed files with 24,673 additions and 980 deletions.
2 changes: 1 addition & 1 deletion dme-vcenter-plugin/plugin-package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
type: keep "html" for this plugin to be deployed in the vSphere HTML client.
name: short name displayed in the Administration < Client plugins view
-->
<pluginPackage id="com.huawei.dmestore" version="1.0.0" type="html" name="Huawei DME Plugin"
<pluginPackage id="com.huawei.dmestore" version="1.1.0" type="html" name="Huawei DME Plugin"
description="Huawei DME Plugin" vendor="Add vendor">

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,13 @@ public class DmeConstants {
* POST
* estimate connectivity of host or hostgroup on dme
* old
* public static final String DME_ESTIMATE_CONNECTIVITY = "/rest/vmmgmt/v1/connectivity/host-storage";
*/
//public static final String DME_ESTIMATE_CONNECTIVITY = "/rest/vmmgmt/v1/connectivity/host-storage";
public static final String DME_ESTIMATE_CONNECTIVITY = "/rest/hostmgmt/v1/connectivity/host-and-storage";
/**
* query oriented volume
* /rest/blockservice/v1/volumes/{volume_id}
*/
public static final String DME_QUERY_ONE_VOLUME = "/rest/blockservice/v1/volumes/{volume_id}";
/**
* nfs share detail
**/
Expand Down Expand Up @@ -158,6 +161,12 @@ public class DmeConstants {
**/
public static final String MOUNT_VOLUME_TO_HOSTGROUP_URL = "/rest/blockservice/v1/volumes/hostgroup-mapping";

/**
* hostgroup mapping view query
* post
**/
public static final String QUERY_HOSTGROUP_MAPPING_VIEW_URL = "/rest/blockservice/v1/volumes/mapping-view/query";

/**
* volume expand
**/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public void doFilter(ServletRequest request, ServletResponse response, FilterCha
throws IOException, ServletException {
HttpServletResponse res = (HttpServletResponse) response;
res.addHeader("Access-Control-Allow-Credentials", "true");
//res.addHeader("Access-Control-Allow-Origin", "http://localhost:4200");
res.addHeader("Access-Control-Allow-Origin", "*");
res.addHeader("Access-Control-Allow-Methods", "GET, POST, DELETE, PUT");
res.addHeader("Access-Control-Allow-Headers", "Content-Type,X-CAF-Authorization-Token,sessionToken,X-TOKEN");
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
package com.huawei.dmestore.model;

import java.util.Date;

/**
* @author yc
* @Title:
* @Description:
* @date 2021/5/2518:03
*/
public class Attachment {
private String id;
private String volumeId;
private String hostId;
private String attachedAt;
private String attachedHostGroup;
private Date attachedAtDate;

public Attachment() {
}

public String getId() {
return id;
}

public void setId(String id) {
this.id = id;
}

public String getVolumeId() {
return volumeId;
}

public void setVolumeId(String volumeId) {
this.volumeId = volumeId;
}

public String getHostId() {
return hostId;
}

public void setHostId(String hostId) {
this.hostId = hostId;
}

public String getAttachedAt() {
return attachedAt;
}

public void setAttachedAt(String attachedAt) {
this.attachedAt = attachedAt;
}

public String getAttachedHostGroup() {
return attachedHostGroup;
}

public void setAttachedHostGroup(String attachedHostGroup) {
this.attachedHostGroup = attachedHostGroup;
}

public Date getAttachedAtDate() {
return attachedAtDate;
}

public void setAttachedAtDate(Date attachedAtDate) {
this.attachedAtDate = attachedAtDate;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
package com.huawei.dmestore.model;

import java.io.Serializable;
import java.util.List;

/**
* @author yc
* @Title: ClusterTree
* @Description: be used encapsulation cluster tree
* @date 2021/5/1114:15
*/
public class ClusterTree implements Serializable {
private static final long serialVersionUID = 6756705875820791027L;
private String clusterId;
private String clusterName;
private boolean flag = true;
private List<ClusterTree> children;

public ClusterTree(String clusterId, String clusterName, List<ClusterTree> children) {
this.clusterId = clusterId;
this.clusterName = clusterName;
this.children = children;
}

public ClusterTree() {

}

public String getClusterId() {
return clusterId;
}

public void setClusterId(String clusterId) {
this.clusterId = clusterId;
}

public String getClusterName() {
return clusterName;
}

public void setClusterName(String clusterName) {
this.clusterName = clusterName;
}

public List<ClusterTree> getChildren() {
return children;
}

public void setChildren(List<ClusterTree> children) {
this.children = children;
}

public boolean isFlag() {
return flag;
}

public void setFlag(boolean flag) {
this.flag = flag;
}

@Override
public String toString() {
return "ClusterTree{" +
"clusterId='" + clusterId + '\'' +
", clusterName='" + clusterName + '\'' +
", children=" + children +
'}';
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
package com.huawei.dmestore.model;

import java.io.Serializable;
import java.util.List;
import java.util.Map;

/**
* @author yc
* @Title:
* @Description:
* @date 2021/5/2810:41
*/
public class CreateVmfsResponse implements Serializable {
private static final long serialVersionUID = 8718802610431878776L;

private int successNo;
private int failNo;
private List<String> connectionResult ;
private String descriptionEN;
private String descriptionCN;

public CreateVmfsResponse() {
}

@Override
public String toString() {
return "CreateVmfsResponse{" +
"successNo=" + successNo +
", failNo=" + failNo +
", connectionResult=" + connectionResult +
'}';
}

public CreateVmfsResponse(int successNo) {
this.successNo = successNo;
}

public CreateVmfsResponse(int successNo, int failNo) {
this.successNo = successNo;
this.failNo = failNo;
}

public CreateVmfsResponse(int successNo, int failNo, List<String> connectionResult) {
this.successNo = successNo;
this.failNo = failNo;
this.connectionResult = connectionResult;
}

public int getSuccessNo() {
return successNo;
}

public void setSuccessNo(int successNo) {
this.successNo = successNo;
}

public int getFailNo() {
return failNo;
}

public void setFailNo(int failNo) {
this.failNo = failNo;
}

public List<String> getConnectionResult() {
return connectionResult;
}

public void setConnectionResult(List<String> connectionResult) {
this.connectionResult = connectionResult;
}

public String getDescriptionEN() {
return descriptionEN;
}

public void setDescriptionEN(String descriptionEN) {
this.descriptionEN = descriptionEN;
}

public String getDescriptionCN() {
return descriptionCN;
}

public void setDescriptionCN(String descriptionCN) {
this.descriptionCN = descriptionCN;
}

public CreateVmfsResponse(int successNo, int failNo, List<String> connectionResult, String descriptionEN, String descriptionCN) {
this.successNo = successNo;
this.failNo = failNo;
this.connectionResult = connectionResult;
this.descriptionEN = descriptionEN;
this.descriptionCN = descriptionCN;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package com.huawei.dmestore.model;

/**
* @author yc
* @Title:
* @Description:
* @date 2021/5/3111:23
*/
public class HostGroupAndClusterConsistency {
private boolean consistency; //true 一致; false 不一致
private String hostGroupId; //主机组id

public HostGroupAndClusterConsistency() { }

public HostGroupAndClusterConsistency(boolean consistency) {
this.consistency = consistency;
}

public HostGroupAndClusterConsistency(String hostGroupId) {
this.hostGroupId = hostGroupId;
}

public boolean isConsistency() {
return consistency;
}

public void setConsistency(boolean consistency) {
this.consistency = consistency;
}

public String getHostGroupId() {
return hostGroupId;
}

public void setHostGroupId(String hostGroupId) {
this.hostGroupId = hostGroupId;
}

public HostGroupAndClusterConsistency(boolean consistency, String hostGroupId) {
this.consistency = consistency;
this.hostGroupId = hostGroupId;
}
}
Loading

0 comments on commit c70d1b7

Please sign in to comment.