mirror of https://github.com/apache/cloudstack.git
Bug 8018 - return cloud identifier in some instance metadata
There's an API call "getCloudIdentifier". it returns some UUID that uniquely identifies a cloud.
This bug is to set the value of the instace metadata field cloud-identifier to "CloudStack-{result of getCloudIdentifier}. This metadata is programmed into
the virtual router by the management server.
This commit is contained in:
parent
598503f094
commit
b0b2d594a0
|
|
@ -621,6 +621,14 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
|
|||
cmd.addVmData("metadata", "instance-id", vmInstanceName);
|
||||
cmd.addVmData("metadata", "vm-id", String.valueOf(vmId));
|
||||
cmd.addVmData("metadata", "public-keys", publicKey);
|
||||
|
||||
String cloudIdentifier = _configDao.getValue("cloud.identifier");
|
||||
if (cloudIdentifier == null) {
|
||||
cloudIdentifier = "";
|
||||
}else{
|
||||
cloudIdentifier = "CloudStack-{"+cloudIdentifier+"}";
|
||||
}
|
||||
cmd.addVmData("metadata", "cloud-identifier", cloudIdentifier);
|
||||
|
||||
return cmd;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue