cloudaccounts.go 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  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/cmd/climc/shell"
  17. modules "yunion.io/x/onecloud/pkg/mcclient/modules/compute"
  18. options "yunion.io/x/onecloud/pkg/mcclient/options/compute"
  19. )
  20. func init() {
  21. cmd := shell.NewResourceCmd(&modules.Cloudaccounts).WithKeyword("cloud-account")
  22. cmd.List(&options.CloudaccountListOptions{})
  23. cmd.Show(&options.SCloudAccountIdOptions{})
  24. cmd.Delete(&options.SCloudAccountIdOptions{})
  25. cmd.Update(&options.SCloudAccountUpdateBaseOptions{})
  26. // cmd.PerformClassWithKeyword("preparenets-vmware", "prepare-nets", &options.SVMwareCloudAccountPrepareNetsOptions{})
  27. cmd.CreateWithKeyword("create-vmware", &options.SVMwareCloudAccountCreateOptions{})
  28. cmd.CreateWithKeyword("create-aliyun", &options.SAliyunCloudAccountCreateOptions{})
  29. cmd.CreateWithKeyword("create-azure", &options.SAzureCloudAccountCreateOptions{})
  30. cmd.CreateWithKeyword("create-qcloud", &options.SQcloudCloudAccountCreateOptions{})
  31. cmd.CreateWithKeyword("create-google", &options.SGoogleCloudAccountCreateOptions{})
  32. cmd.CreateWithKeyword("create-aws", &options.SAWSCloudAccountCreateOptions{})
  33. cmd.CreateWithKeyword("create-openstack", &options.SOpenStackCloudAccountCreateOptions{})
  34. cmd.CreateWithKeyword("create-huawei", &options.SHuaweiCloudAccountCreateOptions{})
  35. cmd.CreateWithKeyword("create-hcso", &options.SHCSOAccountCreateOptions{})
  36. cmd.CreateWithKeyword("create-hcs", &options.SHCSAccountCreateOptions{})
  37. cmd.CreateWithKeyword("create-hcsop", &options.SHcsOpCloudAccountCreateOptions{})
  38. cmd.CreateWithKeyword("create-ucloud", &options.SUcloudCloudAccountCreateOptions{})
  39. cmd.CreateWithKeyword("create-volcengine", &options.SVolcengineCloudAccountCreateOptions{})
  40. cmd.CreateWithKeyword("create-zstack", &options.SZStackCloudAccountCreateOptions{})
  41. cmd.CreateWithKeyword("create-s3", &options.SS3CloudAccountCreateOptions{})
  42. cmd.CreateWithKeyword("create-ceph", &options.SCephCloudAccountCreateOptions{})
  43. cmd.CreateWithKeyword("create-xsky", &options.SXskyCloudAccountCreateOptions{})
  44. cmd.CreateWithKeyword("create-ctyun", &options.SCtyunCloudAccountCreateOptions{})
  45. cmd.CreateWithKeyword("create-apsara", &options.SApsaraCloudAccountCreateOptions{})
  46. cmd.CreateWithKeyword("create-ecloud", &options.SEcloudCloudAccountCreateOptions{})
  47. cmd.CreateWithKeyword("create-jdcloud", &options.SJDcloudCloudAccountCreateOptions{})
  48. cmd.CreateWithKeyword("create-cloudpods", &options.SCloudpodsCloudAccountCreateOptions{})
  49. cmd.CreateWithKeyword("create-nutanix", &options.SNutanixCloudAccountCreateOptions{})
  50. cmd.CreateWithKeyword("create-bingocloud", &options.SBingoCloudAccountCreateOptions{})
  51. cmd.CreateWithKeyword("create-incloudsphere", &options.SInCloudSphereAccountCreateOptions{})
  52. cmd.CreateWithKeyword("create-proxmox", &options.SProxmoxAccountCreateOptions{})
  53. cmd.CreateWithKeyword("create-remotefile", &options.SRemoteFileAccountCreateOptions{})
  54. cmd.CreateWithKeyword("create-ksyun", &options.SKsyunCloudAccountCreateOptions{})
  55. cmd.CreateWithKeyword("create-baidu", &options.SBaiduCloudAccountCreateOptions{})
  56. cmd.CreateWithKeyword("create-cucloud", &options.SCucloudCloudAccountCreateOptions{})
  57. cmd.CreateWithKeyword("create-qingcloud", &options.SQingCloudCloudAccountCreateOptions{})
  58. cmd.CreateWithKeyword("create-oracle", &options.SOracleCloudAccountCreateOptions{})
  59. cmd.CreateWithKeyword("create-cephfs", &options.SCephFSCloudAccountCreateOptions{})
  60. cmd.CreateWithKeyword("create-cnware", &options.SCNwareCloudAccountCreateOptions{})
  61. cmd.CreateWithKeyword("create-oceanbase", &options.SOceanbaseCloudAccountCreateOptions{})
  62. cmd.UpdateWithKeyword("update-vmware", &options.SVMwareCloudAccountUpdateOptions{})
  63. cmd.UpdateWithKeyword("update-aliyun", &options.SAliyunCloudAccountUpdateOptions{})
  64. cmd.UpdateWithKeyword("update-azure", &options.SAzureCloudAccountUpdateOptions{})
  65. cmd.UpdateWithKeyword("update-qcloud", &options.SQcloudCloudAccountUpdateOptions{})
  66. cmd.UpdateWithKeyword("update-google", &options.SGoogleCloudAccountUpdateOptions{})
  67. cmd.UpdateWithKeyword("update-aws", &options.SAWSCloudAccountUpdateOptions{})
  68. cmd.UpdateWithKeyword("update-openstack", &options.SOpenStackCloudAccountUpdateOptions{})
  69. cmd.UpdateWithKeyword("update-huawei", &options.SHuaweiCloudAccountUpdateOptions{})
  70. cmd.UpdateWithKeyword("update-hcso", &options.SHCSOAccountUpdateOptions{})
  71. cmd.UpdateWithKeyword("update-hcs", &options.SHCSAccountUpdateOptions{})
  72. cmd.UpdateWithKeyword("update-ucloud", &options.SUcloudCloudAccountUpdateOptions{})
  73. cmd.UpdateWithKeyword("update-volcengine", &options.SVolcengineCloudAccountUpdateOptions{})
  74. cmd.UpdateWithKeyword("update-zstack", &options.SZStackCloudAccountUpdateOptions{})
  75. cmd.UpdateWithKeyword("update-s3", &options.SS3CloudAccountUpdateOptions{})
  76. cmd.UpdateWithKeyword("update-ctyun", &options.SCtyunCloudAccountUpdateOptions{})
  77. cmd.UpdateWithKeyword("update-jdcloud", &options.SJDcloudCloudAccountUpdateOptions{})
  78. cmd.UpdateWithKeyword("update-cloudpods", &options.SCloudpodsCloudAccountUpdateOptions{})
  79. cmd.UpdateWithKeyword("update-nutanix", &options.SNutanixCloudAccountUpdateOptions{})
  80. cmd.UpdateWithKeyword("update-bingocloud", &options.SBingoCloudAccountUpdateOptions{})
  81. cmd.UpdateWithKeyword("update-incloudsphere", &options.SInCloudSphereAccountUpdateOptions{})
  82. cmd.UpdateWithKeyword("update-proxmox", &options.SProxmoxAccountUpdateOptions{})
  83. cmd.UpdateWithKeyword("update-ksyun", &options.SKsyunCloudAccountUpdateOptions{})
  84. cmd.UpdateWithKeyword("update-baidu", &options.SBaiduCloudAccountUpdateOptions{})
  85. cmd.UpdateWithKeyword("update-cucloud", &options.SCucloudCloudAccountUpdateOptions{})
  86. cmd.UpdateWithKeyword("update-qingcloud", &options.SQingCloudCloudAccountUpdateOptions{})
  87. cmd.UpdateWithKeyword("update-cnware", &options.SCNwareCloudAccountUpdateOptions{})
  88. cmd.UpdateWithKeyword("update-oceanbase", &options.SOceanbaseCloudAccountUpdateOptions{})
  89. cmd.Perform("update-credential", &options.CloudaccountUpdateCredentialOptions{})
  90. cmd.PerformWithKeyword("update-credential-google", "update-credential", &options.SGoogleCloudAccountUpdateCredentialOptions{})
  91. cmd.PerformWithKeyword("update-credential-vmware", "update-credential", &options.SVMwareCloudAccountUpdateCredentialOptions{})
  92. cmd.PerformWithKeyword("update-credential-aliyun", "update-credential", &options.SAliyunCloudAccountUpdateCredentialOptions{})
  93. cmd.PerformWithKeyword("update-credential-azure", "update-credential", &options.SAzureCloudAccountUpdateCredentialOptions{})
  94. cmd.PerformWithKeyword("update-credential-qcloud", "update-credential", &options.SQcloudCloudAccountUpdateCredentialOptions{})
  95. cmd.PerformWithKeyword("update-credential-aws", "update-credential", &options.SAWSCloudAccountUpdateCredentialOptions{})
  96. cmd.PerformWithKeyword("update-credential-openstack", "update-credential", &options.SOpenStackCloudAccountUpdateCredentialOptions{})
  97. cmd.PerformWithKeyword("update-credential-huawei", "update-credential", &options.SHuaweiCloudAccountUpdateCredentialOptions{})
  98. cmd.PerformWithKeyword("update-credential-apsara", "update-credential", &options.SApsaraCloudAccountUpdateCredentialOptions{})
  99. cmd.PerformWithKeyword("update-credential-hcso", "update-credential", &options.SHCSOAccountUpdateCredentialOptions{})
  100. cmd.PerformWithKeyword("update-credential-hcs", "update-credential", &options.SHCSOAccountUpdateCredentialOptions{})
  101. cmd.PerformWithKeyword("update-credential-ucloud", "update-credential", &options.SUcloudCloudAccountUpdateCredentialOptions{})
  102. cmd.PerformWithKeyword("update-credential-volcengine", "update-credential", &options.SVolcengineCloudAccountUpdateCredentialOptions{})
  103. cmd.PerformWithKeyword("update-credential-zstack", "update-credential", &options.SZStackCloudAccountUpdateCredentialOptions{})
  104. cmd.PerformWithKeyword("update-credential-s3", "update-credential", &options.SS3CloudAccountUpdateCredentialOptions{})
  105. cmd.PerformWithKeyword("update-credential-ctyun", "update-credential", &options.SCtyunCloudAccountUpdateCredentialOptions{})
  106. cmd.PerformWithKeyword("update-credential-jdcloud", "update-credential", &options.SJDcloudCloudAccountUpdateCredentialOptions{})
  107. cmd.PerformWithKeyword("update-credential-cloudpods", "update-credential", &options.SCloudpodsCloudAccountUpdateCredentialOptions{})
  108. cmd.PerformWithKeyword("update-credential-nutanix", "update-credential", &options.SNutanixCloudAccountUpdateCredentialOptions{})
  109. cmd.PerformWithKeyword("update-credential-bingocloud", "update-credential", &options.SBingoCloudAccountUpdateCredentialOptions{})
  110. cmd.PerformWithKeyword("update-credential-incloudsphere", "update-credential", &options.SInCloudSphereAccountUpdateCredentialOptions{})
  111. cmd.PerformWithKeyword("update-credential-proxmox", "update-credential", &options.SProxmoxAccountUpdateCredentialOptions{})
  112. cmd.PerformWithKeyword("update-credential-ksyun", "update-credential", &options.SKsyunCloudAccountUpdateCredentialOptions{})
  113. cmd.PerformWithKeyword("update-credential-baidu", "update-credential", &options.SBaiduCloudAccountUpdateCredentialOptions{})
  114. cmd.PerformWithKeyword("update-credential-cucloud", "update-credential", &options.SCucloudCloudAccountUpdateCredentialOptions{})
  115. cmd.PerformWithKeyword("update-credential-qingcloud", "update-credential", &options.SQingCloudCloudAccountUpdateCredentialOptions{})
  116. cmd.PerformWithKeyword("update-credential-cnware", "update-credential", &options.SCNwareCloudAccountUpdateCredentialOptions{})
  117. cmd.PerformWithKeyword("test-connectivity-google", "test-connectivity", &options.SGoogleCloudAccountUpdateCredentialOptions{})
  118. cmd.PerformWithKeyword("test-connectivity-vmware", "test-connectivity", &options.SVMwareCloudAccountUpdateCredentialOptions{})
  119. cmd.PerformWithKeyword("test-connectivity-aliyun", "test-connectivity", &options.SAliyunCloudAccountUpdateCredentialOptions{})
  120. cmd.PerformWithKeyword("test-connectivity-azure", "test-connectivity", &options.SAzureCloudAccountUpdateCredentialOptions{})
  121. cmd.PerformWithKeyword("test-connectivity-qcloud", "test-connectivity", &options.SQcloudCloudAccountUpdateCredentialOptions{})
  122. cmd.PerformWithKeyword("test-connectivity-aws", "test-connectivity", &options.SAWSCloudAccountUpdateCredentialOptions{})
  123. cmd.PerformWithKeyword("test-connectivity-openstack", "test-connectivity", &options.SOpenStackCloudAccountUpdateCredentialOptions{})
  124. cmd.PerformWithKeyword("test-connectivity-huawei", "test-connectivity", &options.SHuaweiCloudAccountUpdateCredentialOptions{})
  125. cmd.PerformWithKeyword("test-connectivity-ucloud", "test-connectivity", &options.SUcloudCloudAccountUpdateCredentialOptions{})
  126. cmd.PerformWithKeyword("test-connectivity-volcengine", "test-connectivity", &options.SVolcengineCloudAccountUpdateCredentialOptions{})
  127. cmd.PerformWithKeyword("test-connectivity-zstack", "test-connectivity", &options.SZStackCloudAccountUpdateCredentialOptions{})
  128. cmd.PerformWithKeyword("test-connectivity-s3", "test-connectivity", &options.SS3CloudAccountUpdateCredentialOptions{})
  129. cmd.PerformWithKeyword("test-connectivity-ctyun", "test-connectivity", &options.SCtyunCloudAccountUpdateCredentialOptions{})
  130. cmd.PerformWithKeyword("test-connectivity-jdcloud", "test-connectivity", &options.SJDcloudCloudAccountUpdateCredentialOptions{})
  131. cmd.PerformWithKeyword("test-connectivity-cloudpods", "test-connectivity", &options.SCloudpodsCloudAccountUpdateCredentialOptions{})
  132. cmd.PerformWithKeyword("test-connectivity-oceanbase", "test-connectivity", &options.SOceanbaseCloudAccountUpdateCredentialOptions{})
  133. cmd.Perform("enable", &options.SCloudAccountIdOptions{})
  134. cmd.Perform("disable", &options.SCloudAccountIdOptions{})
  135. cmd.Perform("sync", &options.CloudaccountSyncOptions{})
  136. cmd.Perform("enable-auto-sync", &options.CloudaccountEnableAutoSyncOptions{})
  137. cmd.Perform("disable-auto-sync", &options.SCloudAccountIdOptions{})
  138. cmd.Perform("public", &options.CloudaccountPublicOptions{})
  139. cmd.Perform("private", &options.SCloudAccountIdOptions{})
  140. cmd.Perform("share-mode", &options.CloudaccountShareModeOptions{})
  141. cmd.Perform("sync-skus", &options.CloudaccountSyncSkusOptions{})
  142. cmd.Perform("change-owner", &options.ClouaccountChangeOwnerOptions{})
  143. cmd.Perform("change-project", &options.ClouaccountChangeProjectOptions{})
  144. cmd.Perform("create-subscription", &options.SubscriptionCreateOptions{})
  145. cmd.Perform("project-mapping", &options.ClouaccountProjectMappingOptions{})
  146. cmd.Get("change-owner-candidate-domains", &options.SCloudAccountIdOptions{})
  147. cmd.Get("enrollment-accounts", &options.SCloudAccountIdOptions{})
  148. cmd.Get("balance", &options.SCloudAccountIdOptions{})
  149. }