policy_definition.go 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. const (
  17. POLICY_DEFINITION_STATUS_READY = "ready"
  18. POLICY_DEFINITION_STATUS_UNKNOWN = "unknown"
  19. POLICY_DEFINITION_CATEGORY_CLOUDREGION = "cloudregion"
  20. POLICY_DEFINITION_CATEGORY_TAG = "tag"
  21. POLICY_DEFINITION_CONDITION_IN = "in"
  22. POLICY_DEFINITION_CONDITION_NOT_IN = "not_in"
  23. POLICY_DEFINITION_CONDITION_CONTAINS = "contains"
  24. POLICY_DEFINITION_CONDITION_EXCEPT = "except"
  25. )
  26. type PolicyDefinitionListInput struct {
  27. apis.StatusStandaloneResourceListInput
  28. ManagedResourceListInput
  29. }
  30. type PolicyDefinitionCreateInput struct {
  31. apis.StatusStandaloneResourceCreateInput
  32. SPolicyDefinition
  33. }
  34. type PolicyDefinitionDetails struct {
  35. apis.StatusStandaloneResourceDetails
  36. SPolicyDefinition
  37. }
  38. type PolicyDefinitionResourceInfo struct {
  39. Policydefinition string `json:"policydefinition"`
  40. }
  41. type SCloudregionPolicyDefinition struct {
  42. Id string `json:"id"`
  43. Name string `json:"name"`
  44. }
  45. type SCloudregionPolicyDefinitions struct {
  46. Cloudregions []SCloudregionPolicyDefinition `json:"cloudregions"`
  47. }
  48. type PolicyDefinitionSyncstatusInput struct {
  49. }