mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-08-31 01:35:56 +08:00
fix: build broken for changing GetNetworkOfIP to GetOnPremiseNetworkOfIP
This commit is contained in:
+1
-1
@@ -36,7 +36,7 @@ func parseRequest(state request.Request) (r *recordRequest, err error) {
|
||||
if guest := models.GuestnetworkManager.GetGuestByAddress(srcIP); guest != nil {
|
||||
r.srcProjectId = guest.ProjectId
|
||||
r.srcInCloud = true
|
||||
} else if network, _ := models.NetworkManager.GetNetworkOfIP(srcIP, "", tristate.None); network != nil {
|
||||
} else if network, _ := models.NetworkManager.GetOnPremiseNetworkOfIP(srcIP, "", tristate.None); network != nil {
|
||||
r.srcProjectId = network.ProjectId
|
||||
r.srcInCloud = true
|
||||
}
|
||||
|
||||
@@ -58,7 +58,11 @@ func init() {
|
||||
}
|
||||
|
||||
shellutils.R(&InstanceChangeConfigOptions{}, "instance-change-config", "Change instance config", func(cli *openstack.SRegion, args *InstanceChangeConfigOptions) error {
|
||||
return cli.ChageConfig(args.ID, args.FLAVOR_ID)
|
||||
instance, err := cli.GetInstance(args.ID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return cli.ChangeConfig(instance, args.FLAVOR_ID)
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user