instance_group.go 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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. import "yunion.io/x/onecloud/pkg/apis"
  16. type InstanceGroupListInput struct {
  17. apis.VirtualResourceListInput
  18. apis.EnabledResourceBaseListInput
  19. ZonalFilterListInput
  20. ServerFilterListInput
  21. // 以service_type过滤列表结果
  22. ServiceType string `json:"service_type"`
  23. // 以parent_id过滤列表结果
  24. ParentId string `json:"parent_id"`
  25. // 调度策略
  26. SchedStrategy string `json:"sched_strategy"`
  27. // 按ip地址排序
  28. // pattern:asc|desc
  29. OrderByVips string `json:"order_by_vips"`
  30. // 按关联的虚拟机数量排序
  31. // pattern:asc|desc
  32. OrderByGuestCount string `json:"order_by_guest_count"`
  33. }
  34. type InstanceGroupDetail struct {
  35. apis.VirtualResourceDetails
  36. ZoneResourceInfo
  37. SGroup
  38. // 云主机数量
  39. GuestCount int `json:"guest_count"`
  40. // VIP
  41. Vips []string `json:"vips"`
  42. // EIP of VIP
  43. VipEip string `json:"vip_eip"`
  44. // Attached NetworkId
  45. NetworkId string `json:"network_id"`
  46. // Attached Network
  47. Network string `json:"network"`
  48. }
  49. type GroupResourceInput struct {
  50. // 实例组(ID或Name)
  51. GroupId string `json:"group_id"`
  52. // swagger:ignore
  53. // Deprecated
  54. // Filter by instance group Id
  55. Group string `json:"group" yunion-deprecated-by:"group_id"`
  56. }
  57. type GroupFilterListInput struct {
  58. GroupResourceInput
  59. // 按组名排序
  60. OrderByGroup string `json:"order_by_group"`
  61. }
  62. type GroupResourceInfo struct {
  63. // 实例组名称
  64. Group string `json:"group"`
  65. }