mirror of https://github.com/apache/cloudstack.git
Bug 8208 - bare metal provisioning
use hostTags in addHostCmd
This commit is contained in:
parent
96e83fe97f
commit
b4e18b7fbe
|
|
@ -77,12 +77,7 @@ public class AddHostCmd extends BaseCmd {
|
|||
private Long memCapacity;
|
||||
|
||||
@Parameter(name=ApiConstants.HOST_MAC, type=CommandType.STRING, description="Only for hypervisor is BareMetal, Mac of PXE nic")
|
||||
private String mac;
|
||||
|
||||
@Parameter(name=ApiConstants.HOST_TAG, type=CommandType.STRING, description="Only for hypervisor is BareMetal, Tag of host")
|
||||
private String hostTag;
|
||||
|
||||
|
||||
private String mac;
|
||||
|
||||
@Parameter(name=ApiConstants.HOST_TAGS, type=CommandType.LIST, collectionType=CommandType.STRING, description="list of tags to be added to the host")
|
||||
private List<String> hostTags;
|
||||
|
|
@ -141,11 +136,7 @@ public class AddHostCmd extends BaseCmd {
|
|||
|
||||
public String getMac() {
|
||||
return mac;
|
||||
}
|
||||
|
||||
public String getHostTag() {
|
||||
return hostTag;
|
||||
}
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
/////////////// API Implementation///////////////////
|
||||
|
|
|
|||
|
|
@ -756,7 +756,7 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory,
|
|||
Long cpuSpeed = cmd.getCpuSpeed();
|
||||
Long cpuNum = cmd.getCpuNum();
|
||||
String mac = cmd.getMac();
|
||||
String hostTag = cmd.getHostTag();
|
||||
List<String> hostTags = cmd.getHostTags();
|
||||
Map<String, String>bareMetalParams = new HashMap<String, String>();
|
||||
|
||||
// this is for standalone option
|
||||
|
|
@ -782,13 +782,11 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory,
|
|||
bareMetalParams.put("cpuCapacity", cpuSpeed.toString());
|
||||
bareMetalParams.put("memCapacity", memCapacity.toString());
|
||||
bareMetalParams.put("mac", mac);
|
||||
if (hostTag != null) {
|
||||
bareMetalParams.put("hostTag", hostTag);
|
||||
if (hostTags != null) {
|
||||
bareMetalParams.put("hostTag", hostTags.get(0));
|
||||
}
|
||||
}
|
||||
|
||||
List<String> hostTags = cmd.getHostTags();
|
||||
|
||||
return discoverHostsFull(dcId, podId, clusterId, clusterName, url,
|
||||
username, password, cmd.getHypervisor(), hostTags, bareMetalParams);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue