inter_vpc_network.go 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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/cloudmux/pkg/apis/compute"
  17. "yunion.io/x/onecloud/pkg/apis"
  18. )
  19. const (
  20. INTER_VPC_NETWORK_STATUS_AVAILABLE = compute.INTER_VPC_NETWORK_STATUS_AVAILABLE
  21. INTER_VPC_NETWORK_STATUS_CREATING = compute.INTER_VPC_NETWORK_STATUS_CREATING
  22. INTER_VPC_NETWORK_STATUS_CREATE_FAILED = "create_failed"
  23. INTER_VPC_NETWORK_STATUS_DELETE_FAILED = "delete_failed"
  24. INTER_VPC_NETWORK_STATUS_DELETING = compute.INTER_VPC_NETWORK_STATUS_DELETING
  25. INTER_VPC_NETWORK_STATUS_ACTIVE = "active"
  26. INTER_VPC_NETWORK_STATUS_ADDVPC = "add_vpc"
  27. INTER_VPC_NETWORK_STATUS_ADDVPC_FAILED = "add_vpc_failed"
  28. INTER_VPC_NETWORK_STATUS_REMOVEVPC = "remove_vpc"
  29. INTER_VPC_NETWORK_STATUS_REMOVEVPC_FAILED = "remove_vpc_failed"
  30. INTER_VPC_NETWORK_STATUS_UPDATEROUTE = "update_route"
  31. INTER_VPC_NETWORK_STATUS_UPDATEROUTE_FAILED = "update_route_failed"
  32. INTER_VPC_NETWORK_STATUS_UNKNOWN = compute.INTER_VPC_NETWORK_STATUS_UNKNOWN
  33. )
  34. type InterVpcNetworkListInput struct {
  35. apis.EnabledStatusInfrasResourceBaseListInput
  36. ManagedResourceListInput
  37. }
  38. type InterVpcNetworkCreateInput struct {
  39. apis.EnabledStatusInfrasResourceBaseCreateInput
  40. ManagerId string `json:"manager_id"`
  41. }
  42. type InterVpcNetworkUpdateInput struct {
  43. apis.EnabledStatusInfrasResourceBaseUpdateInput
  44. }
  45. type InterVpcNetworkDetails struct {
  46. apis.EnabledStatusInfrasResourceBaseDetails
  47. ManagedResourceInfo
  48. VpcCount int `json:"vpc_count"`
  49. }
  50. type InterVpcNetworkSyncstatusInput struct {
  51. }
  52. type InterVpcNetworkAddVpcInput struct {
  53. // 待加入的vpc id
  54. // vpc和当前vpc互联所必须是同一平台,且运营平台一致,例如aws中国区不能和aws国际区运营平台不一致
  55. // 可以通过 /vpcs?usable_for_inter_vpc_network_id=<当前vpc互联id> 过滤可以加入的vpc列表
  56. // required: true
  57. VpcId string `json:"vpc_id"`
  58. }
  59. type InterVpcNetworkRemoveVpcInput struct {
  60. VpcId string `json:"vpc_id"`
  61. }
  62. type InterVpcNetworkFilterListBase struct {
  63. InterVpcNetworkId string `json:"inter_vpc_network_id"`
  64. }
  65. type InterVpcNetworkManagerListInput struct {
  66. apis.EnabledStatusInfrasResourceBaseListInput
  67. ManagedResourceListInput
  68. // 按关联的vpc数量排序
  69. // pattern:asc|desc
  70. OrderByVpcCount string `json:"order_by_vpc_count"`
  71. }