groupnetwork.go 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. // Copyright 2019 Yunion
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. package compute
  15. type GroupnetworkDetails struct {
  16. GroupJointResourceDetails
  17. SGroupnetwork
  18. // IP子网名称
  19. Network string `json:"network"`
  20. // EipAddr if eip is associated with this groupnetwork
  21. EipAddr string `json:"eip_addr"`
  22. }
  23. type GroupnetworkListInput struct {
  24. GroupJointsListInput
  25. NetworkFilterListInput
  26. // IP地址
  27. IpAddr []string `json:"ip_addr"`
  28. // IPv6地址
  29. Ip6Addr []string `json:"ip6_addr"`
  30. }
  31. type GroupAttachNetworkInput struct {
  32. // network id or name
  33. NetworkId string `json:"network_id" help:"The network to attach, optional"`
  34. // candidate IPv4 addr
  35. IpAddr string `json:"ip_addr" help:"The ipv4 address to use, optional"`
  36. // candidate IPv6 addr
  37. Ip6Addr string `json:"ip6_addr" help:"The ipv6 address to use, optional"`
  38. // Allocation direction
  39. AllocDir IPAllocationDirection `json:"alloc_dir" help:"ip allocation direction, optional"`
  40. // Reserved
  41. Reserved *bool `json:"reserved" help:"the address is allocated from reserved addresses"`
  42. // Required Designed IP
  43. RequireDesignatedIp *bool `json:"require_designated_ip" help:"fail if the designed ip is not available"`
  44. // allocate ipv6 address
  45. RequireIPv6 bool `json:"require_ipv6" help:"fail if no ipv6 address allocated"`
  46. }
  47. type GroupDetachNetworkInput struct {
  48. // candidate IPaddr, can be either IPv4 or IPv6 address
  49. IpAddr string `json:"ip_addr" help:"Ip address to detach, empty if detach all networks"`
  50. }