添加ct的transporter
parent
12dac071a5
commit
ac490ab0ea
|
@ -479,6 +479,10 @@ public class CloudServer extends GenericEntity implements VendorEntity {
|
|||
@IgnoreAll
|
||||
private String statusName;
|
||||
|
||||
|
||||
@Column("local_id")
|
||||
private String localId;
|
||||
|
||||
/**
|
||||
* @return the password
|
||||
*/
|
||||
|
|
|
@ -159,6 +159,30 @@ public class Network extends GenericEntity {
|
|||
@IgnoreAll
|
||||
private String azName;
|
||||
|
||||
|
||||
@Column("local_id")
|
||||
private String localId;
|
||||
|
||||
|
||||
@Column("cluster_uuid")
|
||||
private String clusterUuid;
|
||||
|
||||
public String getClusterUuid() {
|
||||
return clusterUuid;
|
||||
}
|
||||
|
||||
public void setClusterUuid(String clusterUuid) {
|
||||
this.clusterUuid = clusterUuid;
|
||||
}
|
||||
|
||||
public String getLocalId() {
|
||||
return localId;
|
||||
}
|
||||
|
||||
public void setLocalId(String localId) {
|
||||
this.localId = localId;
|
||||
}
|
||||
|
||||
public Boolean getRouterExternal() {
|
||||
return isRouterExternal;
|
||||
}
|
||||
|
|
|
@ -190,4 +190,10 @@ public class VendorTaskMsg extends Generic {
|
|||
return this.getSmartSucceed() || this.getSmartFailed();
|
||||
}
|
||||
|
||||
|
||||
public boolean getCloudTowerSucceed() {
|
||||
// smart的任务状态 pending processing done failed
|
||||
return "SUCCESSED".equalsIgnoreCase(this.getStatus());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ import com.bocloud.common.utils.MapTools;
|
|||
import com.bocloud.database.core.intf.impl.BasicGenericDao;
|
||||
import com.bocloud.database.utils.QueryBuilder;
|
||||
import com.bocloud.ims.entity.resource.Cluster;
|
||||
import com.bocloud.orm.OrmGenericDaoImpl;
|
||||
import com.google.common.collect.Maps;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.jdbc.core.JdbcTemplate;
|
||||
|
@ -29,7 +30,7 @@ import java.util.Map;
|
|||
* @since 2020年5月15日
|
||||
*/
|
||||
@Component("clusterRepository")
|
||||
public class ClusterRepository extends BasicGenericDao<Cluster, Long> {
|
||||
public class ClusterRepository extends OrmGenericDaoImpl<Cluster, Long> {
|
||||
|
||||
public ClusterRepository(JdbcTemplate jdbcTemplate, NamedParameterJdbcTemplate npJdbcTemplate) {
|
||||
super(jdbcTemplate, npJdbcTemplate);
|
||||
|
|
|
@ -1039,4 +1039,16 @@ public class VolumeRepository extends OrmGenericDaoImpl<Volume, Long> {
|
|||
List<Volume> list = this.list(Volume.class, sql, params);
|
||||
return list == null || list.size() == 0 ? null : list.get(0).getSequenceNum();
|
||||
}
|
||||
|
||||
|
||||
public Volume getByServerIdAndVolumeUuid(Long serverId, String volumeUuid) {
|
||||
String sql = "select a.* from volume a where a.is_deleted = 0 and a.server_id = :serverId and a.volume_uuid = :volumeUuid";
|
||||
Map<String, Object> paramMap = MapTools.simpleMap("serverId", serverId);
|
||||
paramMap.put("volumeUuid", volumeUuid);
|
||||
List<Volume> list = this.list(Volume.class, sql, paramMap);
|
||||
if (list.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
return list.get(0);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -104,4 +104,12 @@ public class VolumeTemplateRepository extends JdbcGenericDao<VolumeTemplate, Lon
|
|||
List<VolumeTemplate> templates = list(VolumeTemplate.class, sql, params);
|
||||
return templates == null || templates.size() == 0 ? null : templates.get(0);
|
||||
}
|
||||
|
||||
|
||||
public VolumeTemplate getByName(String name) {
|
||||
String sql = "select a.* from volume_template a where a.is_deleted = 0 and a.name = :name";
|
||||
Map<String, Object> params = MapTools.simpleMap("name", name);
|
||||
List<VolumeTemplate> templates = list(VolumeTemplate.class, sql, params);
|
||||
return templates == null || templates.size() == 0 ? null : templates.get(0);
|
||||
}
|
||||
}
|
||||
|
|
1348
bocloud.ims.service/src/main/java/com/bocloud/ims/service/transporter/vendor/CloudTowerTransporter.java
vendored
Normal file
1348
bocloud.ims.service/src/main/java/com/bocloud/ims/service/transporter/vendor/CloudTowerTransporter.java
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue