mount_targets.go 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. MOUNT_TARGET_STATUS_AVAILABLE = compute.MOUNT_TARGET_STATUS_AVAILABLE
  21. MOUNT_TARGET_STATUS_UNAVAILABLE = compute.MOUNT_TARGET_STATUS_UNAVAILABLE
  22. MOUNT_TARGET_STATUS_CREATING = compute.MOUNT_TARGET_STATUS_CREATING
  23. MOUNT_TARGET_STATUS_CREATE_FAILED = "create_failed"
  24. MOUNT_TARGET_STATUS_DELETING = compute.MOUNT_TARGET_STATUS_DELETING
  25. MOUNT_TARGET_STATUS_DELETE_FAILED = "delete_failed"
  26. MOUNT_TARGET_STATUS_UNKNOWN = "unknown"
  27. )
  28. type MountTargetListInput struct {
  29. apis.StatusStandaloneResourceListInput
  30. apis.ExternalizedResourceBaseListInput
  31. AccessGroupFilterListInput
  32. VpcFilterListInput
  33. NetworkFilterListInput
  34. // 文件系统Id
  35. FileSystemId string `json:"file_system_id"`
  36. }
  37. type MountTargetDetails struct {
  38. apis.StatusStandaloneResourceDetails
  39. AccessGroupResourceInfo
  40. VpcResourceInfo
  41. NetworkResourceInfo
  42. FileSystem string `json:"file_system"`
  43. }
  44. type MountTargetCreateInput struct {
  45. apis.StatusStandaloneResourceCreateInput
  46. // 网络类型
  47. // enmu: vpc, classic
  48. // default: vpc
  49. NetworkType string `json:"network_type"`
  50. // 文件系统Id
  51. // required: true
  52. FileSystemId string `json:"file_system_id"`
  53. // Ip子网名称或Id, network_type == vpc时有效
  54. // required: true
  55. NetworkId string `json:"network_id"`
  56. // swagger:ignore
  57. Network string `json:"network" yunion-deprecated-by:"network_id"`
  58. // swagger:ignore
  59. VpcId string `json:"vpc_id"`
  60. // 权限组Id
  61. AccessGroupId string `json:"access_group_id"`
  62. }
  63. type MountTargetSyncstatusInput struct {
  64. }