paths.py 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. #
  2. # Licensed to the Apache Software Foundation (ASF) under one
  3. # or more contributor license agreements. See the NOTICE file
  4. # distributed with this work for additional information
  5. # regarding copyright ownership. The ASF licenses this file
  6. # to you under the Apache License, Version 2.0 (the
  7. # "License"); you may not use this file except in compliance
  8. # with the License. You may obtain a copy of the License at
  9. #
  10. # http://www.apache.org/licenses/LICENSE-2.0
  11. #
  12. # Unless required by applicable law or agreed to in writing, software
  13. # distributed under the License is distributed on an "AS IS" BASIS,
  14. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. # See the License for the specific language governing permissions and
  16. # limitations under the License.
  17. CLUSTERS_PATH = "/clusters"
  18. CLUSTERS_CONFIG_PATH = "/clusters/%s"
  19. CLUSTER_HOSTS_PATH = "/clusters/%s/hosts"
  20. CLUSTER_HOST_PATH = "/clusters/%s/hosts/%s"
  21. CLUSTER_START_ALL_SERVICES = "/clusters/%s/services?ServiceInfo/state=INSTALLED"
  22. CLUSTER_STOP_ALL_SERVICES = "/clusters/%s/services?ServiceInfo"
  23. CLUSTER_REQUESTS_PATH = "/clusters/%s/requests"
  24. SERVICES_PATH = "/clusters/%s/services"
  25. SERVICE_PATH = "/clusters/%s/services/%s"
  26. SERVICE_CREATE_PATH = "/clusters/%s/services/?ServiceInfo/service_name=%s"
  27. SERVICE_COMPONENTS_PATH = "/clusters/%s/services/%s/components?fields=*"
  28. SERVICE_COMPONENT_PATH = "/clusters/%s/services/%s/components/%s"
  29. HOST_PATH = "/hosts/%s"
  30. HOSTS_PATH = "/hosts"
  31. HOSTS_CREATE_PATH = "/clusters/%s/hosts"
  32. HOSTS_COMPONENTS_PATH = "/clusters/%s/hosts/%s/host_components?fields=HostRoles/state"
  33. HOSTS_COMPONENT_PATH = "/clusters/%s/hosts/%s/host_components/%s"
  34. HOSTS_ASSIGN_ROLE = "/clusters/%s/hosts?Hosts/host_name=%s"
  35. BOOTSTRAP_PATH = "/bootstrap"
  36. REQUEST_STATUS_PATH = "/clusters/%s/requests/%s?fields=tasks/Tasks/status"
  37. REQUEST_PATH = "clusters/%s/requests/%s"
  38. REQUEST_N_PATH = "clusters/%s/requests?to=end&page_size=%s&fields=Requests"
  39. CONFIGURATION_PATH = "/clusters/%s/configurations?type=%s&tag=%s"
  40. CONFIGURATION_ALL_PATH = "/clusters/%s/configurations?type=%s"
  41. CREATE_CONFIGURATION_PATH = "/clusters/%s/configurations"
  42. UPDATE_CONFIGURATION_PATH = "/clusters/%s"
  43. STACKS_PATH = "/stacks2"
  44. STACKS_VERSIONS_PATH = "stacks2/HDP/versions"
  45. STACKS_OS_REPO_PATH = "stacks2/HDP/versions/%s/operatingSystems/%s/repositories/HDP-%s"
  46. STACK_SERVICES_COMPONENTS_PATH = "/stacks2/HDP/versions/%s/stackServices/%s/serviceComponents?fields=*"
  47. STACK_SERVICES_CONFIG_PATH = "/stacks2/HDP/versions/%s/stackServices/%s/configurations?fields=*"
  48. TASKS_PATH = "clusters/%s/requests/%s/tasks?fields=*"
  49. BLUEPRINT_ALL_PATH = "blueprints?fields=*"
  50. BLUEPRINT_PATH = "blueprints/%s"
  51. BLUEPRINT_CLUSTER_PATH = "clusters/%s?format=blueprint"