input.go 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168
  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 (
  16. "yunion.io/x/onecloud/pkg/apis"
  17. )
  18. /*
  19. type RegionalResourceCreateInput struct {
  20. Cloudregion string `json:"cloudregion"`
  21. CloudregionId string `json:"cloudregion_id"`
  22. }
  23. type ManagedResourceInput struct {
  24. Manager string `json:"manager"`
  25. ManagerId string `json:"manager_id"`
  26. }
  27. */
  28. type DeletePreventableCreateInput struct {
  29. //删除保护,创建的资源默认不允许删除
  30. //default: true
  31. DisableDelete *bool `json:"disable_delete"`
  32. }
  33. type KeypairListInput struct {
  34. apis.UserResourceListInput
  35. apis.SharableResourceBaseListInput
  36. // 加密类型
  37. // example: RSA
  38. Scheme []string `json:"scheme"`
  39. // 指纹信息
  40. // example: 1d:3a:83:4a:a1:f3:75:97:ec:d1:ef:f8:3f:a7:5d:9e
  41. Fingerprint []string `json:"fingerprint"`
  42. }
  43. type ExternalProjectListInput struct {
  44. apis.VirtualResourceListInput
  45. apis.ExternalizedResourceBaseListInput
  46. ManagedResourceListInput
  47. }
  48. type RouteTableListInput struct {
  49. apis.StatusInfrasResourceBaseListInput
  50. apis.ExternalizedResourceBaseListInput
  51. VpcFilterListInput
  52. // filter by type
  53. Type []string `json:"type"`
  54. }
  55. type SnapshotPolicyCacheListInput struct {
  56. apis.StatusStandaloneResourceListInput
  57. apis.ExternalizedResourceBaseListInput
  58. ManagedResourceListInput
  59. RegionalFilterListInput
  60. SnapshotPolicyFilterListInput
  61. // filter by snapshotpolicy Id or Name
  62. //Snapshotpolicy string `json:"snapshotpolicy"`
  63. }
  64. type NetworkInterfaceListInput struct {
  65. apis.StatusInfrasResourceBaseListInput
  66. apis.ExternalizedResourceBaseListInput
  67. ManagedResourceListInput
  68. RegionalFilterListInput
  69. // MAC地址
  70. Mac []string `json:"mac"`
  71. // 绑定资源类型
  72. AssociateType []string `json:"associate_type"`
  73. // 绑定资源Id
  74. AssociateId []string `json:"associate_id"`
  75. }
  76. type BaremetalagentListInput struct {
  77. apis.StandaloneResourceListInput
  78. ZonalFilterListInput
  79. // 以状态过滤
  80. Status []string `json:"status"`
  81. // 以IP地址过滤
  82. AccessIp []string `json:"access_ip"`
  83. // 以AgentType过滤
  84. AgentType []string `json:"agent_type"`
  85. }
  86. type DynamicschedtagListInput struct {
  87. apis.StandaloneResourceListInput
  88. SchedtagFilterListInput
  89. // filter by enabled status
  90. Enabled *bool `json:"enabled"`
  91. }
  92. type SchedpolicyListInput struct {
  93. apis.StandaloneResourceListInput
  94. SchedtagFilterListInput
  95. //
  96. Strategy []string `json:"strategy"`
  97. //
  98. Enabled *bool `json:"enabled"`
  99. }
  100. type GuestTemplateFilterListInput struct {
  101. // 主机镜像
  102. GuestTemplateId string `json:"guest_template_id"`
  103. // swagger:ignore
  104. // Deprecated
  105. GuestTemplate string `json:"guest_template" yunion-deprecated-by:"guest_template_id"`
  106. }
  107. type ServiceCatalogListInput struct {
  108. apis.SharableVirtualResourceListInput
  109. GuestTemplateFilterListInput
  110. }
  111. type SnapshotPolicyListInput struct {
  112. apis.VirtualResourceListInput
  113. apis.ExternalizedResourceBaseListInput
  114. ManagedResourceListInput
  115. RegionalFilterListInput
  116. // 按绑定的磁盘数量排序
  117. // pattern:asc|desc
  118. OrderByBindDiskCount string `json:"order_by_bind_disk_count"`
  119. OrderBySnapshotCount string `json:"order_by_snapshot_count"`
  120. // 按类型过滤
  121. // example: disk, server
  122. Type string `json:"type"`
  123. ResourceId []string `json:"resource_id"`
  124. }
  125. type HostnameInput struct {
  126. // 主机名
  127. // 点号(.)和短横线(-)不能作为 HostName 的首尾字符,不能连续使用
  128. // 字符长度2-60个字符
  129. // Windows: 字符长度2-15, 允许大小写英文字母, 数字和短横线, 不支持点号(.),不能全是数字
  130. // 若输入为空,则会根据资源名称自动生成主机名
  131. // 输入不为空则会自动剔除不符合规则的字符, 并进行校验
  132. // 若长度大于允许的最大长度,会自动截取
  133. // required: false
  134. Hostname string `json:"hostname"`
  135. }