mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
development: Adapt docker-machine addon to new GO API structure and fix minor bugs (#2908)
This commit is contained in:
parent
732b408dad
commit
949e4ffe8f
@ -521,8 +521,10 @@ func (d *Driver) GetIP() (string, error) {
|
||||
return "", err
|
||||
}
|
||||
|
||||
if ip, ok := vm.XPath("/VM/TEMPLATE/NIC/IP"); ok {
|
||||
d.IPAddress = ip
|
||||
if len(vm.Template.NIC) > 0 {
|
||||
if vm.Template.NIC[0].IP != "" {
|
||||
d.IPAddress = vm.Template.NIC[0].IP
|
||||
}
|
||||
}
|
||||
|
||||
if d.IPAddress == "" {
|
||||
|
@ -15,7 +15,7 @@ type Permissions struct {
|
||||
}
|
||||
|
||||
func (p *Permissions) String() string {
|
||||
permStr := [8]string{"uma", "um-", "u-a", "u--", "-ma", "-m-", "--a", "---"}
|
||||
permStr := [8]string{"---", "--a", "-m-", "-ma", "u--", "u-a", "um-", "uma"}
|
||||
owner := permStr[p.OwnerU<<2|p.OwnerM<<1|p.OwnerA]
|
||||
group := permStr[p.GroupU<<2|p.GroupM<<1|p.GroupA]
|
||||
other := permStr[p.OtherU<<2|p.OtherM<<1|p.OtherA]
|
||||
|
@ -85,13 +85,13 @@ type virtualNetworkAR struct {
|
||||
type lease struct {
|
||||
IP string `xml:"IP"`
|
||||
IP6 string `xml:"IP6"`
|
||||
IP6Global string `xml:"IP6Global"`
|
||||
IP6Link string `xml:"IP6Link"`
|
||||
IP6Global string `xml:"IP6GLOBAL"`
|
||||
IP6Link string `xml:"IP6LINK"`
|
||||
IP6ULA string `xml:"IP6ULA"`
|
||||
MAC string `xml:"MAC"`
|
||||
VM int `xml:"VM"`
|
||||
VNet int `xml:"VNet"`
|
||||
VRouter int `xml:"VRouter"`
|
||||
VNet int `xml:"VNET"`
|
||||
VRouter int `xml:"VROUTER"`
|
||||
}
|
||||
|
||||
// NewVirtualNetworkPool returns a virtualnetwork pool. A connection to OpenNebula is
|
||||
|
Loading…
x
Reference in New Issue
Block a user