@@ -58,7 +58,7 @@ type NetworkParam struct {
58
58
// The UUID of the network. Required if you omit the port attribute.
59
59
UUID string `json:"uuid,omitempty"`
60
60
// A fixed IPv4 address for the NIC.
61
- FixedIP string `json:"fixedIp ,omitempty"`
61
+ FixedIP string `json:"fixedIP ,omitempty"`
62
62
// Filters for optional network query
63
63
Filter Filter `json:"filter,omitempty"`
64
64
// Subnet within a network to use
@@ -116,6 +116,38 @@ type SubnetFilter struct {
116
116
NotTagsAny string `json:"notTagsAny,omitempty"`
117
117
}
118
118
119
+ type PortOpts struct {
120
+ // ID of the OpenStack network on which to create the port. If unspecified, create the port on the default cluster network.
121
+ NetworkID string `json:"networkId,omitempty"`
122
+ // Used to make the name of the port unique. If unspecified, instead the 0-based index of the port in the list is used.
123
+ NameSuffix string `json:"nameSuffix,omitempty"`
124
+ Description string `json:"description,omitempty"`
125
+ AdminStateUp * bool `json:"adminStateUp,omitempty"`
126
+ MACAddress string `json:"macAddress,omitempty"`
127
+ // Specify pairs of subnet and/or IP address. These should be subnets of the network with the given NetworkID.
128
+ FixedIPs []FixedIP `json:"fixedIPs,omitempty"`
129
+ TenantID string `json:"tenantId,omitempty"`
130
+ ProjectID string `json:"projectId,omitempty"`
131
+ SecurityGroups * []string `json:"securityGroups,omitempty"`
132
+ AllowedAddressPairs []AddressPair `json:"allowedAddressPairs,omitempty"`
133
+
134
+ // The ID of the host where the port is allocated
135
+ HostID string `json:"hostId,omitempty"`
136
+
137
+ // The virtual network interface card (vNIC) type that is bound to the neutron port.
138
+ VNICType string `json:"vnicType,omitempty"`
139
+ }
140
+
141
+ type FixedIP struct {
142
+ SubnetID string `json:"subnetId"`
143
+ IPAddress string `json:"ipAddress,omitempty"`
144
+ }
145
+
146
+ type AddressPair struct {
147
+ IPAddress string `json:"ipAddress,omitempty"`
148
+ MACAddress string `json:"macAddress,omitempty"`
149
+ }
150
+
119
151
type Instance struct {
120
152
ID string `json:"id,omitempty"`
121
153
Name string `json:"name,omitempty"`
@@ -145,16 +177,17 @@ type RootVolume struct {
145
177
Size int `json:"diskSize,omitempty"`
146
178
}
147
179
148
- // Network represents basic information about the associated OpenStach Neutron Network.
180
+ // Network represents basic information about an OpenStack Neutron Network associated with an instance's port .
149
181
type Network struct {
150
182
Name string `json:"name"`
151
183
ID string `json:"id"`
152
184
153
185
//+optional
154
186
Tags []string `json:"tags,omitempty"`
155
187
156
- Subnet * Subnet `json:"subnet,omitempty"`
157
- Router * Router `json:"router,omitempty"`
188
+ Subnet * Subnet `json:"subnet,omitempty"`
189
+ PortOpts * PortOpts `json:"port,omitempty"`
190
+ Router * Router `json:"router,omitempty"`
158
191
159
192
// Be careful when using APIServerLoadBalancer, because this field is optional and therefore not
160
193
// set in all cases
0 commit comments