Skip to content

Commit

Permalink
F OpenNebula#3219: GOCA - fix omitempty for consistency
Browse files Browse the repository at this point in the history
Signed-off-by: Pierre Lafievre <pierre.lafievre@iguanesolutions.com>
  • Loading branch information
treywelsh committed Jan 30, 2020
1 parent 31610ba commit 8102057
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
10 changes: 5 additions & 5 deletions src/oca/go/src/goca/schemas/virtualnetwork/virtualnetwork.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ type Pool struct {
type VirtualNetwork struct {
XMLName xml.Name `xml:"VNET"`
ID int `xml:"ID,omitempty"`
UID int `xml:"UID"`
GID int `xml:"GID"`
UName string `xml:"UNAME"`
GName string `xml:"GNAME"`
UID int `xml:"UID,omitempty"`
GID int `xml:"GID,omitempty"`
UName string `xml:"UNAME,omitempty"`
GName string `xml:"GNAME,omitempty"`
Name string `xml:"NAME"`
Permissions *shared.Permissions `xml:"PERMISSIONS"`
Permissions *shared.Permissions `xml:"PERMISSIONS,omitempty"`
Clusters shared.EntitiesID `xml:"CLUSTERS,omitempty"`
Bridge string `xml:"BRIDGE,omitempty"`
BridgeType string `xml:"BRIDGE_TYPE,omitempty"` // minOccurs=0
Expand Down
20 changes: 10 additions & 10 deletions src/oca/go/src/goca/schemas/vmgroup/vmgroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,20 @@ type Pool struct {
// VMGroup represents an OpenNebula VM group
type VMGroup struct {
XMLName xml.Name `xml:"VM_GROUP"`
ID int `xml:"ID"`
UID int `xml:"UID"`
GID int `xml:"GID"`
UName string `xml:"UNAME"`
GName string `xml:"GNAME"`
ID int `xml:"ID,omitemtpy"`
UID int `xml:"UID,omitempty"`
GID int `xml:"GID,omitempty"`
UName string `xml:"UNAME,omitempty"`
GName string `xml:"GNAME,omitempty"`
Name string `xml:"NAME"`
Permissions *shared.Permissions `xml:"PERMISSIONS"`
LockInfos *shared.Lock `xml:"LOCK"`
Roles []Role `xml:"ROLES>ROLE"`
Template dyn.Template `xml:"TEMPLATE"`
Permissions *shared.Permissions `xml:"PERMISSIONS,omitempty"`
LockInfos *shared.Lock `xml:"LOCK,omitempty"`
Roles []Role `xml:"ROLES>ROLE,omitempty"`
Template dyn.Template `xml:"TEMPLATE,omitempty"`
}

type Role struct {
ID int `xml:"ID"`
ID int `xml:"ID,omitempty"`
Name string `xml:"NAME"`
HostAffined string `xml:"HOST_AFFINED,omitempty"` // minOccurs=0
HostAntiAffined string `xml:"HOST_ANTI_AFFINED,omitempty"` // minOccurs=0
Expand Down

0 comments on commit 8102057

Please sign in to comment.