mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Automatic merge from release/2.2.0 -> release/2.3.0
* commit 'd8a52fdf1d82f2d67158939e183b95913a937287': priceKey携带region信息
This commit is contained in:
@@ -113,7 +113,8 @@ type SClassicInstance struct {
|
||||
|
||||
func (self *SClassicInstance) GetMetadata() *jsonutils.JSONDict {
|
||||
data := jsonutils.NewDict()
|
||||
data.Add(jsonutils.NewString(self.Properties.HardwareProfile.Size), "price_key")
|
||||
priceKey := fmt.Sprintf("%s::%s", self.Properties.HardwareProfile.Size, self.host.zone.region.Name)
|
||||
data.Add(jsonutils.NewString(priceKey), "price_key")
|
||||
if self.Properties.NetworkProfile.NetworkSecurityGroup != nil {
|
||||
data.Add(jsonutils.NewString(self.Properties.NetworkProfile.NetworkSecurityGroup.ID), "secgroupId")
|
||||
}
|
||||
|
||||
@@ -229,7 +229,8 @@ func (self *SInstance) GetMetadata() *jsonutils.JSONDict {
|
||||
data.Add(jsonutils.NewString(loginKey), "login_key")
|
||||
}
|
||||
|
||||
data.Add(jsonutils.NewString(self.Properties.HardwareProfile.VMSize), "price_key")
|
||||
priceKey := fmt.Sprintf("%s::%s", self.Properties.HardwareProfile.VMSize, self.host.zone.region.Name)
|
||||
data.Add(jsonutils.NewString(priceKey), "price_key")
|
||||
if nics, err := self.getNics(); err == nil {
|
||||
for _, nic := range nics {
|
||||
if nic.Properties.NetworkSecurityGroup != nil {
|
||||
|
||||
Reference in New Issue
Block a user