From 899fb02984023eea5f65d1112dc4c6e42d159ead Mon Sep 17 00:00:00 2001 From: John Engelman Date: Thu, 14 Jul 2016 14:02:27 -0500 Subject: [PATCH 1/2] Vendor Rancher Go library. --- vendor/github.com/gorilla/websocket/AUTHORS | 8 + vendor/github.com/gorilla/websocket/LICENSE | 22 + vendor/github.com/gorilla/websocket/README.md | 61 + vendor/github.com/gorilla/websocket/client.go | 375 + .../gorilla/websocket/compression.go | 85 + vendor/github.com/gorilla/websocket/conn.go | 994 + .../github.com/gorilla/websocket/conn_read.go | 18 + .../gorilla/websocket/conn_read_legacy.go | 21 + vendor/github.com/gorilla/websocket/doc.go | 152 + vendor/github.com/gorilla/websocket/json.go | 55 + vendor/github.com/gorilla/websocket/server.go | 261 + vendor/github.com/gorilla/websocket/util.go | 214 + .../rancher/go-rancher/Dockerfile.dapper | 31 + vendor/github.com/rancher/go-rancher/LICENSE | 177 + vendor/github.com/rancher/go-rancher/Makefile | 23 + .../github.com/rancher/go-rancher/README.md | 35 + .../rancher/go-rancher/client/client.go | 7 + .../rancher/go-rancher/client/common.go | 565 + .../go-rancher/client/generated_account.go | 172 + .../client/generated_active_setting.go | 75 + .../client/generated_add_label_input.go | 64 + .../generated_add_load_balancer_input.go | 69 + .../client/generated_add_outputs_input.go | 67 + ...generated_add_remove_cluster_host_input.go | 67 + ...ted_add_remove_load_balancer_host_input.go | 67 + ...add_remove_load_balancer_listener_input.go | 67 + ...remove_load_balancer_service_link_input.go | 67 + ...d_add_remove_load_balancer_target_input.go | 67 + ...generated_add_remove_service_link_input.go | 67 + .../go-rancher/client/generated_agent.go | 183 + .../client/generated_amazonec2config.go | 101 + .../go-rancher/client/generated_api_key.go | 161 + .../go-rancher/client/generated_audit_log.go | 93 + .../client/generated_azure_config.go | 87 + .../client/generated_azureadconfig.go | 81 + .../go-rancher/client/generated_backup.go | 121 + .../client/generated_backup_target.go | 115 + .../client/generated_base_machine_config.go | 65 + .../client/generated_blkio_device_option.go | 75 + .../client/generated_certificate.go | 150 + .../client/generated_change_secret_input.go | 69 + .../go-rancher/client/generated_client.go | 304 + .../go-rancher/client/generated_cluster.go | 223 + .../client/generated_compose_config.go | 69 + .../client/generated_compose_config_input.go | 67 + .../client/generated_compose_project.go | 180 + .../client/generated_compose_service.go | 194 + .../client/generated_config_item.go | 69 + .../client/generated_config_item_status.go | 81 + .../go-rancher/client/generated_container.go | 431 + .../client/generated_container_event.go | 117 + .../client/generated_container_exec.go | 73 + .../client/generated_container_logs.go | 69 + .../client/generated_container_proxy.go | 69 + .../go-rancher/client/generated_credential.go | 161 + .../client/generated_databasechangelog.go | 85 + .../client/generated_databasechangeloglock.go | 71 + .../client/generated_digitalocean_config.go | 81 + .../client/generated_dns_service.go | 267 + .../client/generated_docker_build.go | 77 + .../client/generated_dynamic_schema.go | 117 + .../client/generated_environment.go | 252 + .../client/generated_environment_upgrade.go | 73 + .../client/generated_exoscale_config.go | 81 + .../generated_extension_implementation.go | 71 + .../client/generated_extension_point.go | 75 + .../client/generated_external_dns_event.go | 117 + .../client/generated_external_event.go | 111 + .../client/generated_external_handler.go | 174 + ...al_handler_external_handler_process_map.go | 172 + .../generated_external_handler_process.go | 166 + ...nerated_external_handler_process_config.go | 69 + .../client/generated_external_host_event.go | 117 + .../client/generated_external_service.go | 234 + .../generated_external_service_event.go | 115 + .../generated_external_storage_pool_event.go | 115 + .../client/generated_external_volume_event.go | 113 + .../client/generated_field_documentation.go | 67 + .../client/generated_githubconfig.go | 81 + .../client/generated_global_load_balancer.go | 139 + ...rated_global_load_balancer_health_check.go | 67 + .../generated_global_load_balancer_policy.go | 67 + .../go-rancher/client/generated_ha_config.go | 73 + .../client/generated_ha_config_input.go | 97 + .../client/generated_haproxy_config.go | 69 + ...generated_healthcheck_instance_host_map.go | 119 + .../go-rancher/client/generated_host.go | 197 + .../client/generated_host_access.go | 69 + .../client/generated_host_api_proxy_token.go | 71 + .../go-rancher/client/generated_identity.go | 83 + .../go-rancher/client/generated_image.go | 168 + .../generated_in_service_upgrade_strategy.go | 79 + .../go-rancher/client/generated_instance.go | 271 + .../client/generated_instance_console.go | 71 + .../generated_instance_console_input.go | 65 + .../client/generated_instance_health_check.go | 87 + .../client/generated_instance_link.go | 176 + .../client/generated_instance_stop.go | 69 + .../go-rancher/client/generated_ip_address.go | 183 + .../generated_ip_address_associate_input.go | 67 + .../client/generated_kubernetes_service.go | 257 + .../client/generated_kubernetes_stack.go | 193 + .../generated_kubernetes_stack_upgrade.go | 71 + .../go-rancher/client/generated_label.go | 117 + .../client/generated_launch_config.go | 430 + .../go-rancher/client/generated_ldapconfig.go | 111 + .../client/generated_load_balancer.go | 224 + ...d_balancer_app_cookie_stickiness_policy.go | 79 + .../client/generated_load_balancer_config.go | 69 + ...rated_load_balancer_config_listener_map.go | 117 + ..._load_balancer_cookie_stickiness_policy.go | 79 + .../generated_load_balancer_health_check.go | 79 + .../generated_load_balancer_host_map.go | 89 + .../generated_load_balancer_listener.go | 127 + .../client/generated_load_balancer_service.go | 283 + .../generated_load_balancer_service_link.go | 71 + .../client/generated_load_balancer_target.go | 132 + .../client/generated_local_auth_config.go | 75 + .../go-rancher/client/generated_log_config.go | 69 + .../go-rancher/client/generated_machine.go | 174 + .../client/generated_machine_driver.go | 169 + .../generated_machine_driver_error_input.go | 67 + .../generated_machine_driver_update_input.go | 71 + .../go-rancher/client/generated_mount.go | 132 + .../go-rancher/client/generated_network.go | 168 + .../go-rancher/client/generated_nfs_config.go | 71 + .../client/generated_openldapconfig.go | 109 + .../client/generated_openstack_config.go | 107 + .../client/generated_packet_config.go | 77 + .../go-rancher/client/generated_password.go | 172 + .../client/generated_physical_host.go | 150 + .../go-rancher/client/generated_port.go | 182 + .../client/generated_process_definition.go | 79 + .../client/generated_process_execution.go | 73 + .../client/generated_process_instance.go | 89 + .../go-rancher/client/generated_project.go | 193 + .../client/generated_project_member.go | 174 + .../client/generated_public_endpoint.go | 75 + .../go-rancher/client/generated_publish.go | 87 + .../go-rancher/client/generated_pull_task.go | 99 + .../client/generated_rackspace_config.go | 83 + ...ated_recreate_on_quorum_strategy_config.go | 67 + .../go-rancher/client/generated_register.go | 108 + .../client/generated_registration_token.go | 165 + .../go-rancher/client/generated_registry.go | 180 + .../client/generated_registry_credential.go | 165 + .../client/generated_remove_label_input.go | 62 + .../generated_remove_load_balancer_input.go | 67 + .../client/generated_resource_definition.go | 67 + .../client/generated_restart_policy.go | 69 + .../generated_restore_from_backup_input.go | 67 + .../generated_revert_to_snapshot_input.go | 67 + .../generated_rolling_restart_strategy.go | 69 + .../client/generated_scale_policy.go | 71 + .../generated_secondary_launch_config.go | 432 + .../go-rancher/client/generated_service.go | 283 + .../client/generated_service_consume_map.go | 130 + .../client/generated_service_event.go | 123 + .../client/generated_service_expose_map.go | 121 + .../client/generated_service_link.go | 71 + .../client/generated_service_proxy.go | 75 + .../client/generated_service_restart.go | 67 + .../client/generated_service_upgrade.go | 69 + .../generated_service_upgrade_strategy.go | 69 + .../client/generated_services_port_range.go | 69 + .../client/generated_set_labels_input.go | 67 + ...generated_set_load_balancer_hosts_input.go | 67 + ...rated_set_load_balancer_listeners_input.go | 67 + ...d_set_load_balancer_service_links_input.go | 67 + ...nerated_set_load_balancer_targets_input.go | 67 + .../generated_set_project_members_input.go | 67 + .../generated_set_service_links_input.go | 67 + .../go-rancher/client/generated_setting.go | 75 + .../go-rancher/client/generated_snapshot.go | 126 + .../client/generated_snapshot_backup_input.go | 95 + .../client/generated_softlayer_config.go | 95 + .../client/generated_state_transition.go | 65 + .../client/generated_stats_access.go | 69 + .../client/generated_storage_pool.go | 178 + .../go-rancher/client/generated_subscribe.go | 69 + .../go-rancher/client/generated_task.go | 78 + .../client/generated_task_instance.go | 77 + .../generated_to_service_upgrade_strategy.go | 75 + .../client/generated_type_documentation.go | 69 + .../client/generated_ubiquity_config.go | 77 + .../client/generated_user_preference.go | 165 + .../client/generated_virtual_machine.go | 401 + .../client/generated_virtual_machine_disk.go | 79 + .../client/generated_virtualbox_config.go | 79 + .../generated_vmwarevcloudair_config.go | 93 + .../client/generated_vmwarevsphere_config.go | 89 + .../go-rancher/client/generated_volume.go | 228 + .../client/generated_volume_snapshot_input.go | 67 + .../rancher/go-rancher/client/schemas.go | 129 + .../rancher/go-rancher/client/types.go | 95 + vendor/github.com/rancher/go-rancher/main.go | 10 + .../rancher/go-rancher/schemas.json | 25862 ++++++++++++++++ .../github.com/rancher/go-rancher/trash.conf | 6 + vendor/github.com/raphink/go-rancher/LICENSE | 177 + .../raphink/go-rancher/catalog/client.go | 35 + .../raphink/go-rancher/catalog/common.go | 577 + .../catalog/generated_api_version.go | 71 + .../go-rancher/catalog/generated_catalog.go | 87 + .../go-rancher/catalog/generated_client.go | 41 + .../go-rancher/catalog/generated_error.go | 75 + .../go-rancher/catalog/generated_question.go | 93 + .../go-rancher/catalog/generated_template.go | 107 + .../catalog/generated_template_version.go | 117 + .../raphink/go-rancher/catalog/schemas.go | 129 + .../raphink/go-rancher/catalog/types.go | 95 + vendor/vendor.json | 12 + 211 files changed, 51091 insertions(+) create mode 100644 vendor/github.com/gorilla/websocket/AUTHORS create mode 100644 vendor/github.com/gorilla/websocket/LICENSE create mode 100644 vendor/github.com/gorilla/websocket/README.md create mode 100644 vendor/github.com/gorilla/websocket/client.go create mode 100644 vendor/github.com/gorilla/websocket/compression.go create mode 100644 vendor/github.com/gorilla/websocket/conn.go create mode 100644 vendor/github.com/gorilla/websocket/conn_read.go create mode 100644 vendor/github.com/gorilla/websocket/conn_read_legacy.go create mode 100644 vendor/github.com/gorilla/websocket/doc.go create mode 100644 vendor/github.com/gorilla/websocket/json.go create mode 100644 vendor/github.com/gorilla/websocket/server.go create mode 100644 vendor/github.com/gorilla/websocket/util.go create mode 100644 vendor/github.com/rancher/go-rancher/Dockerfile.dapper create mode 100644 vendor/github.com/rancher/go-rancher/LICENSE create mode 100644 vendor/github.com/rancher/go-rancher/Makefile create mode 100644 vendor/github.com/rancher/go-rancher/README.md create mode 100644 vendor/github.com/rancher/go-rancher/client/client.go create mode 100644 vendor/github.com/rancher/go-rancher/client/common.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_account.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_active_setting.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_add_label_input.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_add_load_balancer_input.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_add_outputs_input.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_add_remove_cluster_host_input.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_add_remove_load_balancer_host_input.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_add_remove_load_balancer_listener_input.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_add_remove_load_balancer_service_link_input.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_add_remove_load_balancer_target_input.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_add_remove_service_link_input.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_agent.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_amazonec2config.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_api_key.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_audit_log.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_azure_config.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_azureadconfig.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_backup.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_backup_target.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_base_machine_config.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_blkio_device_option.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_certificate.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_change_secret_input.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_client.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_cluster.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_compose_config.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_compose_config_input.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_compose_project.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_compose_service.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_config_item.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_config_item_status.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_container.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_container_event.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_container_exec.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_container_logs.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_container_proxy.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_credential.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_databasechangelog.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_databasechangeloglock.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_digitalocean_config.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_dns_service.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_docker_build.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_dynamic_schema.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_environment.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_environment_upgrade.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_exoscale_config.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_extension_implementation.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_extension_point.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_external_dns_event.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_external_event.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_external_handler.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_external_handler_external_handler_process_map.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_external_handler_process.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_external_handler_process_config.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_external_host_event.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_external_service.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_external_service_event.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_external_storage_pool_event.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_external_volume_event.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_field_documentation.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_githubconfig.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_global_load_balancer.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_global_load_balancer_health_check.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_global_load_balancer_policy.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_ha_config.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_ha_config_input.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_haproxy_config.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_healthcheck_instance_host_map.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_host.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_host_access.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_host_api_proxy_token.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_identity.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_image.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_in_service_upgrade_strategy.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_instance.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_instance_console.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_instance_console_input.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_instance_health_check.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_instance_link.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_instance_stop.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_ip_address.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_ip_address_associate_input.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_kubernetes_service.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_kubernetes_stack.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_kubernetes_stack_upgrade.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_label.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_launch_config.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_ldapconfig.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_load_balancer.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_load_balancer_app_cookie_stickiness_policy.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_load_balancer_config.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_load_balancer_config_listener_map.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_load_balancer_cookie_stickiness_policy.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_load_balancer_health_check.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_load_balancer_host_map.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_load_balancer_listener.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_load_balancer_service.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_load_balancer_service_link.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_load_balancer_target.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_local_auth_config.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_log_config.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_machine.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_machine_driver.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_machine_driver_error_input.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_machine_driver_update_input.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_mount.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_network.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_nfs_config.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_openldapconfig.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_openstack_config.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_packet_config.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_password.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_physical_host.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_port.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_process_definition.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_process_execution.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_process_instance.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_project.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_project_member.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_public_endpoint.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_publish.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_pull_task.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_rackspace_config.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_recreate_on_quorum_strategy_config.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_register.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_registration_token.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_registry.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_registry_credential.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_remove_label_input.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_remove_load_balancer_input.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_resource_definition.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_restart_policy.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_restore_from_backup_input.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_revert_to_snapshot_input.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_rolling_restart_strategy.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_scale_policy.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_secondary_launch_config.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_service.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_service_consume_map.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_service_event.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_service_expose_map.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_service_link.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_service_proxy.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_service_restart.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_service_upgrade.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_service_upgrade_strategy.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_services_port_range.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_set_labels_input.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_set_load_balancer_hosts_input.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_set_load_balancer_listeners_input.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_set_load_balancer_service_links_input.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_set_load_balancer_targets_input.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_set_project_members_input.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_set_service_links_input.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_setting.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_snapshot.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_snapshot_backup_input.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_softlayer_config.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_state_transition.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_stats_access.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_storage_pool.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_subscribe.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_task.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_task_instance.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_to_service_upgrade_strategy.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_type_documentation.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_ubiquity_config.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_user_preference.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_virtual_machine.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_virtual_machine_disk.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_virtualbox_config.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_vmwarevcloudair_config.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_vmwarevsphere_config.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_volume.go create mode 100644 vendor/github.com/rancher/go-rancher/client/generated_volume_snapshot_input.go create mode 100644 vendor/github.com/rancher/go-rancher/client/schemas.go create mode 100644 vendor/github.com/rancher/go-rancher/client/types.go create mode 100644 vendor/github.com/rancher/go-rancher/main.go create mode 100644 vendor/github.com/rancher/go-rancher/schemas.json create mode 100644 vendor/github.com/rancher/go-rancher/trash.conf create mode 100644 vendor/github.com/raphink/go-rancher/LICENSE create mode 100644 vendor/github.com/raphink/go-rancher/catalog/client.go create mode 100644 vendor/github.com/raphink/go-rancher/catalog/common.go create mode 100644 vendor/github.com/raphink/go-rancher/catalog/generated_api_version.go create mode 100644 vendor/github.com/raphink/go-rancher/catalog/generated_catalog.go create mode 100644 vendor/github.com/raphink/go-rancher/catalog/generated_client.go create mode 100644 vendor/github.com/raphink/go-rancher/catalog/generated_error.go create mode 100644 vendor/github.com/raphink/go-rancher/catalog/generated_question.go create mode 100644 vendor/github.com/raphink/go-rancher/catalog/generated_template.go create mode 100644 vendor/github.com/raphink/go-rancher/catalog/generated_template_version.go create mode 100644 vendor/github.com/raphink/go-rancher/catalog/schemas.go create mode 100644 vendor/github.com/raphink/go-rancher/catalog/types.go diff --git a/vendor/github.com/gorilla/websocket/AUTHORS b/vendor/github.com/gorilla/websocket/AUTHORS new file mode 100644 index 000000000000..b003eca0ca18 --- /dev/null +++ b/vendor/github.com/gorilla/websocket/AUTHORS @@ -0,0 +1,8 @@ +# This is the official list of Gorilla WebSocket authors for copyright +# purposes. +# +# Please keep the list sorted. + +Gary Burd +Joachim Bauch + diff --git a/vendor/github.com/gorilla/websocket/LICENSE b/vendor/github.com/gorilla/websocket/LICENSE new file mode 100644 index 000000000000..9171c9722522 --- /dev/null +++ b/vendor/github.com/gorilla/websocket/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2013 The Gorilla WebSocket Authors. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + + Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/vendor/github.com/gorilla/websocket/README.md b/vendor/github.com/gorilla/websocket/README.md new file mode 100644 index 000000000000..9d71959ea1ad --- /dev/null +++ b/vendor/github.com/gorilla/websocket/README.md @@ -0,0 +1,61 @@ +# Gorilla WebSocket + +Gorilla WebSocket is a [Go](http://golang.org/) implementation of the +[WebSocket](http://www.rfc-editor.org/rfc/rfc6455.txt) protocol. + +### Documentation + +* [API Reference](http://godoc.org/github.com/gorilla/websocket) +* [Chat example](https://github.com/gorilla/websocket/tree/master/examples/chat) +* [Command example](https://github.com/gorilla/websocket/tree/master/examples/command) +* [Client and server example](https://github.com/gorilla/websocket/tree/master/examples/echo) +* [File watch example](https://github.com/gorilla/websocket/tree/master/examples/filewatch) + +### Status + +The Gorilla WebSocket package provides a complete and tested implementation of +the [WebSocket](http://www.rfc-editor.org/rfc/rfc6455.txt) protocol. The +package API is stable. + +### Installation + + go get github.com/gorilla/websocket + +### Protocol Compliance + +The Gorilla WebSocket package passes the server tests in the [Autobahn Test +Suite](http://autobahn.ws/testsuite) using the application in the [examples/autobahn +subdirectory](https://github.com/gorilla/websocket/tree/master/examples/autobahn). + +### Gorilla WebSocket compared with other packages + + + + + + + + + + + + + + + + + + +
github.com/gorillagolang.org/x/net
RFC 6455 Features
Passes Autobahn Test SuiteYesNo
Receive fragmented messageYesNo, see note 1
Send close messageYesNo
Send pings and receive pongsYesNo
Get the type of a received data messageYesYes, see note 2
Other Features
Limit size of received messageYesNo
Read message using io.ReaderYesNo, see note 3
Write message using io.WriteCloserYesNo, see note 3
+ +Notes: + +1. Large messages are fragmented in [Chrome's new WebSocket implementation](http://www.ietf.org/mail-archive/web/hybi/current/msg10503.html). +2. The application can get the type of a received data message by implementing + a [Codec marshal](http://godoc.org/golang.org/x/net/websocket#Codec.Marshal) + function. +3. The go.net io.Reader and io.Writer operate across WebSocket frame boundaries. + Read returns when the input buffer is full or a frame boundary is + encountered. Each call to Write sends a single frame message. The Gorilla + io.Reader and io.WriteCloser operate on a single WebSocket message. + diff --git a/vendor/github.com/gorilla/websocket/client.go b/vendor/github.com/gorilla/websocket/client.go new file mode 100644 index 000000000000..879d33ed33e8 --- /dev/null +++ b/vendor/github.com/gorilla/websocket/client.go @@ -0,0 +1,375 @@ +// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package websocket + +import ( + "bufio" + "bytes" + "crypto/tls" + "encoding/base64" + "errors" + "io" + "io/ioutil" + "net" + "net/http" + "net/url" + "strings" + "time" +) + +// ErrBadHandshake is returned when the server response to opening handshake is +// invalid. +var ErrBadHandshake = errors.New("websocket: bad handshake") + +// NewClient creates a new client connection using the given net connection. +// The URL u specifies the host and request URI. Use requestHeader to specify +// the origin (Origin), subprotocols (Sec-WebSocket-Protocol) and cookies +// (Cookie). Use the response.Header to get the selected subprotocol +// (Sec-WebSocket-Protocol) and cookies (Set-Cookie). +// +// If the WebSocket handshake fails, ErrBadHandshake is returned along with a +// non-nil *http.Response so that callers can handle redirects, authentication, +// etc. +// +// Deprecated: Use Dialer instead. +func NewClient(netConn net.Conn, u *url.URL, requestHeader http.Header, readBufSize, writeBufSize int) (c *Conn, response *http.Response, err error) { + d := Dialer{ + ReadBufferSize: readBufSize, + WriteBufferSize: writeBufSize, + NetDial: func(net, addr string) (net.Conn, error) { + return netConn, nil + }, + } + return d.Dial(u.String(), requestHeader) +} + +// A Dialer contains options for connecting to WebSocket server. +type Dialer struct { + // NetDial specifies the dial function for creating TCP connections. If + // NetDial is nil, net.Dial is used. + NetDial func(network, addr string) (net.Conn, error) + + // Proxy specifies a function to return a proxy for a given + // Request. If the function returns a non-nil error, the + // request is aborted with the provided error. + // If Proxy is nil or returns a nil *URL, no proxy is used. + Proxy func(*http.Request) (*url.URL, error) + + // TLSClientConfig specifies the TLS configuration to use with tls.Client. + // If nil, the default configuration is used. + TLSClientConfig *tls.Config + + // HandshakeTimeout specifies the duration for the handshake to complete. + HandshakeTimeout time.Duration + + // Input and output buffer sizes. If the buffer size is zero, then a + // default value of 4096 is used. + ReadBufferSize, WriteBufferSize int + + // Subprotocols specifies the client's requested subprotocols. + Subprotocols []string +} + +var errMalformedURL = errors.New("malformed ws or wss URL") + +// parseURL parses the URL. +// +// This function is a replacement for the standard library url.Parse function. +// In Go 1.4 and earlier, url.Parse loses information from the path. +func parseURL(s string) (*url.URL, error) { + // From the RFC: + // + // ws-URI = "ws:" "//" host [ ":" port ] path [ "?" query ] + // wss-URI = "wss:" "//" host [ ":" port ] path [ "?" query ] + + var u url.URL + switch { + case strings.HasPrefix(s, "ws://"): + u.Scheme = "ws" + s = s[len("ws://"):] + case strings.HasPrefix(s, "wss://"): + u.Scheme = "wss" + s = s[len("wss://"):] + default: + return nil, errMalformedURL + } + + if i := strings.Index(s, "?"); i >= 0 { + u.RawQuery = s[i+1:] + s = s[:i] + } + + if i := strings.Index(s, "/"); i >= 0 { + u.Opaque = s[i:] + s = s[:i] + } else { + u.Opaque = "/" + } + + u.Host = s + + if strings.Contains(u.Host, "@") { + // Don't bother parsing user information because user information is + // not allowed in websocket URIs. + return nil, errMalformedURL + } + + return &u, nil +} + +func hostPortNoPort(u *url.URL) (hostPort, hostNoPort string) { + hostPort = u.Host + hostNoPort = u.Host + if i := strings.LastIndex(u.Host, ":"); i > strings.LastIndex(u.Host, "]") { + hostNoPort = hostNoPort[:i] + } else { + switch u.Scheme { + case "wss": + hostPort += ":443" + case "https": + hostPort += ":443" + default: + hostPort += ":80" + } + } + return hostPort, hostNoPort +} + +// DefaultDialer is a dialer with all fields set to the default zero values. +var DefaultDialer = &Dialer{ + Proxy: http.ProxyFromEnvironment, +} + +// Dial creates a new client connection. Use requestHeader to specify the +// origin (Origin), subprotocols (Sec-WebSocket-Protocol) and cookies (Cookie). +// Use the response.Header to get the selected subprotocol +// (Sec-WebSocket-Protocol) and cookies (Set-Cookie). +// +// If the WebSocket handshake fails, ErrBadHandshake is returned along with a +// non-nil *http.Response so that callers can handle redirects, authentication, +// etcetera. The response body may not contain the entire response and does not +// need to be closed by the application. +func (d *Dialer) Dial(urlStr string, requestHeader http.Header) (*Conn, *http.Response, error) { + + if d == nil { + d = &Dialer{ + Proxy: http.ProxyFromEnvironment, + } + } + + challengeKey, err := generateChallengeKey() + if err != nil { + return nil, nil, err + } + + u, err := parseURL(urlStr) + if err != nil { + return nil, nil, err + } + + switch u.Scheme { + case "ws": + u.Scheme = "http" + case "wss": + u.Scheme = "https" + default: + return nil, nil, errMalformedURL + } + + if u.User != nil { + // User name and password are not allowed in websocket URIs. + return nil, nil, errMalformedURL + } + + req := &http.Request{ + Method: "GET", + URL: u, + Proto: "HTTP/1.1", + ProtoMajor: 1, + ProtoMinor: 1, + Header: make(http.Header), + Host: u.Host, + } + + // Set the request headers using the capitalization for names and values in + // RFC examples. Although the capitalization shouldn't matter, there are + // servers that depend on it. The Header.Set method is not used because the + // method canonicalizes the header names. + req.Header["Upgrade"] = []string{"websocket"} + req.Header["Connection"] = []string{"Upgrade"} + req.Header["Sec-WebSocket-Key"] = []string{challengeKey} + req.Header["Sec-WebSocket-Version"] = []string{"13"} + if len(d.Subprotocols) > 0 { + req.Header["Sec-WebSocket-Protocol"] = []string{strings.Join(d.Subprotocols, ", ")} + } + for k, vs := range requestHeader { + switch { + case k == "Host": + if len(vs) > 0 { + req.Host = vs[0] + } + case k == "Upgrade" || + k == "Connection" || + k == "Sec-Websocket-Key" || + k == "Sec-Websocket-Version" || + (k == "Sec-Websocket-Protocol" && len(d.Subprotocols) > 0): + return nil, nil, errors.New("websocket: duplicate header not allowed: " + k) + default: + req.Header[k] = vs + } + } + + hostPort, hostNoPort := hostPortNoPort(u) + + var proxyURL *url.URL + // Check wether the proxy method has been configured + if d.Proxy != nil { + proxyURL, err = d.Proxy(req) + } + if err != nil { + return nil, nil, err + } + + var targetHostPort string + if proxyURL != nil { + targetHostPort, _ = hostPortNoPort(proxyURL) + } else { + targetHostPort = hostPort + } + + var deadline time.Time + if d.HandshakeTimeout != 0 { + deadline = time.Now().Add(d.HandshakeTimeout) + } + + netDial := d.NetDial + if netDial == nil { + netDialer := &net.Dialer{Deadline: deadline} + netDial = netDialer.Dial + } + + netConn, err := netDial("tcp", targetHostPort) + if err != nil { + return nil, nil, err + } + + defer func() { + if netConn != nil { + netConn.Close() + } + }() + + if err := netConn.SetDeadline(deadline); err != nil { + return nil, nil, err + } + + if proxyURL != nil { + connectHeader := make(http.Header) + if user := proxyURL.User; user != nil { + proxyUser := user.Username() + if proxyPassword, passwordSet := user.Password(); passwordSet { + credential := base64.StdEncoding.EncodeToString([]byte(proxyUser + ":" + proxyPassword)) + connectHeader.Set("Proxy-Authorization", "Basic "+credential) + } + } + connectReq := &http.Request{ + Method: "CONNECT", + URL: &url.URL{Opaque: hostPort}, + Host: hostPort, + Header: connectHeader, + } + + connectReq.Write(netConn) + + // Read response. + // Okay to use and discard buffered reader here, because + // TLS server will not speak until spoken to. + br := bufio.NewReader(netConn) + resp, err := http.ReadResponse(br, connectReq) + if err != nil { + return nil, nil, err + } + if resp.StatusCode != 200 { + f := strings.SplitN(resp.Status, " ", 2) + return nil, nil, errors.New(f[1]) + } + } + + if u.Scheme == "https" { + cfg := cloneTLSConfig(d.TLSClientConfig) + if cfg.ServerName == "" { + cfg.ServerName = hostNoPort + } + tlsConn := tls.Client(netConn, cfg) + netConn = tlsConn + if err := tlsConn.Handshake(); err != nil { + return nil, nil, err + } + if !cfg.InsecureSkipVerify { + if err := tlsConn.VerifyHostname(cfg.ServerName); err != nil { + return nil, nil, err + } + } + } + + conn := newConn(netConn, false, d.ReadBufferSize, d.WriteBufferSize) + + if err := req.Write(netConn); err != nil { + return nil, nil, err + } + + resp, err := http.ReadResponse(conn.br, req) + if err != nil { + return nil, nil, err + } + if resp.StatusCode != 101 || + !strings.EqualFold(resp.Header.Get("Upgrade"), "websocket") || + !strings.EqualFold(resp.Header.Get("Connection"), "upgrade") || + resp.Header.Get("Sec-Websocket-Accept") != computeAcceptKey(challengeKey) { + // Before closing the network connection on return from this + // function, slurp up some of the response to aid application + // debugging. + buf := make([]byte, 1024) + n, _ := io.ReadFull(resp.Body, buf) + resp.Body = ioutil.NopCloser(bytes.NewReader(buf[:n])) + return nil, resp, ErrBadHandshake + } + + resp.Body = ioutil.NopCloser(bytes.NewReader([]byte{})) + conn.subprotocol = resp.Header.Get("Sec-Websocket-Protocol") + + netConn.SetDeadline(time.Time{}) + netConn = nil // to avoid close in defer. + return conn, resp, nil +} + +// cloneTLSConfig clones all public fields except the fields +// SessionTicketsDisabled and SessionTicketKey. This avoids copying the +// sync.Mutex in the sync.Once and makes it safe to call cloneTLSConfig on a +// config in active use. +func cloneTLSConfig(cfg *tls.Config) *tls.Config { + if cfg == nil { + return &tls.Config{} + } + return &tls.Config{ + Rand: cfg.Rand, + Time: cfg.Time, + Certificates: cfg.Certificates, + NameToCertificate: cfg.NameToCertificate, + GetCertificate: cfg.GetCertificate, + RootCAs: cfg.RootCAs, + NextProtos: cfg.NextProtos, + ServerName: cfg.ServerName, + ClientAuth: cfg.ClientAuth, + ClientCAs: cfg.ClientCAs, + InsecureSkipVerify: cfg.InsecureSkipVerify, + CipherSuites: cfg.CipherSuites, + PreferServerCipherSuites: cfg.PreferServerCipherSuites, + ClientSessionCache: cfg.ClientSessionCache, + MinVersion: cfg.MinVersion, + MaxVersion: cfg.MaxVersion, + CurvePreferences: cfg.CurvePreferences, + } +} diff --git a/vendor/github.com/gorilla/websocket/compression.go b/vendor/github.com/gorilla/websocket/compression.go new file mode 100644 index 000000000000..e2ac7617b426 --- /dev/null +++ b/vendor/github.com/gorilla/websocket/compression.go @@ -0,0 +1,85 @@ +// Copyright 2016 The Gorilla WebSocket Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package websocket + +import ( + "compress/flate" + "errors" + "io" + "strings" +) + +func decompressNoContextTakeover(r io.Reader) io.Reader { + const tail = + // Add four bytes as specified in RFC + "\x00\x00\xff\xff" + + // Add final block to squelch unexpected EOF error from flate reader. + "\x01\x00\x00\xff\xff" + + return flate.NewReader(io.MultiReader(r, strings.NewReader(tail))) +} + +func compressNoContextTakeover(w io.WriteCloser) (io.WriteCloser, error) { + tw := &truncWriter{w: w} + fw, err := flate.NewWriter(tw, 3) + return &flateWrapper{fw: fw, tw: tw}, err +} + +// truncWriter is an io.Writer that writes all but the last four bytes of the +// stream to another io.Writer. +type truncWriter struct { + w io.WriteCloser + n int + p [4]byte +} + +func (w *truncWriter) Write(p []byte) (int, error) { + n := 0 + + // fill buffer first for simplicity. + if w.n < len(w.p) { + n = copy(w.p[w.n:], p) + p = p[n:] + w.n += n + if len(p) == 0 { + return n, nil + } + } + + m := len(p) + if m > len(w.p) { + m = len(w.p) + } + + if nn, err := w.w.Write(w.p[:m]); err != nil { + return n + nn, err + } + + copy(w.p[:], w.p[m:]) + copy(w.p[len(w.p)-m:], p[len(p)-m:]) + nn, err := w.w.Write(p[:len(p)-m]) + return n + nn, err +} + +type flateWrapper struct { + fw *flate.Writer + tw *truncWriter +} + +func (w *flateWrapper) Write(p []byte) (int, error) { + return w.fw.Write(p) +} + +func (w *flateWrapper) Close() error { + err1 := w.fw.Flush() + if w.tw.p != [4]byte{0, 0, 0xff, 0xff} { + return errors.New("websocket: internal error, unexpected bytes at end of flate stream") + } + err2 := w.tw.w.Close() + if err1 != nil { + return err1 + } + return err2 +} diff --git a/vendor/github.com/gorilla/websocket/conn.go b/vendor/github.com/gorilla/websocket/conn.go new file mode 100644 index 000000000000..eb4334e7164d --- /dev/null +++ b/vendor/github.com/gorilla/websocket/conn.go @@ -0,0 +1,994 @@ +// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package websocket + +import ( + "bufio" + "encoding/binary" + "errors" + "io" + "io/ioutil" + "math/rand" + "net" + "strconv" + "time" + "unicode/utf8" +) + +const ( + // Frame header byte 0 bits from Section 5.2 of RFC 6455 + finalBit = 1 << 7 + rsv1Bit = 1 << 6 + rsv2Bit = 1 << 5 + rsv3Bit = 1 << 4 + + // Frame header byte 1 bits from Section 5.2 of RFC 6455 + maskBit = 1 << 7 + + maxFrameHeaderSize = 2 + 8 + 4 // Fixed header + length + mask + maxControlFramePayloadSize = 125 + + writeWait = time.Second + + defaultReadBufferSize = 4096 + defaultWriteBufferSize = 4096 + + continuationFrame = 0 + noFrame = -1 +) + +// Close codes defined in RFC 6455, section 11.7. +const ( + CloseNormalClosure = 1000 + CloseGoingAway = 1001 + CloseProtocolError = 1002 + CloseUnsupportedData = 1003 + CloseNoStatusReceived = 1005 + CloseAbnormalClosure = 1006 + CloseInvalidFramePayloadData = 1007 + ClosePolicyViolation = 1008 + CloseMessageTooBig = 1009 + CloseMandatoryExtension = 1010 + CloseInternalServerErr = 1011 + CloseServiceRestart = 1012 + CloseTryAgainLater = 1013 + CloseTLSHandshake = 1015 +) + +// The message types are defined in RFC 6455, section 11.8. +const ( + // TextMessage denotes a text data message. The text message payload is + // interpreted as UTF-8 encoded text data. + TextMessage = 1 + + // BinaryMessage denotes a binary data message. + BinaryMessage = 2 + + // CloseMessage denotes a close control message. The optional message + // payload contains a numeric code and text. Use the FormatCloseMessage + // function to format a close message payload. + CloseMessage = 8 + + // PingMessage denotes a ping control message. The optional message payload + // is UTF-8 encoded text. + PingMessage = 9 + + // PongMessage denotes a ping control message. The optional message payload + // is UTF-8 encoded text. + PongMessage = 10 +) + +// ErrCloseSent is returned when the application writes a message to the +// connection after sending a close message. +var ErrCloseSent = errors.New("websocket: close sent") + +// ErrReadLimit is returned when reading a message that is larger than the +// read limit set for the connection. +var ErrReadLimit = errors.New("websocket: read limit exceeded") + +// netError satisfies the net Error interface. +type netError struct { + msg string + temporary bool + timeout bool +} + +func (e *netError) Error() string { return e.msg } +func (e *netError) Temporary() bool { return e.temporary } +func (e *netError) Timeout() bool { return e.timeout } + +// CloseError represents close frame. +type CloseError struct { + + // Code is defined in RFC 6455, section 11.7. + Code int + + // Text is the optional text payload. + Text string +} + +func (e *CloseError) Error() string { + s := []byte("websocket: close ") + s = strconv.AppendInt(s, int64(e.Code), 10) + switch e.Code { + case CloseNormalClosure: + s = append(s, " (normal)"...) + case CloseGoingAway: + s = append(s, " (going away)"...) + case CloseProtocolError: + s = append(s, " (protocol error)"...) + case CloseUnsupportedData: + s = append(s, " (unsupported data)"...) + case CloseNoStatusReceived: + s = append(s, " (no status)"...) + case CloseAbnormalClosure: + s = append(s, " (abnormal closure)"...) + case CloseInvalidFramePayloadData: + s = append(s, " (invalid payload data)"...) + case ClosePolicyViolation: + s = append(s, " (policy violation)"...) + case CloseMessageTooBig: + s = append(s, " (message too big)"...) + case CloseMandatoryExtension: + s = append(s, " (mandatory extension missing)"...) + case CloseInternalServerErr: + s = append(s, " (internal server error)"...) + case CloseTLSHandshake: + s = append(s, " (TLS handshake error)"...) + } + if e.Text != "" { + s = append(s, ": "...) + s = append(s, e.Text...) + } + return string(s) +} + +// IsCloseError returns boolean indicating whether the error is a *CloseError +// with one of the specified codes. +func IsCloseError(err error, codes ...int) bool { + if e, ok := err.(*CloseError); ok { + for _, code := range codes { + if e.Code == code { + return true + } + } + } + return false +} + +// IsUnexpectedCloseError returns boolean indicating whether the error is a +// *CloseError with a code not in the list of expected codes. +func IsUnexpectedCloseError(err error, expectedCodes ...int) bool { + if e, ok := err.(*CloseError); ok { + for _, code := range expectedCodes { + if e.Code == code { + return false + } + } + return true + } + return false +} + +var ( + errWriteTimeout = &netError{msg: "websocket: write timeout", timeout: true, temporary: true} + errUnexpectedEOF = &CloseError{Code: CloseAbnormalClosure, Text: io.ErrUnexpectedEOF.Error()} + errBadWriteOpCode = errors.New("websocket: bad write message type") + errWriteClosed = errors.New("websocket: write closed") + errInvalidControlFrame = errors.New("websocket: invalid control frame") +) + +func hideTempErr(err error) error { + if e, ok := err.(net.Error); ok && e.Temporary() { + err = &netError{msg: e.Error(), timeout: e.Timeout()} + } + return err +} + +func isControl(frameType int) bool { + return frameType == CloseMessage || frameType == PingMessage || frameType == PongMessage +} + +func isData(frameType int) bool { + return frameType == TextMessage || frameType == BinaryMessage +} + +var validReceivedCloseCodes = map[int]bool{ + // see http://www.iana.org/assignments/websocket/websocket.xhtml#close-code-number + + CloseNormalClosure: true, + CloseGoingAway: true, + CloseProtocolError: true, + CloseUnsupportedData: true, + CloseNoStatusReceived: false, + CloseAbnormalClosure: false, + CloseInvalidFramePayloadData: true, + ClosePolicyViolation: true, + CloseMessageTooBig: true, + CloseMandatoryExtension: true, + CloseInternalServerErr: true, + CloseServiceRestart: true, + CloseTryAgainLater: true, + CloseTLSHandshake: false, +} + +func isValidReceivedCloseCode(code int) bool { + return validReceivedCloseCodes[code] || (code >= 3000 && code <= 4999) +} + +func maskBytes(key [4]byte, pos int, b []byte) int { + for i := range b { + b[i] ^= key[pos&3] + pos++ + } + return pos & 3 +} + +func newMaskKey() [4]byte { + n := rand.Uint32() + return [4]byte{byte(n), byte(n >> 8), byte(n >> 16), byte(n >> 24)} +} + +// Conn represents a WebSocket connection. +type Conn struct { + conn net.Conn + isServer bool + subprotocol string + + // Write fields + mu chan bool // used as mutex to protect write to conn and closeSent + closeSent bool // whether close message was sent + writeErr error + writeBuf []byte // frame is constructed in this buffer. + writePos int // end of data in writeBuf. + writeFrameType int // type of the current frame. + writeDeadline time.Time + messageWriter *messageWriter // the current low-level message writer + writer io.WriteCloser // the current writer returned to the application + isWriting bool // for best-effort concurrent write detection + + enableWriteCompression bool + writeCompress bool // whether next call to flushFrame should set RSV1 + newCompressionWriter func(io.WriteCloser) (io.WriteCloser, error) + + // Read fields + readErr error + br *bufio.Reader + readRemaining int64 // bytes remaining in current frame. + readFinal bool // true the current message has more frames. + readLength int64 // Message size. + readLimit int64 // Maximum message size. + readMaskPos int + readMaskKey [4]byte + handlePong func(string) error + handlePing func(string) error + readErrCount int + messageReader *messageReader // the current low-level reader + + readDecompress bool // whether last read frame had RSV1 set + newDecompressionReader func(io.Reader) io.Reader +} + +func newConn(conn net.Conn, isServer bool, readBufferSize, writeBufferSize int) *Conn { + mu := make(chan bool, 1) + mu <- true + + if readBufferSize == 0 { + readBufferSize = defaultReadBufferSize + } + if readBufferSize < maxControlFramePayloadSize { + readBufferSize = maxControlFramePayloadSize + } + if writeBufferSize == 0 { + writeBufferSize = defaultWriteBufferSize + } + + c := &Conn{ + isServer: isServer, + br: bufio.NewReaderSize(conn, readBufferSize), + conn: conn, + mu: mu, + readFinal: true, + writeBuf: make([]byte, writeBufferSize+maxFrameHeaderSize), + writeFrameType: noFrame, + writePos: maxFrameHeaderSize, + enableWriteCompression: true, + } + c.SetPingHandler(nil) + c.SetPongHandler(nil) + return c +} + +// Subprotocol returns the negotiated protocol for the connection. +func (c *Conn) Subprotocol() string { + return c.subprotocol +} + +// Close closes the underlying network connection without sending or waiting for a close frame. +func (c *Conn) Close() error { + return c.conn.Close() +} + +// LocalAddr returns the local network address. +func (c *Conn) LocalAddr() net.Addr { + return c.conn.LocalAddr() +} + +// RemoteAddr returns the remote network address. +func (c *Conn) RemoteAddr() net.Addr { + return c.conn.RemoteAddr() +} + +// Write methods + +func (c *Conn) write(frameType int, deadline time.Time, bufs ...[]byte) error { + <-c.mu + defer func() { c.mu <- true }() + + if c.closeSent { + return ErrCloseSent + } else if frameType == CloseMessage { + c.closeSent = true + } + + c.conn.SetWriteDeadline(deadline) + for _, buf := range bufs { + if len(buf) > 0 { + n, err := c.conn.Write(buf) + if n != len(buf) { + // Close on partial write. + c.conn.Close() + } + if err != nil { + return err + } + } + } + return nil +} + +// WriteControl writes a control message with the given deadline. The allowed +// message types are CloseMessage, PingMessage and PongMessage. +func (c *Conn) WriteControl(messageType int, data []byte, deadline time.Time) error { + if !isControl(messageType) { + return errBadWriteOpCode + } + if len(data) > maxControlFramePayloadSize { + return errInvalidControlFrame + } + + b0 := byte(messageType) | finalBit + b1 := byte(len(data)) + if !c.isServer { + b1 |= maskBit + } + + buf := make([]byte, 0, maxFrameHeaderSize+maxControlFramePayloadSize) + buf = append(buf, b0, b1) + + if c.isServer { + buf = append(buf, data...) + } else { + key := newMaskKey() + buf = append(buf, key[:]...) + buf = append(buf, data...) + maskBytes(key, 0, buf[6:]) + } + + d := time.Hour * 1000 + if !deadline.IsZero() { + d = deadline.Sub(time.Now()) + if d < 0 { + return errWriteTimeout + } + } + + timer := time.NewTimer(d) + select { + case <-c.mu: + timer.Stop() + case <-timer.C: + return errWriteTimeout + } + defer func() { c.mu <- true }() + + if c.closeSent { + return ErrCloseSent + } else if messageType == CloseMessage { + c.closeSent = true + } + + c.conn.SetWriteDeadline(deadline) + n, err := c.conn.Write(buf) + if n != 0 && n != len(buf) { + c.conn.Close() + } + return hideTempErr(err) +} + +// NextWriter returns a writer for the next message to send. The writer's Close +// method flushes the complete message to the network. +// +// There can be at most one open writer on a connection. NextWriter closes the +// previous writer if the application has not already done so. +func (c *Conn) NextWriter(messageType int) (io.WriteCloser, error) { + if c.writeErr != nil { + return nil, c.writeErr + } + + // Close previous writer if not already closed by the application. It's + // probably better to return an error in this situation, but we cannot + // change this without breaking existing applications. + if c.writer != nil { + err := c.writer.Close() + if err != nil { + return nil, err + } + } + + if !isControl(messageType) && !isData(messageType) { + return nil, errBadWriteOpCode + } + + c.writeFrameType = messageType + c.messageWriter = &messageWriter{c} + + var w io.WriteCloser = c.messageWriter + if c.newCompressionWriter != nil && c.enableWriteCompression && isData(messageType) { + c.writeCompress = true + var err error + w, err = c.newCompressionWriter(w) + if err != nil { + c.writer.Close() + return nil, err + } + } + + return w, nil +} + +// flushFrame writes buffered data and extra as a frame to the network. The +// final argument indicates that this is the last frame in the message. +func (c *Conn) flushFrame(final bool, extra []byte) error { + length := c.writePos - maxFrameHeaderSize + len(extra) + + // Check for invalid control frames. + if isControl(c.writeFrameType) && + (!final || length > maxControlFramePayloadSize) { + c.messageWriter = nil + c.writer = nil + c.writeFrameType = noFrame + c.writePos = maxFrameHeaderSize + return errInvalidControlFrame + } + + b0 := byte(c.writeFrameType) + if final { + b0 |= finalBit + } + if c.writeCompress { + b0 |= rsv1Bit + } + c.writeCompress = false + + b1 := byte(0) + if !c.isServer { + b1 |= maskBit + } + + // Assume that the frame starts at beginning of c.writeBuf. + framePos := 0 + if c.isServer { + // Adjust up if mask not included in the header. + framePos = 4 + } + + switch { + case length >= 65536: + c.writeBuf[framePos] = b0 + c.writeBuf[framePos+1] = b1 | 127 + binary.BigEndian.PutUint64(c.writeBuf[framePos+2:], uint64(length)) + case length > 125: + framePos += 6 + c.writeBuf[framePos] = b0 + c.writeBuf[framePos+1] = b1 | 126 + binary.BigEndian.PutUint16(c.writeBuf[framePos+2:], uint16(length)) + default: + framePos += 8 + c.writeBuf[framePos] = b0 + c.writeBuf[framePos+1] = b1 | byte(length) + } + + if !c.isServer { + key := newMaskKey() + copy(c.writeBuf[maxFrameHeaderSize-4:], key[:]) + maskBytes(key, 0, c.writeBuf[maxFrameHeaderSize:c.writePos]) + if len(extra) > 0 { + c.writeErr = errors.New("websocket: internal error, extra used in client mode") + return c.writeErr + } + } + + // Write the buffers to the connection with best-effort detection of + // concurrent writes. See the concurrency section in the package + // documentation for more info. + + if c.isWriting { + panic("concurrent write to websocket connection") + } + c.isWriting = true + + c.writeErr = c.write(c.writeFrameType, c.writeDeadline, c.writeBuf[framePos:c.writePos], extra) + + if !c.isWriting { + panic("concurrent write to websocket connection") + } + c.isWriting = false + + // Setup for next frame. + c.writePos = maxFrameHeaderSize + c.writeFrameType = continuationFrame + if final { + c.messageWriter = nil + c.writer = nil + c.writeFrameType = noFrame + } + return c.writeErr +} + +type messageWriter struct{ c *Conn } + +func (w *messageWriter) err() error { + c := w.c + if c.messageWriter != w { + return errWriteClosed + } + if c.writeErr != nil { + return c.writeErr + } + return nil +} + +func (w *messageWriter) ncopy(max int) (int, error) { + n := len(w.c.writeBuf) - w.c.writePos + if n <= 0 { + if err := w.c.flushFrame(false, nil); err != nil { + return 0, err + } + n = len(w.c.writeBuf) - w.c.writePos + } + if n > max { + n = max + } + return n, nil +} + +func (w *messageWriter) Write(p []byte) (int, error) { + if err := w.err(); err != nil { + return 0, err + } + + if len(p) > 2*len(w.c.writeBuf) && w.c.isServer { + // Don't buffer large messages. + err := w.c.flushFrame(false, p) + if err != nil { + return 0, err + } + return len(p), nil + } + + nn := len(p) + for len(p) > 0 { + n, err := w.ncopy(len(p)) + if err != nil { + return 0, err + } + copy(w.c.writeBuf[w.c.writePos:], p[:n]) + w.c.writePos += n + p = p[n:] + } + return nn, nil +} + +func (w *messageWriter) WriteString(p string) (int, error) { + if err := w.err(); err != nil { + return 0, err + } + + nn := len(p) + for len(p) > 0 { + n, err := w.ncopy(len(p)) + if err != nil { + return 0, err + } + copy(w.c.writeBuf[w.c.writePos:], p[:n]) + w.c.writePos += n + p = p[n:] + } + return nn, nil +} + +func (w *messageWriter) ReadFrom(r io.Reader) (nn int64, err error) { + if err := w.err(); err != nil { + return 0, err + } + for { + if w.c.writePos == len(w.c.writeBuf) { + err = w.c.flushFrame(false, nil) + if err != nil { + break + } + } + var n int + n, err = r.Read(w.c.writeBuf[w.c.writePos:]) + w.c.writePos += n + nn += int64(n) + if err != nil { + if err == io.EOF { + err = nil + } + break + } + } + return nn, err +} + +func (w *messageWriter) Close() error { + if err := w.err(); err != nil { + return err + } + return w.c.flushFrame(true, nil) +} + +// WriteMessage is a helper method for getting a writer using NextWriter, +// writing the message and closing the writer. +func (c *Conn) WriteMessage(messageType int, data []byte) error { + w, err := c.NextWriter(messageType) + if err != nil { + return err + } + if _, ok := w.(*messageWriter); ok && c.isServer { + // Optimize write as a single frame. + n := copy(c.writeBuf[c.writePos:], data) + c.writePos += n + data = data[n:] + err = c.flushFrame(true, data) + return err + } + if _, err = w.Write(data); err != nil { + return err + } + return w.Close() +} + +// SetWriteDeadline sets the write deadline on the underlying network +// connection. After a write has timed out, the websocket state is corrupt and +// all future writes will return an error. A zero value for t means writes will +// not time out. +func (c *Conn) SetWriteDeadline(t time.Time) error { + c.writeDeadline = t + return nil +} + +// Read methods + +func (c *Conn) advanceFrame() (int, error) { + + // 1. Skip remainder of previous frame. + + if c.readRemaining > 0 { + if _, err := io.CopyN(ioutil.Discard, c.br, c.readRemaining); err != nil { + return noFrame, err + } + } + + // 2. Read and parse first two bytes of frame header. + + p, err := c.read(2) + if err != nil { + return noFrame, err + } + + final := p[0]&finalBit != 0 + frameType := int(p[0] & 0xf) + mask := p[1]&maskBit != 0 + c.readRemaining = int64(p[1] & 0x7f) + + c.readDecompress = false + if c.newDecompressionReader != nil && (p[0]&rsv1Bit) != 0 { + c.readDecompress = true + p[0] &^= rsv1Bit + } + + if rsv := p[0] & (rsv1Bit | rsv2Bit | rsv3Bit); rsv != 0 { + return noFrame, c.handleProtocolError("unexpected reserved bits 0x" + strconv.FormatInt(int64(rsv), 16)) + } + + switch frameType { + case CloseMessage, PingMessage, PongMessage: + if c.readRemaining > maxControlFramePayloadSize { + return noFrame, c.handleProtocolError("control frame length > 125") + } + if !final { + return noFrame, c.handleProtocolError("control frame not final") + } + case TextMessage, BinaryMessage: + if !c.readFinal { + return noFrame, c.handleProtocolError("message start before final message frame") + } + c.readFinal = final + case continuationFrame: + if c.readFinal { + return noFrame, c.handleProtocolError("continuation after final message frame") + } + c.readFinal = final + default: + return noFrame, c.handleProtocolError("unknown opcode " + strconv.Itoa(frameType)) + } + + // 3. Read and parse frame length. + + switch c.readRemaining { + case 126: + p, err := c.read(2) + if err != nil { + return noFrame, err + } + c.readRemaining = int64(binary.BigEndian.Uint16(p)) + case 127: + p, err := c.read(8) + if err != nil { + return noFrame, err + } + c.readRemaining = int64(binary.BigEndian.Uint64(p)) + } + + // 4. Handle frame masking. + + if mask != c.isServer { + return noFrame, c.handleProtocolError("incorrect mask flag") + } + + if mask { + c.readMaskPos = 0 + p, err := c.read(len(c.readMaskKey)) + if err != nil { + return noFrame, err + } + copy(c.readMaskKey[:], p) + } + + // 5. For text and binary messages, enforce read limit and return. + + if frameType == continuationFrame || frameType == TextMessage || frameType == BinaryMessage { + + c.readLength += c.readRemaining + if c.readLimit > 0 && c.readLength > c.readLimit { + c.WriteControl(CloseMessage, FormatCloseMessage(CloseMessageTooBig, ""), time.Now().Add(writeWait)) + return noFrame, ErrReadLimit + } + + return frameType, nil + } + + // 6. Read control frame payload. + + var payload []byte + if c.readRemaining > 0 { + payload, err = c.read(int(c.readRemaining)) + c.readRemaining = 0 + if err != nil { + return noFrame, err + } + if c.isServer { + maskBytes(c.readMaskKey, 0, payload) + } + } + + // 7. Process control frame payload. + + switch frameType { + case PongMessage: + if err := c.handlePong(string(payload)); err != nil { + return noFrame, err + } + case PingMessage: + if err := c.handlePing(string(payload)); err != nil { + return noFrame, err + } + case CloseMessage: + echoMessage := []byte{} + closeCode := CloseNoStatusReceived + closeText := "" + if len(payload) >= 2 { + echoMessage = payload[:2] + closeCode = int(binary.BigEndian.Uint16(payload)) + if !isValidReceivedCloseCode(closeCode) { + return noFrame, c.handleProtocolError("invalid close code") + } + closeText = string(payload[2:]) + if !utf8.ValidString(closeText) { + return noFrame, c.handleProtocolError("invalid utf8 payload in close frame") + } + } + c.WriteControl(CloseMessage, echoMessage, time.Now().Add(writeWait)) + return noFrame, &CloseError{Code: closeCode, Text: closeText} + } + + return frameType, nil +} + +func (c *Conn) handleProtocolError(message string) error { + c.WriteControl(CloseMessage, FormatCloseMessage(CloseProtocolError, message), time.Now().Add(writeWait)) + return errors.New("websocket: " + message) +} + +// NextReader returns the next data message received from the peer. The +// returned messageType is either TextMessage or BinaryMessage. +// +// There can be at most one open reader on a connection. NextReader discards +// the previous message if the application has not already consumed it. +// +// Applications must break out of the application's read loop when this method +// returns a non-nil error value. Errors returned from this method are +// permanent. Once this method returns a non-nil error, all subsequent calls to +// this method return the same error. +func (c *Conn) NextReader() (messageType int, r io.Reader, err error) { + + c.messageReader = nil + c.readLength = 0 + + for c.readErr == nil { + frameType, err := c.advanceFrame() + if err != nil { + c.readErr = hideTempErr(err) + break + } + if frameType == TextMessage || frameType == BinaryMessage { + c.messageReader = &messageReader{c} + var r io.Reader = c.messageReader + if c.readDecompress { + r = c.newDecompressionReader(r) + } + return frameType, r, nil + } + } + + // Applications that do handle the error returned from this method spin in + // tight loop on connection failure. To help application developers detect + // this error, panic on repeated reads to the failed connection. + c.readErrCount++ + if c.readErrCount >= 1000 { + panic("repeated read on failed websocket connection") + } + + return noFrame, nil, c.readErr +} + +type messageReader struct{ c *Conn } + +func (r *messageReader) Read(b []byte) (int, error) { + c := r.c + if c.messageReader != r { + return 0, io.EOF + } + + for c.readErr == nil { + + if c.readRemaining > 0 { + if int64(len(b)) > c.readRemaining { + b = b[:c.readRemaining] + } + n, err := c.br.Read(b) + c.readErr = hideTempErr(err) + if c.isServer { + c.readMaskPos = maskBytes(c.readMaskKey, c.readMaskPos, b[:n]) + } + c.readRemaining -= int64(n) + if c.readRemaining > 0 && c.readErr == io.EOF { + c.readErr = errUnexpectedEOF + } + return n, c.readErr + } + + if c.readFinal { + c.messageReader = nil + return 0, io.EOF + } + + frameType, err := c.advanceFrame() + switch { + case err != nil: + c.readErr = hideTempErr(err) + case frameType == TextMessage || frameType == BinaryMessage: + c.readErr = errors.New("websocket: internal error, unexpected text or binary in Reader") + } + } + + err := c.readErr + if err == io.EOF && c.messageReader == r { + err = errUnexpectedEOF + } + return 0, err +} + +// ReadMessage is a helper method for getting a reader using NextReader and +// reading from that reader to a buffer. +func (c *Conn) ReadMessage() (messageType int, p []byte, err error) { + var r io.Reader + messageType, r, err = c.NextReader() + if err != nil { + return messageType, nil, err + } + p, err = ioutil.ReadAll(r) + return messageType, p, err +} + +// SetReadDeadline sets the read deadline on the underlying network connection. +// After a read has timed out, the websocket connection state is corrupt and +// all future reads will return an error. A zero value for t means reads will +// not time out. +func (c *Conn) SetReadDeadline(t time.Time) error { + return c.conn.SetReadDeadline(t) +} + +// SetReadLimit sets the maximum size for a message read from the peer. If a +// message exceeds the limit, the connection sends a close frame to the peer +// and returns ErrReadLimit to the application. +func (c *Conn) SetReadLimit(limit int64) { + c.readLimit = limit +} + +// PingHandler returns the current ping handler +func (c *Conn) PingHandler() func(appData string) error { + return c.handlePing +} + +// SetPingHandler sets the handler for ping messages received from the peer. +// The appData argument to h is the PING frame application data. The default +// ping handler sends a pong to the peer. +func (c *Conn) SetPingHandler(h func(appData string) error) { + if h == nil { + h = func(message string) error { + err := c.WriteControl(PongMessage, []byte(message), time.Now().Add(writeWait)) + if err == ErrCloseSent { + return nil + } else if e, ok := err.(net.Error); ok && e.Temporary() { + return nil + } + return err + } + } + c.handlePing = h +} + +// PongHandler returns the current pong handler +func (c *Conn) PongHandler() func(appData string) error { + return c.handlePong +} + +// SetPongHandler sets the handler for pong messages received from the peer. +// The appData argument to h is the PONG frame application data. The default +// pong handler does nothing. +func (c *Conn) SetPongHandler(h func(appData string) error) { + if h == nil { + h = func(string) error { return nil } + } + c.handlePong = h +} + +// UnderlyingConn returns the internal net.Conn. This can be used to further +// modifications to connection specific flags. +func (c *Conn) UnderlyingConn() net.Conn { + return c.conn +} + +// FormatCloseMessage formats closeCode and text as a WebSocket close message. +func FormatCloseMessage(closeCode int, text string) []byte { + buf := make([]byte, 2+len(text)) + binary.BigEndian.PutUint16(buf, uint16(closeCode)) + copy(buf[2:], text) + return buf +} diff --git a/vendor/github.com/gorilla/websocket/conn_read.go b/vendor/github.com/gorilla/websocket/conn_read.go new file mode 100644 index 000000000000..1ea15059ee14 --- /dev/null +++ b/vendor/github.com/gorilla/websocket/conn_read.go @@ -0,0 +1,18 @@ +// Copyright 2016 The Gorilla WebSocket Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build go1.5 + +package websocket + +import "io" + +func (c *Conn) read(n int) ([]byte, error) { + p, err := c.br.Peek(n) + if err == io.EOF { + err = errUnexpectedEOF + } + c.br.Discard(len(p)) + return p, err +} diff --git a/vendor/github.com/gorilla/websocket/conn_read_legacy.go b/vendor/github.com/gorilla/websocket/conn_read_legacy.go new file mode 100644 index 000000000000..018541cf6cbb --- /dev/null +++ b/vendor/github.com/gorilla/websocket/conn_read_legacy.go @@ -0,0 +1,21 @@ +// Copyright 2016 The Gorilla WebSocket Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// +build !go1.5 + +package websocket + +import "io" + +func (c *Conn) read(n int) ([]byte, error) { + p, err := c.br.Peek(n) + if err == io.EOF { + err = errUnexpectedEOF + } + if len(p) > 0 { + // advance over the bytes just read + io.ReadFull(c.br, p) + } + return p, err +} diff --git a/vendor/github.com/gorilla/websocket/doc.go b/vendor/github.com/gorilla/websocket/doc.go new file mode 100644 index 000000000000..c901a7a94d3e --- /dev/null +++ b/vendor/github.com/gorilla/websocket/doc.go @@ -0,0 +1,152 @@ +// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +// Package websocket implements the WebSocket protocol defined in RFC 6455. +// +// Overview +// +// The Conn type represents a WebSocket connection. A server application uses +// the Upgrade function from an Upgrader object with a HTTP request handler +// to get a pointer to a Conn: +// +// var upgrader = websocket.Upgrader{ +// ReadBufferSize: 1024, +// WriteBufferSize: 1024, +// } +// +// func handler(w http.ResponseWriter, r *http.Request) { +// conn, err := upgrader.Upgrade(w, r, nil) +// if err != nil { +// log.Println(err) +// return +// } +// ... Use conn to send and receive messages. +// } +// +// Call the connection's WriteMessage and ReadMessage methods to send and +// receive messages as a slice of bytes. This snippet of code shows how to echo +// messages using these methods: +// +// for { +// messageType, p, err := conn.ReadMessage() +// if err != nil { +// return +// } +// if err = conn.WriteMessage(messageType, p); err != nil { +// return err +// } +// } +// +// In above snippet of code, p is a []byte and messageType is an int with value +// websocket.BinaryMessage or websocket.TextMessage. +// +// An application can also send and receive messages using the io.WriteCloser +// and io.Reader interfaces. To send a message, call the connection NextWriter +// method to get an io.WriteCloser, write the message to the writer and close +// the writer when done. To receive a message, call the connection NextReader +// method to get an io.Reader and read until io.EOF is returned. This snippet +// shows how to echo messages using the NextWriter and NextReader methods: +// +// for { +// messageType, r, err := conn.NextReader() +// if err != nil { +// return +// } +// w, err := conn.NextWriter(messageType) +// if err != nil { +// return err +// } +// if _, err := io.Copy(w, r); err != nil { +// return err +// } +// if err := w.Close(); err != nil { +// return err +// } +// } +// +// Data Messages +// +// The WebSocket protocol distinguishes between text and binary data messages. +// Text messages are interpreted as UTF-8 encoded text. The interpretation of +// binary messages is left to the application. +// +// This package uses the TextMessage and BinaryMessage integer constants to +// identify the two data message types. The ReadMessage and NextReader methods +// return the type of the received message. The messageType argument to the +// WriteMessage and NextWriter methods specifies the type of a sent message. +// +// It is the application's responsibility to ensure that text messages are +// valid UTF-8 encoded text. +// +// Control Messages +// +// The WebSocket protocol defines three types of control messages: close, ping +// and pong. Call the connection WriteControl, WriteMessage or NextWriter +// methods to send a control message to the peer. +// +// Connections handle received close messages by sending a close message to the +// peer and returning a *CloseError from the the NextReader, ReadMessage or the +// message Read method. +// +// Connections handle received ping and pong messages by invoking callback +// functions set with SetPingHandler and SetPongHandler methods. The callback +// functions are called from the NextReader, ReadMessage and the message Read +// methods. +// +// The default ping handler sends a pong to the peer. The application's reading +// goroutine can block for a short time while the handler writes the pong data +// to the connection. +// +// The application must read the connection to process ping, pong and close +// messages sent from the peer. If the application is not otherwise interested +// in messages from the peer, then the application should start a goroutine to +// read and discard messages from the peer. A simple example is: +// +// func readLoop(c *websocket.Conn) { +// for { +// if _, _, err := c.NextReader(); err != nil { +// c.Close() +// break +// } +// } +// } +// +// Concurrency +// +// Connections support one concurrent reader and one concurrent writer. +// +// Applications are responsible for ensuring that no more than one goroutine +// calls the write methods (NextWriter, SetWriteDeadline, WriteMessage, +// WriteJSON) concurrently and that no more than one goroutine calls the read +// methods (NextReader, SetReadDeadline, ReadMessage, ReadJSON, SetPongHandler, +// SetPingHandler) concurrently. +// +// The Close and WriteControl methods can be called concurrently with all other +// methods. +// +// Origin Considerations +// +// Web browsers allow Javascript applications to open a WebSocket connection to +// any host. It's up to the server to enforce an origin policy using the Origin +// request header sent by the browser. +// +// The Upgrader calls the function specified in the CheckOrigin field to check +// the origin. If the CheckOrigin function returns false, then the Upgrade +// method fails the WebSocket handshake with HTTP status 403. +// +// If the CheckOrigin field is nil, then the Upgrader uses a safe default: fail +// the handshake if the Origin request header is present and not equal to the +// Host request header. +// +// An application can allow connections from any origin by specifying a +// function that always returns true: +// +// var upgrader = websocket.Upgrader{ +// CheckOrigin: func(r *http.Request) bool { return true }, +// } +// +// The deprecated Upgrade function does not enforce an origin policy. It's the +// application's responsibility to check the Origin header before calling +// Upgrade. +package websocket diff --git a/vendor/github.com/gorilla/websocket/json.go b/vendor/github.com/gorilla/websocket/json.go new file mode 100644 index 000000000000..4f0e36875a5c --- /dev/null +++ b/vendor/github.com/gorilla/websocket/json.go @@ -0,0 +1,55 @@ +// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package websocket + +import ( + "encoding/json" + "io" +) + +// WriteJSON is deprecated, use c.WriteJSON instead. +func WriteJSON(c *Conn, v interface{}) error { + return c.WriteJSON(v) +} + +// WriteJSON writes the JSON encoding of v to the connection. +// +// See the documentation for encoding/json Marshal for details about the +// conversion of Go values to JSON. +func (c *Conn) WriteJSON(v interface{}) error { + w, err := c.NextWriter(TextMessage) + if err != nil { + return err + } + err1 := json.NewEncoder(w).Encode(v) + err2 := w.Close() + if err1 != nil { + return err1 + } + return err2 +} + +// ReadJSON is deprecated, use c.ReadJSON instead. +func ReadJSON(c *Conn, v interface{}) error { + return c.ReadJSON(v) +} + +// ReadJSON reads the next JSON-encoded message from the connection and stores +// it in the value pointed to by v. +// +// See the documentation for the encoding/json Unmarshal function for details +// about the conversion of JSON to a Go value. +func (c *Conn) ReadJSON(v interface{}) error { + _, r, err := c.NextReader() + if err != nil { + return err + } + err = json.NewDecoder(r).Decode(v) + if err == io.EOF { + // One value is expected in the message. + err = io.ErrUnexpectedEOF + } + return err +} diff --git a/vendor/github.com/gorilla/websocket/server.go b/vendor/github.com/gorilla/websocket/server.go new file mode 100644 index 000000000000..8402d20bd77b --- /dev/null +++ b/vendor/github.com/gorilla/websocket/server.go @@ -0,0 +1,261 @@ +// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package websocket + +import ( + "bufio" + "errors" + "net" + "net/http" + "net/url" + "strings" + "time" +) + +// HandshakeError describes an error with the handshake from the peer. +type HandshakeError struct { + message string +} + +func (e HandshakeError) Error() string { return e.message } + +// Upgrader specifies parameters for upgrading an HTTP connection to a +// WebSocket connection. +type Upgrader struct { + // HandshakeTimeout specifies the duration for the handshake to complete. + HandshakeTimeout time.Duration + + // ReadBufferSize and WriteBufferSize specify I/O buffer sizes. If a buffer + // size is zero, then a default value of 4096 is used. The I/O buffer sizes + // do not limit the size of the messages that can be sent or received. + ReadBufferSize, WriteBufferSize int + + // Subprotocols specifies the server's supported protocols in order of + // preference. If this field is set, then the Upgrade method negotiates a + // subprotocol by selecting the first match in this list with a protocol + // requested by the client. + Subprotocols []string + + // Error specifies the function for generating HTTP error responses. If Error + // is nil, then http.Error is used to generate the HTTP response. + Error func(w http.ResponseWriter, r *http.Request, status int, reason error) + + // CheckOrigin returns true if the request Origin header is acceptable. If + // CheckOrigin is nil, the host in the Origin header must not be set or + // must match the host of the request. + CheckOrigin func(r *http.Request) bool +} + +func (u *Upgrader) returnError(w http.ResponseWriter, r *http.Request, status int, reason string) (*Conn, error) { + err := HandshakeError{reason} + if u.Error != nil { + u.Error(w, r, status, err) + } else { + w.Header().Set("Sec-Websocket-Version", "13") + http.Error(w, http.StatusText(status), status) + } + return nil, err +} + +// checkSameOrigin returns true if the origin is not set or is equal to the request host. +func checkSameOrigin(r *http.Request) bool { + origin := r.Header["Origin"] + if len(origin) == 0 { + return true + } + u, err := url.Parse(origin[0]) + if err != nil { + return false + } + return u.Host == r.Host +} + +func (u *Upgrader) selectSubprotocol(r *http.Request, responseHeader http.Header) string { + if u.Subprotocols != nil { + clientProtocols := Subprotocols(r) + for _, serverProtocol := range u.Subprotocols { + for _, clientProtocol := range clientProtocols { + if clientProtocol == serverProtocol { + return clientProtocol + } + } + } + } else if responseHeader != nil { + return responseHeader.Get("Sec-Websocket-Protocol") + } + return "" +} + +// Upgrade upgrades the HTTP server connection to the WebSocket protocol. +// +// The responseHeader is included in the response to the client's upgrade +// request. Use the responseHeader to specify cookies (Set-Cookie) and the +// application negotiated subprotocol (Sec-Websocket-Protocol). +// +// If the upgrade fails, then Upgrade replies to the client with an HTTP error +// response. +func (u *Upgrader) Upgrade(w http.ResponseWriter, r *http.Request, responseHeader http.Header) (*Conn, error) { + if r.Method != "GET" { + return u.returnError(w, r, http.StatusMethodNotAllowed, "websocket: method not GET") + } + if !tokenListContainsValue(r.Header, "Sec-Websocket-Version", "13") { + return u.returnError(w, r, http.StatusBadRequest, "websocket: version != 13") + } + + if !tokenListContainsValue(r.Header, "Connection", "upgrade") { + return u.returnError(w, r, http.StatusBadRequest, "websocket: could not find connection header with token 'upgrade'") + } + + if !tokenListContainsValue(r.Header, "Upgrade", "websocket") { + return u.returnError(w, r, http.StatusBadRequest, "websocket: could not find upgrade header with token 'websocket'") + } + + checkOrigin := u.CheckOrigin + if checkOrigin == nil { + checkOrigin = checkSameOrigin + } + if !checkOrigin(r) { + return u.returnError(w, r, http.StatusForbidden, "websocket: origin not allowed") + } + + challengeKey := r.Header.Get("Sec-Websocket-Key") + if challengeKey == "" { + return u.returnError(w, r, http.StatusBadRequest, "websocket: key missing or blank") + } + + subprotocol := u.selectSubprotocol(r, responseHeader) + + var ( + netConn net.Conn + br *bufio.Reader + err error + ) + + h, ok := w.(http.Hijacker) + if !ok { + return u.returnError(w, r, http.StatusInternalServerError, "websocket: response does not implement http.Hijacker") + } + var rw *bufio.ReadWriter + netConn, rw, err = h.Hijack() + if err != nil { + return u.returnError(w, r, http.StatusInternalServerError, err.Error()) + } + br = rw.Reader + + if br.Buffered() > 0 { + netConn.Close() + return nil, errors.New("websocket: client sent data before handshake is complete") + } + + c := newConn(netConn, true, u.ReadBufferSize, u.WriteBufferSize) + c.subprotocol = subprotocol + + p := c.writeBuf[:0] + p = append(p, "HTTP/1.1 101 Switching Protocols\r\nUpgrade: websocket\r\nConnection: Upgrade\r\nSec-WebSocket-Accept: "...) + p = append(p, computeAcceptKey(challengeKey)...) + p = append(p, "\r\n"...) + if c.subprotocol != "" { + p = append(p, "Sec-Websocket-Protocol: "...) + p = append(p, c.subprotocol...) + p = append(p, "\r\n"...) + } + for k, vs := range responseHeader { + if k == "Sec-Websocket-Protocol" { + continue + } + for _, v := range vs { + p = append(p, k...) + p = append(p, ": "...) + for i := 0; i < len(v); i++ { + b := v[i] + if b <= 31 { + // prevent response splitting. + b = ' ' + } + p = append(p, b) + } + p = append(p, "\r\n"...) + } + } + p = append(p, "\r\n"...) + + // Clear deadlines set by HTTP server. + netConn.SetDeadline(time.Time{}) + + if u.HandshakeTimeout > 0 { + netConn.SetWriteDeadline(time.Now().Add(u.HandshakeTimeout)) + } + if _, err = netConn.Write(p); err != nil { + netConn.Close() + return nil, err + } + if u.HandshakeTimeout > 0 { + netConn.SetWriteDeadline(time.Time{}) + } + + return c, nil +} + +// Upgrade upgrades the HTTP server connection to the WebSocket protocol. +// +// This function is deprecated, use websocket.Upgrader instead. +// +// The application is responsible for checking the request origin before +// calling Upgrade. An example implementation of the same origin policy is: +// +// if req.Header.Get("Origin") != "http://"+req.Host { +// http.Error(w, "Origin not allowed", 403) +// return +// } +// +// If the endpoint supports subprotocols, then the application is responsible +// for negotiating the protocol used on the connection. Use the Subprotocols() +// function to get the subprotocols requested by the client. Use the +// Sec-Websocket-Protocol response header to specify the subprotocol selected +// by the application. +// +// The responseHeader is included in the response to the client's upgrade +// request. Use the responseHeader to specify cookies (Set-Cookie) and the +// negotiated subprotocol (Sec-Websocket-Protocol). +// +// The connection buffers IO to the underlying network connection. The +// readBufSize and writeBufSize parameters specify the size of the buffers to +// use. Messages can be larger than the buffers. +// +// If the request is not a valid WebSocket handshake, then Upgrade returns an +// error of type HandshakeError. Applications should handle this error by +// replying to the client with an HTTP error response. +func Upgrade(w http.ResponseWriter, r *http.Request, responseHeader http.Header, readBufSize, writeBufSize int) (*Conn, error) { + u := Upgrader{ReadBufferSize: readBufSize, WriteBufferSize: writeBufSize} + u.Error = func(w http.ResponseWriter, r *http.Request, status int, reason error) { + // don't return errors to maintain backwards compatibility + } + u.CheckOrigin = func(r *http.Request) bool { + // allow all connections by default + return true + } + return u.Upgrade(w, r, responseHeader) +} + +// Subprotocols returns the subprotocols requested by the client in the +// Sec-Websocket-Protocol header. +func Subprotocols(r *http.Request) []string { + h := strings.TrimSpace(r.Header.Get("Sec-Websocket-Protocol")) + if h == "" { + return nil + } + protocols := strings.Split(h, ",") + for i := range protocols { + protocols[i] = strings.TrimSpace(protocols[i]) + } + return protocols +} + +// IsWebSocketUpgrade returns true if the client requested upgrade to the +// WebSocket protocol. +func IsWebSocketUpgrade(r *http.Request) bool { + return tokenListContainsValue(r.Header, "Connection", "upgrade") && + tokenListContainsValue(r.Header, "Upgrade", "websocket") +} diff --git a/vendor/github.com/gorilla/websocket/util.go b/vendor/github.com/gorilla/websocket/util.go new file mode 100644 index 000000000000..9a4908df2ee7 --- /dev/null +++ b/vendor/github.com/gorilla/websocket/util.go @@ -0,0 +1,214 @@ +// Copyright 2013 The Gorilla WebSocket Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package websocket + +import ( + "crypto/rand" + "crypto/sha1" + "encoding/base64" + "io" + "net/http" + "strings" +) + +var keyGUID = []byte("258EAFA5-E914-47DA-95CA-C5AB0DC85B11") + +func computeAcceptKey(challengeKey string) string { + h := sha1.New() + h.Write([]byte(challengeKey)) + h.Write(keyGUID) + return base64.StdEncoding.EncodeToString(h.Sum(nil)) +} + +func generateChallengeKey() (string, error) { + p := make([]byte, 16) + if _, err := io.ReadFull(rand.Reader, p); err != nil { + return "", err + } + return base64.StdEncoding.EncodeToString(p), nil +} + +// Octet types from RFC 2616. +var octetTypes [256]byte + +const ( + isTokenOctet = 1 << iota + isSpaceOctet +) + +func init() { + // From RFC 2616 + // + // OCTET = + // CHAR = + // CTL = + // CR = + // LF = + // SP = + // HT = + // <"> = + // CRLF = CR LF + // LWS = [CRLF] 1*( SP | HT ) + // TEXT = + // separators = "(" | ")" | "<" | ">" | "@" | "," | ";" | ":" | "\" | <"> + // | "/" | "[" | "]" | "?" | "=" | "{" | "}" | SP | HT + // token = 1* + // qdtext = > + + for c := 0; c < 256; c++ { + var t byte + isCtl := c <= 31 || c == 127 + isChar := 0 <= c && c <= 127 + isSeparator := strings.IndexRune(" \t\"(),/:;<=>?@[]\\{}", rune(c)) >= 0 + if strings.IndexRune(" \t\r\n", rune(c)) >= 0 { + t |= isSpaceOctet + } + if isChar && !isCtl && !isSeparator { + t |= isTokenOctet + } + octetTypes[c] = t + } +} + +func skipSpace(s string) (rest string) { + i := 0 + for ; i < len(s); i++ { + if octetTypes[s[i]]&isSpaceOctet == 0 { + break + } + } + return s[i:] +} + +func nextToken(s string) (token, rest string) { + i := 0 + for ; i < len(s); i++ { + if octetTypes[s[i]]&isTokenOctet == 0 { + break + } + } + return s[:i], s[i:] +} + +func nextTokenOrQuoted(s string) (value string, rest string) { + if !strings.HasPrefix(s, "\"") { + return nextToken(s) + } + s = s[1:] + for i := 0; i < len(s); i++ { + switch s[i] { + case '"': + return s[:i], s[i+1:] + case '\\': + p := make([]byte, len(s)-1) + j := copy(p, s[:i]) + escape := true + for i = i + 1; i < len(s); i++ { + b := s[i] + switch { + case escape: + escape = false + p[j] = b + j += 1 + case b == '\\': + escape = true + case b == '"': + return string(p[:j]), s[i+1:] + default: + p[j] = b + j += 1 + } + } + return "", "" + } + } + return "", "" +} + +// tokenListContainsValue returns true if the 1#token header with the given +// name contains token. +func tokenListContainsValue(header http.Header, name string, value string) bool { +headers: + for _, s := range header[name] { + for { + var t string + t, s = nextToken(skipSpace(s)) + if t == "" { + continue headers + } + s = skipSpace(s) + if s != "" && s[0] != ',' { + continue headers + } + if strings.EqualFold(t, value) { + return true + } + if s == "" { + continue headers + } + s = s[1:] + } + } + return false +} + +// parseExtensiosn parses WebSocket extensions from a header. +func parseExtensions(header http.Header) []map[string]string { + + // From RFC 6455: + // + // Sec-WebSocket-Extensions = extension-list + // extension-list = 1#extension + // extension = extension-token *( ";" extension-param ) + // extension-token = registered-token + // registered-token = token + // extension-param = token [ "=" (token | quoted-string) ] + // ;When using the quoted-string syntax variant, the value + // ;after quoted-string unescaping MUST conform to the + // ;'token' ABNF. + + var result []map[string]string +headers: + for _, s := range header["Sec-Websocket-Extensions"] { + for { + var t string + t, s = nextToken(skipSpace(s)) + if t == "" { + continue headers + } + ext := map[string]string{"": t} + for { + s = skipSpace(s) + if !strings.HasPrefix(s, ";") { + break + } + var k string + k, s = nextToken(skipSpace(s[1:])) + if k == "" { + continue headers + } + s = skipSpace(s) + var v string + if strings.HasPrefix(s, "=") { + v, s = nextTokenOrQuoted(skipSpace(s[1:])) + s = skipSpace(s) + } + if s != "" && s[0] != ',' && s[0] != ';' { + continue headers + } + ext[k] = v + } + if s != "" && s[0] != ',' { + continue headers + } + result = append(result, ext) + if s == "" { + continue headers + } + s = s[1:] + } + } + return result +} diff --git a/vendor/github.com/rancher/go-rancher/Dockerfile.dapper b/vendor/github.com/rancher/go-rancher/Dockerfile.dapper new file mode 100644 index 000000000000..6755d3fa11bc --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/Dockerfile.dapper @@ -0,0 +1,31 @@ +FROM ubuntu:16.04 +# FROM arm=armhf/ubuntu:16.04 + +ARG DAPPER_HOST_ARCH +ENV HOST_ARCH=${DAPPER_HOST_ARCH} ARCH=${DAPPER_HOST_ARCH} + +RUN apt-get update && \ + apt-get install -y gcc ca-certificates git wget curl vim less file && \ + rm -f /bin/sh && ln -s /bin/bash /bin/sh + +ENV GOLANG_ARCH_amd64=amd64 GOLANG_ARCH_arm=armv6l GOLANG_ARCH=GOLANG_ARCH_${ARCH} \ + GOPATH=/go PATH=/go/bin:/usr/local/go/bin:${PATH} SHELL=/bin/bash + +RUN wget -O - https://storage.googleapis.com/golang/go1.6.2.linux-${!GOLANG_ARCH}.tar.gz | tar -xzf - -C /usr/local && \ + go get github.com/rancher/trash && go get github.com/golang/lint/golint + +ENV DOCKER_URL_amd64=https://get.docker.com/builds/Linux/x86_64/docker-1.10.3 \ + DOCKER_URL_arm=https://github.com/rancher/docker/releases/download/v1.10.3-ros1/docker-1.10.3_arm \ + DOCKER_URL=DOCKER_URL_${ARCH} + +RUN wget -O - ${!DOCKER_URL} > /usr/bin/docker && chmod +x /usr/bin/docker + +ENV DAPPER_SOURCE /go/src/github.com/rancher/go-rancher/ +ENV DAPPER_OUTPUT ./bin ./dist +ENV DAPPER_DOCKER_SOCKET true +ENV TRASH_CACHE ${DAPPER_SOURCE}/.trash-cache +ENV HOME ${DAPPER_SOURCE} +WORKDIR ${DAPPER_SOURCE} + +ENTRYPOINT ["./scripts/entry"] +CMD ["ci"] diff --git a/vendor/github.com/rancher/go-rancher/LICENSE b/vendor/github.com/rancher/go-rancher/LICENSE new file mode 100644 index 000000000000..f433b1a53f5b --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/LICENSE @@ -0,0 +1,177 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/vendor/github.com/rancher/go-rancher/Makefile b/vendor/github.com/rancher/go-rancher/Makefile new file mode 100644 index 000000000000..d7d72a16d549 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/Makefile @@ -0,0 +1,23 @@ +TARGETS := $(shell ls scripts) + +.dapper: + @echo Downloading dapper + @curl -sL https://releases.rancher.com/dapper/latest/dapper-`uname -s`-`uname -m` > .dapper.tmp + @@chmod +x .dapper.tmp + @./.dapper.tmp -v + @mv .dapper.tmp .dapper + +$(TARGETS): .dapper + ./.dapper $@ + +trash: .dapper + ./.dapper -m bind trash + +trash-keep: .dapper + ./.dapper -m bind trash -k + +deps: trash + +.DEFAULT_GOAL := ci + +.PHONY: $(TARGETS) diff --git a/vendor/github.com/rancher/go-rancher/README.md b/vendor/github.com/rancher/go-rancher/README.md new file mode 100644 index 000000000000..247a6b909db9 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/README.md @@ -0,0 +1,35 @@ +# Go Bindings for Rancher API + +# Building + +```sh +godep go build ./client +``` + +# Tests + +```sh +godep go test ./client +``` +# Contact +For bugs, questions, comments, corrections, suggestions, etc., open an issue in + [rancher/rancher](//github.com/rancher/rancher/issues) with a title starting with `[go-rancher] `. + +Or just [click here](//github.com/rancher/rancher/issues/new?title=%5Bgo-rancher%5D%20) to create a new issue. + + +# License +Copyright (c) 2014-2015 [Rancher Labs, Inc.](http://rancher.com) + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + +[http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0) + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. + diff --git a/vendor/github.com/rancher/go-rancher/client/client.go b/vendor/github.com/rancher/go-rancher/client/client.go new file mode 100644 index 000000000000..0b14ada3a8ec --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/client.go @@ -0,0 +1,7 @@ +package client + +type RancherBaseClient struct { + Opts *ClientOpts + Schemas *Schemas + Types map[string]Schema +} diff --git a/vendor/github.com/rancher/go-rancher/client/common.go b/vendor/github.com/rancher/go-rancher/client/common.go new file mode 100644 index 000000000000..a9f5a40d2d65 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/common.go @@ -0,0 +1,565 @@ +package client + +import ( + "bytes" + "encoding/json" + "fmt" + "io" + "io/ioutil" + "net/http" + "net/url" + "os" + "regexp" + "time" + + "github.com/gorilla/websocket" + "github.com/pkg/errors" +) + +const ( + SELF = "self" + COLLECTION = "collection" +) + +var ( + debug = false + dialer = &websocket.Dialer{} +) + +type ClientOpts struct { + Url string + AccessKey string + SecretKey string + Timeout time.Duration +} + +type ApiError struct { + StatusCode int + Url string + Msg string + Status string + Body string +} + +func (e *ApiError) Error() string { + return e.Msg +} + +func IsNotFound(err error) bool { + apiError, ok := err.(*ApiError) + if !ok { + return false + } + + return apiError.StatusCode == http.StatusNotFound +} + +func newApiError(resp *http.Response, url string) *ApiError { + contents, err := ioutil.ReadAll(resp.Body) + var body string + if err != nil { + body = "Unreadable body." + } else { + body = string(contents) + } + + data := map[string]interface{}{} + if json.Unmarshal(contents, &data) == nil { + delete(data, "id") + delete(data, "links") + delete(data, "actions") + delete(data, "type") + delete(data, "status") + buf := &bytes.Buffer{} + for k, v := range data { + if v == nil { + continue + } + if buf.Len() > 0 { + buf.WriteString(", ") + } + fmt.Fprintf(buf, "%s=%v", k, v) + } + body = buf.String() + } + formattedMsg := fmt.Sprintf("Bad response statusCode [%d]. Status [%s]. Body: [%s] from [%s]", + resp.StatusCode, resp.Status, body, url) + return &ApiError{ + Url: url, + Msg: formattedMsg, + StatusCode: resp.StatusCode, + Status: resp.Status, + Body: body, + } +} + +func contains(array []string, item string) bool { + for _, check := range array { + if check == item { + return true + } + } + + return false +} + +func appendFilters(urlString string, filters map[string]interface{}) (string, error) { + if len(filters) == 0 { + return urlString, nil + } + + u, err := url.Parse(urlString) + if err != nil { + return "", err + } + + q := u.Query() + for k, v := range filters { + q.Add(k, fmt.Sprintf("%v", v)) + } + + u.RawQuery = q.Encode() + return u.String(), nil +} + +func setupRancherBaseClient(rancherClient *RancherBaseClient, opts *ClientOpts) error { + if opts.Timeout == 0 { + opts.Timeout = time.Second * 10 + } + client := &http.Client{Timeout: opts.Timeout} + req, err := http.NewRequest("GET", opts.Url, nil) + if err != nil { + return err + } + + req.SetBasicAuth(opts.AccessKey, opts.SecretKey) + + resp, err := client.Do(req) + if err != nil { + return err + } + + defer resp.Body.Close() + + if resp.StatusCode != 200 { + return newApiError(resp, opts.Url) + } + + schemasUrls := resp.Header.Get("X-API-Schemas") + if len(schemasUrls) == 0 { + return errors.New("Failed to find schema at [" + opts.Url + "]") + } + + if schemasUrls != opts.Url { + req, err = http.NewRequest("GET", schemasUrls, nil) + req.SetBasicAuth(opts.AccessKey, opts.SecretKey) + if err != nil { + return err + } + + resp, err = client.Do(req) + if err != nil { + return err + } + + defer resp.Body.Close() + + if resp.StatusCode != 200 { + return newApiError(resp, opts.Url) + } + } + + var schemas Schemas + bytes, err := ioutil.ReadAll(resp.Body) + if err != nil { + return err + } + + err = json.Unmarshal(bytes, &schemas) + if err != nil { + return err + } + + rancherClient.Opts = opts + rancherClient.Schemas = &schemas + + for _, schema := range schemas.Data { + rancherClient.Types[schema.Id] = schema + } + + return nil +} + +func NewListOpts() *ListOpts { + return &ListOpts{ + Filters: map[string]interface{}{}, + } +} + +func (rancherClient *RancherBaseClient) setupRequest(req *http.Request) { + req.SetBasicAuth(rancherClient.Opts.AccessKey, rancherClient.Opts.SecretKey) +} + +func (rancherClient *RancherBaseClient) newHttpClient() *http.Client { + if rancherClient.Opts.Timeout == 0 { + rancherClient.Opts.Timeout = time.Second * 10 + } + return &http.Client{Timeout: rancherClient.Opts.Timeout} +} + +func (rancherClient *RancherBaseClient) doDelete(url string) error { + client := rancherClient.newHttpClient() + req, err := http.NewRequest("DELETE", url, nil) + if err != nil { + return err + } + + rancherClient.setupRequest(req) + + resp, err := client.Do(req) + if err != nil { + return err + } + defer resp.Body.Close() + + io.Copy(ioutil.Discard, resp.Body) + + if resp.StatusCode >= 300 { + return newApiError(resp, url) + } + + return nil +} + +func (rancherClient *RancherBaseClient) Websocket(url string, headers map[string][]string) (*websocket.Conn, *http.Response, error) { + return dialer.Dial(url, http.Header(headers)) +} + +func (rancherClient *RancherBaseClient) doGet(url string, opts *ListOpts, respObject interface{}) error { + if opts == nil { + opts = NewListOpts() + } + url, err := appendFilters(url, opts.Filters) + if err != nil { + return err + } + + if debug { + fmt.Println("GET " + url) + } + + client := rancherClient.newHttpClient() + req, err := http.NewRequest("GET", url, nil) + if err != nil { + return err + } + + rancherClient.setupRequest(req) + + resp, err := client.Do(req) + if err != nil { + return err + } + + defer resp.Body.Close() + + if resp.StatusCode != 200 { + return newApiError(resp, url) + } + + byteContent, err := ioutil.ReadAll(resp.Body) + if err != nil { + return err + } + + if debug { + fmt.Println("Response <= " + string(byteContent)) + } + + if err := json.Unmarshal(byteContent, respObject); err != nil { + return errors.Wrap(err, fmt.Sprintf("Failed to parse: %s", byteContent)) + } + + return nil +} + +func (rancherClient *RancherBaseClient) List(schemaType string, opts *ListOpts, respObject interface{}) error { + return rancherClient.doList(schemaType, opts, respObject) +} + +func (rancherClient *RancherBaseClient) doList(schemaType string, opts *ListOpts, respObject interface{}) error { + schema, ok := rancherClient.Types[schemaType] + if !ok { + return errors.New("Unknown schema type [" + schemaType + "]") + } + + if !contains(schema.CollectionMethods, "GET") { + return errors.New("Resource type [" + schemaType + "] is not listable") + } + + collectionUrl, ok := schema.Links[COLLECTION] + if !ok { + return errors.New("Failed to find collection URL for [" + schemaType + "]") + } + + return rancherClient.doGet(collectionUrl, opts, respObject) +} + +func (rancherClient *RancherBaseClient) Post(url string, createObj interface{}, respObject interface{}) error { + return rancherClient.doModify("POST", url, createObj, respObject) +} + +func (rancherClient *RancherBaseClient) GetLink(resource Resource, link string, respObject interface{}) error { + url := resource.Links[link] + if url == "" { + return fmt.Errorf("Failed to find link: %s", link) + } + + return rancherClient.doGet(url, &ListOpts{}, respObject) +} + +func (rancherClient *RancherBaseClient) doModify(method string, url string, createObj interface{}, respObject interface{}) error { + bodyContent, err := json.Marshal(createObj) + if err != nil { + return err + } + + if debug { + fmt.Println(method + " " + url) + fmt.Println("Request => " + string(bodyContent)) + } + + client := rancherClient.newHttpClient() + req, err := http.NewRequest(method, url, bytes.NewBuffer(bodyContent)) + if err != nil { + return err + } + + rancherClient.setupRequest(req) + req.Header.Set("Content-Type", "application/json") + req.Header.Set("Content-Length", string(len(bodyContent))) + + resp, err := client.Do(req) + if err != nil { + return err + } + + defer resp.Body.Close() + + if resp.StatusCode >= 300 { + return newApiError(resp, url) + } + + byteContent, err := ioutil.ReadAll(resp.Body) + if err != nil { + return err + } + + if len(byteContent) > 0 { + if debug { + fmt.Println("Response <= " + string(byteContent)) + } + return json.Unmarshal(byteContent, respObject) + } + + return nil +} + +func (rancherClient *RancherBaseClient) Create(schemaType string, createObj interface{}, respObject interface{}) error { + return rancherClient.doCreate(schemaType, createObj, respObject) +} + +func (rancherClient *RancherBaseClient) doCreate(schemaType string, createObj interface{}, respObject interface{}) error { + if createObj == nil { + createObj = map[string]string{} + } + if respObject == nil { + respObject = &map[string]interface{}{} + } + schema, ok := rancherClient.Types[schemaType] + if !ok { + return errors.New("Unknown schema type [" + schemaType + "]") + } + + if !contains(schema.CollectionMethods, "POST") { + return errors.New("Resource type [" + schemaType + "] is not creatable") + } + + var collectionUrl string + collectionUrl, ok = schema.Links[COLLECTION] + if !ok { + // return errors.New("Failed to find collection URL for [" + schemaType + "]") + // This is a hack to address https://github.com/rancher/cattle/issues/254 + re := regexp.MustCompile("schemas.*") + collectionUrl = re.ReplaceAllString(schema.Links[SELF], schema.PluralName) + } + + return rancherClient.doModify("POST", collectionUrl, createObj, respObject) +} + +func (rancherClient *RancherBaseClient) Update(schemaType string, existing *Resource, updates interface{}, respObject interface{}) error { + return rancherClient.doUpdate(schemaType, existing, updates, respObject) +} + +func (rancherClient *RancherBaseClient) doUpdate(schemaType string, existing *Resource, updates interface{}, respObject interface{}) error { + if existing == nil { + return errors.New("Existing object is nil") + } + + selfUrl, ok := existing.Links[SELF] + if !ok { + return errors.New(fmt.Sprintf("Failed to find self URL of [%v]", existing)) + } + + if updates == nil { + updates = map[string]string{} + } + + if respObject == nil { + respObject = &map[string]interface{}{} + } + + schema, ok := rancherClient.Types[schemaType] + if !ok { + return errors.New("Unknown schema type [" + schemaType + "]") + } + + if !contains(schema.ResourceMethods, "PUT") { + return errors.New("Resource type [" + schemaType + "] is not updatable") + } + + return rancherClient.doModify("PUT", selfUrl, updates, respObject) +} + +func (rancherClient *RancherBaseClient) ById(schemaType string, id string, respObject interface{}) error { + return rancherClient.doById(schemaType, id, respObject) +} + +func (rancherClient *RancherBaseClient) doById(schemaType string, id string, respObject interface{}) error { + schema, ok := rancherClient.Types[schemaType] + if !ok { + return errors.New("Unknown schema type [" + schemaType + "]") + } + + if !contains(schema.ResourceMethods, "GET") { + return errors.New("Resource type [" + schemaType + "] can not be looked up by ID") + } + + collectionUrl, ok := schema.Links[COLLECTION] + if !ok { + return errors.New("Failed to find collection URL for [" + schemaType + "]") + } + + err := rancherClient.doGet(collectionUrl+"/"+id, nil, respObject) + //TODO check for 404 and return nil, nil + return err +} + +func (rancherClient *RancherBaseClient) Delete(existing *Resource) error { + if existing == nil { + return nil + } + return rancherClient.doResourceDelete(existing.Type, existing) +} + +func (rancherClient *RancherBaseClient) doResourceDelete(schemaType string, existing *Resource) error { + schema, ok := rancherClient.Types[schemaType] + if !ok { + return errors.New("Unknown schema type [" + schemaType + "]") + } + + if !contains(schema.ResourceMethods, "DELETE") { + return errors.New("Resource type [" + schemaType + "] can not be deleted") + } + + selfUrl, ok := existing.Links[SELF] + if !ok { + return errors.New(fmt.Sprintf("Failed to find self URL of [%v]", existing)) + } + + return rancherClient.doDelete(selfUrl) +} + +func (rancherClient *RancherBaseClient) Reload(existing *Resource, output interface{}) error { + selfUrl, ok := existing.Links[SELF] + if !ok { + return errors.New(fmt.Sprintf("Failed to find self URL of [%v]", existing)) + } + + return rancherClient.doGet(selfUrl, NewListOpts(), output) +} + +func (rancherClient *RancherBaseClient) Action(schemaType string, action string, + existing *Resource, inputObject, respObject interface{}) error { + return rancherClient.doAction(schemaType, action, existing, inputObject, respObject) +} + +func (rancherClient *RancherBaseClient) doAction(schemaType string, action string, + existing *Resource, inputObject, respObject interface{}) error { + + if existing == nil { + return errors.New("Existing object is nil") + } + + actionUrl, ok := existing.Actions[action] + if !ok { + return errors.New(fmt.Sprintf("Action [%v] not available on [%v]", action, existing)) + } + + _, ok = rancherClient.Types[schemaType] + if !ok { + return errors.New("Unknown schema type [" + schemaType + "]") + } + + var input io.Reader + + if inputObject != nil { + bodyContent, err := json.Marshal(inputObject) + if err != nil { + return err + } + if debug { + fmt.Println("Request => " + string(bodyContent)) + } + input = bytes.NewBuffer(bodyContent) + } + + client := rancherClient.newHttpClient() + req, err := http.NewRequest("POST", actionUrl, input) + if err != nil { + return err + } + + rancherClient.setupRequest(req) + req.Header.Set("Content-Type", "application/json") + req.Header.Set("Content-Length", "0") + + resp, err := client.Do(req) + if err != nil { + return err + } + + defer resp.Body.Close() + + if resp.StatusCode >= 300 { + return newApiError(resp, actionUrl) + } + + byteContent, err := ioutil.ReadAll(resp.Body) + if err != nil { + return err + } + + if debug { + fmt.Println("Response <= " + string(byteContent)) + } + + return json.Unmarshal(byteContent, respObject) +} + +func init() { + debug = os.Getenv("RANCHER_CLIENT_DEBUG") == "true" + if debug { + fmt.Println("Rancher client debug on") + } +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_account.go b/vendor/github.com/rancher/go-rancher/client/generated_account.go new file mode 100644 index 000000000000..3e95989eccf9 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_account.go @@ -0,0 +1,172 @@ +package client + +const ( + ACCOUNT_TYPE = "account" +) + +type Account struct { + Resource + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"` + + ExternalIdType string `json:"externalIdType,omitempty" yaml:"external_id_type,omitempty"` + + Identity string `json:"identity,omitempty" yaml:"identity,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type AccountCollection struct { + Collection + Data []Account `json:"data,omitempty"` +} + +type AccountClient struct { + rancherClient *RancherClient +} + +type AccountOperations interface { + List(opts *ListOpts) (*AccountCollection, error) + Create(opts *Account) (*Account, error) + Update(existing *Account, updates interface{}) (*Account, error) + ById(id string) (*Account, error) + Delete(container *Account) error + + ActionActivate(*Account) (*Account, error) + + ActionCreate(*Account) (*Account, error) + + ActionDeactivate(*Account) (*Account, error) + + ActionPurge(*Account) (*Account, error) + + ActionRemove(*Account) (*Account, error) + + ActionRestore(*Account) (*Account, error) + + ActionUpdate(*Account) (*Account, error) +} + +func newAccountClient(rancherClient *RancherClient) *AccountClient { + return &AccountClient{ + rancherClient: rancherClient, + } +} + +func (c *AccountClient) Create(container *Account) (*Account, error) { + resp := &Account{} + err := c.rancherClient.doCreate(ACCOUNT_TYPE, container, resp) + return resp, err +} + +func (c *AccountClient) Update(existing *Account, updates interface{}) (*Account, error) { + resp := &Account{} + err := c.rancherClient.doUpdate(ACCOUNT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *AccountClient) List(opts *ListOpts) (*AccountCollection, error) { + resp := &AccountCollection{} + err := c.rancherClient.doList(ACCOUNT_TYPE, opts, resp) + return resp, err +} + +func (c *AccountClient) ById(id string) (*Account, error) { + resp := &Account{} + err := c.rancherClient.doById(ACCOUNT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *AccountClient) Delete(container *Account) error { + return c.rancherClient.doResourceDelete(ACCOUNT_TYPE, &container.Resource) +} + +func (c *AccountClient) ActionActivate(resource *Account) (*Account, error) { + + resp := &Account{} + + err := c.rancherClient.doAction(ACCOUNT_TYPE, "activate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *AccountClient) ActionCreate(resource *Account) (*Account, error) { + + resp := &Account{} + + err := c.rancherClient.doAction(ACCOUNT_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *AccountClient) ActionDeactivate(resource *Account) (*Account, error) { + + resp := &Account{} + + err := c.rancherClient.doAction(ACCOUNT_TYPE, "deactivate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *AccountClient) ActionPurge(resource *Account) (*Account, error) { + + resp := &Account{} + + err := c.rancherClient.doAction(ACCOUNT_TYPE, "purge", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *AccountClient) ActionRemove(resource *Account) (*Account, error) { + + resp := &Account{} + + err := c.rancherClient.doAction(ACCOUNT_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *AccountClient) ActionRestore(resource *Account) (*Account, error) { + + resp := &Account{} + + err := c.rancherClient.doAction(ACCOUNT_TYPE, "restore", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *AccountClient) ActionUpdate(resource *Account) (*Account, error) { + + resp := &Account{} + + err := c.rancherClient.doAction(ACCOUNT_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_active_setting.go b/vendor/github.com/rancher/go-rancher/client/generated_active_setting.go new file mode 100644 index 000000000000..c8db84705077 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_active_setting.go @@ -0,0 +1,75 @@ +package client + +const ( + ACTIVE_SETTING_TYPE = "activeSetting" +) + +type ActiveSetting struct { + Resource + + ActiveValue interface{} `json:"activeValue,omitempty" yaml:"active_value,omitempty"` + + InDb bool `json:"inDb,omitempty" yaml:"in_db,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + Source string `json:"source,omitempty" yaml:"source,omitempty"` + + Value string `json:"value,omitempty" yaml:"value,omitempty"` +} + +type ActiveSettingCollection struct { + Collection + Data []ActiveSetting `json:"data,omitempty"` +} + +type ActiveSettingClient struct { + rancherClient *RancherClient +} + +type ActiveSettingOperations interface { + List(opts *ListOpts) (*ActiveSettingCollection, error) + Create(opts *ActiveSetting) (*ActiveSetting, error) + Update(existing *ActiveSetting, updates interface{}) (*ActiveSetting, error) + ById(id string) (*ActiveSetting, error) + Delete(container *ActiveSetting) error +} + +func newActiveSettingClient(rancherClient *RancherClient) *ActiveSettingClient { + return &ActiveSettingClient{ + rancherClient: rancherClient, + } +} + +func (c *ActiveSettingClient) Create(container *ActiveSetting) (*ActiveSetting, error) { + resp := &ActiveSetting{} + err := c.rancherClient.doCreate(ACTIVE_SETTING_TYPE, container, resp) + return resp, err +} + +func (c *ActiveSettingClient) Update(existing *ActiveSetting, updates interface{}) (*ActiveSetting, error) { + resp := &ActiveSetting{} + err := c.rancherClient.doUpdate(ACTIVE_SETTING_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ActiveSettingClient) List(opts *ListOpts) (*ActiveSettingCollection, error) { + resp := &ActiveSettingCollection{} + err := c.rancherClient.doList(ACTIVE_SETTING_TYPE, opts, resp) + return resp, err +} + +func (c *ActiveSettingClient) ById(id string) (*ActiveSetting, error) { + resp := &ActiveSetting{} + err := c.rancherClient.doById(ACTIVE_SETTING_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ActiveSettingClient) Delete(container *ActiveSetting) error { + return c.rancherClient.doResourceDelete(ACTIVE_SETTING_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_add_label_input.go b/vendor/github.com/rancher/go-rancher/client/generated_add_label_input.go new file mode 100644 index 000000000000..97afedd0ffdb --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_add_label_input.go @@ -0,0 +1,64 @@ +package client + +const ( + ADD_LABEL_INPUT_TYPE = "addLabelInput" +) + +type AddLabelInput struct { + Resource + + Key string `json:"key,omitempty"` + + Value string `json:"value,omitempty"` +} + +type AddLabelInputCollection struct { + Collection + Data []AddLabelInput `json:"data,omitempty"` +} + +type AddLabelInputClient struct { + rancherClient *RancherClient +} + +type AddLabelInputOperations interface { + List(opts *ListOpts) (*AddLabelInputCollection, error) + Create(opts *AddLabelInput) (*AddLabelInput, error) + Update(existing *AddLabelInput, updates interface{}) (*AddLabelInput, error) + ById(id string) (*AddLabelInput, error) + Delete(container *AddLabelInput) error +} + +func newAddLabelInputClient(rancherClient *RancherClient) *AddLabelInputClient { + return &AddLabelInputClient{ + rancherClient: rancherClient, + } +} + +func (c *AddLabelInputClient) Create(container *AddLabelInput) (*AddLabelInput, error) { + resp := &AddLabelInput{} + err := c.rancherClient.doCreate(ADD_LABEL_INPUT_TYPE, container, resp) + return resp, err +} + +func (c *AddLabelInputClient) Update(existing *AddLabelInput, updates interface{}) (*AddLabelInput, error) { + resp := &AddLabelInput{} + err := c.rancherClient.doUpdate(ADD_LABEL_INPUT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *AddLabelInputClient) List(opts *ListOpts) (*AddLabelInputCollection, error) { + resp := &AddLabelInputCollection{} + err := c.rancherClient.doList(ADD_LABEL_INPUT_TYPE, opts, resp) + return resp, err +} + +func (c *AddLabelInputClient) ById(id string) (*AddLabelInput, error) { + resp := &AddLabelInput{} + err := c.rancherClient.doById(ADD_LABEL_INPUT_TYPE, id, resp) + return resp, err +} + +func (c *AddLabelInputClient) Delete(container *AddLabelInput) error { + return c.rancherClient.doResourceDelete(ADD_LABEL_INPUT_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_add_load_balancer_input.go b/vendor/github.com/rancher/go-rancher/client/generated_add_load_balancer_input.go new file mode 100644 index 000000000000..1afdbadae533 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_add_load_balancer_input.go @@ -0,0 +1,69 @@ +package client + +const ( + ADD_LOAD_BALANCER_INPUT_TYPE = "addLoadBalancerInput" +) + +type AddLoadBalancerInput struct { + Resource + + LoadBalancerId string `json:"loadBalancerId,omitempty" yaml:"load_balancer_id,omitempty"` + + Weight int64 `json:"weight,omitempty" yaml:"weight,omitempty"` +} + +type AddLoadBalancerInputCollection struct { + Collection + Data []AddLoadBalancerInput `json:"data,omitempty"` +} + +type AddLoadBalancerInputClient struct { + rancherClient *RancherClient +} + +type AddLoadBalancerInputOperations interface { + List(opts *ListOpts) (*AddLoadBalancerInputCollection, error) + Create(opts *AddLoadBalancerInput) (*AddLoadBalancerInput, error) + Update(existing *AddLoadBalancerInput, updates interface{}) (*AddLoadBalancerInput, error) + ById(id string) (*AddLoadBalancerInput, error) + Delete(container *AddLoadBalancerInput) error +} + +func newAddLoadBalancerInputClient(rancherClient *RancherClient) *AddLoadBalancerInputClient { + return &AddLoadBalancerInputClient{ + rancherClient: rancherClient, + } +} + +func (c *AddLoadBalancerInputClient) Create(container *AddLoadBalancerInput) (*AddLoadBalancerInput, error) { + resp := &AddLoadBalancerInput{} + err := c.rancherClient.doCreate(ADD_LOAD_BALANCER_INPUT_TYPE, container, resp) + return resp, err +} + +func (c *AddLoadBalancerInputClient) Update(existing *AddLoadBalancerInput, updates interface{}) (*AddLoadBalancerInput, error) { + resp := &AddLoadBalancerInput{} + err := c.rancherClient.doUpdate(ADD_LOAD_BALANCER_INPUT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *AddLoadBalancerInputClient) List(opts *ListOpts) (*AddLoadBalancerInputCollection, error) { + resp := &AddLoadBalancerInputCollection{} + err := c.rancherClient.doList(ADD_LOAD_BALANCER_INPUT_TYPE, opts, resp) + return resp, err +} + +func (c *AddLoadBalancerInputClient) ById(id string) (*AddLoadBalancerInput, error) { + resp := &AddLoadBalancerInput{} + err := c.rancherClient.doById(ADD_LOAD_BALANCER_INPUT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *AddLoadBalancerInputClient) Delete(container *AddLoadBalancerInput) error { + return c.rancherClient.doResourceDelete(ADD_LOAD_BALANCER_INPUT_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_add_outputs_input.go b/vendor/github.com/rancher/go-rancher/client/generated_add_outputs_input.go new file mode 100644 index 000000000000..b2d51c73fa67 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_add_outputs_input.go @@ -0,0 +1,67 @@ +package client + +const ( + ADD_OUTPUTS_INPUT_TYPE = "addOutputsInput" +) + +type AddOutputsInput struct { + Resource + + Outputs map[string]interface{} `json:"outputs,omitempty" yaml:"outputs,omitempty"` +} + +type AddOutputsInputCollection struct { + Collection + Data []AddOutputsInput `json:"data,omitempty"` +} + +type AddOutputsInputClient struct { + rancherClient *RancherClient +} + +type AddOutputsInputOperations interface { + List(opts *ListOpts) (*AddOutputsInputCollection, error) + Create(opts *AddOutputsInput) (*AddOutputsInput, error) + Update(existing *AddOutputsInput, updates interface{}) (*AddOutputsInput, error) + ById(id string) (*AddOutputsInput, error) + Delete(container *AddOutputsInput) error +} + +func newAddOutputsInputClient(rancherClient *RancherClient) *AddOutputsInputClient { + return &AddOutputsInputClient{ + rancherClient: rancherClient, + } +} + +func (c *AddOutputsInputClient) Create(container *AddOutputsInput) (*AddOutputsInput, error) { + resp := &AddOutputsInput{} + err := c.rancherClient.doCreate(ADD_OUTPUTS_INPUT_TYPE, container, resp) + return resp, err +} + +func (c *AddOutputsInputClient) Update(existing *AddOutputsInput, updates interface{}) (*AddOutputsInput, error) { + resp := &AddOutputsInput{} + err := c.rancherClient.doUpdate(ADD_OUTPUTS_INPUT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *AddOutputsInputClient) List(opts *ListOpts) (*AddOutputsInputCollection, error) { + resp := &AddOutputsInputCollection{} + err := c.rancherClient.doList(ADD_OUTPUTS_INPUT_TYPE, opts, resp) + return resp, err +} + +func (c *AddOutputsInputClient) ById(id string) (*AddOutputsInput, error) { + resp := &AddOutputsInput{} + err := c.rancherClient.doById(ADD_OUTPUTS_INPUT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *AddOutputsInputClient) Delete(container *AddOutputsInput) error { + return c.rancherClient.doResourceDelete(ADD_OUTPUTS_INPUT_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_add_remove_cluster_host_input.go b/vendor/github.com/rancher/go-rancher/client/generated_add_remove_cluster_host_input.go new file mode 100644 index 000000000000..09d79e6adc36 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_add_remove_cluster_host_input.go @@ -0,0 +1,67 @@ +package client + +const ( + ADD_REMOVE_CLUSTER_HOST_INPUT_TYPE = "addRemoveClusterHostInput" +) + +type AddRemoveClusterHostInput struct { + Resource + + HostId string `json:"hostId,omitempty" yaml:"host_id,omitempty"` +} + +type AddRemoveClusterHostInputCollection struct { + Collection + Data []AddRemoveClusterHostInput `json:"data,omitempty"` +} + +type AddRemoveClusterHostInputClient struct { + rancherClient *RancherClient +} + +type AddRemoveClusterHostInputOperations interface { + List(opts *ListOpts) (*AddRemoveClusterHostInputCollection, error) + Create(opts *AddRemoveClusterHostInput) (*AddRemoveClusterHostInput, error) + Update(existing *AddRemoveClusterHostInput, updates interface{}) (*AddRemoveClusterHostInput, error) + ById(id string) (*AddRemoveClusterHostInput, error) + Delete(container *AddRemoveClusterHostInput) error +} + +func newAddRemoveClusterHostInputClient(rancherClient *RancherClient) *AddRemoveClusterHostInputClient { + return &AddRemoveClusterHostInputClient{ + rancherClient: rancherClient, + } +} + +func (c *AddRemoveClusterHostInputClient) Create(container *AddRemoveClusterHostInput) (*AddRemoveClusterHostInput, error) { + resp := &AddRemoveClusterHostInput{} + err := c.rancherClient.doCreate(ADD_REMOVE_CLUSTER_HOST_INPUT_TYPE, container, resp) + return resp, err +} + +func (c *AddRemoveClusterHostInputClient) Update(existing *AddRemoveClusterHostInput, updates interface{}) (*AddRemoveClusterHostInput, error) { + resp := &AddRemoveClusterHostInput{} + err := c.rancherClient.doUpdate(ADD_REMOVE_CLUSTER_HOST_INPUT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *AddRemoveClusterHostInputClient) List(opts *ListOpts) (*AddRemoveClusterHostInputCollection, error) { + resp := &AddRemoveClusterHostInputCollection{} + err := c.rancherClient.doList(ADD_REMOVE_CLUSTER_HOST_INPUT_TYPE, opts, resp) + return resp, err +} + +func (c *AddRemoveClusterHostInputClient) ById(id string) (*AddRemoveClusterHostInput, error) { + resp := &AddRemoveClusterHostInput{} + err := c.rancherClient.doById(ADD_REMOVE_CLUSTER_HOST_INPUT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *AddRemoveClusterHostInputClient) Delete(container *AddRemoveClusterHostInput) error { + return c.rancherClient.doResourceDelete(ADD_REMOVE_CLUSTER_HOST_INPUT_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_add_remove_load_balancer_host_input.go b/vendor/github.com/rancher/go-rancher/client/generated_add_remove_load_balancer_host_input.go new file mode 100644 index 000000000000..39a7d1759840 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_add_remove_load_balancer_host_input.go @@ -0,0 +1,67 @@ +package client + +const ( + ADD_REMOVE_LOAD_BALANCER_HOST_INPUT_TYPE = "addRemoveLoadBalancerHostInput" +) + +type AddRemoveLoadBalancerHostInput struct { + Resource + + HostId string `json:"hostId,omitempty" yaml:"host_id,omitempty"` +} + +type AddRemoveLoadBalancerHostInputCollection struct { + Collection + Data []AddRemoveLoadBalancerHostInput `json:"data,omitempty"` +} + +type AddRemoveLoadBalancerHostInputClient struct { + rancherClient *RancherClient +} + +type AddRemoveLoadBalancerHostInputOperations interface { + List(opts *ListOpts) (*AddRemoveLoadBalancerHostInputCollection, error) + Create(opts *AddRemoveLoadBalancerHostInput) (*AddRemoveLoadBalancerHostInput, error) + Update(existing *AddRemoveLoadBalancerHostInput, updates interface{}) (*AddRemoveLoadBalancerHostInput, error) + ById(id string) (*AddRemoveLoadBalancerHostInput, error) + Delete(container *AddRemoveLoadBalancerHostInput) error +} + +func newAddRemoveLoadBalancerHostInputClient(rancherClient *RancherClient) *AddRemoveLoadBalancerHostInputClient { + return &AddRemoveLoadBalancerHostInputClient{ + rancherClient: rancherClient, + } +} + +func (c *AddRemoveLoadBalancerHostInputClient) Create(container *AddRemoveLoadBalancerHostInput) (*AddRemoveLoadBalancerHostInput, error) { + resp := &AddRemoveLoadBalancerHostInput{} + err := c.rancherClient.doCreate(ADD_REMOVE_LOAD_BALANCER_HOST_INPUT_TYPE, container, resp) + return resp, err +} + +func (c *AddRemoveLoadBalancerHostInputClient) Update(existing *AddRemoveLoadBalancerHostInput, updates interface{}) (*AddRemoveLoadBalancerHostInput, error) { + resp := &AddRemoveLoadBalancerHostInput{} + err := c.rancherClient.doUpdate(ADD_REMOVE_LOAD_BALANCER_HOST_INPUT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *AddRemoveLoadBalancerHostInputClient) List(opts *ListOpts) (*AddRemoveLoadBalancerHostInputCollection, error) { + resp := &AddRemoveLoadBalancerHostInputCollection{} + err := c.rancherClient.doList(ADD_REMOVE_LOAD_BALANCER_HOST_INPUT_TYPE, opts, resp) + return resp, err +} + +func (c *AddRemoveLoadBalancerHostInputClient) ById(id string) (*AddRemoveLoadBalancerHostInput, error) { + resp := &AddRemoveLoadBalancerHostInput{} + err := c.rancherClient.doById(ADD_REMOVE_LOAD_BALANCER_HOST_INPUT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *AddRemoveLoadBalancerHostInputClient) Delete(container *AddRemoveLoadBalancerHostInput) error { + return c.rancherClient.doResourceDelete(ADD_REMOVE_LOAD_BALANCER_HOST_INPUT_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_add_remove_load_balancer_listener_input.go b/vendor/github.com/rancher/go-rancher/client/generated_add_remove_load_balancer_listener_input.go new file mode 100644 index 000000000000..df5a7195d495 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_add_remove_load_balancer_listener_input.go @@ -0,0 +1,67 @@ +package client + +const ( + ADD_REMOVE_LOAD_BALANCER_LISTENER_INPUT_TYPE = "addRemoveLoadBalancerListenerInput" +) + +type AddRemoveLoadBalancerListenerInput struct { + Resource + + LoadBalancerListenerId string `json:"loadBalancerListenerId,omitempty" yaml:"load_balancer_listener_id,omitempty"` +} + +type AddRemoveLoadBalancerListenerInputCollection struct { + Collection + Data []AddRemoveLoadBalancerListenerInput `json:"data,omitempty"` +} + +type AddRemoveLoadBalancerListenerInputClient struct { + rancherClient *RancherClient +} + +type AddRemoveLoadBalancerListenerInputOperations interface { + List(opts *ListOpts) (*AddRemoveLoadBalancerListenerInputCollection, error) + Create(opts *AddRemoveLoadBalancerListenerInput) (*AddRemoveLoadBalancerListenerInput, error) + Update(existing *AddRemoveLoadBalancerListenerInput, updates interface{}) (*AddRemoveLoadBalancerListenerInput, error) + ById(id string) (*AddRemoveLoadBalancerListenerInput, error) + Delete(container *AddRemoveLoadBalancerListenerInput) error +} + +func newAddRemoveLoadBalancerListenerInputClient(rancherClient *RancherClient) *AddRemoveLoadBalancerListenerInputClient { + return &AddRemoveLoadBalancerListenerInputClient{ + rancherClient: rancherClient, + } +} + +func (c *AddRemoveLoadBalancerListenerInputClient) Create(container *AddRemoveLoadBalancerListenerInput) (*AddRemoveLoadBalancerListenerInput, error) { + resp := &AddRemoveLoadBalancerListenerInput{} + err := c.rancherClient.doCreate(ADD_REMOVE_LOAD_BALANCER_LISTENER_INPUT_TYPE, container, resp) + return resp, err +} + +func (c *AddRemoveLoadBalancerListenerInputClient) Update(existing *AddRemoveLoadBalancerListenerInput, updates interface{}) (*AddRemoveLoadBalancerListenerInput, error) { + resp := &AddRemoveLoadBalancerListenerInput{} + err := c.rancherClient.doUpdate(ADD_REMOVE_LOAD_BALANCER_LISTENER_INPUT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *AddRemoveLoadBalancerListenerInputClient) List(opts *ListOpts) (*AddRemoveLoadBalancerListenerInputCollection, error) { + resp := &AddRemoveLoadBalancerListenerInputCollection{} + err := c.rancherClient.doList(ADD_REMOVE_LOAD_BALANCER_LISTENER_INPUT_TYPE, opts, resp) + return resp, err +} + +func (c *AddRemoveLoadBalancerListenerInputClient) ById(id string) (*AddRemoveLoadBalancerListenerInput, error) { + resp := &AddRemoveLoadBalancerListenerInput{} + err := c.rancherClient.doById(ADD_REMOVE_LOAD_BALANCER_LISTENER_INPUT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *AddRemoveLoadBalancerListenerInputClient) Delete(container *AddRemoveLoadBalancerListenerInput) error { + return c.rancherClient.doResourceDelete(ADD_REMOVE_LOAD_BALANCER_LISTENER_INPUT_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_add_remove_load_balancer_service_link_input.go b/vendor/github.com/rancher/go-rancher/client/generated_add_remove_load_balancer_service_link_input.go new file mode 100644 index 000000000000..a5f010ef8957 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_add_remove_load_balancer_service_link_input.go @@ -0,0 +1,67 @@ +package client + +const ( + ADD_REMOVE_LOAD_BALANCER_SERVICE_LINK_INPUT_TYPE = "addRemoveLoadBalancerServiceLinkInput" +) + +type AddRemoveLoadBalancerServiceLinkInput struct { + Resource + + ServiceLink LoadBalancerServiceLink `json:"serviceLink,omitempty" yaml:"service_link,omitempty"` +} + +type AddRemoveLoadBalancerServiceLinkInputCollection struct { + Collection + Data []AddRemoveLoadBalancerServiceLinkInput `json:"data,omitempty"` +} + +type AddRemoveLoadBalancerServiceLinkInputClient struct { + rancherClient *RancherClient +} + +type AddRemoveLoadBalancerServiceLinkInputOperations interface { + List(opts *ListOpts) (*AddRemoveLoadBalancerServiceLinkInputCollection, error) + Create(opts *AddRemoveLoadBalancerServiceLinkInput) (*AddRemoveLoadBalancerServiceLinkInput, error) + Update(existing *AddRemoveLoadBalancerServiceLinkInput, updates interface{}) (*AddRemoveLoadBalancerServiceLinkInput, error) + ById(id string) (*AddRemoveLoadBalancerServiceLinkInput, error) + Delete(container *AddRemoveLoadBalancerServiceLinkInput) error +} + +func newAddRemoveLoadBalancerServiceLinkInputClient(rancherClient *RancherClient) *AddRemoveLoadBalancerServiceLinkInputClient { + return &AddRemoveLoadBalancerServiceLinkInputClient{ + rancherClient: rancherClient, + } +} + +func (c *AddRemoveLoadBalancerServiceLinkInputClient) Create(container *AddRemoveLoadBalancerServiceLinkInput) (*AddRemoveLoadBalancerServiceLinkInput, error) { + resp := &AddRemoveLoadBalancerServiceLinkInput{} + err := c.rancherClient.doCreate(ADD_REMOVE_LOAD_BALANCER_SERVICE_LINK_INPUT_TYPE, container, resp) + return resp, err +} + +func (c *AddRemoveLoadBalancerServiceLinkInputClient) Update(existing *AddRemoveLoadBalancerServiceLinkInput, updates interface{}) (*AddRemoveLoadBalancerServiceLinkInput, error) { + resp := &AddRemoveLoadBalancerServiceLinkInput{} + err := c.rancherClient.doUpdate(ADD_REMOVE_LOAD_BALANCER_SERVICE_LINK_INPUT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *AddRemoveLoadBalancerServiceLinkInputClient) List(opts *ListOpts) (*AddRemoveLoadBalancerServiceLinkInputCollection, error) { + resp := &AddRemoveLoadBalancerServiceLinkInputCollection{} + err := c.rancherClient.doList(ADD_REMOVE_LOAD_BALANCER_SERVICE_LINK_INPUT_TYPE, opts, resp) + return resp, err +} + +func (c *AddRemoveLoadBalancerServiceLinkInputClient) ById(id string) (*AddRemoveLoadBalancerServiceLinkInput, error) { + resp := &AddRemoveLoadBalancerServiceLinkInput{} + err := c.rancherClient.doById(ADD_REMOVE_LOAD_BALANCER_SERVICE_LINK_INPUT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *AddRemoveLoadBalancerServiceLinkInputClient) Delete(container *AddRemoveLoadBalancerServiceLinkInput) error { + return c.rancherClient.doResourceDelete(ADD_REMOVE_LOAD_BALANCER_SERVICE_LINK_INPUT_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_add_remove_load_balancer_target_input.go b/vendor/github.com/rancher/go-rancher/client/generated_add_remove_load_balancer_target_input.go new file mode 100644 index 000000000000..c352aad83f15 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_add_remove_load_balancer_target_input.go @@ -0,0 +1,67 @@ +package client + +const ( + ADD_REMOVE_LOAD_BALANCER_TARGET_INPUT_TYPE = "addRemoveLoadBalancerTargetInput" +) + +type AddRemoveLoadBalancerTargetInput struct { + Resource + + LoadBalancerTarget LoadBalancerTarget `json:"loadBalancerTarget,omitempty" yaml:"load_balancer_target,omitempty"` +} + +type AddRemoveLoadBalancerTargetInputCollection struct { + Collection + Data []AddRemoveLoadBalancerTargetInput `json:"data,omitempty"` +} + +type AddRemoveLoadBalancerTargetInputClient struct { + rancherClient *RancherClient +} + +type AddRemoveLoadBalancerTargetInputOperations interface { + List(opts *ListOpts) (*AddRemoveLoadBalancerTargetInputCollection, error) + Create(opts *AddRemoveLoadBalancerTargetInput) (*AddRemoveLoadBalancerTargetInput, error) + Update(existing *AddRemoveLoadBalancerTargetInput, updates interface{}) (*AddRemoveLoadBalancerTargetInput, error) + ById(id string) (*AddRemoveLoadBalancerTargetInput, error) + Delete(container *AddRemoveLoadBalancerTargetInput) error +} + +func newAddRemoveLoadBalancerTargetInputClient(rancherClient *RancherClient) *AddRemoveLoadBalancerTargetInputClient { + return &AddRemoveLoadBalancerTargetInputClient{ + rancherClient: rancherClient, + } +} + +func (c *AddRemoveLoadBalancerTargetInputClient) Create(container *AddRemoveLoadBalancerTargetInput) (*AddRemoveLoadBalancerTargetInput, error) { + resp := &AddRemoveLoadBalancerTargetInput{} + err := c.rancherClient.doCreate(ADD_REMOVE_LOAD_BALANCER_TARGET_INPUT_TYPE, container, resp) + return resp, err +} + +func (c *AddRemoveLoadBalancerTargetInputClient) Update(existing *AddRemoveLoadBalancerTargetInput, updates interface{}) (*AddRemoveLoadBalancerTargetInput, error) { + resp := &AddRemoveLoadBalancerTargetInput{} + err := c.rancherClient.doUpdate(ADD_REMOVE_LOAD_BALANCER_TARGET_INPUT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *AddRemoveLoadBalancerTargetInputClient) List(opts *ListOpts) (*AddRemoveLoadBalancerTargetInputCollection, error) { + resp := &AddRemoveLoadBalancerTargetInputCollection{} + err := c.rancherClient.doList(ADD_REMOVE_LOAD_BALANCER_TARGET_INPUT_TYPE, opts, resp) + return resp, err +} + +func (c *AddRemoveLoadBalancerTargetInputClient) ById(id string) (*AddRemoveLoadBalancerTargetInput, error) { + resp := &AddRemoveLoadBalancerTargetInput{} + err := c.rancherClient.doById(ADD_REMOVE_LOAD_BALANCER_TARGET_INPUT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *AddRemoveLoadBalancerTargetInputClient) Delete(container *AddRemoveLoadBalancerTargetInput) error { + return c.rancherClient.doResourceDelete(ADD_REMOVE_LOAD_BALANCER_TARGET_INPUT_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_add_remove_service_link_input.go b/vendor/github.com/rancher/go-rancher/client/generated_add_remove_service_link_input.go new file mode 100644 index 000000000000..82c7d18bdfb2 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_add_remove_service_link_input.go @@ -0,0 +1,67 @@ +package client + +const ( + ADD_REMOVE_SERVICE_LINK_INPUT_TYPE = "addRemoveServiceLinkInput" +) + +type AddRemoveServiceLinkInput struct { + Resource + + ServiceLink ServiceLink `json:"serviceLink,omitempty" yaml:"service_link,omitempty"` +} + +type AddRemoveServiceLinkInputCollection struct { + Collection + Data []AddRemoveServiceLinkInput `json:"data,omitempty"` +} + +type AddRemoveServiceLinkInputClient struct { + rancherClient *RancherClient +} + +type AddRemoveServiceLinkInputOperations interface { + List(opts *ListOpts) (*AddRemoveServiceLinkInputCollection, error) + Create(opts *AddRemoveServiceLinkInput) (*AddRemoveServiceLinkInput, error) + Update(existing *AddRemoveServiceLinkInput, updates interface{}) (*AddRemoveServiceLinkInput, error) + ById(id string) (*AddRemoveServiceLinkInput, error) + Delete(container *AddRemoveServiceLinkInput) error +} + +func newAddRemoveServiceLinkInputClient(rancherClient *RancherClient) *AddRemoveServiceLinkInputClient { + return &AddRemoveServiceLinkInputClient{ + rancherClient: rancherClient, + } +} + +func (c *AddRemoveServiceLinkInputClient) Create(container *AddRemoveServiceLinkInput) (*AddRemoveServiceLinkInput, error) { + resp := &AddRemoveServiceLinkInput{} + err := c.rancherClient.doCreate(ADD_REMOVE_SERVICE_LINK_INPUT_TYPE, container, resp) + return resp, err +} + +func (c *AddRemoveServiceLinkInputClient) Update(existing *AddRemoveServiceLinkInput, updates interface{}) (*AddRemoveServiceLinkInput, error) { + resp := &AddRemoveServiceLinkInput{} + err := c.rancherClient.doUpdate(ADD_REMOVE_SERVICE_LINK_INPUT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *AddRemoveServiceLinkInputClient) List(opts *ListOpts) (*AddRemoveServiceLinkInputCollection, error) { + resp := &AddRemoveServiceLinkInputCollection{} + err := c.rancherClient.doList(ADD_REMOVE_SERVICE_LINK_INPUT_TYPE, opts, resp) + return resp, err +} + +func (c *AddRemoveServiceLinkInputClient) ById(id string) (*AddRemoveServiceLinkInput, error) { + resp := &AddRemoveServiceLinkInput{} + err := c.rancherClient.doById(ADD_REMOVE_SERVICE_LINK_INPUT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *AddRemoveServiceLinkInputClient) Delete(container *AddRemoveServiceLinkInput) error { + return c.rancherClient.doResourceDelete(ADD_REMOVE_SERVICE_LINK_INPUT_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_agent.go b/vendor/github.com/rancher/go-rancher/client/generated_agent.go new file mode 100644 index 000000000000..557ca6188230 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_agent.go @@ -0,0 +1,183 @@ +package client + +const ( + AGENT_TYPE = "agent" +) + +type Agent struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + ManagedConfig bool `json:"managedConfig,omitempty" yaml:"managed_config,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uri string `json:"uri,omitempty" yaml:"uri,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type AgentCollection struct { + Collection + Data []Agent `json:"data,omitempty"` +} + +type AgentClient struct { + rancherClient *RancherClient +} + +type AgentOperations interface { + List(opts *ListOpts) (*AgentCollection, error) + Create(opts *Agent) (*Agent, error) + Update(existing *Agent, updates interface{}) (*Agent, error) + ById(id string) (*Agent, error) + Delete(container *Agent) error + + ActionActivate(*Agent) (*Agent, error) + + ActionCreate(*Agent) (*Agent, error) + + ActionDeactivate(*Agent) (*Agent, error) + + ActionPurge(*Agent) (*Agent, error) + + ActionReconnect(*Agent) (*Agent, error) + + ActionRemove(*Agent) (*Agent, error) + + ActionRestore(*Agent) (*Agent, error) + + ActionUpdate(*Agent) (*Agent, error) +} + +func newAgentClient(rancherClient *RancherClient) *AgentClient { + return &AgentClient{ + rancherClient: rancherClient, + } +} + +func (c *AgentClient) Create(container *Agent) (*Agent, error) { + resp := &Agent{} + err := c.rancherClient.doCreate(AGENT_TYPE, container, resp) + return resp, err +} + +func (c *AgentClient) Update(existing *Agent, updates interface{}) (*Agent, error) { + resp := &Agent{} + err := c.rancherClient.doUpdate(AGENT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *AgentClient) List(opts *ListOpts) (*AgentCollection, error) { + resp := &AgentCollection{} + err := c.rancherClient.doList(AGENT_TYPE, opts, resp) + return resp, err +} + +func (c *AgentClient) ById(id string) (*Agent, error) { + resp := &Agent{} + err := c.rancherClient.doById(AGENT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *AgentClient) Delete(container *Agent) error { + return c.rancherClient.doResourceDelete(AGENT_TYPE, &container.Resource) +} + +func (c *AgentClient) ActionActivate(resource *Agent) (*Agent, error) { + + resp := &Agent{} + + err := c.rancherClient.doAction(AGENT_TYPE, "activate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *AgentClient) ActionCreate(resource *Agent) (*Agent, error) { + + resp := &Agent{} + + err := c.rancherClient.doAction(AGENT_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *AgentClient) ActionDeactivate(resource *Agent) (*Agent, error) { + + resp := &Agent{} + + err := c.rancherClient.doAction(AGENT_TYPE, "deactivate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *AgentClient) ActionPurge(resource *Agent) (*Agent, error) { + + resp := &Agent{} + + err := c.rancherClient.doAction(AGENT_TYPE, "purge", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *AgentClient) ActionReconnect(resource *Agent) (*Agent, error) { + + resp := &Agent{} + + err := c.rancherClient.doAction(AGENT_TYPE, "reconnect", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *AgentClient) ActionRemove(resource *Agent) (*Agent, error) { + + resp := &Agent{} + + err := c.rancherClient.doAction(AGENT_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *AgentClient) ActionRestore(resource *Agent) (*Agent, error) { + + resp := &Agent{} + + err := c.rancherClient.doAction(AGENT_TYPE, "restore", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *AgentClient) ActionUpdate(resource *Agent) (*Agent, error) { + + resp := &Agent{} + + err := c.rancherClient.doAction(AGENT_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_amazonec2config.go b/vendor/github.com/rancher/go-rancher/client/generated_amazonec2config.go new file mode 100644 index 000000000000..8306f1ffc179 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_amazonec2config.go @@ -0,0 +1,101 @@ +package client + +const ( + AMAZONEC2CONFIG_TYPE = "amazonec2Config" +) + +type Amazonec2Config struct { + Resource + + AccessKey string `json:"accessKey,omitempty" yaml:"access_key,omitempty"` + + Ami string `json:"ami,omitempty" yaml:"ami,omitempty"` + + IamInstanceProfile string `json:"iamInstanceProfile,omitempty" yaml:"iam_instance_profile,omitempty"` + + InstanceType string `json:"instanceType,omitempty" yaml:"instance_type,omitempty"` + + Monitoring bool `json:"monitoring,omitempty" yaml:"monitoring,omitempty"` + + PrivateAddressOnly bool `json:"privateAddressOnly,omitempty" yaml:"private_address_only,omitempty"` + + Region string `json:"region,omitempty" yaml:"region,omitempty"` + + RequestSpotInstance bool `json:"requestSpotInstance,omitempty" yaml:"request_spot_instance,omitempty"` + + RootSize string `json:"rootSize,omitempty" yaml:"root_size,omitempty"` + + SecretKey string `json:"secretKey,omitempty" yaml:"secret_key,omitempty"` + + SecurityGroup string `json:"securityGroup,omitempty" yaml:"security_group,omitempty"` + + SessionToken string `json:"sessionToken,omitempty" yaml:"session_token,omitempty"` + + SpotPrice string `json:"spotPrice,omitempty" yaml:"spot_price,omitempty"` + + SshUser string `json:"sshUser,omitempty" yaml:"ssh_user,omitempty"` + + SubnetId string `json:"subnetId,omitempty" yaml:"subnet_id,omitempty"` + + UsePrivateAddress bool `json:"usePrivateAddress,omitempty" yaml:"use_private_address,omitempty"` + + VpcId string `json:"vpcId,omitempty" yaml:"vpc_id,omitempty"` + + Zone string `json:"zone,omitempty" yaml:"zone,omitempty"` +} + +type Amazonec2ConfigCollection struct { + Collection + Data []Amazonec2Config `json:"data,omitempty"` +} + +type Amazonec2ConfigClient struct { + rancherClient *RancherClient +} + +type Amazonec2ConfigOperations interface { + List(opts *ListOpts) (*Amazonec2ConfigCollection, error) + Create(opts *Amazonec2Config) (*Amazonec2Config, error) + Update(existing *Amazonec2Config, updates interface{}) (*Amazonec2Config, error) + ById(id string) (*Amazonec2Config, error) + Delete(container *Amazonec2Config) error +} + +func newAmazonec2ConfigClient(rancherClient *RancherClient) *Amazonec2ConfigClient { + return &Amazonec2ConfigClient{ + rancherClient: rancherClient, + } +} + +func (c *Amazonec2ConfigClient) Create(container *Amazonec2Config) (*Amazonec2Config, error) { + resp := &Amazonec2Config{} + err := c.rancherClient.doCreate(AMAZONEC2CONFIG_TYPE, container, resp) + return resp, err +} + +func (c *Amazonec2ConfigClient) Update(existing *Amazonec2Config, updates interface{}) (*Amazonec2Config, error) { + resp := &Amazonec2Config{} + err := c.rancherClient.doUpdate(AMAZONEC2CONFIG_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *Amazonec2ConfigClient) List(opts *ListOpts) (*Amazonec2ConfigCollection, error) { + resp := &Amazonec2ConfigCollection{} + err := c.rancherClient.doList(AMAZONEC2CONFIG_TYPE, opts, resp) + return resp, err +} + +func (c *Amazonec2ConfigClient) ById(id string) (*Amazonec2Config, error) { + resp := &Amazonec2Config{} + err := c.rancherClient.doById(AMAZONEC2CONFIG_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *Amazonec2ConfigClient) Delete(container *Amazonec2Config) error { + return c.rancherClient.doResourceDelete(AMAZONEC2CONFIG_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_api_key.go b/vendor/github.com/rancher/go-rancher/client/generated_api_key.go new file mode 100644 index 000000000000..c0f9c50eaa91 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_api_key.go @@ -0,0 +1,161 @@ +package client + +const ( + API_KEY_TYPE = "apiKey" +) + +type ApiKey struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + PublicValue string `json:"publicValue,omitempty" yaml:"public_value,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + SecretValue string `json:"secretValue,omitempty" yaml:"secret_value,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type ApiKeyCollection struct { + Collection + Data []ApiKey `json:"data,omitempty"` +} + +type ApiKeyClient struct { + rancherClient *RancherClient +} + +type ApiKeyOperations interface { + List(opts *ListOpts) (*ApiKeyCollection, error) + Create(opts *ApiKey) (*ApiKey, error) + Update(existing *ApiKey, updates interface{}) (*ApiKey, error) + ById(id string) (*ApiKey, error) + Delete(container *ApiKey) error + + ActionActivate(*ApiKey) (*Credential, error) + + ActionCreate(*ApiKey) (*Credential, error) + + ActionDeactivate(*ApiKey) (*Credential, error) + + ActionPurge(*ApiKey) (*Credential, error) + + ActionRemove(*ApiKey) (*Credential, error) + + ActionUpdate(*ApiKey) (*Credential, error) +} + +func newApiKeyClient(rancherClient *RancherClient) *ApiKeyClient { + return &ApiKeyClient{ + rancherClient: rancherClient, + } +} + +func (c *ApiKeyClient) Create(container *ApiKey) (*ApiKey, error) { + resp := &ApiKey{} + err := c.rancherClient.doCreate(API_KEY_TYPE, container, resp) + return resp, err +} + +func (c *ApiKeyClient) Update(existing *ApiKey, updates interface{}) (*ApiKey, error) { + resp := &ApiKey{} + err := c.rancherClient.doUpdate(API_KEY_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ApiKeyClient) List(opts *ListOpts) (*ApiKeyCollection, error) { + resp := &ApiKeyCollection{} + err := c.rancherClient.doList(API_KEY_TYPE, opts, resp) + return resp, err +} + +func (c *ApiKeyClient) ById(id string) (*ApiKey, error) { + resp := &ApiKey{} + err := c.rancherClient.doById(API_KEY_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ApiKeyClient) Delete(container *ApiKey) error { + return c.rancherClient.doResourceDelete(API_KEY_TYPE, &container.Resource) +} + +func (c *ApiKeyClient) ActionActivate(resource *ApiKey) (*Credential, error) { + + resp := &Credential{} + + err := c.rancherClient.doAction(API_KEY_TYPE, "activate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ApiKeyClient) ActionCreate(resource *ApiKey) (*Credential, error) { + + resp := &Credential{} + + err := c.rancherClient.doAction(API_KEY_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ApiKeyClient) ActionDeactivate(resource *ApiKey) (*Credential, error) { + + resp := &Credential{} + + err := c.rancherClient.doAction(API_KEY_TYPE, "deactivate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ApiKeyClient) ActionPurge(resource *ApiKey) (*Credential, error) { + + resp := &Credential{} + + err := c.rancherClient.doAction(API_KEY_TYPE, "purge", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ApiKeyClient) ActionRemove(resource *ApiKey) (*Credential, error) { + + resp := &Credential{} + + err := c.rancherClient.doAction(API_KEY_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ApiKeyClient) ActionUpdate(resource *ApiKey) (*Credential, error) { + + resp := &Credential{} + + err := c.rancherClient.doAction(API_KEY_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_audit_log.go b/vendor/github.com/rancher/go-rancher/client/generated_audit_log.go new file mode 100644 index 000000000000..d8ff08fb5962 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_audit_log.go @@ -0,0 +1,93 @@ +package client + +const ( + AUDIT_LOG_TYPE = "auditLog" +) + +type AuditLog struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + AuthType string `json:"authType,omitempty" yaml:"auth_type,omitempty"` + + AuthenticatedAsAccountId string `json:"authenticatedAsAccountId,omitempty" yaml:"authenticated_as_account_id,omitempty"` + + AuthenticatedAsIdentityId string `json:"authenticatedAsIdentityId,omitempty" yaml:"authenticated_as_identity_id,omitempty"` + + ClientIp string `json:"clientIp,omitempty" yaml:"client_ip,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + EventType string `json:"eventType,omitempty" yaml:"event_type,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + RequestObject string `json:"requestObject,omitempty" yaml:"request_object,omitempty"` + + ResourceId int64 `json:"resourceId,omitempty" yaml:"resource_id,omitempty"` + + ResourceType string `json:"resourceType,omitempty" yaml:"resource_type,omitempty"` + + ResponseCode string `json:"responseCode,omitempty" yaml:"response_code,omitempty"` + + ResponseObject string `json:"responseObject,omitempty" yaml:"response_object,omitempty"` +} + +type AuditLogCollection struct { + Collection + Data []AuditLog `json:"data,omitempty"` +} + +type AuditLogClient struct { + rancherClient *RancherClient +} + +type AuditLogOperations interface { + List(opts *ListOpts) (*AuditLogCollection, error) + Create(opts *AuditLog) (*AuditLog, error) + Update(existing *AuditLog, updates interface{}) (*AuditLog, error) + ById(id string) (*AuditLog, error) + Delete(container *AuditLog) error +} + +func newAuditLogClient(rancherClient *RancherClient) *AuditLogClient { + return &AuditLogClient{ + rancherClient: rancherClient, + } +} + +func (c *AuditLogClient) Create(container *AuditLog) (*AuditLog, error) { + resp := &AuditLog{} + err := c.rancherClient.doCreate(AUDIT_LOG_TYPE, container, resp) + return resp, err +} + +func (c *AuditLogClient) Update(existing *AuditLog, updates interface{}) (*AuditLog, error) { + resp := &AuditLog{} + err := c.rancherClient.doUpdate(AUDIT_LOG_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *AuditLogClient) List(opts *ListOpts) (*AuditLogCollection, error) { + resp := &AuditLogCollection{} + err := c.rancherClient.doList(AUDIT_LOG_TYPE, opts, resp) + return resp, err +} + +func (c *AuditLogClient) ById(id string) (*AuditLog, error) { + resp := &AuditLog{} + err := c.rancherClient.doById(AUDIT_LOG_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *AuditLogClient) Delete(container *AuditLog) error { + return c.rancherClient.doResourceDelete(AUDIT_LOG_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_azure_config.go b/vendor/github.com/rancher/go-rancher/client/generated_azure_config.go new file mode 100644 index 000000000000..afe230f89c85 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_azure_config.go @@ -0,0 +1,87 @@ +package client + +const ( + AZURE_CONFIG_TYPE = "azureConfig" +) + +type AzureConfig struct { + Resource + + DockerPort string `json:"dockerPort,omitempty" yaml:"docker_port,omitempty"` + + DockerSwarmMasterPort string `json:"dockerSwarmMasterPort,omitempty" yaml:"docker_swarm_master_port,omitempty"` + + Image string `json:"image,omitempty" yaml:"image,omitempty"` + + Location string `json:"location,omitempty" yaml:"location,omitempty"` + + Password string `json:"password,omitempty" yaml:"password,omitempty"` + + PublishSettingsFile string `json:"publishSettingsFile,omitempty" yaml:"publish_settings_file,omitempty"` + + Size string `json:"size,omitempty" yaml:"size,omitempty"` + + SshPort string `json:"sshPort,omitempty" yaml:"ssh_port,omitempty"` + + SubscriptionCert string `json:"subscriptionCert,omitempty" yaml:"subscription_cert,omitempty"` + + SubscriptionId string `json:"subscriptionId,omitempty" yaml:"subscription_id,omitempty"` + + Username string `json:"username,omitempty" yaml:"username,omitempty"` +} + +type AzureConfigCollection struct { + Collection + Data []AzureConfig `json:"data,omitempty"` +} + +type AzureConfigClient struct { + rancherClient *RancherClient +} + +type AzureConfigOperations interface { + List(opts *ListOpts) (*AzureConfigCollection, error) + Create(opts *AzureConfig) (*AzureConfig, error) + Update(existing *AzureConfig, updates interface{}) (*AzureConfig, error) + ById(id string) (*AzureConfig, error) + Delete(container *AzureConfig) error +} + +func newAzureConfigClient(rancherClient *RancherClient) *AzureConfigClient { + return &AzureConfigClient{ + rancherClient: rancherClient, + } +} + +func (c *AzureConfigClient) Create(container *AzureConfig) (*AzureConfig, error) { + resp := &AzureConfig{} + err := c.rancherClient.doCreate(AZURE_CONFIG_TYPE, container, resp) + return resp, err +} + +func (c *AzureConfigClient) Update(existing *AzureConfig, updates interface{}) (*AzureConfig, error) { + resp := &AzureConfig{} + err := c.rancherClient.doUpdate(AZURE_CONFIG_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *AzureConfigClient) List(opts *ListOpts) (*AzureConfigCollection, error) { + resp := &AzureConfigCollection{} + err := c.rancherClient.doList(AZURE_CONFIG_TYPE, opts, resp) + return resp, err +} + +func (c *AzureConfigClient) ById(id string) (*AzureConfig, error) { + resp := &AzureConfig{} + err := c.rancherClient.doById(AZURE_CONFIG_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *AzureConfigClient) Delete(container *AzureConfig) error { + return c.rancherClient.doResourceDelete(AZURE_CONFIG_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_azureadconfig.go b/vendor/github.com/rancher/go-rancher/client/generated_azureadconfig.go new file mode 100644 index 000000000000..fe741e2e1ab6 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_azureadconfig.go @@ -0,0 +1,81 @@ +package client + +const ( + AZUREADCONFIG_TYPE = "azureadconfig" +) + +type Azureadconfig struct { + Resource + + AccessMode string `json:"accessMode,omitempty" yaml:"access_mode,omitempty"` + + AdminAccountPassword string `json:"adminAccountPassword,omitempty" yaml:"admin_account_password,omitempty"` + + AdminAccountUsername string `json:"adminAccountUsername,omitempty" yaml:"admin_account_username,omitempty"` + + ClientId string `json:"clientId,omitempty" yaml:"client_id,omitempty"` + + Domain string `json:"domain,omitempty" yaml:"domain,omitempty"` + + Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + TenantId string `json:"tenantId,omitempty" yaml:"tenant_id,omitempty"` +} + +type AzureadconfigCollection struct { + Collection + Data []Azureadconfig `json:"data,omitempty"` +} + +type AzureadconfigClient struct { + rancherClient *RancherClient +} + +type AzureadconfigOperations interface { + List(opts *ListOpts) (*AzureadconfigCollection, error) + Create(opts *Azureadconfig) (*Azureadconfig, error) + Update(existing *Azureadconfig, updates interface{}) (*Azureadconfig, error) + ById(id string) (*Azureadconfig, error) + Delete(container *Azureadconfig) error +} + +func newAzureadconfigClient(rancherClient *RancherClient) *AzureadconfigClient { + return &AzureadconfigClient{ + rancherClient: rancherClient, + } +} + +func (c *AzureadconfigClient) Create(container *Azureadconfig) (*Azureadconfig, error) { + resp := &Azureadconfig{} + err := c.rancherClient.doCreate(AZUREADCONFIG_TYPE, container, resp) + return resp, err +} + +func (c *AzureadconfigClient) Update(existing *Azureadconfig, updates interface{}) (*Azureadconfig, error) { + resp := &Azureadconfig{} + err := c.rancherClient.doUpdate(AZUREADCONFIG_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *AzureadconfigClient) List(opts *ListOpts) (*AzureadconfigCollection, error) { + resp := &AzureadconfigCollection{} + err := c.rancherClient.doList(AZUREADCONFIG_TYPE, opts, resp) + return resp, err +} + +func (c *AzureadconfigClient) ById(id string) (*Azureadconfig, error) { + resp := &Azureadconfig{} + err := c.rancherClient.doById(AZUREADCONFIG_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *AzureadconfigClient) Delete(container *Azureadconfig) error { + return c.rancherClient.doResourceDelete(AZUREADCONFIG_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_backup.go b/vendor/github.com/rancher/go-rancher/client/generated_backup.go new file mode 100644 index 000000000000..237194ced9fc --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_backup.go @@ -0,0 +1,121 @@ +package client + +const ( + BACKUP_TYPE = "backup" +) + +type Backup struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + BackupTargetId string `json:"backupTargetId,omitempty" yaml:"backup_target_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + SnapshotId string `json:"snapshotId,omitempty" yaml:"snapshot_id,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uri string `json:"uri,omitempty" yaml:"uri,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + + VolumeId string `json:"volumeId,omitempty" yaml:"volume_id,omitempty"` +} + +type BackupCollection struct { + Collection + Data []Backup `json:"data,omitempty"` +} + +type BackupClient struct { + rancherClient *RancherClient +} + +type BackupOperations interface { + List(opts *ListOpts) (*BackupCollection, error) + Create(opts *Backup) (*Backup, error) + Update(existing *Backup, updates interface{}) (*Backup, error) + ById(id string) (*Backup, error) + Delete(container *Backup) error + + ActionCreate(*Backup) (*Backup, error) + + ActionRemove(*Backup) (*Backup, error) +} + +func newBackupClient(rancherClient *RancherClient) *BackupClient { + return &BackupClient{ + rancherClient: rancherClient, + } +} + +func (c *BackupClient) Create(container *Backup) (*Backup, error) { + resp := &Backup{} + err := c.rancherClient.doCreate(BACKUP_TYPE, container, resp) + return resp, err +} + +func (c *BackupClient) Update(existing *Backup, updates interface{}) (*Backup, error) { + resp := &Backup{} + err := c.rancherClient.doUpdate(BACKUP_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *BackupClient) List(opts *ListOpts) (*BackupCollection, error) { + resp := &BackupCollection{} + err := c.rancherClient.doList(BACKUP_TYPE, opts, resp) + return resp, err +} + +func (c *BackupClient) ById(id string) (*Backup, error) { + resp := &Backup{} + err := c.rancherClient.doById(BACKUP_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *BackupClient) Delete(container *Backup) error { + return c.rancherClient.doResourceDelete(BACKUP_TYPE, &container.Resource) +} + +func (c *BackupClient) ActionCreate(resource *Backup) (*Backup, error) { + + resp := &Backup{} + + err := c.rancherClient.doAction(BACKUP_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *BackupClient) ActionRemove(resource *Backup) (*Backup, error) { + + resp := &Backup{} + + err := c.rancherClient.doAction(BACKUP_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_backup_target.go b/vendor/github.com/rancher/go-rancher/client/generated_backup_target.go new file mode 100644 index 000000000000..c93d615c7a6a --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_backup_target.go @@ -0,0 +1,115 @@ +package client + +const ( + BACKUP_TARGET_TYPE = "backupTarget" +) + +type BackupTarget struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + NfsConfig *NfsConfig `json:"nfsConfig,omitempty" yaml:"nfs_config,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type BackupTargetCollection struct { + Collection + Data []BackupTarget `json:"data,omitempty"` +} + +type BackupTargetClient struct { + rancherClient *RancherClient +} + +type BackupTargetOperations interface { + List(opts *ListOpts) (*BackupTargetCollection, error) + Create(opts *BackupTarget) (*BackupTarget, error) + Update(existing *BackupTarget, updates interface{}) (*BackupTarget, error) + ById(id string) (*BackupTarget, error) + Delete(container *BackupTarget) error + + ActionCreate(*BackupTarget) (*BackupTarget, error) + + ActionRemove(*BackupTarget) (*BackupTarget, error) +} + +func newBackupTargetClient(rancherClient *RancherClient) *BackupTargetClient { + return &BackupTargetClient{ + rancherClient: rancherClient, + } +} + +func (c *BackupTargetClient) Create(container *BackupTarget) (*BackupTarget, error) { + resp := &BackupTarget{} + err := c.rancherClient.doCreate(BACKUP_TARGET_TYPE, container, resp) + return resp, err +} + +func (c *BackupTargetClient) Update(existing *BackupTarget, updates interface{}) (*BackupTarget, error) { + resp := &BackupTarget{} + err := c.rancherClient.doUpdate(BACKUP_TARGET_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *BackupTargetClient) List(opts *ListOpts) (*BackupTargetCollection, error) { + resp := &BackupTargetCollection{} + err := c.rancherClient.doList(BACKUP_TARGET_TYPE, opts, resp) + return resp, err +} + +func (c *BackupTargetClient) ById(id string) (*BackupTarget, error) { + resp := &BackupTarget{} + err := c.rancherClient.doById(BACKUP_TARGET_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *BackupTargetClient) Delete(container *BackupTarget) error { + return c.rancherClient.doResourceDelete(BACKUP_TARGET_TYPE, &container.Resource) +} + +func (c *BackupTargetClient) ActionCreate(resource *BackupTarget) (*BackupTarget, error) { + + resp := &BackupTarget{} + + err := c.rancherClient.doAction(BACKUP_TARGET_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *BackupTargetClient) ActionRemove(resource *BackupTarget) (*BackupTarget, error) { + + resp := &BackupTarget{} + + err := c.rancherClient.doAction(BACKUP_TARGET_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_base_machine_config.go b/vendor/github.com/rancher/go-rancher/client/generated_base_machine_config.go new file mode 100644 index 000000000000..a01934241d45 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_base_machine_config.go @@ -0,0 +1,65 @@ +package client + +const ( + BASE_MACHINE_CONFIG_TYPE = "baseMachineConfig" +) + +type BaseMachineConfig struct { + Resource +} + +type BaseMachineConfigCollection struct { + Collection + Data []BaseMachineConfig `json:"data,omitempty"` +} + +type BaseMachineConfigClient struct { + rancherClient *RancherClient +} + +type BaseMachineConfigOperations interface { + List(opts *ListOpts) (*BaseMachineConfigCollection, error) + Create(opts *BaseMachineConfig) (*BaseMachineConfig, error) + Update(existing *BaseMachineConfig, updates interface{}) (*BaseMachineConfig, error) + ById(id string) (*BaseMachineConfig, error) + Delete(container *BaseMachineConfig) error +} + +func newBaseMachineConfigClient(rancherClient *RancherClient) *BaseMachineConfigClient { + return &BaseMachineConfigClient{ + rancherClient: rancherClient, + } +} + +func (c *BaseMachineConfigClient) Create(container *BaseMachineConfig) (*BaseMachineConfig, error) { + resp := &BaseMachineConfig{} + err := c.rancherClient.doCreate(BASE_MACHINE_CONFIG_TYPE, container, resp) + return resp, err +} + +func (c *BaseMachineConfigClient) Update(existing *BaseMachineConfig, updates interface{}) (*BaseMachineConfig, error) { + resp := &BaseMachineConfig{} + err := c.rancherClient.doUpdate(BASE_MACHINE_CONFIG_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *BaseMachineConfigClient) List(opts *ListOpts) (*BaseMachineConfigCollection, error) { + resp := &BaseMachineConfigCollection{} + err := c.rancherClient.doList(BASE_MACHINE_CONFIG_TYPE, opts, resp) + return resp, err +} + +func (c *BaseMachineConfigClient) ById(id string) (*BaseMachineConfig, error) { + resp := &BaseMachineConfig{} + err := c.rancherClient.doById(BASE_MACHINE_CONFIG_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *BaseMachineConfigClient) Delete(container *BaseMachineConfig) error { + return c.rancherClient.doResourceDelete(BASE_MACHINE_CONFIG_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_blkio_device_option.go b/vendor/github.com/rancher/go-rancher/client/generated_blkio_device_option.go new file mode 100644 index 000000000000..4d005225584d --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_blkio_device_option.go @@ -0,0 +1,75 @@ +package client + +const ( + BLKIO_DEVICE_OPTION_TYPE = "blkioDeviceOption" +) + +type BlkioDeviceOption struct { + Resource + + ReadBps int64 `json:"readBps,omitempty" yaml:"read_bps,omitempty"` + + ReadIops int64 `json:"readIops,omitempty" yaml:"read_iops,omitempty"` + + Weight int64 `json:"weight,omitempty" yaml:"weight,omitempty"` + + WriteBps int64 `json:"writeBps,omitempty" yaml:"write_bps,omitempty"` + + WriteIops int64 `json:"writeIops,omitempty" yaml:"write_iops,omitempty"` +} + +type BlkioDeviceOptionCollection struct { + Collection + Data []BlkioDeviceOption `json:"data,omitempty"` +} + +type BlkioDeviceOptionClient struct { + rancherClient *RancherClient +} + +type BlkioDeviceOptionOperations interface { + List(opts *ListOpts) (*BlkioDeviceOptionCollection, error) + Create(opts *BlkioDeviceOption) (*BlkioDeviceOption, error) + Update(existing *BlkioDeviceOption, updates interface{}) (*BlkioDeviceOption, error) + ById(id string) (*BlkioDeviceOption, error) + Delete(container *BlkioDeviceOption) error +} + +func newBlkioDeviceOptionClient(rancherClient *RancherClient) *BlkioDeviceOptionClient { + return &BlkioDeviceOptionClient{ + rancherClient: rancherClient, + } +} + +func (c *BlkioDeviceOptionClient) Create(container *BlkioDeviceOption) (*BlkioDeviceOption, error) { + resp := &BlkioDeviceOption{} + err := c.rancherClient.doCreate(BLKIO_DEVICE_OPTION_TYPE, container, resp) + return resp, err +} + +func (c *BlkioDeviceOptionClient) Update(existing *BlkioDeviceOption, updates interface{}) (*BlkioDeviceOption, error) { + resp := &BlkioDeviceOption{} + err := c.rancherClient.doUpdate(BLKIO_DEVICE_OPTION_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *BlkioDeviceOptionClient) List(opts *ListOpts) (*BlkioDeviceOptionCollection, error) { + resp := &BlkioDeviceOptionCollection{} + err := c.rancherClient.doList(BLKIO_DEVICE_OPTION_TYPE, opts, resp) + return resp, err +} + +func (c *BlkioDeviceOptionClient) ById(id string) (*BlkioDeviceOption, error) { + resp := &BlkioDeviceOption{} + err := c.rancherClient.doById(BLKIO_DEVICE_OPTION_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *BlkioDeviceOptionClient) Delete(container *BlkioDeviceOption) error { + return c.rancherClient.doResourceDelete(BLKIO_DEVICE_OPTION_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_certificate.go b/vendor/github.com/rancher/go-rancher/client/generated_certificate.go new file mode 100644 index 000000000000..02f99e3ef4b2 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_certificate.go @@ -0,0 +1,150 @@ +package client + +const ( + CERTIFICATE_TYPE = "certificate" +) + +type Certificate struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Algorithm string `json:"algorithm,omitempty" yaml:"algorithm,omitempty"` + + CN string `json:"cN,omitempty" yaml:"cn,omitempty"` + + Cert string `json:"cert,omitempty" yaml:"cert,omitempty"` + + CertChain string `json:"certChain,omitempty" yaml:"cert_chain,omitempty"` + + CertFingerprint string `json:"certFingerprint,omitempty" yaml:"cert_fingerprint,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + ExpiresAt string `json:"expiresAt,omitempty" yaml:"expires_at,omitempty"` + + IssuedAt string `json:"issuedAt,omitempty" yaml:"issued_at,omitempty"` + + Issuer string `json:"issuer,omitempty" yaml:"issuer,omitempty"` + + Key string `json:"key,omitempty" yaml:"key,omitempty"` + + KeySize int64 `json:"keySize,omitempty" yaml:"key_size,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + SerialNumber string `json:"serialNumber,omitempty" yaml:"serial_number,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + SubjectAlternativeNames []string `json:"subjectAlternativeNames,omitempty" yaml:"subject_alternative_names,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + + Version string `json:"version,omitempty" yaml:"version,omitempty"` +} + +type CertificateCollection struct { + Collection + Data []Certificate `json:"data,omitempty"` +} + +type CertificateClient struct { + rancherClient *RancherClient +} + +type CertificateOperations interface { + List(opts *ListOpts) (*CertificateCollection, error) + Create(opts *Certificate) (*Certificate, error) + Update(existing *Certificate, updates interface{}) (*Certificate, error) + ById(id string) (*Certificate, error) + Delete(container *Certificate) error + + ActionCreate(*Certificate) (*Certificate, error) + + ActionRemove(*Certificate) (*Certificate, error) + + ActionUpdate(*Certificate) (*Certificate, error) +} + +func newCertificateClient(rancherClient *RancherClient) *CertificateClient { + return &CertificateClient{ + rancherClient: rancherClient, + } +} + +func (c *CertificateClient) Create(container *Certificate) (*Certificate, error) { + resp := &Certificate{} + err := c.rancherClient.doCreate(CERTIFICATE_TYPE, container, resp) + return resp, err +} + +func (c *CertificateClient) Update(existing *Certificate, updates interface{}) (*Certificate, error) { + resp := &Certificate{} + err := c.rancherClient.doUpdate(CERTIFICATE_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *CertificateClient) List(opts *ListOpts) (*CertificateCollection, error) { + resp := &CertificateCollection{} + err := c.rancherClient.doList(CERTIFICATE_TYPE, opts, resp) + return resp, err +} + +func (c *CertificateClient) ById(id string) (*Certificate, error) { + resp := &Certificate{} + err := c.rancherClient.doById(CERTIFICATE_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *CertificateClient) Delete(container *Certificate) error { + return c.rancherClient.doResourceDelete(CERTIFICATE_TYPE, &container.Resource) +} + +func (c *CertificateClient) ActionCreate(resource *Certificate) (*Certificate, error) { + + resp := &Certificate{} + + err := c.rancherClient.doAction(CERTIFICATE_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *CertificateClient) ActionRemove(resource *Certificate) (*Certificate, error) { + + resp := &Certificate{} + + err := c.rancherClient.doAction(CERTIFICATE_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *CertificateClient) ActionUpdate(resource *Certificate) (*Certificate, error) { + + resp := &Certificate{} + + err := c.rancherClient.doAction(CERTIFICATE_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_change_secret_input.go b/vendor/github.com/rancher/go-rancher/client/generated_change_secret_input.go new file mode 100644 index 000000000000..913c2eeaa891 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_change_secret_input.go @@ -0,0 +1,69 @@ +package client + +const ( + CHANGE_SECRET_INPUT_TYPE = "changeSecretInput" +) + +type ChangeSecretInput struct { + Resource + + NewSecret string `json:"newSecret,omitempty" yaml:"new_secret,omitempty"` + + OldSecret string `json:"oldSecret,omitempty" yaml:"old_secret,omitempty"` +} + +type ChangeSecretInputCollection struct { + Collection + Data []ChangeSecretInput `json:"data,omitempty"` +} + +type ChangeSecretInputClient struct { + rancherClient *RancherClient +} + +type ChangeSecretInputOperations interface { + List(opts *ListOpts) (*ChangeSecretInputCollection, error) + Create(opts *ChangeSecretInput) (*ChangeSecretInput, error) + Update(existing *ChangeSecretInput, updates interface{}) (*ChangeSecretInput, error) + ById(id string) (*ChangeSecretInput, error) + Delete(container *ChangeSecretInput) error +} + +func newChangeSecretInputClient(rancherClient *RancherClient) *ChangeSecretInputClient { + return &ChangeSecretInputClient{ + rancherClient: rancherClient, + } +} + +func (c *ChangeSecretInputClient) Create(container *ChangeSecretInput) (*ChangeSecretInput, error) { + resp := &ChangeSecretInput{} + err := c.rancherClient.doCreate(CHANGE_SECRET_INPUT_TYPE, container, resp) + return resp, err +} + +func (c *ChangeSecretInputClient) Update(existing *ChangeSecretInput, updates interface{}) (*ChangeSecretInput, error) { + resp := &ChangeSecretInput{} + err := c.rancherClient.doUpdate(CHANGE_SECRET_INPUT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ChangeSecretInputClient) List(opts *ListOpts) (*ChangeSecretInputCollection, error) { + resp := &ChangeSecretInputCollection{} + err := c.rancherClient.doList(CHANGE_SECRET_INPUT_TYPE, opts, resp) + return resp, err +} + +func (c *ChangeSecretInputClient) ById(id string) (*ChangeSecretInput, error) { + resp := &ChangeSecretInput{} + err := c.rancherClient.doById(CHANGE_SECRET_INPUT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ChangeSecretInputClient) Delete(container *ChangeSecretInput) error { + return c.rancherClient.doResourceDelete(CHANGE_SECRET_INPUT_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_client.go b/vendor/github.com/rancher/go-rancher/client/generated_client.go new file mode 100644 index 000000000000..152f1177c8a6 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_client.go @@ -0,0 +1,304 @@ +package client + +type RancherClient struct { + RancherBaseClient + + Account AccountOperations + ActiveSetting ActiveSettingOperations + AddOutputsInput AddOutputsInputOperations + AddRemoveLoadBalancerServiceLinkInput AddRemoveLoadBalancerServiceLinkInputOperations + AddRemoveServiceLinkInput AddRemoveServiceLinkInputOperations + Agent AgentOperations + ApiKey ApiKeyOperations + AuditLog AuditLogOperations + Azureadconfig AzureadconfigOperations + Backup BackupOperations + BackupTarget BackupTargetOperations + BaseMachineConfig BaseMachineConfigOperations + BlkioDeviceOption BlkioDeviceOptionOperations + Certificate CertificateOperations + ChangeSecretInput ChangeSecretInputOperations + ComposeConfig ComposeConfigOperations + ComposeConfigInput ComposeConfigInputOperations + ComposeProject ComposeProjectOperations + ComposeService ComposeServiceOperations + ConfigItem ConfigItemOperations + ConfigItemStatus ConfigItemStatusOperations + Container ContainerOperations + ContainerEvent ContainerEventOperations + ContainerExec ContainerExecOperations + ContainerLogs ContainerLogsOperations + ContainerProxy ContainerProxyOperations + Credential CredentialOperations + Databasechangelog DatabasechangelogOperations + Databasechangeloglock DatabasechangeloglockOperations + DnsService DnsServiceOperations + DockerBuild DockerBuildOperations + DynamicSchema DynamicSchemaOperations + Environment EnvironmentOperations + EnvironmentUpgrade EnvironmentUpgradeOperations + ExtensionImplementation ExtensionImplementationOperations + ExtensionPoint ExtensionPointOperations + ExternalDnsEvent ExternalDnsEventOperations + ExternalEvent ExternalEventOperations + ExternalHandler ExternalHandlerOperations + ExternalHandlerExternalHandlerProcessMap ExternalHandlerExternalHandlerProcessMapOperations + ExternalHandlerProcess ExternalHandlerProcessOperations + ExternalHandlerProcessConfig ExternalHandlerProcessConfigOperations + ExternalHostEvent ExternalHostEventOperations + ExternalService ExternalServiceOperations + ExternalServiceEvent ExternalServiceEventOperations + ExternalStoragePoolEvent ExternalStoragePoolEventOperations + ExternalVolumeEvent ExternalVolumeEventOperations + FieldDocumentation FieldDocumentationOperations + Githubconfig GithubconfigOperations + HaConfig HaConfigOperations + HaConfigInput HaConfigInputOperations + HaproxyConfig HaproxyConfigOperations + HealthcheckInstanceHostMap HealthcheckInstanceHostMapOperations + Host HostOperations + HostAccess HostAccessOperations + HostApiProxyToken HostApiProxyTokenOperations + Identity IdentityOperations + Image ImageOperations + InServiceUpgradeStrategy InServiceUpgradeStrategyOperations + Instance InstanceOperations + InstanceConsole InstanceConsoleOperations + InstanceConsoleInput InstanceConsoleInputOperations + InstanceHealthCheck InstanceHealthCheckOperations + InstanceLink InstanceLinkOperations + InstanceStop InstanceStopOperations + IpAddress IpAddressOperations + IpAddressAssociateInput IpAddressAssociateInputOperations + KubernetesService KubernetesServiceOperations + KubernetesStack KubernetesStackOperations + KubernetesStackUpgrade KubernetesStackUpgradeOperations + Label LabelOperations + LaunchConfig LaunchConfigOperations + Ldapconfig LdapconfigOperations + LoadBalancerAppCookieStickinessPolicy LoadBalancerAppCookieStickinessPolicyOperations + LoadBalancerConfig LoadBalancerConfigOperations + LoadBalancerCookieStickinessPolicy LoadBalancerCookieStickinessPolicyOperations + LoadBalancerService LoadBalancerServiceOperations + LoadBalancerServiceLink LoadBalancerServiceLinkOperations + LocalAuthConfig LocalAuthConfigOperations + LogConfig LogConfigOperations + Machine MachineOperations + MachineDriver MachineDriverOperations + Mount MountOperations + Network NetworkOperations + NfsConfig NfsConfigOperations + Openldapconfig OpenldapconfigOperations + Password PasswordOperations + PhysicalHost PhysicalHostOperations + Port PortOperations + ProcessDefinition ProcessDefinitionOperations + ProcessExecution ProcessExecutionOperations + ProcessInstance ProcessInstanceOperations + Project ProjectOperations + ProjectMember ProjectMemberOperations + PublicEndpoint PublicEndpointOperations + Publish PublishOperations + PullTask PullTaskOperations + RecreateOnQuorumStrategyConfig RecreateOnQuorumStrategyConfigOperations + Register RegisterOperations + RegistrationToken RegistrationTokenOperations + Registry RegistryOperations + RegistryCredential RegistryCredentialOperations + ResourceDefinition ResourceDefinitionOperations + RestartPolicy RestartPolicyOperations + RestoreFromBackupInput RestoreFromBackupInputOperations + RevertToSnapshotInput RevertToSnapshotInputOperations + RollingRestartStrategy RollingRestartStrategyOperations + ScalePolicy ScalePolicyOperations + SecondaryLaunchConfig SecondaryLaunchConfigOperations + Service ServiceOperations + ServiceConsumeMap ServiceConsumeMapOperations + ServiceEvent ServiceEventOperations + ServiceExposeMap ServiceExposeMapOperations + ServiceLink ServiceLinkOperations + ServiceProxy ServiceProxyOperations + ServiceRestart ServiceRestartOperations + ServiceUpgrade ServiceUpgradeOperations + ServiceUpgradeStrategy ServiceUpgradeStrategyOperations + ServicesPortRange ServicesPortRangeOperations + SetLabelsInput SetLabelsInputOperations + SetLoadBalancerServiceLinksInput SetLoadBalancerServiceLinksInputOperations + SetProjectMembersInput SetProjectMembersInputOperations + SetServiceLinksInput SetServiceLinksInputOperations + Setting SettingOperations + Snapshot SnapshotOperations + SnapshotBackupInput SnapshotBackupInputOperations + StateTransition StateTransitionOperations + StatsAccess StatsAccessOperations + StoragePool StoragePoolOperations + Subscribe SubscribeOperations + Task TaskOperations + TaskInstance TaskInstanceOperations + ToServiceUpgradeStrategy ToServiceUpgradeStrategyOperations + TypeDocumentation TypeDocumentationOperations + VirtualMachine VirtualMachineOperations + VirtualMachineDisk VirtualMachineDiskOperations + Volume VolumeOperations + VolumeSnapshotInput VolumeSnapshotInputOperations +} + +func constructClient() *RancherClient { + client := &RancherClient{ + RancherBaseClient: RancherBaseClient{ + Types: map[string]Schema{}, + }, + } + + client.Account = newAccountClient(client) + client.ActiveSetting = newActiveSettingClient(client) + client.AddOutputsInput = newAddOutputsInputClient(client) + client.AddRemoveLoadBalancerServiceLinkInput = newAddRemoveLoadBalancerServiceLinkInputClient(client) + client.AddRemoveServiceLinkInput = newAddRemoveServiceLinkInputClient(client) + client.Agent = newAgentClient(client) + client.ApiKey = newApiKeyClient(client) + client.AuditLog = newAuditLogClient(client) + client.Azureadconfig = newAzureadconfigClient(client) + client.Backup = newBackupClient(client) + client.BackupTarget = newBackupTargetClient(client) + client.BaseMachineConfig = newBaseMachineConfigClient(client) + client.BlkioDeviceOption = newBlkioDeviceOptionClient(client) + client.Certificate = newCertificateClient(client) + client.ChangeSecretInput = newChangeSecretInputClient(client) + client.ComposeConfig = newComposeConfigClient(client) + client.ComposeConfigInput = newComposeConfigInputClient(client) + client.ComposeProject = newComposeProjectClient(client) + client.ComposeService = newComposeServiceClient(client) + client.ConfigItem = newConfigItemClient(client) + client.ConfigItemStatus = newConfigItemStatusClient(client) + client.Container = newContainerClient(client) + client.ContainerEvent = newContainerEventClient(client) + client.ContainerExec = newContainerExecClient(client) + client.ContainerLogs = newContainerLogsClient(client) + client.ContainerProxy = newContainerProxyClient(client) + client.Credential = newCredentialClient(client) + client.Databasechangelog = newDatabasechangelogClient(client) + client.Databasechangeloglock = newDatabasechangeloglockClient(client) + client.DnsService = newDnsServiceClient(client) + client.DockerBuild = newDockerBuildClient(client) + client.DynamicSchema = newDynamicSchemaClient(client) + client.Environment = newEnvironmentClient(client) + client.EnvironmentUpgrade = newEnvironmentUpgradeClient(client) + client.ExtensionImplementation = newExtensionImplementationClient(client) + client.ExtensionPoint = newExtensionPointClient(client) + client.ExternalDnsEvent = newExternalDnsEventClient(client) + client.ExternalEvent = newExternalEventClient(client) + client.ExternalHandler = newExternalHandlerClient(client) + client.ExternalHandlerExternalHandlerProcessMap = newExternalHandlerExternalHandlerProcessMapClient(client) + client.ExternalHandlerProcess = newExternalHandlerProcessClient(client) + client.ExternalHandlerProcessConfig = newExternalHandlerProcessConfigClient(client) + client.ExternalHostEvent = newExternalHostEventClient(client) + client.ExternalService = newExternalServiceClient(client) + client.ExternalServiceEvent = newExternalServiceEventClient(client) + client.ExternalStoragePoolEvent = newExternalStoragePoolEventClient(client) + client.ExternalVolumeEvent = newExternalVolumeEventClient(client) + client.FieldDocumentation = newFieldDocumentationClient(client) + client.Githubconfig = newGithubconfigClient(client) + client.HaConfig = newHaConfigClient(client) + client.HaConfigInput = newHaConfigInputClient(client) + client.HaproxyConfig = newHaproxyConfigClient(client) + client.HealthcheckInstanceHostMap = newHealthcheckInstanceHostMapClient(client) + client.Host = newHostClient(client) + client.HostAccess = newHostAccessClient(client) + client.HostApiProxyToken = newHostApiProxyTokenClient(client) + client.Identity = newIdentityClient(client) + client.Image = newImageClient(client) + client.InServiceUpgradeStrategy = newInServiceUpgradeStrategyClient(client) + client.Instance = newInstanceClient(client) + client.InstanceConsole = newInstanceConsoleClient(client) + client.InstanceConsoleInput = newInstanceConsoleInputClient(client) + client.InstanceHealthCheck = newInstanceHealthCheckClient(client) + client.InstanceLink = newInstanceLinkClient(client) + client.InstanceStop = newInstanceStopClient(client) + client.IpAddress = newIpAddressClient(client) + client.IpAddressAssociateInput = newIpAddressAssociateInputClient(client) + client.KubernetesService = newKubernetesServiceClient(client) + client.KubernetesStack = newKubernetesStackClient(client) + client.KubernetesStackUpgrade = newKubernetesStackUpgradeClient(client) + client.Label = newLabelClient(client) + client.LaunchConfig = newLaunchConfigClient(client) + client.Ldapconfig = newLdapconfigClient(client) + client.LoadBalancerAppCookieStickinessPolicy = newLoadBalancerAppCookieStickinessPolicyClient(client) + client.LoadBalancerConfig = newLoadBalancerConfigClient(client) + client.LoadBalancerCookieStickinessPolicy = newLoadBalancerCookieStickinessPolicyClient(client) + client.LoadBalancerService = newLoadBalancerServiceClient(client) + client.LoadBalancerServiceLink = newLoadBalancerServiceLinkClient(client) + client.LocalAuthConfig = newLocalAuthConfigClient(client) + client.LogConfig = newLogConfigClient(client) + client.Machine = newMachineClient(client) + client.MachineDriver = newMachineDriverClient(client) + client.Mount = newMountClient(client) + client.Network = newNetworkClient(client) + client.NfsConfig = newNfsConfigClient(client) + client.Openldapconfig = newOpenldapconfigClient(client) + client.Password = newPasswordClient(client) + client.PhysicalHost = newPhysicalHostClient(client) + client.Port = newPortClient(client) + client.ProcessDefinition = newProcessDefinitionClient(client) + client.ProcessExecution = newProcessExecutionClient(client) + client.ProcessInstance = newProcessInstanceClient(client) + client.Project = newProjectClient(client) + client.ProjectMember = newProjectMemberClient(client) + client.PublicEndpoint = newPublicEndpointClient(client) + client.Publish = newPublishClient(client) + client.PullTask = newPullTaskClient(client) + client.RecreateOnQuorumStrategyConfig = newRecreateOnQuorumStrategyConfigClient(client) + client.Register = newRegisterClient(client) + client.RegistrationToken = newRegistrationTokenClient(client) + client.Registry = newRegistryClient(client) + client.RegistryCredential = newRegistryCredentialClient(client) + client.ResourceDefinition = newResourceDefinitionClient(client) + client.RestartPolicy = newRestartPolicyClient(client) + client.RestoreFromBackupInput = newRestoreFromBackupInputClient(client) + client.RevertToSnapshotInput = newRevertToSnapshotInputClient(client) + client.RollingRestartStrategy = newRollingRestartStrategyClient(client) + client.ScalePolicy = newScalePolicyClient(client) + client.SecondaryLaunchConfig = newSecondaryLaunchConfigClient(client) + client.Service = newServiceClient(client) + client.ServiceConsumeMap = newServiceConsumeMapClient(client) + client.ServiceEvent = newServiceEventClient(client) + client.ServiceExposeMap = newServiceExposeMapClient(client) + client.ServiceLink = newServiceLinkClient(client) + client.ServiceProxy = newServiceProxyClient(client) + client.ServiceRestart = newServiceRestartClient(client) + client.ServiceUpgrade = newServiceUpgradeClient(client) + client.ServiceUpgradeStrategy = newServiceUpgradeStrategyClient(client) + client.ServicesPortRange = newServicesPortRangeClient(client) + client.SetLabelsInput = newSetLabelsInputClient(client) + client.SetLoadBalancerServiceLinksInput = newSetLoadBalancerServiceLinksInputClient(client) + client.SetProjectMembersInput = newSetProjectMembersInputClient(client) + client.SetServiceLinksInput = newSetServiceLinksInputClient(client) + client.Setting = newSettingClient(client) + client.Snapshot = newSnapshotClient(client) + client.SnapshotBackupInput = newSnapshotBackupInputClient(client) + client.StateTransition = newStateTransitionClient(client) + client.StatsAccess = newStatsAccessClient(client) + client.StoragePool = newStoragePoolClient(client) + client.Subscribe = newSubscribeClient(client) + client.Task = newTaskClient(client) + client.TaskInstance = newTaskInstanceClient(client) + client.ToServiceUpgradeStrategy = newToServiceUpgradeStrategyClient(client) + client.TypeDocumentation = newTypeDocumentationClient(client) + client.VirtualMachine = newVirtualMachineClient(client) + client.VirtualMachineDisk = newVirtualMachineDiskClient(client) + client.Volume = newVolumeClient(client) + client.VolumeSnapshotInput = newVolumeSnapshotInputClient(client) + + return client +} + +func NewRancherClient(opts *ClientOpts) (*RancherClient, error) { + client := constructClient() + + err := setupRancherBaseClient(&client.RancherBaseClient, opts) + if err != nil { + return nil, err + } + + return client, nil +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_cluster.go b/vendor/github.com/rancher/go-rancher/client/generated_cluster.go new file mode 100644 index 000000000000..0374af9642e4 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_cluster.go @@ -0,0 +1,223 @@ +package client + +const ( + CLUSTER_TYPE = "cluster" +) + +type Cluster struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + AgentId string `json:"agentId,omitempty" yaml:"agent_id,omitempty"` + + AgentState string `json:"agentState,omitempty" yaml:"agent_state,omitempty"` + + ApiProxy string `json:"apiProxy,omitempty" yaml:"api_proxy,omitempty"` + + ComputeTotal int64 `json:"computeTotal,omitempty" yaml:"compute_total,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + DiscoverySpec string `json:"discoverySpec,omitempty" yaml:"discovery_spec,omitempty"` + + Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"` + + Info interface{} `json:"info,omitempty" yaml:"info,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Labels map[string]interface{} `json:"labels,omitempty" yaml:"labels,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + PhysicalHostId string `json:"physicalHostId,omitempty" yaml:"physical_host_id,omitempty"` + + Port int64 `json:"port,omitempty" yaml:"port,omitempty"` + + PublicEndpoints []interface{} `json:"publicEndpoints,omitempty" yaml:"public_endpoints,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type ClusterCollection struct { + Collection + Data []Cluster `json:"data,omitempty"` +} + +type ClusterClient struct { + rancherClient *RancherClient +} + +type ClusterOperations interface { + List(opts *ListOpts) (*ClusterCollection, error) + Create(opts *Cluster) (*Cluster, error) + Update(existing *Cluster, updates interface{}) (*Cluster, error) + ById(id string) (*Cluster, error) + Delete(container *Cluster) error + + ActionActivate(*Cluster) (*Host, error) + + ActionAddhost(*Cluster, *AddRemoveClusterHostInput) (*Cluster, error) + + ActionCreate(*Cluster) (*Host, error) + + ActionDeactivate(*Cluster) (*Host, error) + + ActionDockersocket(*Cluster) (*HostAccess, error) + + ActionPurge(*Cluster) (*Host, error) + + ActionRemove(*Cluster) (*Host, error) + + ActionRemovehost(*Cluster, *AddRemoveClusterHostInput) (*Cluster, error) + + ActionRestore(*Cluster) (*Host, error) + + ActionUpdate(*Cluster) (*Host, error) +} + +func newClusterClient(rancherClient *RancherClient) *ClusterClient { + return &ClusterClient{ + rancherClient: rancherClient, + } +} + +func (c *ClusterClient) Create(container *Cluster) (*Cluster, error) { + resp := &Cluster{} + err := c.rancherClient.doCreate(CLUSTER_TYPE, container, resp) + return resp, err +} + +func (c *ClusterClient) Update(existing *Cluster, updates interface{}) (*Cluster, error) { + resp := &Cluster{} + err := c.rancherClient.doUpdate(CLUSTER_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ClusterClient) List(opts *ListOpts) (*ClusterCollection, error) { + resp := &ClusterCollection{} + err := c.rancherClient.doList(CLUSTER_TYPE, opts, resp) + return resp, err +} + +func (c *ClusterClient) ById(id string) (*Cluster, error) { + resp := &Cluster{} + err := c.rancherClient.doById(CLUSTER_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ClusterClient) Delete(container *Cluster) error { + return c.rancherClient.doResourceDelete(CLUSTER_TYPE, &container.Resource) +} + +func (c *ClusterClient) ActionActivate(resource *Cluster) (*Host, error) { + + resp := &Host{} + + err := c.rancherClient.doAction(CLUSTER_TYPE, "activate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ClusterClient) ActionAddhost(resource *Cluster, input *AddRemoveClusterHostInput) (*Cluster, error) { + + resp := &Cluster{} + + err := c.rancherClient.doAction(CLUSTER_TYPE, "addhost", &resource.Resource, input, resp) + + return resp, err +} + +func (c *ClusterClient) ActionCreate(resource *Cluster) (*Host, error) { + + resp := &Host{} + + err := c.rancherClient.doAction(CLUSTER_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ClusterClient) ActionDeactivate(resource *Cluster) (*Host, error) { + + resp := &Host{} + + err := c.rancherClient.doAction(CLUSTER_TYPE, "deactivate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ClusterClient) ActionDockersocket(resource *Cluster) (*HostAccess, error) { + + resp := &HostAccess{} + + err := c.rancherClient.doAction(CLUSTER_TYPE, "dockersocket", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ClusterClient) ActionPurge(resource *Cluster) (*Host, error) { + + resp := &Host{} + + err := c.rancherClient.doAction(CLUSTER_TYPE, "purge", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ClusterClient) ActionRemove(resource *Cluster) (*Host, error) { + + resp := &Host{} + + err := c.rancherClient.doAction(CLUSTER_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ClusterClient) ActionRemovehost(resource *Cluster, input *AddRemoveClusterHostInput) (*Cluster, error) { + + resp := &Cluster{} + + err := c.rancherClient.doAction(CLUSTER_TYPE, "removehost", &resource.Resource, input, resp) + + return resp, err +} + +func (c *ClusterClient) ActionRestore(resource *Cluster) (*Host, error) { + + resp := &Host{} + + err := c.rancherClient.doAction(CLUSTER_TYPE, "restore", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ClusterClient) ActionUpdate(resource *Cluster) (*Host, error) { + + resp := &Host{} + + err := c.rancherClient.doAction(CLUSTER_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_compose_config.go b/vendor/github.com/rancher/go-rancher/client/generated_compose_config.go new file mode 100644 index 000000000000..49ee5ba1d172 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_compose_config.go @@ -0,0 +1,69 @@ +package client + +const ( + COMPOSE_CONFIG_TYPE = "composeConfig" +) + +type ComposeConfig struct { + Resource + + DockerComposeConfig string `json:"dockerComposeConfig,omitempty" yaml:"docker_compose_config,omitempty"` + + RancherComposeConfig string `json:"rancherComposeConfig,omitempty" yaml:"rancher_compose_config,omitempty"` +} + +type ComposeConfigCollection struct { + Collection + Data []ComposeConfig `json:"data,omitempty"` +} + +type ComposeConfigClient struct { + rancherClient *RancherClient +} + +type ComposeConfigOperations interface { + List(opts *ListOpts) (*ComposeConfigCollection, error) + Create(opts *ComposeConfig) (*ComposeConfig, error) + Update(existing *ComposeConfig, updates interface{}) (*ComposeConfig, error) + ById(id string) (*ComposeConfig, error) + Delete(container *ComposeConfig) error +} + +func newComposeConfigClient(rancherClient *RancherClient) *ComposeConfigClient { + return &ComposeConfigClient{ + rancherClient: rancherClient, + } +} + +func (c *ComposeConfigClient) Create(container *ComposeConfig) (*ComposeConfig, error) { + resp := &ComposeConfig{} + err := c.rancherClient.doCreate(COMPOSE_CONFIG_TYPE, container, resp) + return resp, err +} + +func (c *ComposeConfigClient) Update(existing *ComposeConfig, updates interface{}) (*ComposeConfig, error) { + resp := &ComposeConfig{} + err := c.rancherClient.doUpdate(COMPOSE_CONFIG_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ComposeConfigClient) List(opts *ListOpts) (*ComposeConfigCollection, error) { + resp := &ComposeConfigCollection{} + err := c.rancherClient.doList(COMPOSE_CONFIG_TYPE, opts, resp) + return resp, err +} + +func (c *ComposeConfigClient) ById(id string) (*ComposeConfig, error) { + resp := &ComposeConfig{} + err := c.rancherClient.doById(COMPOSE_CONFIG_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ComposeConfigClient) Delete(container *ComposeConfig) error { + return c.rancherClient.doResourceDelete(COMPOSE_CONFIG_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_compose_config_input.go b/vendor/github.com/rancher/go-rancher/client/generated_compose_config_input.go new file mode 100644 index 000000000000..e0cdc76f995a --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_compose_config_input.go @@ -0,0 +1,67 @@ +package client + +const ( + COMPOSE_CONFIG_INPUT_TYPE = "composeConfigInput" +) + +type ComposeConfigInput struct { + Resource + + ServiceIds []string `json:"serviceIds,omitempty" yaml:"service_ids,omitempty"` +} + +type ComposeConfigInputCollection struct { + Collection + Data []ComposeConfigInput `json:"data,omitempty"` +} + +type ComposeConfigInputClient struct { + rancherClient *RancherClient +} + +type ComposeConfigInputOperations interface { + List(opts *ListOpts) (*ComposeConfigInputCollection, error) + Create(opts *ComposeConfigInput) (*ComposeConfigInput, error) + Update(existing *ComposeConfigInput, updates interface{}) (*ComposeConfigInput, error) + ById(id string) (*ComposeConfigInput, error) + Delete(container *ComposeConfigInput) error +} + +func newComposeConfigInputClient(rancherClient *RancherClient) *ComposeConfigInputClient { + return &ComposeConfigInputClient{ + rancherClient: rancherClient, + } +} + +func (c *ComposeConfigInputClient) Create(container *ComposeConfigInput) (*ComposeConfigInput, error) { + resp := &ComposeConfigInput{} + err := c.rancherClient.doCreate(COMPOSE_CONFIG_INPUT_TYPE, container, resp) + return resp, err +} + +func (c *ComposeConfigInputClient) Update(existing *ComposeConfigInput, updates interface{}) (*ComposeConfigInput, error) { + resp := &ComposeConfigInput{} + err := c.rancherClient.doUpdate(COMPOSE_CONFIG_INPUT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ComposeConfigInputClient) List(opts *ListOpts) (*ComposeConfigInputCollection, error) { + resp := &ComposeConfigInputCollection{} + err := c.rancherClient.doList(COMPOSE_CONFIG_INPUT_TYPE, opts, resp) + return resp, err +} + +func (c *ComposeConfigInputClient) ById(id string) (*ComposeConfigInput, error) { + resp := &ComposeConfigInput{} + err := c.rancherClient.doById(COMPOSE_CONFIG_INPUT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ComposeConfigInputClient) Delete(container *ComposeConfigInput) error { + return c.rancherClient.doResourceDelete(COMPOSE_CONFIG_INPUT_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_compose_project.go b/vendor/github.com/rancher/go-rancher/client/generated_compose_project.go new file mode 100644 index 000000000000..7d41efad161c --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_compose_project.go @@ -0,0 +1,180 @@ +package client + +const ( + COMPOSE_PROJECT_TYPE = "composeProject" +) + +type ComposeProject struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + Environment map[string]interface{} `json:"environment,omitempty" yaml:"environment,omitempty"` + + ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"` + + HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + PreviousEnvironment map[string]interface{} `json:"previousEnvironment,omitempty" yaml:"previous_environment,omitempty"` + + PreviousExternalId string `json:"previousExternalId,omitempty" yaml:"previous_external_id,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Templates map[string]interface{} `json:"templates,omitempty" yaml:"templates,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type ComposeProjectCollection struct { + Collection + Data []ComposeProject `json:"data,omitempty"` +} + +type ComposeProjectClient struct { + rancherClient *RancherClient +} + +type ComposeProjectOperations interface { + List(opts *ListOpts) (*ComposeProjectCollection, error) + Create(opts *ComposeProject) (*ComposeProject, error) + Update(existing *ComposeProject, updates interface{}) (*ComposeProject, error) + ById(id string) (*ComposeProject, error) + Delete(container *ComposeProject) error + + ActionCancelrollback(*ComposeProject) (*Environment, error) + + ActionCancelupgrade(*ComposeProject) (*Environment, error) + + ActionCreate(*ComposeProject) (*Environment, error) + + ActionError(*ComposeProject) (*Environment, error) + + ActionFinishupgrade(*ComposeProject) (*Environment, error) + + ActionRemove(*ComposeProject) (*Environment, error) + + ActionRollback(*ComposeProject) (*Environment, error) +} + +func newComposeProjectClient(rancherClient *RancherClient) *ComposeProjectClient { + return &ComposeProjectClient{ + rancherClient: rancherClient, + } +} + +func (c *ComposeProjectClient) Create(container *ComposeProject) (*ComposeProject, error) { + resp := &ComposeProject{} + err := c.rancherClient.doCreate(COMPOSE_PROJECT_TYPE, container, resp) + return resp, err +} + +func (c *ComposeProjectClient) Update(existing *ComposeProject, updates interface{}) (*ComposeProject, error) { + resp := &ComposeProject{} + err := c.rancherClient.doUpdate(COMPOSE_PROJECT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ComposeProjectClient) List(opts *ListOpts) (*ComposeProjectCollection, error) { + resp := &ComposeProjectCollection{} + err := c.rancherClient.doList(COMPOSE_PROJECT_TYPE, opts, resp) + return resp, err +} + +func (c *ComposeProjectClient) ById(id string) (*ComposeProject, error) { + resp := &ComposeProject{} + err := c.rancherClient.doById(COMPOSE_PROJECT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ComposeProjectClient) Delete(container *ComposeProject) error { + return c.rancherClient.doResourceDelete(COMPOSE_PROJECT_TYPE, &container.Resource) +} + +func (c *ComposeProjectClient) ActionCancelrollback(resource *ComposeProject) (*Environment, error) { + + resp := &Environment{} + + err := c.rancherClient.doAction(COMPOSE_PROJECT_TYPE, "cancelrollback", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ComposeProjectClient) ActionCancelupgrade(resource *ComposeProject) (*Environment, error) { + + resp := &Environment{} + + err := c.rancherClient.doAction(COMPOSE_PROJECT_TYPE, "cancelupgrade", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ComposeProjectClient) ActionCreate(resource *ComposeProject) (*Environment, error) { + + resp := &Environment{} + + err := c.rancherClient.doAction(COMPOSE_PROJECT_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ComposeProjectClient) ActionError(resource *ComposeProject) (*Environment, error) { + + resp := &Environment{} + + err := c.rancherClient.doAction(COMPOSE_PROJECT_TYPE, "error", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ComposeProjectClient) ActionFinishupgrade(resource *ComposeProject) (*Environment, error) { + + resp := &Environment{} + + err := c.rancherClient.doAction(COMPOSE_PROJECT_TYPE, "finishupgrade", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ComposeProjectClient) ActionRemove(resource *ComposeProject) (*Environment, error) { + + resp := &Environment{} + + err := c.rancherClient.doAction(COMPOSE_PROJECT_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ComposeProjectClient) ActionRollback(resource *ComposeProject) (*Environment, error) { + + resp := &Environment{} + + err := c.rancherClient.doAction(COMPOSE_PROJECT_TYPE, "rollback", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_compose_service.go b/vendor/github.com/rancher/go-rancher/client/generated_compose_service.go new file mode 100644 index 000000000000..e8511e0bf2e0 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_compose_service.go @@ -0,0 +1,194 @@ +package client + +const ( + COMPOSE_SERVICE_TYPE = "composeService" +) + +type ComposeService struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + CurrentScale int64 `json:"currentScale,omitempty" yaml:"current_scale,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + EnvironmentId string `json:"environmentId,omitempty" yaml:"environment_id,omitempty"` + + ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"` + + Fqdn string `json:"fqdn,omitempty" yaml:"fqdn,omitempty"` + + HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + LaunchConfig *LaunchConfig `json:"launchConfig,omitempty" yaml:"launch_config,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + PublicEndpoints []interface{} `json:"publicEndpoints,omitempty" yaml:"public_endpoints,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + Scale int64 `json:"scale,omitempty" yaml:"scale,omitempty"` + + ScalePolicy *ScalePolicy `json:"scalePolicy,omitempty" yaml:"scale_policy,omitempty"` + + SelectorContainer string `json:"selectorContainer,omitempty" yaml:"selector_container,omitempty"` + + SelectorLink string `json:"selectorLink,omitempty" yaml:"selector_link,omitempty"` + + StartOnCreate bool `json:"startOnCreate,omitempty" yaml:"start_on_create,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + + Vip string `json:"vip,omitempty" yaml:"vip,omitempty"` +} + +type ComposeServiceCollection struct { + Collection + Data []ComposeService `json:"data,omitempty"` +} + +type ComposeServiceClient struct { + rancherClient *RancherClient +} + +type ComposeServiceOperations interface { + List(opts *ListOpts) (*ComposeServiceCollection, error) + Create(opts *ComposeService) (*ComposeService, error) + Update(existing *ComposeService, updates interface{}) (*ComposeService, error) + ById(id string) (*ComposeService, error) + Delete(container *ComposeService) error + + ActionActivate(*ComposeService) (*Service, error) + + ActionCancelrollback(*ComposeService) (*Service, error) + + ActionCancelupgrade(*ComposeService) (*Service, error) + + ActionCreate(*ComposeService) (*Service, error) + + ActionFinishupgrade(*ComposeService) (*Service, error) + + ActionRemove(*ComposeService) (*Service, error) + + ActionRollback(*ComposeService) (*Service, error) +} + +func newComposeServiceClient(rancherClient *RancherClient) *ComposeServiceClient { + return &ComposeServiceClient{ + rancherClient: rancherClient, + } +} + +func (c *ComposeServiceClient) Create(container *ComposeService) (*ComposeService, error) { + resp := &ComposeService{} + err := c.rancherClient.doCreate(COMPOSE_SERVICE_TYPE, container, resp) + return resp, err +} + +func (c *ComposeServiceClient) Update(existing *ComposeService, updates interface{}) (*ComposeService, error) { + resp := &ComposeService{} + err := c.rancherClient.doUpdate(COMPOSE_SERVICE_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ComposeServiceClient) List(opts *ListOpts) (*ComposeServiceCollection, error) { + resp := &ComposeServiceCollection{} + err := c.rancherClient.doList(COMPOSE_SERVICE_TYPE, opts, resp) + return resp, err +} + +func (c *ComposeServiceClient) ById(id string) (*ComposeService, error) { + resp := &ComposeService{} + err := c.rancherClient.doById(COMPOSE_SERVICE_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ComposeServiceClient) Delete(container *ComposeService) error { + return c.rancherClient.doResourceDelete(COMPOSE_SERVICE_TYPE, &container.Resource) +} + +func (c *ComposeServiceClient) ActionActivate(resource *ComposeService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(COMPOSE_SERVICE_TYPE, "activate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ComposeServiceClient) ActionCancelrollback(resource *ComposeService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(COMPOSE_SERVICE_TYPE, "cancelrollback", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ComposeServiceClient) ActionCancelupgrade(resource *ComposeService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(COMPOSE_SERVICE_TYPE, "cancelupgrade", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ComposeServiceClient) ActionCreate(resource *ComposeService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(COMPOSE_SERVICE_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ComposeServiceClient) ActionFinishupgrade(resource *ComposeService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(COMPOSE_SERVICE_TYPE, "finishupgrade", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ComposeServiceClient) ActionRemove(resource *ComposeService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(COMPOSE_SERVICE_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ComposeServiceClient) ActionRollback(resource *ComposeService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(COMPOSE_SERVICE_TYPE, "rollback", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_config_item.go b/vendor/github.com/rancher/go-rancher/client/generated_config_item.go new file mode 100644 index 000000000000..71e687d223d1 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_config_item.go @@ -0,0 +1,69 @@ +package client + +const ( + CONFIG_ITEM_TYPE = "configItem" +) + +type ConfigItem struct { + Resource + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + SourceVersion string `json:"sourceVersion,omitempty" yaml:"source_version,omitempty"` +} + +type ConfigItemCollection struct { + Collection + Data []ConfigItem `json:"data,omitempty"` +} + +type ConfigItemClient struct { + rancherClient *RancherClient +} + +type ConfigItemOperations interface { + List(opts *ListOpts) (*ConfigItemCollection, error) + Create(opts *ConfigItem) (*ConfigItem, error) + Update(existing *ConfigItem, updates interface{}) (*ConfigItem, error) + ById(id string) (*ConfigItem, error) + Delete(container *ConfigItem) error +} + +func newConfigItemClient(rancherClient *RancherClient) *ConfigItemClient { + return &ConfigItemClient{ + rancherClient: rancherClient, + } +} + +func (c *ConfigItemClient) Create(container *ConfigItem) (*ConfigItem, error) { + resp := &ConfigItem{} + err := c.rancherClient.doCreate(CONFIG_ITEM_TYPE, container, resp) + return resp, err +} + +func (c *ConfigItemClient) Update(existing *ConfigItem, updates interface{}) (*ConfigItem, error) { + resp := &ConfigItem{} + err := c.rancherClient.doUpdate(CONFIG_ITEM_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ConfigItemClient) List(opts *ListOpts) (*ConfigItemCollection, error) { + resp := &ConfigItemCollection{} + err := c.rancherClient.doList(CONFIG_ITEM_TYPE, opts, resp) + return resp, err +} + +func (c *ConfigItemClient) ById(id string) (*ConfigItem, error) { + resp := &ConfigItem{} + err := c.rancherClient.doById(CONFIG_ITEM_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ConfigItemClient) Delete(container *ConfigItem) error { + return c.rancherClient.doResourceDelete(CONFIG_ITEM_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_config_item_status.go b/vendor/github.com/rancher/go-rancher/client/generated_config_item_status.go new file mode 100644 index 000000000000..0ffef351fff0 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_config_item_status.go @@ -0,0 +1,81 @@ +package client + +const ( + CONFIG_ITEM_STATUS_TYPE = "configItemStatus" +) + +type ConfigItemStatus struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + AgentId string `json:"agentId,omitempty" yaml:"agent_id,omitempty"` + + AppliedUpdated string `json:"appliedUpdated,omitempty" yaml:"applied_updated,omitempty"` + + AppliedVersion int64 `json:"appliedVersion,omitempty" yaml:"applied_version,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + RequestedUpdated string `json:"requestedUpdated,omitempty" yaml:"requested_updated,omitempty"` + + RequestedVersion int64 `json:"requestedVersion,omitempty" yaml:"requested_version,omitempty"` + + SourceVersion string `json:"sourceVersion,omitempty" yaml:"source_version,omitempty"` +} + +type ConfigItemStatusCollection struct { + Collection + Data []ConfigItemStatus `json:"data,omitempty"` +} + +type ConfigItemStatusClient struct { + rancherClient *RancherClient +} + +type ConfigItemStatusOperations interface { + List(opts *ListOpts) (*ConfigItemStatusCollection, error) + Create(opts *ConfigItemStatus) (*ConfigItemStatus, error) + Update(existing *ConfigItemStatus, updates interface{}) (*ConfigItemStatus, error) + ById(id string) (*ConfigItemStatus, error) + Delete(container *ConfigItemStatus) error +} + +func newConfigItemStatusClient(rancherClient *RancherClient) *ConfigItemStatusClient { + return &ConfigItemStatusClient{ + rancherClient: rancherClient, + } +} + +func (c *ConfigItemStatusClient) Create(container *ConfigItemStatus) (*ConfigItemStatus, error) { + resp := &ConfigItemStatus{} + err := c.rancherClient.doCreate(CONFIG_ITEM_STATUS_TYPE, container, resp) + return resp, err +} + +func (c *ConfigItemStatusClient) Update(existing *ConfigItemStatus, updates interface{}) (*ConfigItemStatus, error) { + resp := &ConfigItemStatus{} + err := c.rancherClient.doUpdate(CONFIG_ITEM_STATUS_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ConfigItemStatusClient) List(opts *ListOpts) (*ConfigItemStatusCollection, error) { + resp := &ConfigItemStatusCollection{} + err := c.rancherClient.doList(CONFIG_ITEM_STATUS_TYPE, opts, resp) + return resp, err +} + +func (c *ConfigItemStatusClient) ById(id string) (*ConfigItemStatus, error) { + resp := &ConfigItemStatus{} + err := c.rancherClient.doById(CONFIG_ITEM_STATUS_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ConfigItemStatusClient) Delete(container *ConfigItemStatus) error { + return c.rancherClient.doResourceDelete(CONFIG_ITEM_STATUS_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_container.go b/vendor/github.com/rancher/go-rancher/client/generated_container.go new file mode 100644 index 000000000000..a41dcf362805 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_container.go @@ -0,0 +1,431 @@ +package client + +const ( + CONTAINER_TYPE = "container" +) + +type Container struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + AgentId string `json:"agentId,omitempty" yaml:"agent_id,omitempty"` + + AllocationState string `json:"allocationState,omitempty" yaml:"allocation_state,omitempty"` + + BlkioDeviceOptions map[string]interface{} `json:"blkioDeviceOptions,omitempty" yaml:"blkio_device_options,omitempty"` + + Build *DockerBuild `json:"build,omitempty" yaml:"build,omitempty"` + + CapAdd []string `json:"capAdd,omitempty" yaml:"cap_add,omitempty"` + + CapDrop []string `json:"capDrop,omitempty" yaml:"cap_drop,omitempty"` + + Command []string `json:"command,omitempty" yaml:"command,omitempty"` + + Count int64 `json:"count,omitempty" yaml:"count,omitempty"` + + CpuSet string `json:"cpuSet,omitempty" yaml:"cpu_set,omitempty"` + + CpuShares int64 `json:"cpuShares,omitempty" yaml:"cpu_shares,omitempty"` + + CreateIndex int64 `json:"createIndex,omitempty" yaml:"create_index,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + DataVolumeMounts map[string]interface{} `json:"dataVolumeMounts,omitempty" yaml:"data_volume_mounts,omitempty"` + + DataVolumes []string `json:"dataVolumes,omitempty" yaml:"data_volumes,omitempty"` + + DataVolumesFrom []string `json:"dataVolumesFrom,omitempty" yaml:"data_volumes_from,omitempty"` + + DeploymentUnitUuid string `json:"deploymentUnitUuid,omitempty" yaml:"deployment_unit_uuid,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + Devices []string `json:"devices,omitempty" yaml:"devices,omitempty"` + + Dns []string `json:"dns,omitempty" yaml:"dns,omitempty"` + + DnsSearch []string `json:"dnsSearch,omitempty" yaml:"dns_search,omitempty"` + + DomainName string `json:"domainName,omitempty" yaml:"domain_name,omitempty"` + + EntryPoint []string `json:"entryPoint,omitempty" yaml:"entry_point,omitempty"` + + Environment map[string]interface{} `json:"environment,omitempty" yaml:"environment,omitempty"` + + Expose []string `json:"expose,omitempty" yaml:"expose,omitempty"` + + ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"` + + ExtraHosts []string `json:"extraHosts,omitempty" yaml:"extra_hosts,omitempty"` + + FirstRunning string `json:"firstRunning,omitempty" yaml:"first_running,omitempty"` + + HealthCheck *InstanceHealthCheck `json:"healthCheck,omitempty" yaml:"health_check,omitempty"` + + HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"` + + HostId string `json:"hostId,omitempty" yaml:"host_id,omitempty"` + + Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"` + + ImageUuid string `json:"imageUuid,omitempty" yaml:"image_uuid,omitempty"` + + InstanceLinks map[string]interface{} `json:"instanceLinks,omitempty" yaml:"instance_links,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Labels map[string]interface{} `json:"labels,omitempty" yaml:"labels,omitempty"` + + LogConfig *LogConfig `json:"logConfig,omitempty" yaml:"log_config,omitempty"` + + LxcConf map[string]interface{} `json:"lxcConf,omitempty" yaml:"lxc_conf,omitempty"` + + Memory int64 `json:"memory,omitempty" yaml:"memory,omitempty"` + + MemorySwap int64 `json:"memorySwap,omitempty" yaml:"memory_swap,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + NativeContainer bool `json:"nativeContainer,omitempty" yaml:"native_container,omitempty"` + + NetworkContainerId string `json:"networkContainerId,omitempty" yaml:"network_container_id,omitempty"` + + NetworkIds []string `json:"networkIds,omitempty" yaml:"network_ids,omitempty"` + + NetworkMode string `json:"networkMode,omitempty" yaml:"network_mode,omitempty"` + + PidMode string `json:"pidMode,omitempty" yaml:"pid_mode,omitempty"` + + Ports []string `json:"ports,omitempty" yaml:"ports,omitempty"` + + PrimaryIpAddress string `json:"primaryIpAddress,omitempty" yaml:"primary_ip_address,omitempty"` + + Privileged bool `json:"privileged,omitempty" yaml:"privileged,omitempty"` + + PublishAllPorts bool `json:"publishAllPorts,omitempty" yaml:"publish_all_ports,omitempty"` + + ReadOnly bool `json:"readOnly,omitempty" yaml:"read_only,omitempty"` + + RegistryCredentialId string `json:"registryCredentialId,omitempty" yaml:"registry_credential_id,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + RequestedHostId string `json:"requestedHostId,omitempty" yaml:"requested_host_id,omitempty"` + + RestartPolicy *RestartPolicy `json:"restartPolicy,omitempty" yaml:"restart_policy,omitempty"` + + SecurityOpt []string `json:"securityOpt,omitempty" yaml:"security_opt,omitempty"` + + StartCount int64 `json:"startCount,omitempty" yaml:"start_count,omitempty"` + + StartOnCreate bool `json:"startOnCreate,omitempty" yaml:"start_on_create,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + StdinOpen bool `json:"stdinOpen,omitempty" yaml:"stdin_open,omitempty"` + + SystemContainer string `json:"systemContainer,omitempty" yaml:"system_container,omitempty"` + + Token string `json:"token,omitempty" yaml:"token,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Tty bool `json:"tty,omitempty" yaml:"tty,omitempty"` + + User string `json:"user,omitempty" yaml:"user,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + + Version string `json:"version,omitempty" yaml:"version,omitempty"` + + VolumeDriver string `json:"volumeDriver,omitempty" yaml:"volume_driver,omitempty"` + + WorkingDir string `json:"workingDir,omitempty" yaml:"working_dir,omitempty"` +} + +type ContainerCollection struct { + Collection + Data []Container `json:"data,omitempty"` +} + +type ContainerClient struct { + rancherClient *RancherClient +} + +type ContainerOperations interface { + List(opts *ListOpts) (*ContainerCollection, error) + Create(opts *Container) (*Container, error) + Update(existing *Container, updates interface{}) (*Container, error) + ById(id string) (*Container, error) + Delete(container *Container) error + + ActionAllocate(*Container) (*Instance, error) + + ActionConsole(*Container, *InstanceConsoleInput) (*InstanceConsole, error) + + ActionCreate(*Container) (*Instance, error) + + ActionDeallocate(*Container) (*Instance, error) + + ActionError(*Container) (*Instance, error) + + ActionExecute(*Container, *ContainerExec) (*HostAccess, error) + + ActionLogs(*Container, *ContainerLogs) (*HostAccess, error) + + ActionMigrate(*Container) (*Instance, error) + + ActionProxy(*Container, *ContainerProxy) (*HostAccess, error) + + ActionPurge(*Container) (*Instance, error) + + ActionRemove(*Container) (*Instance, error) + + ActionRestart(*Container) (*Instance, error) + + ActionRestore(*Container) (*Instance, error) + + ActionSetlabels(*Container, *SetLabelsInput) (*Container, error) + + ActionStart(*Container) (*Instance, error) + + ActionStop(*Container, *InstanceStop) (*Instance, error) + + ActionUpdate(*Container) (*Instance, error) + + ActionUpdatehealthy(*Container) (*Instance, error) + + ActionUpdatereinitializing(*Container) (*Instance, error) + + ActionUpdateunhealthy(*Container) (*Instance, error) +} + +func newContainerClient(rancherClient *RancherClient) *ContainerClient { + return &ContainerClient{ + rancherClient: rancherClient, + } +} + +func (c *ContainerClient) Create(container *Container) (*Container, error) { + resp := &Container{} + err := c.rancherClient.doCreate(CONTAINER_TYPE, container, resp) + return resp, err +} + +func (c *ContainerClient) Update(existing *Container, updates interface{}) (*Container, error) { + resp := &Container{} + err := c.rancherClient.doUpdate(CONTAINER_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ContainerClient) List(opts *ListOpts) (*ContainerCollection, error) { + resp := &ContainerCollection{} + err := c.rancherClient.doList(CONTAINER_TYPE, opts, resp) + return resp, err +} + +func (c *ContainerClient) ById(id string) (*Container, error) { + resp := &Container{} + err := c.rancherClient.doById(CONTAINER_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ContainerClient) Delete(container *Container) error { + return c.rancherClient.doResourceDelete(CONTAINER_TYPE, &container.Resource) +} + +func (c *ContainerClient) ActionAllocate(resource *Container) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(CONTAINER_TYPE, "allocate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ContainerClient) ActionConsole(resource *Container, input *InstanceConsoleInput) (*InstanceConsole, error) { + + resp := &InstanceConsole{} + + err := c.rancherClient.doAction(CONTAINER_TYPE, "console", &resource.Resource, input, resp) + + return resp, err +} + +func (c *ContainerClient) ActionCreate(resource *Container) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(CONTAINER_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ContainerClient) ActionDeallocate(resource *Container) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(CONTAINER_TYPE, "deallocate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ContainerClient) ActionError(resource *Container) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(CONTAINER_TYPE, "error", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ContainerClient) ActionExecute(resource *Container, input *ContainerExec) (*HostAccess, error) { + + resp := &HostAccess{} + + err := c.rancherClient.doAction(CONTAINER_TYPE, "execute", &resource.Resource, input, resp) + + return resp, err +} + +func (c *ContainerClient) ActionLogs(resource *Container, input *ContainerLogs) (*HostAccess, error) { + + resp := &HostAccess{} + + err := c.rancherClient.doAction(CONTAINER_TYPE, "logs", &resource.Resource, input, resp) + + return resp, err +} + +func (c *ContainerClient) ActionMigrate(resource *Container) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(CONTAINER_TYPE, "migrate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ContainerClient) ActionProxy(resource *Container, input *ContainerProxy) (*HostAccess, error) { + + resp := &HostAccess{} + + err := c.rancherClient.doAction(CONTAINER_TYPE, "proxy", &resource.Resource, input, resp) + + return resp, err +} + +func (c *ContainerClient) ActionPurge(resource *Container) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(CONTAINER_TYPE, "purge", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ContainerClient) ActionRemove(resource *Container) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(CONTAINER_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ContainerClient) ActionRestart(resource *Container) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(CONTAINER_TYPE, "restart", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ContainerClient) ActionRestore(resource *Container) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(CONTAINER_TYPE, "restore", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ContainerClient) ActionSetlabels(resource *Container, input *SetLabelsInput) (*Container, error) { + + resp := &Container{} + + err := c.rancherClient.doAction(CONTAINER_TYPE, "setlabels", &resource.Resource, input, resp) + + return resp, err +} + +func (c *ContainerClient) ActionStart(resource *Container) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(CONTAINER_TYPE, "start", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ContainerClient) ActionStop(resource *Container, input *InstanceStop) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(CONTAINER_TYPE, "stop", &resource.Resource, input, resp) + + return resp, err +} + +func (c *ContainerClient) ActionUpdate(resource *Container) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(CONTAINER_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ContainerClient) ActionUpdatehealthy(resource *Container) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(CONTAINER_TYPE, "updatehealthy", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ContainerClient) ActionUpdatereinitializing(resource *Container) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(CONTAINER_TYPE, "updatereinitializing", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ContainerClient) ActionUpdateunhealthy(resource *Container) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(CONTAINER_TYPE, "updateunhealthy", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_container_event.go b/vendor/github.com/rancher/go-rancher/client/generated_container_event.go new file mode 100644 index 000000000000..414030bdeb34 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_container_event.go @@ -0,0 +1,117 @@ +package client + +const ( + CONTAINER_EVENT_TYPE = "containerEvent" +) + +type ContainerEvent struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + DockerInspect interface{} `json:"dockerInspect,omitempty" yaml:"docker_inspect,omitempty"` + + ExternalFrom string `json:"externalFrom,omitempty" yaml:"external_from,omitempty"` + + ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"` + + ExternalStatus string `json:"externalStatus,omitempty" yaml:"external_status,omitempty"` + + ExternalTimestamp int64 `json:"externalTimestamp,omitempty" yaml:"external_timestamp,omitempty"` + + HostId string `json:"hostId,omitempty" yaml:"host_id,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + ReportedHostUuid string `json:"reportedHostUuid,omitempty" yaml:"reported_host_uuid,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` +} + +type ContainerEventCollection struct { + Collection + Data []ContainerEvent `json:"data,omitempty"` +} + +type ContainerEventClient struct { + rancherClient *RancherClient +} + +type ContainerEventOperations interface { + List(opts *ListOpts) (*ContainerEventCollection, error) + Create(opts *ContainerEvent) (*ContainerEvent, error) + Update(existing *ContainerEvent, updates interface{}) (*ContainerEvent, error) + ById(id string) (*ContainerEvent, error) + Delete(container *ContainerEvent) error + + ActionCreate(*ContainerEvent) (*ContainerEvent, error) + + ActionRemove(*ContainerEvent) (*ContainerEvent, error) +} + +func newContainerEventClient(rancherClient *RancherClient) *ContainerEventClient { + return &ContainerEventClient{ + rancherClient: rancherClient, + } +} + +func (c *ContainerEventClient) Create(container *ContainerEvent) (*ContainerEvent, error) { + resp := &ContainerEvent{} + err := c.rancherClient.doCreate(CONTAINER_EVENT_TYPE, container, resp) + return resp, err +} + +func (c *ContainerEventClient) Update(existing *ContainerEvent, updates interface{}) (*ContainerEvent, error) { + resp := &ContainerEvent{} + err := c.rancherClient.doUpdate(CONTAINER_EVENT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ContainerEventClient) List(opts *ListOpts) (*ContainerEventCollection, error) { + resp := &ContainerEventCollection{} + err := c.rancherClient.doList(CONTAINER_EVENT_TYPE, opts, resp) + return resp, err +} + +func (c *ContainerEventClient) ById(id string) (*ContainerEvent, error) { + resp := &ContainerEvent{} + err := c.rancherClient.doById(CONTAINER_EVENT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ContainerEventClient) Delete(container *ContainerEvent) error { + return c.rancherClient.doResourceDelete(CONTAINER_EVENT_TYPE, &container.Resource) +} + +func (c *ContainerEventClient) ActionCreate(resource *ContainerEvent) (*ContainerEvent, error) { + + resp := &ContainerEvent{} + + err := c.rancherClient.doAction(CONTAINER_EVENT_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ContainerEventClient) ActionRemove(resource *ContainerEvent) (*ContainerEvent, error) { + + resp := &ContainerEvent{} + + err := c.rancherClient.doAction(CONTAINER_EVENT_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_container_exec.go b/vendor/github.com/rancher/go-rancher/client/generated_container_exec.go new file mode 100644 index 000000000000..c97f7703be18 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_container_exec.go @@ -0,0 +1,73 @@ +package client + +const ( + CONTAINER_EXEC_TYPE = "containerExec" +) + +type ContainerExec struct { + Resource + + AttachStdin bool `json:"attachStdin,omitempty" yaml:"attach_stdin,omitempty"` + + AttachStdout bool `json:"attachStdout,omitempty" yaml:"attach_stdout,omitempty"` + + Command []string `json:"command,omitempty" yaml:"command,omitempty"` + + Tty bool `json:"tty,omitempty" yaml:"tty,omitempty"` +} + +type ContainerExecCollection struct { + Collection + Data []ContainerExec `json:"data,omitempty"` +} + +type ContainerExecClient struct { + rancherClient *RancherClient +} + +type ContainerExecOperations interface { + List(opts *ListOpts) (*ContainerExecCollection, error) + Create(opts *ContainerExec) (*ContainerExec, error) + Update(existing *ContainerExec, updates interface{}) (*ContainerExec, error) + ById(id string) (*ContainerExec, error) + Delete(container *ContainerExec) error +} + +func newContainerExecClient(rancherClient *RancherClient) *ContainerExecClient { + return &ContainerExecClient{ + rancherClient: rancherClient, + } +} + +func (c *ContainerExecClient) Create(container *ContainerExec) (*ContainerExec, error) { + resp := &ContainerExec{} + err := c.rancherClient.doCreate(CONTAINER_EXEC_TYPE, container, resp) + return resp, err +} + +func (c *ContainerExecClient) Update(existing *ContainerExec, updates interface{}) (*ContainerExec, error) { + resp := &ContainerExec{} + err := c.rancherClient.doUpdate(CONTAINER_EXEC_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ContainerExecClient) List(opts *ListOpts) (*ContainerExecCollection, error) { + resp := &ContainerExecCollection{} + err := c.rancherClient.doList(CONTAINER_EXEC_TYPE, opts, resp) + return resp, err +} + +func (c *ContainerExecClient) ById(id string) (*ContainerExec, error) { + resp := &ContainerExec{} + err := c.rancherClient.doById(CONTAINER_EXEC_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ContainerExecClient) Delete(container *ContainerExec) error { + return c.rancherClient.doResourceDelete(CONTAINER_EXEC_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_container_logs.go b/vendor/github.com/rancher/go-rancher/client/generated_container_logs.go new file mode 100644 index 000000000000..4d37dab9267a --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_container_logs.go @@ -0,0 +1,69 @@ +package client + +const ( + CONTAINER_LOGS_TYPE = "containerLogs" +) + +type ContainerLogs struct { + Resource + + Follow bool `json:"follow,omitempty" yaml:"follow,omitempty"` + + Lines int64 `json:"lines,omitempty" yaml:"lines,omitempty"` +} + +type ContainerLogsCollection struct { + Collection + Data []ContainerLogs `json:"data,omitempty"` +} + +type ContainerLogsClient struct { + rancherClient *RancherClient +} + +type ContainerLogsOperations interface { + List(opts *ListOpts) (*ContainerLogsCollection, error) + Create(opts *ContainerLogs) (*ContainerLogs, error) + Update(existing *ContainerLogs, updates interface{}) (*ContainerLogs, error) + ById(id string) (*ContainerLogs, error) + Delete(container *ContainerLogs) error +} + +func newContainerLogsClient(rancherClient *RancherClient) *ContainerLogsClient { + return &ContainerLogsClient{ + rancherClient: rancherClient, + } +} + +func (c *ContainerLogsClient) Create(container *ContainerLogs) (*ContainerLogs, error) { + resp := &ContainerLogs{} + err := c.rancherClient.doCreate(CONTAINER_LOGS_TYPE, container, resp) + return resp, err +} + +func (c *ContainerLogsClient) Update(existing *ContainerLogs, updates interface{}) (*ContainerLogs, error) { + resp := &ContainerLogs{} + err := c.rancherClient.doUpdate(CONTAINER_LOGS_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ContainerLogsClient) List(opts *ListOpts) (*ContainerLogsCollection, error) { + resp := &ContainerLogsCollection{} + err := c.rancherClient.doList(CONTAINER_LOGS_TYPE, opts, resp) + return resp, err +} + +func (c *ContainerLogsClient) ById(id string) (*ContainerLogs, error) { + resp := &ContainerLogs{} + err := c.rancherClient.doById(CONTAINER_LOGS_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ContainerLogsClient) Delete(container *ContainerLogs) error { + return c.rancherClient.doResourceDelete(CONTAINER_LOGS_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_container_proxy.go b/vendor/github.com/rancher/go-rancher/client/generated_container_proxy.go new file mode 100644 index 000000000000..19bcfd532f46 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_container_proxy.go @@ -0,0 +1,69 @@ +package client + +const ( + CONTAINER_PROXY_TYPE = "containerProxy" +) + +type ContainerProxy struct { + Resource + + Port int64 `json:"port,omitempty" yaml:"port,omitempty"` + + Scheme string `json:"scheme,omitempty" yaml:"scheme,omitempty"` +} + +type ContainerProxyCollection struct { + Collection + Data []ContainerProxy `json:"data,omitempty"` +} + +type ContainerProxyClient struct { + rancherClient *RancherClient +} + +type ContainerProxyOperations interface { + List(opts *ListOpts) (*ContainerProxyCollection, error) + Create(opts *ContainerProxy) (*ContainerProxy, error) + Update(existing *ContainerProxy, updates interface{}) (*ContainerProxy, error) + ById(id string) (*ContainerProxy, error) + Delete(container *ContainerProxy) error +} + +func newContainerProxyClient(rancherClient *RancherClient) *ContainerProxyClient { + return &ContainerProxyClient{ + rancherClient: rancherClient, + } +} + +func (c *ContainerProxyClient) Create(container *ContainerProxy) (*ContainerProxy, error) { + resp := &ContainerProxy{} + err := c.rancherClient.doCreate(CONTAINER_PROXY_TYPE, container, resp) + return resp, err +} + +func (c *ContainerProxyClient) Update(existing *ContainerProxy, updates interface{}) (*ContainerProxy, error) { + resp := &ContainerProxy{} + err := c.rancherClient.doUpdate(CONTAINER_PROXY_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ContainerProxyClient) List(opts *ListOpts) (*ContainerProxyCollection, error) { + resp := &ContainerProxyCollection{} + err := c.rancherClient.doList(CONTAINER_PROXY_TYPE, opts, resp) + return resp, err +} + +func (c *ContainerProxyClient) ById(id string) (*ContainerProxy, error) { + resp := &ContainerProxy{} + err := c.rancherClient.doById(CONTAINER_PROXY_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ContainerProxyClient) Delete(container *ContainerProxy) error { + return c.rancherClient.doResourceDelete(CONTAINER_PROXY_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_credential.go b/vendor/github.com/rancher/go-rancher/client/generated_credential.go new file mode 100644 index 000000000000..e1586db29162 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_credential.go @@ -0,0 +1,161 @@ +package client + +const ( + CREDENTIAL_TYPE = "credential" +) + +type Credential struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + PublicValue string `json:"publicValue,omitempty" yaml:"public_value,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + SecretValue string `json:"secretValue,omitempty" yaml:"secret_value,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type CredentialCollection struct { + Collection + Data []Credential `json:"data,omitempty"` +} + +type CredentialClient struct { + rancherClient *RancherClient +} + +type CredentialOperations interface { + List(opts *ListOpts) (*CredentialCollection, error) + Create(opts *Credential) (*Credential, error) + Update(existing *Credential, updates interface{}) (*Credential, error) + ById(id string) (*Credential, error) + Delete(container *Credential) error + + ActionActivate(*Credential) (*Credential, error) + + ActionCreate(*Credential) (*Credential, error) + + ActionDeactivate(*Credential) (*Credential, error) + + ActionPurge(*Credential) (*Credential, error) + + ActionRemove(*Credential) (*Credential, error) + + ActionUpdate(*Credential) (*Credential, error) +} + +func newCredentialClient(rancherClient *RancherClient) *CredentialClient { + return &CredentialClient{ + rancherClient: rancherClient, + } +} + +func (c *CredentialClient) Create(container *Credential) (*Credential, error) { + resp := &Credential{} + err := c.rancherClient.doCreate(CREDENTIAL_TYPE, container, resp) + return resp, err +} + +func (c *CredentialClient) Update(existing *Credential, updates interface{}) (*Credential, error) { + resp := &Credential{} + err := c.rancherClient.doUpdate(CREDENTIAL_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *CredentialClient) List(opts *ListOpts) (*CredentialCollection, error) { + resp := &CredentialCollection{} + err := c.rancherClient.doList(CREDENTIAL_TYPE, opts, resp) + return resp, err +} + +func (c *CredentialClient) ById(id string) (*Credential, error) { + resp := &Credential{} + err := c.rancherClient.doById(CREDENTIAL_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *CredentialClient) Delete(container *Credential) error { + return c.rancherClient.doResourceDelete(CREDENTIAL_TYPE, &container.Resource) +} + +func (c *CredentialClient) ActionActivate(resource *Credential) (*Credential, error) { + + resp := &Credential{} + + err := c.rancherClient.doAction(CREDENTIAL_TYPE, "activate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *CredentialClient) ActionCreate(resource *Credential) (*Credential, error) { + + resp := &Credential{} + + err := c.rancherClient.doAction(CREDENTIAL_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *CredentialClient) ActionDeactivate(resource *Credential) (*Credential, error) { + + resp := &Credential{} + + err := c.rancherClient.doAction(CREDENTIAL_TYPE, "deactivate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *CredentialClient) ActionPurge(resource *Credential) (*Credential, error) { + + resp := &Credential{} + + err := c.rancherClient.doAction(CREDENTIAL_TYPE, "purge", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *CredentialClient) ActionRemove(resource *Credential) (*Credential, error) { + + resp := &Credential{} + + err := c.rancherClient.doAction(CREDENTIAL_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *CredentialClient) ActionUpdate(resource *Credential) (*Credential, error) { + + resp := &Credential{} + + err := c.rancherClient.doAction(CREDENTIAL_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_databasechangelog.go b/vendor/github.com/rancher/go-rancher/client/generated_databasechangelog.go new file mode 100644 index 000000000000..63b3ca6cb497 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_databasechangelog.go @@ -0,0 +1,85 @@ +package client + +const ( + DATABASECHANGELOG_TYPE = "databasechangelog" +) + +type Databasechangelog struct { + Resource + + Author string `json:"author,omitempty" yaml:"author,omitempty"` + + Comments string `json:"comments,omitempty" yaml:"comments,omitempty"` + + Dateexecuted string `json:"dateexecuted,omitempty" yaml:"dateexecuted,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + Exectype string `json:"exectype,omitempty" yaml:"exectype,omitempty"` + + Filename string `json:"filename,omitempty" yaml:"filename,omitempty"` + + Liquibase string `json:"liquibase,omitempty" yaml:"liquibase,omitempty"` + + Md5sum string `json:"md5sum,omitempty" yaml:"md5sum,omitempty"` + + Orderexecuted int64 `json:"orderexecuted,omitempty" yaml:"orderexecuted,omitempty"` + + Tag string `json:"tag,omitempty" yaml:"tag,omitempty"` +} + +type DatabasechangelogCollection struct { + Collection + Data []Databasechangelog `json:"data,omitempty"` +} + +type DatabasechangelogClient struct { + rancherClient *RancherClient +} + +type DatabasechangelogOperations interface { + List(opts *ListOpts) (*DatabasechangelogCollection, error) + Create(opts *Databasechangelog) (*Databasechangelog, error) + Update(existing *Databasechangelog, updates interface{}) (*Databasechangelog, error) + ById(id string) (*Databasechangelog, error) + Delete(container *Databasechangelog) error +} + +func newDatabasechangelogClient(rancherClient *RancherClient) *DatabasechangelogClient { + return &DatabasechangelogClient{ + rancherClient: rancherClient, + } +} + +func (c *DatabasechangelogClient) Create(container *Databasechangelog) (*Databasechangelog, error) { + resp := &Databasechangelog{} + err := c.rancherClient.doCreate(DATABASECHANGELOG_TYPE, container, resp) + return resp, err +} + +func (c *DatabasechangelogClient) Update(existing *Databasechangelog, updates interface{}) (*Databasechangelog, error) { + resp := &Databasechangelog{} + err := c.rancherClient.doUpdate(DATABASECHANGELOG_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *DatabasechangelogClient) List(opts *ListOpts) (*DatabasechangelogCollection, error) { + resp := &DatabasechangelogCollection{} + err := c.rancherClient.doList(DATABASECHANGELOG_TYPE, opts, resp) + return resp, err +} + +func (c *DatabasechangelogClient) ById(id string) (*Databasechangelog, error) { + resp := &Databasechangelog{} + err := c.rancherClient.doById(DATABASECHANGELOG_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *DatabasechangelogClient) Delete(container *Databasechangelog) error { + return c.rancherClient.doResourceDelete(DATABASECHANGELOG_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_databasechangeloglock.go b/vendor/github.com/rancher/go-rancher/client/generated_databasechangeloglock.go new file mode 100644 index 000000000000..f01b7bbc807f --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_databasechangeloglock.go @@ -0,0 +1,71 @@ +package client + +const ( + DATABASECHANGELOGLOCK_TYPE = "databasechangeloglock" +) + +type Databasechangeloglock struct { + Resource + + Locked bool `json:"locked,omitempty" yaml:"locked,omitempty"` + + Lockedby string `json:"lockedby,omitempty" yaml:"lockedby,omitempty"` + + Lockgranted string `json:"lockgranted,omitempty" yaml:"lockgranted,omitempty"` +} + +type DatabasechangeloglockCollection struct { + Collection + Data []Databasechangeloglock `json:"data,omitempty"` +} + +type DatabasechangeloglockClient struct { + rancherClient *RancherClient +} + +type DatabasechangeloglockOperations interface { + List(opts *ListOpts) (*DatabasechangeloglockCollection, error) + Create(opts *Databasechangeloglock) (*Databasechangeloglock, error) + Update(existing *Databasechangeloglock, updates interface{}) (*Databasechangeloglock, error) + ById(id string) (*Databasechangeloglock, error) + Delete(container *Databasechangeloglock) error +} + +func newDatabasechangeloglockClient(rancherClient *RancherClient) *DatabasechangeloglockClient { + return &DatabasechangeloglockClient{ + rancherClient: rancherClient, + } +} + +func (c *DatabasechangeloglockClient) Create(container *Databasechangeloglock) (*Databasechangeloglock, error) { + resp := &Databasechangeloglock{} + err := c.rancherClient.doCreate(DATABASECHANGELOGLOCK_TYPE, container, resp) + return resp, err +} + +func (c *DatabasechangeloglockClient) Update(existing *Databasechangeloglock, updates interface{}) (*Databasechangeloglock, error) { + resp := &Databasechangeloglock{} + err := c.rancherClient.doUpdate(DATABASECHANGELOGLOCK_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *DatabasechangeloglockClient) List(opts *ListOpts) (*DatabasechangeloglockCollection, error) { + resp := &DatabasechangeloglockCollection{} + err := c.rancherClient.doList(DATABASECHANGELOGLOCK_TYPE, opts, resp) + return resp, err +} + +func (c *DatabasechangeloglockClient) ById(id string) (*Databasechangeloglock, error) { + resp := &Databasechangeloglock{} + err := c.rancherClient.doById(DATABASECHANGELOGLOCK_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *DatabasechangeloglockClient) Delete(container *Databasechangeloglock) error { + return c.rancherClient.doResourceDelete(DATABASECHANGELOGLOCK_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_digitalocean_config.go b/vendor/github.com/rancher/go-rancher/client/generated_digitalocean_config.go new file mode 100644 index 000000000000..c30234b9b04e --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_digitalocean_config.go @@ -0,0 +1,81 @@ +package client + +const ( + DIGITALOCEAN_CONFIG_TYPE = "digitaloceanConfig" +) + +type DigitaloceanConfig struct { + Resource + + AccessToken string `json:"accessToken,omitempty" yaml:"access_token,omitempty"` + + Backups bool `json:"backups,omitempty" yaml:"backups,omitempty"` + + Image string `json:"image,omitempty" yaml:"image,omitempty"` + + Ipv6 bool `json:"ipv6,omitempty" yaml:"ipv6,omitempty"` + + PrivateNetworking bool `json:"privateNetworking,omitempty" yaml:"private_networking,omitempty"` + + Region string `json:"region,omitempty" yaml:"region,omitempty"` + + Size string `json:"size,omitempty" yaml:"size,omitempty"` + + SshUser string `json:"sshUser,omitempty" yaml:"ssh_user,omitempty"` +} + +type DigitaloceanConfigCollection struct { + Collection + Data []DigitaloceanConfig `json:"data,omitempty"` +} + +type DigitaloceanConfigClient struct { + rancherClient *RancherClient +} + +type DigitaloceanConfigOperations interface { + List(opts *ListOpts) (*DigitaloceanConfigCollection, error) + Create(opts *DigitaloceanConfig) (*DigitaloceanConfig, error) + Update(existing *DigitaloceanConfig, updates interface{}) (*DigitaloceanConfig, error) + ById(id string) (*DigitaloceanConfig, error) + Delete(container *DigitaloceanConfig) error +} + +func newDigitaloceanConfigClient(rancherClient *RancherClient) *DigitaloceanConfigClient { + return &DigitaloceanConfigClient{ + rancherClient: rancherClient, + } +} + +func (c *DigitaloceanConfigClient) Create(container *DigitaloceanConfig) (*DigitaloceanConfig, error) { + resp := &DigitaloceanConfig{} + err := c.rancherClient.doCreate(DIGITALOCEAN_CONFIG_TYPE, container, resp) + return resp, err +} + +func (c *DigitaloceanConfigClient) Update(existing *DigitaloceanConfig, updates interface{}) (*DigitaloceanConfig, error) { + resp := &DigitaloceanConfig{} + err := c.rancherClient.doUpdate(DIGITALOCEAN_CONFIG_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *DigitaloceanConfigClient) List(opts *ListOpts) (*DigitaloceanConfigCollection, error) { + resp := &DigitaloceanConfigCollection{} + err := c.rancherClient.doList(DIGITALOCEAN_CONFIG_TYPE, opts, resp) + return resp, err +} + +func (c *DigitaloceanConfigClient) ById(id string) (*DigitaloceanConfig, error) { + resp := &DigitaloceanConfig{} + err := c.rancherClient.doById(DIGITALOCEAN_CONFIG_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *DigitaloceanConfigClient) Delete(container *DigitaloceanConfig) error { + return c.rancherClient.doResourceDelete(DIGITALOCEAN_CONFIG_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_dns_service.go b/vendor/github.com/rancher/go-rancher/client/generated_dns_service.go new file mode 100644 index 000000000000..4ebfbc21140f --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_dns_service.go @@ -0,0 +1,267 @@ +package client + +const ( + DNS_SERVICE_TYPE = "dnsService" +) + +type DnsService struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + AssignServiceIpAddress bool `json:"assignServiceIpAddress,omitempty" yaml:"assign_service_ip_address,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + EnvironmentId string `json:"environmentId,omitempty" yaml:"environment_id,omitempty"` + + ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"` + + Fqdn string `json:"fqdn,omitempty" yaml:"fqdn,omitempty"` + + HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + LaunchConfig *LaunchConfig `json:"launchConfig,omitempty" yaml:"launch_config,omitempty"` + + Metadata map[string]interface{} `json:"metadata,omitempty" yaml:"metadata,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + RetainIp bool `json:"retainIp,omitempty" yaml:"retain_ip,omitempty"` + + SelectorLink string `json:"selectorLink,omitempty" yaml:"selector_link,omitempty"` + + StartOnCreate bool `json:"startOnCreate,omitempty" yaml:"start_on_create,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Upgrade *ServiceUpgrade `json:"upgrade,omitempty" yaml:"upgrade,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type DnsServiceCollection struct { + Collection + Data []DnsService `json:"data,omitempty"` +} + +type DnsServiceClient struct { + rancherClient *RancherClient +} + +type DnsServiceOperations interface { + List(opts *ListOpts) (*DnsServiceCollection, error) + Create(opts *DnsService) (*DnsService, error) + Update(existing *DnsService, updates interface{}) (*DnsService, error) + ById(id string) (*DnsService, error) + Delete(container *DnsService) error + + ActionActivate(*DnsService) (*Service, error) + + ActionAddservicelink(*DnsService, *AddRemoveServiceLinkInput) (*Service, error) + + ActionCancelrollback(*DnsService) (*Service, error) + + ActionCancelupgrade(*DnsService) (*Service, error) + + ActionCreate(*DnsService) (*Service, error) + + ActionDeactivate(*DnsService) (*Service, error) + + ActionFinishupgrade(*DnsService) (*Service, error) + + ActionRemove(*DnsService) (*Service, error) + + ActionRemoveservicelink(*DnsService, *AddRemoveServiceLinkInput) (*Service, error) + + ActionRestart(*DnsService, *ServiceRestart) (*Service, error) + + ActionRollback(*DnsService) (*Service, error) + + ActionSetservicelinks(*DnsService, *SetServiceLinksInput) (*Service, error) + + ActionUpdate(*DnsService) (*Service, error) + + ActionUpgrade(*DnsService, *ServiceUpgrade) (*Service, error) +} + +func newDnsServiceClient(rancherClient *RancherClient) *DnsServiceClient { + return &DnsServiceClient{ + rancherClient: rancherClient, + } +} + +func (c *DnsServiceClient) Create(container *DnsService) (*DnsService, error) { + resp := &DnsService{} + err := c.rancherClient.doCreate(DNS_SERVICE_TYPE, container, resp) + return resp, err +} + +func (c *DnsServiceClient) Update(existing *DnsService, updates interface{}) (*DnsService, error) { + resp := &DnsService{} + err := c.rancherClient.doUpdate(DNS_SERVICE_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *DnsServiceClient) List(opts *ListOpts) (*DnsServiceCollection, error) { + resp := &DnsServiceCollection{} + err := c.rancherClient.doList(DNS_SERVICE_TYPE, opts, resp) + return resp, err +} + +func (c *DnsServiceClient) ById(id string) (*DnsService, error) { + resp := &DnsService{} + err := c.rancherClient.doById(DNS_SERVICE_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *DnsServiceClient) Delete(container *DnsService) error { + return c.rancherClient.doResourceDelete(DNS_SERVICE_TYPE, &container.Resource) +} + +func (c *DnsServiceClient) ActionActivate(resource *DnsService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "activate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *DnsServiceClient) ActionAddservicelink(resource *DnsService, input *AddRemoveServiceLinkInput) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "addservicelink", &resource.Resource, input, resp) + + return resp, err +} + +func (c *DnsServiceClient) ActionCancelrollback(resource *DnsService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "cancelrollback", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *DnsServiceClient) ActionCancelupgrade(resource *DnsService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "cancelupgrade", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *DnsServiceClient) ActionCreate(resource *DnsService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *DnsServiceClient) ActionDeactivate(resource *DnsService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "deactivate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *DnsServiceClient) ActionFinishupgrade(resource *DnsService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "finishupgrade", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *DnsServiceClient) ActionRemove(resource *DnsService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *DnsServiceClient) ActionRemoveservicelink(resource *DnsService, input *AddRemoveServiceLinkInput) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "removeservicelink", &resource.Resource, input, resp) + + return resp, err +} + +func (c *DnsServiceClient) ActionRestart(resource *DnsService, input *ServiceRestart) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "restart", &resource.Resource, input, resp) + + return resp, err +} + +func (c *DnsServiceClient) ActionRollback(resource *DnsService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "rollback", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *DnsServiceClient) ActionSetservicelinks(resource *DnsService, input *SetServiceLinksInput) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "setservicelinks", &resource.Resource, input, resp) + + return resp, err +} + +func (c *DnsServiceClient) ActionUpdate(resource *DnsService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *DnsServiceClient) ActionUpgrade(resource *DnsService, input *ServiceUpgrade) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(DNS_SERVICE_TYPE, "upgrade", &resource.Resource, input, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_docker_build.go b/vendor/github.com/rancher/go-rancher/client/generated_docker_build.go new file mode 100644 index 000000000000..cd91f65b22aa --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_docker_build.go @@ -0,0 +1,77 @@ +package client + +const ( + DOCKER_BUILD_TYPE = "dockerBuild" +) + +type DockerBuild struct { + Resource + + Context string `json:"context,omitempty" yaml:"context,omitempty"` + + Dockerfile string `json:"dockerfile,omitempty" yaml:"dockerfile,omitempty"` + + Forcerm bool `json:"forcerm,omitempty" yaml:"forcerm,omitempty"` + + Nocache bool `json:"nocache,omitempty" yaml:"nocache,omitempty"` + + Remote string `json:"remote,omitempty" yaml:"remote,omitempty"` + + Rm bool `json:"rm,omitempty" yaml:"rm,omitempty"` +} + +type DockerBuildCollection struct { + Collection + Data []DockerBuild `json:"data,omitempty"` +} + +type DockerBuildClient struct { + rancherClient *RancherClient +} + +type DockerBuildOperations interface { + List(opts *ListOpts) (*DockerBuildCollection, error) + Create(opts *DockerBuild) (*DockerBuild, error) + Update(existing *DockerBuild, updates interface{}) (*DockerBuild, error) + ById(id string) (*DockerBuild, error) + Delete(container *DockerBuild) error +} + +func newDockerBuildClient(rancherClient *RancherClient) *DockerBuildClient { + return &DockerBuildClient{ + rancherClient: rancherClient, + } +} + +func (c *DockerBuildClient) Create(container *DockerBuild) (*DockerBuild, error) { + resp := &DockerBuild{} + err := c.rancherClient.doCreate(DOCKER_BUILD_TYPE, container, resp) + return resp, err +} + +func (c *DockerBuildClient) Update(existing *DockerBuild, updates interface{}) (*DockerBuild, error) { + resp := &DockerBuild{} + err := c.rancherClient.doUpdate(DOCKER_BUILD_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *DockerBuildClient) List(opts *ListOpts) (*DockerBuildCollection, error) { + resp := &DockerBuildCollection{} + err := c.rancherClient.doList(DOCKER_BUILD_TYPE, opts, resp) + return resp, err +} + +func (c *DockerBuildClient) ById(id string) (*DockerBuild, error) { + resp := &DockerBuild{} + err := c.rancherClient.doById(DOCKER_BUILD_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *DockerBuildClient) Delete(container *DockerBuild) error { + return c.rancherClient.doResourceDelete(DOCKER_BUILD_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_dynamic_schema.go b/vendor/github.com/rancher/go-rancher/client/generated_dynamic_schema.go new file mode 100644 index 000000000000..f9421dd6634d --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_dynamic_schema.go @@ -0,0 +1,117 @@ +package client + +const ( + DYNAMIC_SCHEMA_TYPE = "dynamicSchema" +) + +type DynamicSchema struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Definition string `json:"definition,omitempty" yaml:"definition,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + Parent string `json:"parent,omitempty" yaml:"parent,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + Roles []string `json:"roles,omitempty" yaml:"roles,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type DynamicSchemaCollection struct { + Collection + Data []DynamicSchema `json:"data,omitempty"` +} + +type DynamicSchemaClient struct { + rancherClient *RancherClient +} + +type DynamicSchemaOperations interface { + List(opts *ListOpts) (*DynamicSchemaCollection, error) + Create(opts *DynamicSchema) (*DynamicSchema, error) + Update(existing *DynamicSchema, updates interface{}) (*DynamicSchema, error) + ById(id string) (*DynamicSchema, error) + Delete(container *DynamicSchema) error + + ActionCreate(*DynamicSchema) (*DynamicSchema, error) + + ActionRemove(*DynamicSchema) (*DynamicSchema, error) +} + +func newDynamicSchemaClient(rancherClient *RancherClient) *DynamicSchemaClient { + return &DynamicSchemaClient{ + rancherClient: rancherClient, + } +} + +func (c *DynamicSchemaClient) Create(container *DynamicSchema) (*DynamicSchema, error) { + resp := &DynamicSchema{} + err := c.rancherClient.doCreate(DYNAMIC_SCHEMA_TYPE, container, resp) + return resp, err +} + +func (c *DynamicSchemaClient) Update(existing *DynamicSchema, updates interface{}) (*DynamicSchema, error) { + resp := &DynamicSchema{} + err := c.rancherClient.doUpdate(DYNAMIC_SCHEMA_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *DynamicSchemaClient) List(opts *ListOpts) (*DynamicSchemaCollection, error) { + resp := &DynamicSchemaCollection{} + err := c.rancherClient.doList(DYNAMIC_SCHEMA_TYPE, opts, resp) + return resp, err +} + +func (c *DynamicSchemaClient) ById(id string) (*DynamicSchema, error) { + resp := &DynamicSchema{} + err := c.rancherClient.doById(DYNAMIC_SCHEMA_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *DynamicSchemaClient) Delete(container *DynamicSchema) error { + return c.rancherClient.doResourceDelete(DYNAMIC_SCHEMA_TYPE, &container.Resource) +} + +func (c *DynamicSchemaClient) ActionCreate(resource *DynamicSchema) (*DynamicSchema, error) { + + resp := &DynamicSchema{} + + err := c.rancherClient.doAction(DYNAMIC_SCHEMA_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *DynamicSchemaClient) ActionRemove(resource *DynamicSchema) (*DynamicSchema, error) { + + resp := &DynamicSchema{} + + err := c.rancherClient.doAction(DYNAMIC_SCHEMA_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_environment.go b/vendor/github.com/rancher/go-rancher/client/generated_environment.go new file mode 100644 index 000000000000..3439fb25aed6 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_environment.go @@ -0,0 +1,252 @@ +package client + +const ( + ENVIRONMENT_TYPE = "environment" +) + +type Environment struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + DockerCompose string `json:"dockerCompose,omitempty" yaml:"docker_compose,omitempty"` + + Environment map[string]interface{} `json:"environment,omitempty" yaml:"environment,omitempty"` + + ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"` + + HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + Outputs map[string]interface{} `json:"outputs,omitempty" yaml:"outputs,omitempty"` + + PreviousEnvironment map[string]interface{} `json:"previousEnvironment,omitempty" yaml:"previous_environment,omitempty"` + + PreviousExternalId string `json:"previousExternalId,omitempty" yaml:"previous_external_id,omitempty"` + + RancherCompose string `json:"rancherCompose,omitempty" yaml:"rancher_compose,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + StartOnCreate bool `json:"startOnCreate,omitempty" yaml:"start_on_create,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type EnvironmentCollection struct { + Collection + Data []Environment `json:"data,omitempty"` +} + +type EnvironmentClient struct { + rancherClient *RancherClient +} + +type EnvironmentOperations interface { + List(opts *ListOpts) (*EnvironmentCollection, error) + Create(opts *Environment) (*Environment, error) + Update(existing *Environment, updates interface{}) (*Environment, error) + ById(id string) (*Environment, error) + Delete(container *Environment) error + + ActionActivateservices(*Environment) (*Environment, error) + + ActionAddoutputs(*Environment, *AddOutputsInput) (*Environment, error) + + ActionCancelrollback(*Environment) (*Environment, error) + + ActionCancelupgrade(*Environment) (*Environment, error) + + ActionCreate(*Environment) (*Environment, error) + + ActionDeactivateservices(*Environment) (*Environment, error) + + ActionError(*Environment) (*Environment, error) + + ActionExportconfig(*Environment, *ComposeConfigInput) (*ComposeConfig, error) + + ActionFinishupgrade(*Environment) (*Environment, error) + + ActionRemove(*Environment) (*Environment, error) + + ActionRollback(*Environment) (*Environment, error) + + ActionUpdate(*Environment) (*Environment, error) + + ActionUpgrade(*Environment, *EnvironmentUpgrade) (*Environment, error) +} + +func newEnvironmentClient(rancherClient *RancherClient) *EnvironmentClient { + return &EnvironmentClient{ + rancherClient: rancherClient, + } +} + +func (c *EnvironmentClient) Create(container *Environment) (*Environment, error) { + resp := &Environment{} + err := c.rancherClient.doCreate(ENVIRONMENT_TYPE, container, resp) + return resp, err +} + +func (c *EnvironmentClient) Update(existing *Environment, updates interface{}) (*Environment, error) { + resp := &Environment{} + err := c.rancherClient.doUpdate(ENVIRONMENT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *EnvironmentClient) List(opts *ListOpts) (*EnvironmentCollection, error) { + resp := &EnvironmentCollection{} + err := c.rancherClient.doList(ENVIRONMENT_TYPE, opts, resp) + return resp, err +} + +func (c *EnvironmentClient) ById(id string) (*Environment, error) { + resp := &Environment{} + err := c.rancherClient.doById(ENVIRONMENT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *EnvironmentClient) Delete(container *Environment) error { + return c.rancherClient.doResourceDelete(ENVIRONMENT_TYPE, &container.Resource) +} + +func (c *EnvironmentClient) ActionActivateservices(resource *Environment) (*Environment, error) { + + resp := &Environment{} + + err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "activateservices", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *EnvironmentClient) ActionAddoutputs(resource *Environment, input *AddOutputsInput) (*Environment, error) { + + resp := &Environment{} + + err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "addoutputs", &resource.Resource, input, resp) + + return resp, err +} + +func (c *EnvironmentClient) ActionCancelrollback(resource *Environment) (*Environment, error) { + + resp := &Environment{} + + err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "cancelrollback", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *EnvironmentClient) ActionCancelupgrade(resource *Environment) (*Environment, error) { + + resp := &Environment{} + + err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "cancelupgrade", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *EnvironmentClient) ActionCreate(resource *Environment) (*Environment, error) { + + resp := &Environment{} + + err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *EnvironmentClient) ActionDeactivateservices(resource *Environment) (*Environment, error) { + + resp := &Environment{} + + err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "deactivateservices", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *EnvironmentClient) ActionError(resource *Environment) (*Environment, error) { + + resp := &Environment{} + + err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "error", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *EnvironmentClient) ActionExportconfig(resource *Environment, input *ComposeConfigInput) (*ComposeConfig, error) { + + resp := &ComposeConfig{} + + err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "exportconfig", &resource.Resource, input, resp) + + return resp, err +} + +func (c *EnvironmentClient) ActionFinishupgrade(resource *Environment) (*Environment, error) { + + resp := &Environment{} + + err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "finishupgrade", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *EnvironmentClient) ActionRemove(resource *Environment) (*Environment, error) { + + resp := &Environment{} + + err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *EnvironmentClient) ActionRollback(resource *Environment) (*Environment, error) { + + resp := &Environment{} + + err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "rollback", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *EnvironmentClient) ActionUpdate(resource *Environment) (*Environment, error) { + + resp := &Environment{} + + err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *EnvironmentClient) ActionUpgrade(resource *Environment, input *EnvironmentUpgrade) (*Environment, error) { + + resp := &Environment{} + + err := c.rancherClient.doAction(ENVIRONMENT_TYPE, "upgrade", &resource.Resource, input, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_environment_upgrade.go b/vendor/github.com/rancher/go-rancher/client/generated_environment_upgrade.go new file mode 100644 index 000000000000..23a9afc49b20 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_environment_upgrade.go @@ -0,0 +1,73 @@ +package client + +const ( + ENVIRONMENT_UPGRADE_TYPE = "environmentUpgrade" +) + +type EnvironmentUpgrade struct { + Resource + + DockerCompose string `json:"dockerCompose,omitempty" yaml:"docker_compose,omitempty"` + + Environment map[string]interface{} `json:"environment,omitempty" yaml:"environment,omitempty"` + + ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"` + + RancherCompose string `json:"rancherCompose,omitempty" yaml:"rancher_compose,omitempty"` +} + +type EnvironmentUpgradeCollection struct { + Collection + Data []EnvironmentUpgrade `json:"data,omitempty"` +} + +type EnvironmentUpgradeClient struct { + rancherClient *RancherClient +} + +type EnvironmentUpgradeOperations interface { + List(opts *ListOpts) (*EnvironmentUpgradeCollection, error) + Create(opts *EnvironmentUpgrade) (*EnvironmentUpgrade, error) + Update(existing *EnvironmentUpgrade, updates interface{}) (*EnvironmentUpgrade, error) + ById(id string) (*EnvironmentUpgrade, error) + Delete(container *EnvironmentUpgrade) error +} + +func newEnvironmentUpgradeClient(rancherClient *RancherClient) *EnvironmentUpgradeClient { + return &EnvironmentUpgradeClient{ + rancherClient: rancherClient, + } +} + +func (c *EnvironmentUpgradeClient) Create(container *EnvironmentUpgrade) (*EnvironmentUpgrade, error) { + resp := &EnvironmentUpgrade{} + err := c.rancherClient.doCreate(ENVIRONMENT_UPGRADE_TYPE, container, resp) + return resp, err +} + +func (c *EnvironmentUpgradeClient) Update(existing *EnvironmentUpgrade, updates interface{}) (*EnvironmentUpgrade, error) { + resp := &EnvironmentUpgrade{} + err := c.rancherClient.doUpdate(ENVIRONMENT_UPGRADE_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *EnvironmentUpgradeClient) List(opts *ListOpts) (*EnvironmentUpgradeCollection, error) { + resp := &EnvironmentUpgradeCollection{} + err := c.rancherClient.doList(ENVIRONMENT_UPGRADE_TYPE, opts, resp) + return resp, err +} + +func (c *EnvironmentUpgradeClient) ById(id string) (*EnvironmentUpgrade, error) { + resp := &EnvironmentUpgrade{} + err := c.rancherClient.doById(ENVIRONMENT_UPGRADE_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *EnvironmentUpgradeClient) Delete(container *EnvironmentUpgrade) error { + return c.rancherClient.doResourceDelete(ENVIRONMENT_UPGRADE_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_exoscale_config.go b/vendor/github.com/rancher/go-rancher/client/generated_exoscale_config.go new file mode 100644 index 000000000000..5fbda9b7573f --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_exoscale_config.go @@ -0,0 +1,81 @@ +package client + +const ( + EXOSCALE_CONFIG_TYPE = "exoscaleConfig" +) + +type ExoscaleConfig struct { + Resource + + ApiKey string `json:"apiKey,omitempty" yaml:"api_key,omitempty"` + + ApiSecretKey string `json:"apiSecretKey,omitempty" yaml:"api_secret_key,omitempty"` + + AvailabilityZone string `json:"availabilityZone,omitempty" yaml:"availability_zone,omitempty"` + + DiskSize string `json:"diskSize,omitempty" yaml:"disk_size,omitempty"` + + Image string `json:"image,omitempty" yaml:"image,omitempty"` + + InstanceProfile string `json:"instanceProfile,omitempty" yaml:"instance_profile,omitempty"` + + SecurityGroup []string `json:"securityGroup,omitempty" yaml:"security_group,omitempty"` + + Url string `json:"url,omitempty" yaml:"url,omitempty"` +} + +type ExoscaleConfigCollection struct { + Collection + Data []ExoscaleConfig `json:"data,omitempty"` +} + +type ExoscaleConfigClient struct { + rancherClient *RancherClient +} + +type ExoscaleConfigOperations interface { + List(opts *ListOpts) (*ExoscaleConfigCollection, error) + Create(opts *ExoscaleConfig) (*ExoscaleConfig, error) + Update(existing *ExoscaleConfig, updates interface{}) (*ExoscaleConfig, error) + ById(id string) (*ExoscaleConfig, error) + Delete(container *ExoscaleConfig) error +} + +func newExoscaleConfigClient(rancherClient *RancherClient) *ExoscaleConfigClient { + return &ExoscaleConfigClient{ + rancherClient: rancherClient, + } +} + +func (c *ExoscaleConfigClient) Create(container *ExoscaleConfig) (*ExoscaleConfig, error) { + resp := &ExoscaleConfig{} + err := c.rancherClient.doCreate(EXOSCALE_CONFIG_TYPE, container, resp) + return resp, err +} + +func (c *ExoscaleConfigClient) Update(existing *ExoscaleConfig, updates interface{}) (*ExoscaleConfig, error) { + resp := &ExoscaleConfig{} + err := c.rancherClient.doUpdate(EXOSCALE_CONFIG_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ExoscaleConfigClient) List(opts *ListOpts) (*ExoscaleConfigCollection, error) { + resp := &ExoscaleConfigCollection{} + err := c.rancherClient.doList(EXOSCALE_CONFIG_TYPE, opts, resp) + return resp, err +} + +func (c *ExoscaleConfigClient) ById(id string) (*ExoscaleConfig, error) { + resp := &ExoscaleConfig{} + err := c.rancherClient.doById(EXOSCALE_CONFIG_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ExoscaleConfigClient) Delete(container *ExoscaleConfig) error { + return c.rancherClient.doResourceDelete(EXOSCALE_CONFIG_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_extension_implementation.go b/vendor/github.com/rancher/go-rancher/client/generated_extension_implementation.go new file mode 100644 index 000000000000..cfa7b4aa378c --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_extension_implementation.go @@ -0,0 +1,71 @@ +package client + +const ( + EXTENSION_IMPLEMENTATION_TYPE = "extensionImplementation" +) + +type ExtensionImplementation struct { + Resource + + ClassName string `json:"className,omitempty" yaml:"class_name,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + Properties map[string]interface{} `json:"properties,omitempty" yaml:"properties,omitempty"` +} + +type ExtensionImplementationCollection struct { + Collection + Data []ExtensionImplementation `json:"data,omitempty"` +} + +type ExtensionImplementationClient struct { + rancherClient *RancherClient +} + +type ExtensionImplementationOperations interface { + List(opts *ListOpts) (*ExtensionImplementationCollection, error) + Create(opts *ExtensionImplementation) (*ExtensionImplementation, error) + Update(existing *ExtensionImplementation, updates interface{}) (*ExtensionImplementation, error) + ById(id string) (*ExtensionImplementation, error) + Delete(container *ExtensionImplementation) error +} + +func newExtensionImplementationClient(rancherClient *RancherClient) *ExtensionImplementationClient { + return &ExtensionImplementationClient{ + rancherClient: rancherClient, + } +} + +func (c *ExtensionImplementationClient) Create(container *ExtensionImplementation) (*ExtensionImplementation, error) { + resp := &ExtensionImplementation{} + err := c.rancherClient.doCreate(EXTENSION_IMPLEMENTATION_TYPE, container, resp) + return resp, err +} + +func (c *ExtensionImplementationClient) Update(existing *ExtensionImplementation, updates interface{}) (*ExtensionImplementation, error) { + resp := &ExtensionImplementation{} + err := c.rancherClient.doUpdate(EXTENSION_IMPLEMENTATION_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ExtensionImplementationClient) List(opts *ListOpts) (*ExtensionImplementationCollection, error) { + resp := &ExtensionImplementationCollection{} + err := c.rancherClient.doList(EXTENSION_IMPLEMENTATION_TYPE, opts, resp) + return resp, err +} + +func (c *ExtensionImplementationClient) ById(id string) (*ExtensionImplementation, error) { + resp := &ExtensionImplementation{} + err := c.rancherClient.doById(EXTENSION_IMPLEMENTATION_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ExtensionImplementationClient) Delete(container *ExtensionImplementation) error { + return c.rancherClient.doResourceDelete(EXTENSION_IMPLEMENTATION_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_extension_point.go b/vendor/github.com/rancher/go-rancher/client/generated_extension_point.go new file mode 100644 index 000000000000..0b13cf548994 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_extension_point.go @@ -0,0 +1,75 @@ +package client + +const ( + EXTENSION_POINT_TYPE = "extensionPoint" +) + +type ExtensionPoint struct { + Resource + + ExcludeSetting string `json:"excludeSetting,omitempty" yaml:"exclude_setting,omitempty"` + + Implementations []interface{} `json:"implementations,omitempty" yaml:"implementations,omitempty"` + + IncludeSetting string `json:"includeSetting,omitempty" yaml:"include_setting,omitempty"` + + ListSetting string `json:"listSetting,omitempty" yaml:"list_setting,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` +} + +type ExtensionPointCollection struct { + Collection + Data []ExtensionPoint `json:"data,omitempty"` +} + +type ExtensionPointClient struct { + rancherClient *RancherClient +} + +type ExtensionPointOperations interface { + List(opts *ListOpts) (*ExtensionPointCollection, error) + Create(opts *ExtensionPoint) (*ExtensionPoint, error) + Update(existing *ExtensionPoint, updates interface{}) (*ExtensionPoint, error) + ById(id string) (*ExtensionPoint, error) + Delete(container *ExtensionPoint) error +} + +func newExtensionPointClient(rancherClient *RancherClient) *ExtensionPointClient { + return &ExtensionPointClient{ + rancherClient: rancherClient, + } +} + +func (c *ExtensionPointClient) Create(container *ExtensionPoint) (*ExtensionPoint, error) { + resp := &ExtensionPoint{} + err := c.rancherClient.doCreate(EXTENSION_POINT_TYPE, container, resp) + return resp, err +} + +func (c *ExtensionPointClient) Update(existing *ExtensionPoint, updates interface{}) (*ExtensionPoint, error) { + resp := &ExtensionPoint{} + err := c.rancherClient.doUpdate(EXTENSION_POINT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ExtensionPointClient) List(opts *ListOpts) (*ExtensionPointCollection, error) { + resp := &ExtensionPointCollection{} + err := c.rancherClient.doList(EXTENSION_POINT_TYPE, opts, resp) + return resp, err +} + +func (c *ExtensionPointClient) ById(id string) (*ExtensionPoint, error) { + resp := &ExtensionPoint{} + err := c.rancherClient.doById(EXTENSION_POINT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ExtensionPointClient) Delete(container *ExtensionPoint) error { + return c.rancherClient.doResourceDelete(EXTENSION_POINT_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_external_dns_event.go b/vendor/github.com/rancher/go-rancher/client/generated_external_dns_event.go new file mode 100644 index 000000000000..7f4ce256259c --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_external_dns_event.go @@ -0,0 +1,117 @@ +package client + +const ( + EXTERNAL_DNS_EVENT_TYPE = "externalDnsEvent" +) + +type ExternalDnsEvent struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + EventType string `json:"eventType,omitempty" yaml:"event_type,omitempty"` + + ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"` + + Fqdn string `json:"fqdn,omitempty" yaml:"fqdn,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + ReportedAccountId string `json:"reportedAccountId,omitempty" yaml:"reported_account_id,omitempty"` + + ServiceName string `json:"serviceName,omitempty" yaml:"service_name,omitempty"` + + StackName string `json:"stackName,omitempty" yaml:"stack_name,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type ExternalDnsEventCollection struct { + Collection + Data []ExternalDnsEvent `json:"data,omitempty"` +} + +type ExternalDnsEventClient struct { + rancherClient *RancherClient +} + +type ExternalDnsEventOperations interface { + List(opts *ListOpts) (*ExternalDnsEventCollection, error) + Create(opts *ExternalDnsEvent) (*ExternalDnsEvent, error) + Update(existing *ExternalDnsEvent, updates interface{}) (*ExternalDnsEvent, error) + ById(id string) (*ExternalDnsEvent, error) + Delete(container *ExternalDnsEvent) error + + ActionCreate(*ExternalDnsEvent) (*ExternalEvent, error) + + ActionRemove(*ExternalDnsEvent) (*ExternalEvent, error) +} + +func newExternalDnsEventClient(rancherClient *RancherClient) *ExternalDnsEventClient { + return &ExternalDnsEventClient{ + rancherClient: rancherClient, + } +} + +func (c *ExternalDnsEventClient) Create(container *ExternalDnsEvent) (*ExternalDnsEvent, error) { + resp := &ExternalDnsEvent{} + err := c.rancherClient.doCreate(EXTERNAL_DNS_EVENT_TYPE, container, resp) + return resp, err +} + +func (c *ExternalDnsEventClient) Update(existing *ExternalDnsEvent, updates interface{}) (*ExternalDnsEvent, error) { + resp := &ExternalDnsEvent{} + err := c.rancherClient.doUpdate(EXTERNAL_DNS_EVENT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ExternalDnsEventClient) List(opts *ListOpts) (*ExternalDnsEventCollection, error) { + resp := &ExternalDnsEventCollection{} + err := c.rancherClient.doList(EXTERNAL_DNS_EVENT_TYPE, opts, resp) + return resp, err +} + +func (c *ExternalDnsEventClient) ById(id string) (*ExternalDnsEvent, error) { + resp := &ExternalDnsEvent{} + err := c.rancherClient.doById(EXTERNAL_DNS_EVENT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ExternalDnsEventClient) Delete(container *ExternalDnsEvent) error { + return c.rancherClient.doResourceDelete(EXTERNAL_DNS_EVENT_TYPE, &container.Resource) +} + +func (c *ExternalDnsEventClient) ActionCreate(resource *ExternalDnsEvent) (*ExternalEvent, error) { + + resp := &ExternalEvent{} + + err := c.rancherClient.doAction(EXTERNAL_DNS_EVENT_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ExternalDnsEventClient) ActionRemove(resource *ExternalDnsEvent) (*ExternalEvent, error) { + + resp := &ExternalEvent{} + + err := c.rancherClient.doAction(EXTERNAL_DNS_EVENT_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_external_event.go b/vendor/github.com/rancher/go-rancher/client/generated_external_event.go new file mode 100644 index 000000000000..a1bf8180bb52 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_external_event.go @@ -0,0 +1,111 @@ +package client + +const ( + EXTERNAL_EVENT_TYPE = "externalEvent" +) + +type ExternalEvent struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + EventType string `json:"eventType,omitempty" yaml:"event_type,omitempty"` + + ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + ReportedAccountId string `json:"reportedAccountId,omitempty" yaml:"reported_account_id,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type ExternalEventCollection struct { + Collection + Data []ExternalEvent `json:"data,omitempty"` +} + +type ExternalEventClient struct { + rancherClient *RancherClient +} + +type ExternalEventOperations interface { + List(opts *ListOpts) (*ExternalEventCollection, error) + Create(opts *ExternalEvent) (*ExternalEvent, error) + Update(existing *ExternalEvent, updates interface{}) (*ExternalEvent, error) + ById(id string) (*ExternalEvent, error) + Delete(container *ExternalEvent) error + + ActionCreate(*ExternalEvent) (*ExternalEvent, error) + + ActionRemove(*ExternalEvent) (*ExternalEvent, error) +} + +func newExternalEventClient(rancherClient *RancherClient) *ExternalEventClient { + return &ExternalEventClient{ + rancherClient: rancherClient, + } +} + +func (c *ExternalEventClient) Create(container *ExternalEvent) (*ExternalEvent, error) { + resp := &ExternalEvent{} + err := c.rancherClient.doCreate(EXTERNAL_EVENT_TYPE, container, resp) + return resp, err +} + +func (c *ExternalEventClient) Update(existing *ExternalEvent, updates interface{}) (*ExternalEvent, error) { + resp := &ExternalEvent{} + err := c.rancherClient.doUpdate(EXTERNAL_EVENT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ExternalEventClient) List(opts *ListOpts) (*ExternalEventCollection, error) { + resp := &ExternalEventCollection{} + err := c.rancherClient.doList(EXTERNAL_EVENT_TYPE, opts, resp) + return resp, err +} + +func (c *ExternalEventClient) ById(id string) (*ExternalEvent, error) { + resp := &ExternalEvent{} + err := c.rancherClient.doById(EXTERNAL_EVENT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ExternalEventClient) Delete(container *ExternalEvent) error { + return c.rancherClient.doResourceDelete(EXTERNAL_EVENT_TYPE, &container.Resource) +} + +func (c *ExternalEventClient) ActionCreate(resource *ExternalEvent) (*ExternalEvent, error) { + + resp := &ExternalEvent{} + + err := c.rancherClient.doAction(EXTERNAL_EVENT_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ExternalEventClient) ActionRemove(resource *ExternalEvent) (*ExternalEvent, error) { + + resp := &ExternalEvent{} + + err := c.rancherClient.doAction(EXTERNAL_EVENT_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_external_handler.go b/vendor/github.com/rancher/go-rancher/client/generated_external_handler.go new file mode 100644 index 000000000000..d325b8d55482 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_external_handler.go @@ -0,0 +1,174 @@ +package client + +const ( + EXTERNAL_HANDLER_TYPE = "externalHandler" +) + +type ExternalHandler struct { + Resource + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + Priority int64 `json:"priority,omitempty" yaml:"priority,omitempty"` + + ProcessConfigs []interface{} `json:"processConfigs,omitempty" yaml:"process_configs,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + Retries int64 `json:"retries,omitempty" yaml:"retries,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + TimeoutMillis int64 `json:"timeoutMillis,omitempty" yaml:"timeout_millis,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type ExternalHandlerCollection struct { + Collection + Data []ExternalHandler `json:"data,omitempty"` +} + +type ExternalHandlerClient struct { + rancherClient *RancherClient +} + +type ExternalHandlerOperations interface { + List(opts *ListOpts) (*ExternalHandlerCollection, error) + Create(opts *ExternalHandler) (*ExternalHandler, error) + Update(existing *ExternalHandler, updates interface{}) (*ExternalHandler, error) + ById(id string) (*ExternalHandler, error) + Delete(container *ExternalHandler) error + + ActionActivate(*ExternalHandler) (*ExternalHandler, error) + + ActionCreate(*ExternalHandler) (*ExternalHandler, error) + + ActionDeactivate(*ExternalHandler) (*ExternalHandler, error) + + ActionPurge(*ExternalHandler) (*ExternalHandler, error) + + ActionRemove(*ExternalHandler) (*ExternalHandler, error) + + ActionRestore(*ExternalHandler) (*ExternalHandler, error) + + ActionUpdate(*ExternalHandler) (*ExternalHandler, error) +} + +func newExternalHandlerClient(rancherClient *RancherClient) *ExternalHandlerClient { + return &ExternalHandlerClient{ + rancherClient: rancherClient, + } +} + +func (c *ExternalHandlerClient) Create(container *ExternalHandler) (*ExternalHandler, error) { + resp := &ExternalHandler{} + err := c.rancherClient.doCreate(EXTERNAL_HANDLER_TYPE, container, resp) + return resp, err +} + +func (c *ExternalHandlerClient) Update(existing *ExternalHandler, updates interface{}) (*ExternalHandler, error) { + resp := &ExternalHandler{} + err := c.rancherClient.doUpdate(EXTERNAL_HANDLER_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ExternalHandlerClient) List(opts *ListOpts) (*ExternalHandlerCollection, error) { + resp := &ExternalHandlerCollection{} + err := c.rancherClient.doList(EXTERNAL_HANDLER_TYPE, opts, resp) + return resp, err +} + +func (c *ExternalHandlerClient) ById(id string) (*ExternalHandler, error) { + resp := &ExternalHandler{} + err := c.rancherClient.doById(EXTERNAL_HANDLER_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ExternalHandlerClient) Delete(container *ExternalHandler) error { + return c.rancherClient.doResourceDelete(EXTERNAL_HANDLER_TYPE, &container.Resource) +} + +func (c *ExternalHandlerClient) ActionActivate(resource *ExternalHandler) (*ExternalHandler, error) { + + resp := &ExternalHandler{} + + err := c.rancherClient.doAction(EXTERNAL_HANDLER_TYPE, "activate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ExternalHandlerClient) ActionCreate(resource *ExternalHandler) (*ExternalHandler, error) { + + resp := &ExternalHandler{} + + err := c.rancherClient.doAction(EXTERNAL_HANDLER_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ExternalHandlerClient) ActionDeactivate(resource *ExternalHandler) (*ExternalHandler, error) { + + resp := &ExternalHandler{} + + err := c.rancherClient.doAction(EXTERNAL_HANDLER_TYPE, "deactivate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ExternalHandlerClient) ActionPurge(resource *ExternalHandler) (*ExternalHandler, error) { + + resp := &ExternalHandler{} + + err := c.rancherClient.doAction(EXTERNAL_HANDLER_TYPE, "purge", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ExternalHandlerClient) ActionRemove(resource *ExternalHandler) (*ExternalHandler, error) { + + resp := &ExternalHandler{} + + err := c.rancherClient.doAction(EXTERNAL_HANDLER_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ExternalHandlerClient) ActionRestore(resource *ExternalHandler) (*ExternalHandler, error) { + + resp := &ExternalHandler{} + + err := c.rancherClient.doAction(EXTERNAL_HANDLER_TYPE, "restore", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ExternalHandlerClient) ActionUpdate(resource *ExternalHandler) (*ExternalHandler, error) { + + resp := &ExternalHandler{} + + err := c.rancherClient.doAction(EXTERNAL_HANDLER_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_external_handler_external_handler_process_map.go b/vendor/github.com/rancher/go-rancher/client/generated_external_handler_external_handler_process_map.go new file mode 100644 index 000000000000..9852fa890d80 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_external_handler_external_handler_process_map.go @@ -0,0 +1,172 @@ +package client + +const ( + EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE = "externalHandlerExternalHandlerProcessMap" +) + +type ExternalHandlerExternalHandlerProcessMap struct { + Resource + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + ExternalHandlerId string `json:"externalHandlerId,omitempty" yaml:"external_handler_id,omitempty"` + + ExternalHandlerProcessId string `json:"externalHandlerProcessId,omitempty" yaml:"external_handler_process_id,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + OnError string `json:"onError,omitempty" yaml:"on_error,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type ExternalHandlerExternalHandlerProcessMapCollection struct { + Collection + Data []ExternalHandlerExternalHandlerProcessMap `json:"data,omitempty"` +} + +type ExternalHandlerExternalHandlerProcessMapClient struct { + rancherClient *RancherClient +} + +type ExternalHandlerExternalHandlerProcessMapOperations interface { + List(opts *ListOpts) (*ExternalHandlerExternalHandlerProcessMapCollection, error) + Create(opts *ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error) + Update(existing *ExternalHandlerExternalHandlerProcessMap, updates interface{}) (*ExternalHandlerExternalHandlerProcessMap, error) + ById(id string) (*ExternalHandlerExternalHandlerProcessMap, error) + Delete(container *ExternalHandlerExternalHandlerProcessMap) error + + ActionActivate(*ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error) + + ActionCreate(*ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error) + + ActionDeactivate(*ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error) + + ActionPurge(*ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error) + + ActionRemove(*ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error) + + ActionRestore(*ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error) + + ActionUpdate(*ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error) +} + +func newExternalHandlerExternalHandlerProcessMapClient(rancherClient *RancherClient) *ExternalHandlerExternalHandlerProcessMapClient { + return &ExternalHandlerExternalHandlerProcessMapClient{ + rancherClient: rancherClient, + } +} + +func (c *ExternalHandlerExternalHandlerProcessMapClient) Create(container *ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error) { + resp := &ExternalHandlerExternalHandlerProcessMap{} + err := c.rancherClient.doCreate(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, container, resp) + return resp, err +} + +func (c *ExternalHandlerExternalHandlerProcessMapClient) Update(existing *ExternalHandlerExternalHandlerProcessMap, updates interface{}) (*ExternalHandlerExternalHandlerProcessMap, error) { + resp := &ExternalHandlerExternalHandlerProcessMap{} + err := c.rancherClient.doUpdate(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ExternalHandlerExternalHandlerProcessMapClient) List(opts *ListOpts) (*ExternalHandlerExternalHandlerProcessMapCollection, error) { + resp := &ExternalHandlerExternalHandlerProcessMapCollection{} + err := c.rancherClient.doList(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, opts, resp) + return resp, err +} + +func (c *ExternalHandlerExternalHandlerProcessMapClient) ById(id string) (*ExternalHandlerExternalHandlerProcessMap, error) { + resp := &ExternalHandlerExternalHandlerProcessMap{} + err := c.rancherClient.doById(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ExternalHandlerExternalHandlerProcessMapClient) Delete(container *ExternalHandlerExternalHandlerProcessMap) error { + return c.rancherClient.doResourceDelete(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, &container.Resource) +} + +func (c *ExternalHandlerExternalHandlerProcessMapClient) ActionActivate(resource *ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error) { + + resp := &ExternalHandlerExternalHandlerProcessMap{} + + err := c.rancherClient.doAction(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, "activate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ExternalHandlerExternalHandlerProcessMapClient) ActionCreate(resource *ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error) { + + resp := &ExternalHandlerExternalHandlerProcessMap{} + + err := c.rancherClient.doAction(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ExternalHandlerExternalHandlerProcessMapClient) ActionDeactivate(resource *ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error) { + + resp := &ExternalHandlerExternalHandlerProcessMap{} + + err := c.rancherClient.doAction(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, "deactivate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ExternalHandlerExternalHandlerProcessMapClient) ActionPurge(resource *ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error) { + + resp := &ExternalHandlerExternalHandlerProcessMap{} + + err := c.rancherClient.doAction(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, "purge", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ExternalHandlerExternalHandlerProcessMapClient) ActionRemove(resource *ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error) { + + resp := &ExternalHandlerExternalHandlerProcessMap{} + + err := c.rancherClient.doAction(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ExternalHandlerExternalHandlerProcessMapClient) ActionRestore(resource *ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error) { + + resp := &ExternalHandlerExternalHandlerProcessMap{} + + err := c.rancherClient.doAction(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, "restore", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ExternalHandlerExternalHandlerProcessMapClient) ActionUpdate(resource *ExternalHandlerExternalHandlerProcessMap) (*ExternalHandlerExternalHandlerProcessMap, error) { + + resp := &ExternalHandlerExternalHandlerProcessMap{} + + err := c.rancherClient.doAction(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_external_handler_process.go b/vendor/github.com/rancher/go-rancher/client/generated_external_handler_process.go new file mode 100644 index 000000000000..a61336572abd --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_external_handler_process.go @@ -0,0 +1,166 @@ +package client + +const ( + EXTERNAL_HANDLER_PROCESS_TYPE = "externalHandlerProcess" +) + +type ExternalHandlerProcess struct { + Resource + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type ExternalHandlerProcessCollection struct { + Collection + Data []ExternalHandlerProcess `json:"data,omitempty"` +} + +type ExternalHandlerProcessClient struct { + rancherClient *RancherClient +} + +type ExternalHandlerProcessOperations interface { + List(opts *ListOpts) (*ExternalHandlerProcessCollection, error) + Create(opts *ExternalHandlerProcess) (*ExternalHandlerProcess, error) + Update(existing *ExternalHandlerProcess, updates interface{}) (*ExternalHandlerProcess, error) + ById(id string) (*ExternalHandlerProcess, error) + Delete(container *ExternalHandlerProcess) error + + ActionActivate(*ExternalHandlerProcess) (*ExternalHandlerProcess, error) + + ActionCreate(*ExternalHandlerProcess) (*ExternalHandlerProcess, error) + + ActionDeactivate(*ExternalHandlerProcess) (*ExternalHandlerProcess, error) + + ActionPurge(*ExternalHandlerProcess) (*ExternalHandlerProcess, error) + + ActionRemove(*ExternalHandlerProcess) (*ExternalHandlerProcess, error) + + ActionRestore(*ExternalHandlerProcess) (*ExternalHandlerProcess, error) + + ActionUpdate(*ExternalHandlerProcess) (*ExternalHandlerProcess, error) +} + +func newExternalHandlerProcessClient(rancherClient *RancherClient) *ExternalHandlerProcessClient { + return &ExternalHandlerProcessClient{ + rancherClient: rancherClient, + } +} + +func (c *ExternalHandlerProcessClient) Create(container *ExternalHandlerProcess) (*ExternalHandlerProcess, error) { + resp := &ExternalHandlerProcess{} + err := c.rancherClient.doCreate(EXTERNAL_HANDLER_PROCESS_TYPE, container, resp) + return resp, err +} + +func (c *ExternalHandlerProcessClient) Update(existing *ExternalHandlerProcess, updates interface{}) (*ExternalHandlerProcess, error) { + resp := &ExternalHandlerProcess{} + err := c.rancherClient.doUpdate(EXTERNAL_HANDLER_PROCESS_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ExternalHandlerProcessClient) List(opts *ListOpts) (*ExternalHandlerProcessCollection, error) { + resp := &ExternalHandlerProcessCollection{} + err := c.rancherClient.doList(EXTERNAL_HANDLER_PROCESS_TYPE, opts, resp) + return resp, err +} + +func (c *ExternalHandlerProcessClient) ById(id string) (*ExternalHandlerProcess, error) { + resp := &ExternalHandlerProcess{} + err := c.rancherClient.doById(EXTERNAL_HANDLER_PROCESS_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ExternalHandlerProcessClient) Delete(container *ExternalHandlerProcess) error { + return c.rancherClient.doResourceDelete(EXTERNAL_HANDLER_PROCESS_TYPE, &container.Resource) +} + +func (c *ExternalHandlerProcessClient) ActionActivate(resource *ExternalHandlerProcess) (*ExternalHandlerProcess, error) { + + resp := &ExternalHandlerProcess{} + + err := c.rancherClient.doAction(EXTERNAL_HANDLER_PROCESS_TYPE, "activate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ExternalHandlerProcessClient) ActionCreate(resource *ExternalHandlerProcess) (*ExternalHandlerProcess, error) { + + resp := &ExternalHandlerProcess{} + + err := c.rancherClient.doAction(EXTERNAL_HANDLER_PROCESS_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ExternalHandlerProcessClient) ActionDeactivate(resource *ExternalHandlerProcess) (*ExternalHandlerProcess, error) { + + resp := &ExternalHandlerProcess{} + + err := c.rancherClient.doAction(EXTERNAL_HANDLER_PROCESS_TYPE, "deactivate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ExternalHandlerProcessClient) ActionPurge(resource *ExternalHandlerProcess) (*ExternalHandlerProcess, error) { + + resp := &ExternalHandlerProcess{} + + err := c.rancherClient.doAction(EXTERNAL_HANDLER_PROCESS_TYPE, "purge", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ExternalHandlerProcessClient) ActionRemove(resource *ExternalHandlerProcess) (*ExternalHandlerProcess, error) { + + resp := &ExternalHandlerProcess{} + + err := c.rancherClient.doAction(EXTERNAL_HANDLER_PROCESS_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ExternalHandlerProcessClient) ActionRestore(resource *ExternalHandlerProcess) (*ExternalHandlerProcess, error) { + + resp := &ExternalHandlerProcess{} + + err := c.rancherClient.doAction(EXTERNAL_HANDLER_PROCESS_TYPE, "restore", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ExternalHandlerProcessClient) ActionUpdate(resource *ExternalHandlerProcess) (*ExternalHandlerProcess, error) { + + resp := &ExternalHandlerProcess{} + + err := c.rancherClient.doAction(EXTERNAL_HANDLER_PROCESS_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_external_handler_process_config.go b/vendor/github.com/rancher/go-rancher/client/generated_external_handler_process_config.go new file mode 100644 index 000000000000..de0d49eb47c5 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_external_handler_process_config.go @@ -0,0 +1,69 @@ +package client + +const ( + EXTERNAL_HANDLER_PROCESS_CONFIG_TYPE = "externalHandlerProcessConfig" +) + +type ExternalHandlerProcessConfig struct { + Resource + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + OnError string `json:"onError,omitempty" yaml:"on_error,omitempty"` +} + +type ExternalHandlerProcessConfigCollection struct { + Collection + Data []ExternalHandlerProcessConfig `json:"data,omitempty"` +} + +type ExternalHandlerProcessConfigClient struct { + rancherClient *RancherClient +} + +type ExternalHandlerProcessConfigOperations interface { + List(opts *ListOpts) (*ExternalHandlerProcessConfigCollection, error) + Create(opts *ExternalHandlerProcessConfig) (*ExternalHandlerProcessConfig, error) + Update(existing *ExternalHandlerProcessConfig, updates interface{}) (*ExternalHandlerProcessConfig, error) + ById(id string) (*ExternalHandlerProcessConfig, error) + Delete(container *ExternalHandlerProcessConfig) error +} + +func newExternalHandlerProcessConfigClient(rancherClient *RancherClient) *ExternalHandlerProcessConfigClient { + return &ExternalHandlerProcessConfigClient{ + rancherClient: rancherClient, + } +} + +func (c *ExternalHandlerProcessConfigClient) Create(container *ExternalHandlerProcessConfig) (*ExternalHandlerProcessConfig, error) { + resp := &ExternalHandlerProcessConfig{} + err := c.rancherClient.doCreate(EXTERNAL_HANDLER_PROCESS_CONFIG_TYPE, container, resp) + return resp, err +} + +func (c *ExternalHandlerProcessConfigClient) Update(existing *ExternalHandlerProcessConfig, updates interface{}) (*ExternalHandlerProcessConfig, error) { + resp := &ExternalHandlerProcessConfig{} + err := c.rancherClient.doUpdate(EXTERNAL_HANDLER_PROCESS_CONFIG_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ExternalHandlerProcessConfigClient) List(opts *ListOpts) (*ExternalHandlerProcessConfigCollection, error) { + resp := &ExternalHandlerProcessConfigCollection{} + err := c.rancherClient.doList(EXTERNAL_HANDLER_PROCESS_CONFIG_TYPE, opts, resp) + return resp, err +} + +func (c *ExternalHandlerProcessConfigClient) ById(id string) (*ExternalHandlerProcessConfig, error) { + resp := &ExternalHandlerProcessConfig{} + err := c.rancherClient.doById(EXTERNAL_HANDLER_PROCESS_CONFIG_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ExternalHandlerProcessConfigClient) Delete(container *ExternalHandlerProcessConfig) error { + return c.rancherClient.doResourceDelete(EXTERNAL_HANDLER_PROCESS_CONFIG_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_external_host_event.go b/vendor/github.com/rancher/go-rancher/client/generated_external_host_event.go new file mode 100644 index 000000000000..ae8ec14cebdf --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_external_host_event.go @@ -0,0 +1,117 @@ +package client + +const ( + EXTERNAL_HOST_EVENT_TYPE = "externalHostEvent" +) + +type ExternalHostEvent struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + DeleteHost bool `json:"deleteHost,omitempty" yaml:"delete_host,omitempty"` + + EventType string `json:"eventType,omitempty" yaml:"event_type,omitempty"` + + ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"` + + HostId string `json:"hostId,omitempty" yaml:"host_id,omitempty"` + + HostLabel string `json:"hostLabel,omitempty" yaml:"host_label,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + ReportedAccountId string `json:"reportedAccountId,omitempty" yaml:"reported_account_id,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type ExternalHostEventCollection struct { + Collection + Data []ExternalHostEvent `json:"data,omitempty"` +} + +type ExternalHostEventClient struct { + rancherClient *RancherClient +} + +type ExternalHostEventOperations interface { + List(opts *ListOpts) (*ExternalHostEventCollection, error) + Create(opts *ExternalHostEvent) (*ExternalHostEvent, error) + Update(existing *ExternalHostEvent, updates interface{}) (*ExternalHostEvent, error) + ById(id string) (*ExternalHostEvent, error) + Delete(container *ExternalHostEvent) error + + ActionCreate(*ExternalHostEvent) (*ExternalEvent, error) + + ActionRemove(*ExternalHostEvent) (*ExternalEvent, error) +} + +func newExternalHostEventClient(rancherClient *RancherClient) *ExternalHostEventClient { + return &ExternalHostEventClient{ + rancherClient: rancherClient, + } +} + +func (c *ExternalHostEventClient) Create(container *ExternalHostEvent) (*ExternalHostEvent, error) { + resp := &ExternalHostEvent{} + err := c.rancherClient.doCreate(EXTERNAL_HOST_EVENT_TYPE, container, resp) + return resp, err +} + +func (c *ExternalHostEventClient) Update(existing *ExternalHostEvent, updates interface{}) (*ExternalHostEvent, error) { + resp := &ExternalHostEvent{} + err := c.rancherClient.doUpdate(EXTERNAL_HOST_EVENT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ExternalHostEventClient) List(opts *ListOpts) (*ExternalHostEventCollection, error) { + resp := &ExternalHostEventCollection{} + err := c.rancherClient.doList(EXTERNAL_HOST_EVENT_TYPE, opts, resp) + return resp, err +} + +func (c *ExternalHostEventClient) ById(id string) (*ExternalHostEvent, error) { + resp := &ExternalHostEvent{} + err := c.rancherClient.doById(EXTERNAL_HOST_EVENT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ExternalHostEventClient) Delete(container *ExternalHostEvent) error { + return c.rancherClient.doResourceDelete(EXTERNAL_HOST_EVENT_TYPE, &container.Resource) +} + +func (c *ExternalHostEventClient) ActionCreate(resource *ExternalHostEvent) (*ExternalEvent, error) { + + resp := &ExternalEvent{} + + err := c.rancherClient.doAction(EXTERNAL_HOST_EVENT_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ExternalHostEventClient) ActionRemove(resource *ExternalHostEvent) (*ExternalEvent, error) { + + resp := &ExternalEvent{} + + err := c.rancherClient.doAction(EXTERNAL_HOST_EVENT_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_external_service.go b/vendor/github.com/rancher/go-rancher/client/generated_external_service.go new file mode 100644 index 000000000000..6bdc9d7d3e32 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_external_service.go @@ -0,0 +1,234 @@ +package client + +const ( + EXTERNAL_SERVICE_TYPE = "externalService" +) + +type ExternalService struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + EnvironmentId string `json:"environmentId,omitempty" yaml:"environment_id,omitempty"` + + ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"` + + ExternalIpAddresses []string `json:"externalIpAddresses,omitempty" yaml:"external_ip_addresses,omitempty"` + + Fqdn string `json:"fqdn,omitempty" yaml:"fqdn,omitempty"` + + HealthCheck *InstanceHealthCheck `json:"healthCheck,omitempty" yaml:"health_check,omitempty"` + + HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"` + + Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + LaunchConfig *LaunchConfig `json:"launchConfig,omitempty" yaml:"launch_config,omitempty"` + + Metadata map[string]interface{} `json:"metadata,omitempty" yaml:"metadata,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + StartOnCreate bool `json:"startOnCreate,omitempty" yaml:"start_on_create,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Upgrade *ServiceUpgrade `json:"upgrade,omitempty" yaml:"upgrade,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type ExternalServiceCollection struct { + Collection + Data []ExternalService `json:"data,omitempty"` +} + +type ExternalServiceClient struct { + rancherClient *RancherClient +} + +type ExternalServiceOperations interface { + List(opts *ListOpts) (*ExternalServiceCollection, error) + Create(opts *ExternalService) (*ExternalService, error) + Update(existing *ExternalService, updates interface{}) (*ExternalService, error) + ById(id string) (*ExternalService, error) + Delete(container *ExternalService) error + + ActionActivate(*ExternalService) (*Service, error) + + ActionCancelrollback(*ExternalService) (*Service, error) + + ActionCancelupgrade(*ExternalService) (*Service, error) + + ActionCreate(*ExternalService) (*Service, error) + + ActionDeactivate(*ExternalService) (*Service, error) + + ActionFinishupgrade(*ExternalService) (*Service, error) + + ActionRemove(*ExternalService) (*Service, error) + + ActionRestart(*ExternalService, *ServiceRestart) (*Service, error) + + ActionRollback(*ExternalService) (*Service, error) + + ActionUpdate(*ExternalService) (*Service, error) + + ActionUpgrade(*ExternalService, *ServiceUpgrade) (*Service, error) +} + +func newExternalServiceClient(rancherClient *RancherClient) *ExternalServiceClient { + return &ExternalServiceClient{ + rancherClient: rancherClient, + } +} + +func (c *ExternalServiceClient) Create(container *ExternalService) (*ExternalService, error) { + resp := &ExternalService{} + err := c.rancherClient.doCreate(EXTERNAL_SERVICE_TYPE, container, resp) + return resp, err +} + +func (c *ExternalServiceClient) Update(existing *ExternalService, updates interface{}) (*ExternalService, error) { + resp := &ExternalService{} + err := c.rancherClient.doUpdate(EXTERNAL_SERVICE_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ExternalServiceClient) List(opts *ListOpts) (*ExternalServiceCollection, error) { + resp := &ExternalServiceCollection{} + err := c.rancherClient.doList(EXTERNAL_SERVICE_TYPE, opts, resp) + return resp, err +} + +func (c *ExternalServiceClient) ById(id string) (*ExternalService, error) { + resp := &ExternalService{} + err := c.rancherClient.doById(EXTERNAL_SERVICE_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ExternalServiceClient) Delete(container *ExternalService) error { + return c.rancherClient.doResourceDelete(EXTERNAL_SERVICE_TYPE, &container.Resource) +} + +func (c *ExternalServiceClient) ActionActivate(resource *ExternalService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(EXTERNAL_SERVICE_TYPE, "activate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ExternalServiceClient) ActionCancelrollback(resource *ExternalService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(EXTERNAL_SERVICE_TYPE, "cancelrollback", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ExternalServiceClient) ActionCancelupgrade(resource *ExternalService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(EXTERNAL_SERVICE_TYPE, "cancelupgrade", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ExternalServiceClient) ActionCreate(resource *ExternalService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(EXTERNAL_SERVICE_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ExternalServiceClient) ActionDeactivate(resource *ExternalService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(EXTERNAL_SERVICE_TYPE, "deactivate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ExternalServiceClient) ActionFinishupgrade(resource *ExternalService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(EXTERNAL_SERVICE_TYPE, "finishupgrade", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ExternalServiceClient) ActionRemove(resource *ExternalService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(EXTERNAL_SERVICE_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ExternalServiceClient) ActionRestart(resource *ExternalService, input *ServiceRestart) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(EXTERNAL_SERVICE_TYPE, "restart", &resource.Resource, input, resp) + + return resp, err +} + +func (c *ExternalServiceClient) ActionRollback(resource *ExternalService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(EXTERNAL_SERVICE_TYPE, "rollback", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ExternalServiceClient) ActionUpdate(resource *ExternalService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(EXTERNAL_SERVICE_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ExternalServiceClient) ActionUpgrade(resource *ExternalService, input *ServiceUpgrade) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(EXTERNAL_SERVICE_TYPE, "upgrade", &resource.Resource, input, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_external_service_event.go b/vendor/github.com/rancher/go-rancher/client/generated_external_service_event.go new file mode 100644 index 000000000000..1eb53a5999f8 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_external_service_event.go @@ -0,0 +1,115 @@ +package client + +const ( + EXTERNAL_SERVICE_EVENT_TYPE = "externalServiceEvent" +) + +type ExternalServiceEvent struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Environment interface{} `json:"environment,omitempty" yaml:"environment,omitempty"` + + EventType string `json:"eventType,omitempty" yaml:"event_type,omitempty"` + + ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + ReportedAccountId string `json:"reportedAccountId,omitempty" yaml:"reported_account_id,omitempty"` + + Service interface{} `json:"service,omitempty" yaml:"service,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type ExternalServiceEventCollection struct { + Collection + Data []ExternalServiceEvent `json:"data,omitempty"` +} + +type ExternalServiceEventClient struct { + rancherClient *RancherClient +} + +type ExternalServiceEventOperations interface { + List(opts *ListOpts) (*ExternalServiceEventCollection, error) + Create(opts *ExternalServiceEvent) (*ExternalServiceEvent, error) + Update(existing *ExternalServiceEvent, updates interface{}) (*ExternalServiceEvent, error) + ById(id string) (*ExternalServiceEvent, error) + Delete(container *ExternalServiceEvent) error + + ActionCreate(*ExternalServiceEvent) (*ExternalEvent, error) + + ActionRemove(*ExternalServiceEvent) (*ExternalEvent, error) +} + +func newExternalServiceEventClient(rancherClient *RancherClient) *ExternalServiceEventClient { + return &ExternalServiceEventClient{ + rancherClient: rancherClient, + } +} + +func (c *ExternalServiceEventClient) Create(container *ExternalServiceEvent) (*ExternalServiceEvent, error) { + resp := &ExternalServiceEvent{} + err := c.rancherClient.doCreate(EXTERNAL_SERVICE_EVENT_TYPE, container, resp) + return resp, err +} + +func (c *ExternalServiceEventClient) Update(existing *ExternalServiceEvent, updates interface{}) (*ExternalServiceEvent, error) { + resp := &ExternalServiceEvent{} + err := c.rancherClient.doUpdate(EXTERNAL_SERVICE_EVENT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ExternalServiceEventClient) List(opts *ListOpts) (*ExternalServiceEventCollection, error) { + resp := &ExternalServiceEventCollection{} + err := c.rancherClient.doList(EXTERNAL_SERVICE_EVENT_TYPE, opts, resp) + return resp, err +} + +func (c *ExternalServiceEventClient) ById(id string) (*ExternalServiceEvent, error) { + resp := &ExternalServiceEvent{} + err := c.rancherClient.doById(EXTERNAL_SERVICE_EVENT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ExternalServiceEventClient) Delete(container *ExternalServiceEvent) error { + return c.rancherClient.doResourceDelete(EXTERNAL_SERVICE_EVENT_TYPE, &container.Resource) +} + +func (c *ExternalServiceEventClient) ActionCreate(resource *ExternalServiceEvent) (*ExternalEvent, error) { + + resp := &ExternalEvent{} + + err := c.rancherClient.doAction(EXTERNAL_SERVICE_EVENT_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ExternalServiceEventClient) ActionRemove(resource *ExternalServiceEvent) (*ExternalEvent, error) { + + resp := &ExternalEvent{} + + err := c.rancherClient.doAction(EXTERNAL_SERVICE_EVENT_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_external_storage_pool_event.go b/vendor/github.com/rancher/go-rancher/client/generated_external_storage_pool_event.go new file mode 100644 index 000000000000..21d4ef365755 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_external_storage_pool_event.go @@ -0,0 +1,115 @@ +package client + +const ( + EXTERNAL_STORAGE_POOL_EVENT_TYPE = "externalStoragePoolEvent" +) + +type ExternalStoragePoolEvent struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + EventType string `json:"eventType,omitempty" yaml:"event_type,omitempty"` + + ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"` + + HostUuids []string `json:"hostUuids,omitempty" yaml:"host_uuids,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + ReportedAccountId string `json:"reportedAccountId,omitempty" yaml:"reported_account_id,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + StoragePool StoragePool `json:"storagePool,omitempty" yaml:"storage_pool,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type ExternalStoragePoolEventCollection struct { + Collection + Data []ExternalStoragePoolEvent `json:"data,omitempty"` +} + +type ExternalStoragePoolEventClient struct { + rancherClient *RancherClient +} + +type ExternalStoragePoolEventOperations interface { + List(opts *ListOpts) (*ExternalStoragePoolEventCollection, error) + Create(opts *ExternalStoragePoolEvent) (*ExternalStoragePoolEvent, error) + Update(existing *ExternalStoragePoolEvent, updates interface{}) (*ExternalStoragePoolEvent, error) + ById(id string) (*ExternalStoragePoolEvent, error) + Delete(container *ExternalStoragePoolEvent) error + + ActionCreate(*ExternalStoragePoolEvent) (*ExternalEvent, error) + + ActionRemove(*ExternalStoragePoolEvent) (*ExternalEvent, error) +} + +func newExternalStoragePoolEventClient(rancherClient *RancherClient) *ExternalStoragePoolEventClient { + return &ExternalStoragePoolEventClient{ + rancherClient: rancherClient, + } +} + +func (c *ExternalStoragePoolEventClient) Create(container *ExternalStoragePoolEvent) (*ExternalStoragePoolEvent, error) { + resp := &ExternalStoragePoolEvent{} + err := c.rancherClient.doCreate(EXTERNAL_STORAGE_POOL_EVENT_TYPE, container, resp) + return resp, err +} + +func (c *ExternalStoragePoolEventClient) Update(existing *ExternalStoragePoolEvent, updates interface{}) (*ExternalStoragePoolEvent, error) { + resp := &ExternalStoragePoolEvent{} + err := c.rancherClient.doUpdate(EXTERNAL_STORAGE_POOL_EVENT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ExternalStoragePoolEventClient) List(opts *ListOpts) (*ExternalStoragePoolEventCollection, error) { + resp := &ExternalStoragePoolEventCollection{} + err := c.rancherClient.doList(EXTERNAL_STORAGE_POOL_EVENT_TYPE, opts, resp) + return resp, err +} + +func (c *ExternalStoragePoolEventClient) ById(id string) (*ExternalStoragePoolEvent, error) { + resp := &ExternalStoragePoolEvent{} + err := c.rancherClient.doById(EXTERNAL_STORAGE_POOL_EVENT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ExternalStoragePoolEventClient) Delete(container *ExternalStoragePoolEvent) error { + return c.rancherClient.doResourceDelete(EXTERNAL_STORAGE_POOL_EVENT_TYPE, &container.Resource) +} + +func (c *ExternalStoragePoolEventClient) ActionCreate(resource *ExternalStoragePoolEvent) (*ExternalEvent, error) { + + resp := &ExternalEvent{} + + err := c.rancherClient.doAction(EXTERNAL_STORAGE_POOL_EVENT_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ExternalStoragePoolEventClient) ActionRemove(resource *ExternalStoragePoolEvent) (*ExternalEvent, error) { + + resp := &ExternalEvent{} + + err := c.rancherClient.doAction(EXTERNAL_STORAGE_POOL_EVENT_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_external_volume_event.go b/vendor/github.com/rancher/go-rancher/client/generated_external_volume_event.go new file mode 100644 index 000000000000..2c1fae7dccd6 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_external_volume_event.go @@ -0,0 +1,113 @@ +package client + +const ( + EXTERNAL_VOLUME_EVENT_TYPE = "externalVolumeEvent" +) + +type ExternalVolumeEvent struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + EventType string `json:"eventType,omitempty" yaml:"event_type,omitempty"` + + ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + ReportedAccountId string `json:"reportedAccountId,omitempty" yaml:"reported_account_id,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + + Volume Volume `json:"volume,omitempty" yaml:"volume,omitempty"` +} + +type ExternalVolumeEventCollection struct { + Collection + Data []ExternalVolumeEvent `json:"data,omitempty"` +} + +type ExternalVolumeEventClient struct { + rancherClient *RancherClient +} + +type ExternalVolumeEventOperations interface { + List(opts *ListOpts) (*ExternalVolumeEventCollection, error) + Create(opts *ExternalVolumeEvent) (*ExternalVolumeEvent, error) + Update(existing *ExternalVolumeEvent, updates interface{}) (*ExternalVolumeEvent, error) + ById(id string) (*ExternalVolumeEvent, error) + Delete(container *ExternalVolumeEvent) error + + ActionCreate(*ExternalVolumeEvent) (*ExternalEvent, error) + + ActionRemove(*ExternalVolumeEvent) (*ExternalEvent, error) +} + +func newExternalVolumeEventClient(rancherClient *RancherClient) *ExternalVolumeEventClient { + return &ExternalVolumeEventClient{ + rancherClient: rancherClient, + } +} + +func (c *ExternalVolumeEventClient) Create(container *ExternalVolumeEvent) (*ExternalVolumeEvent, error) { + resp := &ExternalVolumeEvent{} + err := c.rancherClient.doCreate(EXTERNAL_VOLUME_EVENT_TYPE, container, resp) + return resp, err +} + +func (c *ExternalVolumeEventClient) Update(existing *ExternalVolumeEvent, updates interface{}) (*ExternalVolumeEvent, error) { + resp := &ExternalVolumeEvent{} + err := c.rancherClient.doUpdate(EXTERNAL_VOLUME_EVENT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ExternalVolumeEventClient) List(opts *ListOpts) (*ExternalVolumeEventCollection, error) { + resp := &ExternalVolumeEventCollection{} + err := c.rancherClient.doList(EXTERNAL_VOLUME_EVENT_TYPE, opts, resp) + return resp, err +} + +func (c *ExternalVolumeEventClient) ById(id string) (*ExternalVolumeEvent, error) { + resp := &ExternalVolumeEvent{} + err := c.rancherClient.doById(EXTERNAL_VOLUME_EVENT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ExternalVolumeEventClient) Delete(container *ExternalVolumeEvent) error { + return c.rancherClient.doResourceDelete(EXTERNAL_VOLUME_EVENT_TYPE, &container.Resource) +} + +func (c *ExternalVolumeEventClient) ActionCreate(resource *ExternalVolumeEvent) (*ExternalEvent, error) { + + resp := &ExternalEvent{} + + err := c.rancherClient.doAction(EXTERNAL_VOLUME_EVENT_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ExternalVolumeEventClient) ActionRemove(resource *ExternalVolumeEvent) (*ExternalEvent, error) { + + resp := &ExternalEvent{} + + err := c.rancherClient.doAction(EXTERNAL_VOLUME_EVENT_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_field_documentation.go b/vendor/github.com/rancher/go-rancher/client/generated_field_documentation.go new file mode 100644 index 000000000000..035ac23fdbee --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_field_documentation.go @@ -0,0 +1,67 @@ +package client + +const ( + FIELD_DOCUMENTATION_TYPE = "fieldDocumentation" +) + +type FieldDocumentation struct { + Resource + + Description string `json:"description,omitempty" yaml:"description,omitempty"` +} + +type FieldDocumentationCollection struct { + Collection + Data []FieldDocumentation `json:"data,omitempty"` +} + +type FieldDocumentationClient struct { + rancherClient *RancherClient +} + +type FieldDocumentationOperations interface { + List(opts *ListOpts) (*FieldDocumentationCollection, error) + Create(opts *FieldDocumentation) (*FieldDocumentation, error) + Update(existing *FieldDocumentation, updates interface{}) (*FieldDocumentation, error) + ById(id string) (*FieldDocumentation, error) + Delete(container *FieldDocumentation) error +} + +func newFieldDocumentationClient(rancherClient *RancherClient) *FieldDocumentationClient { + return &FieldDocumentationClient{ + rancherClient: rancherClient, + } +} + +func (c *FieldDocumentationClient) Create(container *FieldDocumentation) (*FieldDocumentation, error) { + resp := &FieldDocumentation{} + err := c.rancherClient.doCreate(FIELD_DOCUMENTATION_TYPE, container, resp) + return resp, err +} + +func (c *FieldDocumentationClient) Update(existing *FieldDocumentation, updates interface{}) (*FieldDocumentation, error) { + resp := &FieldDocumentation{} + err := c.rancherClient.doUpdate(FIELD_DOCUMENTATION_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *FieldDocumentationClient) List(opts *ListOpts) (*FieldDocumentationCollection, error) { + resp := &FieldDocumentationCollection{} + err := c.rancherClient.doList(FIELD_DOCUMENTATION_TYPE, opts, resp) + return resp, err +} + +func (c *FieldDocumentationClient) ById(id string) (*FieldDocumentation, error) { + resp := &FieldDocumentation{} + err := c.rancherClient.doById(FIELD_DOCUMENTATION_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *FieldDocumentationClient) Delete(container *FieldDocumentation) error { + return c.rancherClient.doResourceDelete(FIELD_DOCUMENTATION_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_githubconfig.go b/vendor/github.com/rancher/go-rancher/client/generated_githubconfig.go new file mode 100644 index 000000000000..cafb43340035 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_githubconfig.go @@ -0,0 +1,81 @@ +package client + +const ( + GITHUBCONFIG_TYPE = "githubconfig" +) + +type Githubconfig struct { + Resource + + AccessMode string `json:"accessMode,omitempty" yaml:"access_mode,omitempty"` + + AllowedIdentities []interface{} `json:"allowedIdentities,omitempty" yaml:"allowed_identities,omitempty"` + + ClientId string `json:"clientId,omitempty" yaml:"client_id,omitempty"` + + ClientSecret string `json:"clientSecret,omitempty" yaml:"client_secret,omitempty"` + + Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` + + Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + Scheme string `json:"scheme,omitempty" yaml:"scheme,omitempty"` +} + +type GithubconfigCollection struct { + Collection + Data []Githubconfig `json:"data,omitempty"` +} + +type GithubconfigClient struct { + rancherClient *RancherClient +} + +type GithubconfigOperations interface { + List(opts *ListOpts) (*GithubconfigCollection, error) + Create(opts *Githubconfig) (*Githubconfig, error) + Update(existing *Githubconfig, updates interface{}) (*Githubconfig, error) + ById(id string) (*Githubconfig, error) + Delete(container *Githubconfig) error +} + +func newGithubconfigClient(rancherClient *RancherClient) *GithubconfigClient { + return &GithubconfigClient{ + rancherClient: rancherClient, + } +} + +func (c *GithubconfigClient) Create(container *Githubconfig) (*Githubconfig, error) { + resp := &Githubconfig{} + err := c.rancherClient.doCreate(GITHUBCONFIG_TYPE, container, resp) + return resp, err +} + +func (c *GithubconfigClient) Update(existing *Githubconfig, updates interface{}) (*Githubconfig, error) { + resp := &Githubconfig{} + err := c.rancherClient.doUpdate(GITHUBCONFIG_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *GithubconfigClient) List(opts *ListOpts) (*GithubconfigCollection, error) { + resp := &GithubconfigCollection{} + err := c.rancherClient.doList(GITHUBCONFIG_TYPE, opts, resp) + return resp, err +} + +func (c *GithubconfigClient) ById(id string) (*Githubconfig, error) { + resp := &Githubconfig{} + err := c.rancherClient.doById(GITHUBCONFIG_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *GithubconfigClient) Delete(container *Githubconfig) error { + return c.rancherClient.doResourceDelete(GITHUBCONFIG_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_global_load_balancer.go b/vendor/github.com/rancher/go-rancher/client/generated_global_load_balancer.go new file mode 100644 index 000000000000..881b13fd9853 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_global_load_balancer.go @@ -0,0 +1,139 @@ +package client + +const ( + GLOBAL_LOAD_BALANCER_TYPE = "globalLoadBalancer" +) + +type GlobalLoadBalancer struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + GlobalLoadBalancerHealthCheck []interface{} `json:"globalLoadBalancerHealthCheck,omitempty" yaml:"global_load_balancer_health_check,omitempty"` + + GlobalLoadBalancerPolicy []interface{} `json:"globalLoadBalancerPolicy,omitempty" yaml:"global_load_balancer_policy,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type GlobalLoadBalancerCollection struct { + Collection + Data []GlobalLoadBalancer `json:"data,omitempty"` +} + +type GlobalLoadBalancerClient struct { + rancherClient *RancherClient +} + +type GlobalLoadBalancerOperations interface { + List(opts *ListOpts) (*GlobalLoadBalancerCollection, error) + Create(opts *GlobalLoadBalancer) (*GlobalLoadBalancer, error) + Update(existing *GlobalLoadBalancer, updates interface{}) (*GlobalLoadBalancer, error) + ById(id string) (*GlobalLoadBalancer, error) + Delete(container *GlobalLoadBalancer) error + + ActionAddloadbalancer(*GlobalLoadBalancer, *AddLoadBalancerInput) (*GlobalLoadBalancer, error) + + ActionCreate(*GlobalLoadBalancer) (*GlobalLoadBalancer, error) + + ActionRemove(*GlobalLoadBalancer) (*GlobalLoadBalancer, error) + + ActionRemoveloadbalancer(*GlobalLoadBalancer, *RemoveLoadBalancerInput) (*GlobalLoadBalancer, error) +} + +func newGlobalLoadBalancerClient(rancherClient *RancherClient) *GlobalLoadBalancerClient { + return &GlobalLoadBalancerClient{ + rancherClient: rancherClient, + } +} + +func (c *GlobalLoadBalancerClient) Create(container *GlobalLoadBalancer) (*GlobalLoadBalancer, error) { + resp := &GlobalLoadBalancer{} + err := c.rancherClient.doCreate(GLOBAL_LOAD_BALANCER_TYPE, container, resp) + return resp, err +} + +func (c *GlobalLoadBalancerClient) Update(existing *GlobalLoadBalancer, updates interface{}) (*GlobalLoadBalancer, error) { + resp := &GlobalLoadBalancer{} + err := c.rancherClient.doUpdate(GLOBAL_LOAD_BALANCER_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *GlobalLoadBalancerClient) List(opts *ListOpts) (*GlobalLoadBalancerCollection, error) { + resp := &GlobalLoadBalancerCollection{} + err := c.rancherClient.doList(GLOBAL_LOAD_BALANCER_TYPE, opts, resp) + return resp, err +} + +func (c *GlobalLoadBalancerClient) ById(id string) (*GlobalLoadBalancer, error) { + resp := &GlobalLoadBalancer{} + err := c.rancherClient.doById(GLOBAL_LOAD_BALANCER_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *GlobalLoadBalancerClient) Delete(container *GlobalLoadBalancer) error { + return c.rancherClient.doResourceDelete(GLOBAL_LOAD_BALANCER_TYPE, &container.Resource) +} + +func (c *GlobalLoadBalancerClient) ActionAddloadbalancer(resource *GlobalLoadBalancer, input *AddLoadBalancerInput) (*GlobalLoadBalancer, error) { + + resp := &GlobalLoadBalancer{} + + err := c.rancherClient.doAction(GLOBAL_LOAD_BALANCER_TYPE, "addloadbalancer", &resource.Resource, input, resp) + + return resp, err +} + +func (c *GlobalLoadBalancerClient) ActionCreate(resource *GlobalLoadBalancer) (*GlobalLoadBalancer, error) { + + resp := &GlobalLoadBalancer{} + + err := c.rancherClient.doAction(GLOBAL_LOAD_BALANCER_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *GlobalLoadBalancerClient) ActionRemove(resource *GlobalLoadBalancer) (*GlobalLoadBalancer, error) { + + resp := &GlobalLoadBalancer{} + + err := c.rancherClient.doAction(GLOBAL_LOAD_BALANCER_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *GlobalLoadBalancerClient) ActionRemoveloadbalancer(resource *GlobalLoadBalancer, input *RemoveLoadBalancerInput) (*GlobalLoadBalancer, error) { + + resp := &GlobalLoadBalancer{} + + err := c.rancherClient.doAction(GLOBAL_LOAD_BALANCER_TYPE, "removeloadbalancer", &resource.Resource, input, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_global_load_balancer_health_check.go b/vendor/github.com/rancher/go-rancher/client/generated_global_load_balancer_health_check.go new file mode 100644 index 000000000000..a461de952bf8 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_global_load_balancer_health_check.go @@ -0,0 +1,67 @@ +package client + +const ( + GLOBAL_LOAD_BALANCER_HEALTH_CHECK_TYPE = "globalLoadBalancerHealthCheck" +) + +type GlobalLoadBalancerHealthCheck struct { + Resource + + Name string `json:"name,omitempty" yaml:"name,omitempty"` +} + +type GlobalLoadBalancerHealthCheckCollection struct { + Collection + Data []GlobalLoadBalancerHealthCheck `json:"data,omitempty"` +} + +type GlobalLoadBalancerHealthCheckClient struct { + rancherClient *RancherClient +} + +type GlobalLoadBalancerHealthCheckOperations interface { + List(opts *ListOpts) (*GlobalLoadBalancerHealthCheckCollection, error) + Create(opts *GlobalLoadBalancerHealthCheck) (*GlobalLoadBalancerHealthCheck, error) + Update(existing *GlobalLoadBalancerHealthCheck, updates interface{}) (*GlobalLoadBalancerHealthCheck, error) + ById(id string) (*GlobalLoadBalancerHealthCheck, error) + Delete(container *GlobalLoadBalancerHealthCheck) error +} + +func newGlobalLoadBalancerHealthCheckClient(rancherClient *RancherClient) *GlobalLoadBalancerHealthCheckClient { + return &GlobalLoadBalancerHealthCheckClient{ + rancherClient: rancherClient, + } +} + +func (c *GlobalLoadBalancerHealthCheckClient) Create(container *GlobalLoadBalancerHealthCheck) (*GlobalLoadBalancerHealthCheck, error) { + resp := &GlobalLoadBalancerHealthCheck{} + err := c.rancherClient.doCreate(GLOBAL_LOAD_BALANCER_HEALTH_CHECK_TYPE, container, resp) + return resp, err +} + +func (c *GlobalLoadBalancerHealthCheckClient) Update(existing *GlobalLoadBalancerHealthCheck, updates interface{}) (*GlobalLoadBalancerHealthCheck, error) { + resp := &GlobalLoadBalancerHealthCheck{} + err := c.rancherClient.doUpdate(GLOBAL_LOAD_BALANCER_HEALTH_CHECK_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *GlobalLoadBalancerHealthCheckClient) List(opts *ListOpts) (*GlobalLoadBalancerHealthCheckCollection, error) { + resp := &GlobalLoadBalancerHealthCheckCollection{} + err := c.rancherClient.doList(GLOBAL_LOAD_BALANCER_HEALTH_CHECK_TYPE, opts, resp) + return resp, err +} + +func (c *GlobalLoadBalancerHealthCheckClient) ById(id string) (*GlobalLoadBalancerHealthCheck, error) { + resp := &GlobalLoadBalancerHealthCheck{} + err := c.rancherClient.doById(GLOBAL_LOAD_BALANCER_HEALTH_CHECK_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *GlobalLoadBalancerHealthCheckClient) Delete(container *GlobalLoadBalancerHealthCheck) error { + return c.rancherClient.doResourceDelete(GLOBAL_LOAD_BALANCER_HEALTH_CHECK_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_global_load_balancer_policy.go b/vendor/github.com/rancher/go-rancher/client/generated_global_load_balancer_policy.go new file mode 100644 index 000000000000..e60890648398 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_global_load_balancer_policy.go @@ -0,0 +1,67 @@ +package client + +const ( + GLOBAL_LOAD_BALANCER_POLICY_TYPE = "globalLoadBalancerPolicy" +) + +type GlobalLoadBalancerPolicy struct { + Resource + + Name string `json:"name,omitempty" yaml:"name,omitempty"` +} + +type GlobalLoadBalancerPolicyCollection struct { + Collection + Data []GlobalLoadBalancerPolicy `json:"data,omitempty"` +} + +type GlobalLoadBalancerPolicyClient struct { + rancherClient *RancherClient +} + +type GlobalLoadBalancerPolicyOperations interface { + List(opts *ListOpts) (*GlobalLoadBalancerPolicyCollection, error) + Create(opts *GlobalLoadBalancerPolicy) (*GlobalLoadBalancerPolicy, error) + Update(existing *GlobalLoadBalancerPolicy, updates interface{}) (*GlobalLoadBalancerPolicy, error) + ById(id string) (*GlobalLoadBalancerPolicy, error) + Delete(container *GlobalLoadBalancerPolicy) error +} + +func newGlobalLoadBalancerPolicyClient(rancherClient *RancherClient) *GlobalLoadBalancerPolicyClient { + return &GlobalLoadBalancerPolicyClient{ + rancherClient: rancherClient, + } +} + +func (c *GlobalLoadBalancerPolicyClient) Create(container *GlobalLoadBalancerPolicy) (*GlobalLoadBalancerPolicy, error) { + resp := &GlobalLoadBalancerPolicy{} + err := c.rancherClient.doCreate(GLOBAL_LOAD_BALANCER_POLICY_TYPE, container, resp) + return resp, err +} + +func (c *GlobalLoadBalancerPolicyClient) Update(existing *GlobalLoadBalancerPolicy, updates interface{}) (*GlobalLoadBalancerPolicy, error) { + resp := &GlobalLoadBalancerPolicy{} + err := c.rancherClient.doUpdate(GLOBAL_LOAD_BALANCER_POLICY_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *GlobalLoadBalancerPolicyClient) List(opts *ListOpts) (*GlobalLoadBalancerPolicyCollection, error) { + resp := &GlobalLoadBalancerPolicyCollection{} + err := c.rancherClient.doList(GLOBAL_LOAD_BALANCER_POLICY_TYPE, opts, resp) + return resp, err +} + +func (c *GlobalLoadBalancerPolicyClient) ById(id string) (*GlobalLoadBalancerPolicy, error) { + resp := &GlobalLoadBalancerPolicy{} + err := c.rancherClient.doById(GLOBAL_LOAD_BALANCER_POLICY_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *GlobalLoadBalancerPolicyClient) Delete(container *GlobalLoadBalancerPolicy) error { + return c.rancherClient.doResourceDelete(GLOBAL_LOAD_BALANCER_POLICY_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_ha_config.go b/vendor/github.com/rancher/go-rancher/client/generated_ha_config.go new file mode 100644 index 000000000000..9b9d14c4ab75 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_ha_config.go @@ -0,0 +1,73 @@ +package client + +const ( + HA_CONFIG_TYPE = "haConfig" +) + +type HaConfig struct { + Resource + + ClusterSize int64 `json:"clusterSize,omitempty" yaml:"cluster_size,omitempty"` + + DbHost string `json:"dbHost,omitempty" yaml:"db_host,omitempty"` + + DbSize int64 `json:"dbSize,omitempty" yaml:"db_size,omitempty"` + + Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` +} + +type HaConfigCollection struct { + Collection + Data []HaConfig `json:"data,omitempty"` +} + +type HaConfigClient struct { + rancherClient *RancherClient +} + +type HaConfigOperations interface { + List(opts *ListOpts) (*HaConfigCollection, error) + Create(opts *HaConfig) (*HaConfig, error) + Update(existing *HaConfig, updates interface{}) (*HaConfig, error) + ById(id string) (*HaConfig, error) + Delete(container *HaConfig) error +} + +func newHaConfigClient(rancherClient *RancherClient) *HaConfigClient { + return &HaConfigClient{ + rancherClient: rancherClient, + } +} + +func (c *HaConfigClient) Create(container *HaConfig) (*HaConfig, error) { + resp := &HaConfig{} + err := c.rancherClient.doCreate(HA_CONFIG_TYPE, container, resp) + return resp, err +} + +func (c *HaConfigClient) Update(existing *HaConfig, updates interface{}) (*HaConfig, error) { + resp := &HaConfig{} + err := c.rancherClient.doUpdate(HA_CONFIG_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *HaConfigClient) List(opts *ListOpts) (*HaConfigCollection, error) { + resp := &HaConfigCollection{} + err := c.rancherClient.doList(HA_CONFIG_TYPE, opts, resp) + return resp, err +} + +func (c *HaConfigClient) ById(id string) (*HaConfig, error) { + resp := &HaConfig{} + err := c.rancherClient.doById(HA_CONFIG_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *HaConfigClient) Delete(container *HaConfig) error { + return c.rancherClient.doResourceDelete(HA_CONFIG_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_ha_config_input.go b/vendor/github.com/rancher/go-rancher/client/generated_ha_config_input.go new file mode 100644 index 000000000000..fdff3ae1c335 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_ha_config_input.go @@ -0,0 +1,97 @@ +package client + +const ( + HA_CONFIG_INPUT_TYPE = "haConfigInput" +) + +type HaConfigInput struct { + Resource + + Cert string `json:"cert,omitempty" yaml:"cert,omitempty"` + + CertChain string `json:"certChain,omitempty" yaml:"cert_chain,omitempty"` + + ClusterSize int64 `json:"clusterSize,omitempty" yaml:"cluster_size,omitempty"` + + HostRegistrationUrl string `json:"hostRegistrationUrl,omitempty" yaml:"host_registration_url,omitempty"` + + HttpEnabled bool `json:"httpEnabled,omitempty" yaml:"http_enabled,omitempty"` + + HttpPort int64 `json:"httpPort,omitempty" yaml:"http_port,omitempty"` + + HttpsPort int64 `json:"httpsPort,omitempty" yaml:"https_port,omitempty"` + + Key string `json:"key,omitempty" yaml:"key,omitempty"` + + PpHttpPort int64 `json:"ppHttpPort,omitempty" yaml:"pp_http_port,omitempty"` + + PpHttpsPort int64 `json:"ppHttpsPort,omitempty" yaml:"pp_https_port,omitempty"` + + RedisPort int64 `json:"redisPort,omitempty" yaml:"redis_port,omitempty"` + + SwarmEnabled bool `json:"swarmEnabled,omitempty" yaml:"swarm_enabled,omitempty"` + + SwarmPort int64 `json:"swarmPort,omitempty" yaml:"swarm_port,omitempty"` + + ZookeeperClientPort int64 `json:"zookeeperClientPort,omitempty" yaml:"zookeeper_client_port,omitempty"` + + ZookeeperLeaderPort int64 `json:"zookeeperLeaderPort,omitempty" yaml:"zookeeper_leader_port,omitempty"` + + ZookeeperQuorumPort int64 `json:"zookeeperQuorumPort,omitempty" yaml:"zookeeper_quorum_port,omitempty"` +} + +type HaConfigInputCollection struct { + Collection + Data []HaConfigInput `json:"data,omitempty"` +} + +type HaConfigInputClient struct { + rancherClient *RancherClient +} + +type HaConfigInputOperations interface { + List(opts *ListOpts) (*HaConfigInputCollection, error) + Create(opts *HaConfigInput) (*HaConfigInput, error) + Update(existing *HaConfigInput, updates interface{}) (*HaConfigInput, error) + ById(id string) (*HaConfigInput, error) + Delete(container *HaConfigInput) error +} + +func newHaConfigInputClient(rancherClient *RancherClient) *HaConfigInputClient { + return &HaConfigInputClient{ + rancherClient: rancherClient, + } +} + +func (c *HaConfigInputClient) Create(container *HaConfigInput) (*HaConfigInput, error) { + resp := &HaConfigInput{} + err := c.rancherClient.doCreate(HA_CONFIG_INPUT_TYPE, container, resp) + return resp, err +} + +func (c *HaConfigInputClient) Update(existing *HaConfigInput, updates interface{}) (*HaConfigInput, error) { + resp := &HaConfigInput{} + err := c.rancherClient.doUpdate(HA_CONFIG_INPUT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *HaConfigInputClient) List(opts *ListOpts) (*HaConfigInputCollection, error) { + resp := &HaConfigInputCollection{} + err := c.rancherClient.doList(HA_CONFIG_INPUT_TYPE, opts, resp) + return resp, err +} + +func (c *HaConfigInputClient) ById(id string) (*HaConfigInput, error) { + resp := &HaConfigInput{} + err := c.rancherClient.doById(HA_CONFIG_INPUT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *HaConfigInputClient) Delete(container *HaConfigInput) error { + return c.rancherClient.doResourceDelete(HA_CONFIG_INPUT_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_haproxy_config.go b/vendor/github.com/rancher/go-rancher/client/generated_haproxy_config.go new file mode 100644 index 000000000000..a1e27bcdf0d6 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_haproxy_config.go @@ -0,0 +1,69 @@ +package client + +const ( + HAPROXY_CONFIG_TYPE = "haproxyConfig" +) + +type HaproxyConfig struct { + Resource + + Defaults string `json:"defaults,omitempty" yaml:"defaults,omitempty"` + + Global string `json:"global,omitempty" yaml:"global,omitempty"` +} + +type HaproxyConfigCollection struct { + Collection + Data []HaproxyConfig `json:"data,omitempty"` +} + +type HaproxyConfigClient struct { + rancherClient *RancherClient +} + +type HaproxyConfigOperations interface { + List(opts *ListOpts) (*HaproxyConfigCollection, error) + Create(opts *HaproxyConfig) (*HaproxyConfig, error) + Update(existing *HaproxyConfig, updates interface{}) (*HaproxyConfig, error) + ById(id string) (*HaproxyConfig, error) + Delete(container *HaproxyConfig) error +} + +func newHaproxyConfigClient(rancherClient *RancherClient) *HaproxyConfigClient { + return &HaproxyConfigClient{ + rancherClient: rancherClient, + } +} + +func (c *HaproxyConfigClient) Create(container *HaproxyConfig) (*HaproxyConfig, error) { + resp := &HaproxyConfig{} + err := c.rancherClient.doCreate(HAPROXY_CONFIG_TYPE, container, resp) + return resp, err +} + +func (c *HaproxyConfigClient) Update(existing *HaproxyConfig, updates interface{}) (*HaproxyConfig, error) { + resp := &HaproxyConfig{} + err := c.rancherClient.doUpdate(HAPROXY_CONFIG_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *HaproxyConfigClient) List(opts *ListOpts) (*HaproxyConfigCollection, error) { + resp := &HaproxyConfigCollection{} + err := c.rancherClient.doList(HAPROXY_CONFIG_TYPE, opts, resp) + return resp, err +} + +func (c *HaproxyConfigClient) ById(id string) (*HaproxyConfig, error) { + resp := &HaproxyConfig{} + err := c.rancherClient.doById(HAPROXY_CONFIG_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *HaproxyConfigClient) Delete(container *HaproxyConfig) error { + return c.rancherClient.doResourceDelete(HAPROXY_CONFIG_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_healthcheck_instance_host_map.go b/vendor/github.com/rancher/go-rancher/client/generated_healthcheck_instance_host_map.go new file mode 100644 index 000000000000..6329d2f8398a --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_healthcheck_instance_host_map.go @@ -0,0 +1,119 @@ +package client + +const ( + HEALTHCHECK_INSTANCE_HOST_MAP_TYPE = "healthcheckInstanceHostMap" +) + +type HealthcheckInstanceHostMap struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"` + + HostId string `json:"hostId,omitempty" yaml:"host_id,omitempty"` + + InstanceId string `json:"instanceId,omitempty" yaml:"instance_id,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type HealthcheckInstanceHostMapCollection struct { + Collection + Data []HealthcheckInstanceHostMap `json:"data,omitempty"` +} + +type HealthcheckInstanceHostMapClient struct { + rancherClient *RancherClient +} + +type HealthcheckInstanceHostMapOperations interface { + List(opts *ListOpts) (*HealthcheckInstanceHostMapCollection, error) + Create(opts *HealthcheckInstanceHostMap) (*HealthcheckInstanceHostMap, error) + Update(existing *HealthcheckInstanceHostMap, updates interface{}) (*HealthcheckInstanceHostMap, error) + ById(id string) (*HealthcheckInstanceHostMap, error) + Delete(container *HealthcheckInstanceHostMap) error + + ActionCreate(*HealthcheckInstanceHostMap) (*HealthcheckInstanceHostMap, error) + + ActionRemove(*HealthcheckInstanceHostMap) (*HealthcheckInstanceHostMap, error) +} + +func newHealthcheckInstanceHostMapClient(rancherClient *RancherClient) *HealthcheckInstanceHostMapClient { + return &HealthcheckInstanceHostMapClient{ + rancherClient: rancherClient, + } +} + +func (c *HealthcheckInstanceHostMapClient) Create(container *HealthcheckInstanceHostMap) (*HealthcheckInstanceHostMap, error) { + resp := &HealthcheckInstanceHostMap{} + err := c.rancherClient.doCreate(HEALTHCHECK_INSTANCE_HOST_MAP_TYPE, container, resp) + return resp, err +} + +func (c *HealthcheckInstanceHostMapClient) Update(existing *HealthcheckInstanceHostMap, updates interface{}) (*HealthcheckInstanceHostMap, error) { + resp := &HealthcheckInstanceHostMap{} + err := c.rancherClient.doUpdate(HEALTHCHECK_INSTANCE_HOST_MAP_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *HealthcheckInstanceHostMapClient) List(opts *ListOpts) (*HealthcheckInstanceHostMapCollection, error) { + resp := &HealthcheckInstanceHostMapCollection{} + err := c.rancherClient.doList(HEALTHCHECK_INSTANCE_HOST_MAP_TYPE, opts, resp) + return resp, err +} + +func (c *HealthcheckInstanceHostMapClient) ById(id string) (*HealthcheckInstanceHostMap, error) { + resp := &HealthcheckInstanceHostMap{} + err := c.rancherClient.doById(HEALTHCHECK_INSTANCE_HOST_MAP_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *HealthcheckInstanceHostMapClient) Delete(container *HealthcheckInstanceHostMap) error { + return c.rancherClient.doResourceDelete(HEALTHCHECK_INSTANCE_HOST_MAP_TYPE, &container.Resource) +} + +func (c *HealthcheckInstanceHostMapClient) ActionCreate(resource *HealthcheckInstanceHostMap) (*HealthcheckInstanceHostMap, error) { + + resp := &HealthcheckInstanceHostMap{} + + err := c.rancherClient.doAction(HEALTHCHECK_INSTANCE_HOST_MAP_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *HealthcheckInstanceHostMapClient) ActionRemove(resource *HealthcheckInstanceHostMap) (*HealthcheckInstanceHostMap, error) { + + resp := &HealthcheckInstanceHostMap{} + + err := c.rancherClient.doAction(HEALTHCHECK_INSTANCE_HOST_MAP_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_host.go b/vendor/github.com/rancher/go-rancher/client/generated_host.go new file mode 100644 index 000000000000..f1ee94368827 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_host.go @@ -0,0 +1,197 @@ +package client + +const ( + HOST_TYPE = "host" +) + +type Host struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + AgentId string `json:"agentId,omitempty" yaml:"agent_id,omitempty"` + + AgentState string `json:"agentState,omitempty" yaml:"agent_state,omitempty"` + + ApiProxy string `json:"apiProxy,omitempty" yaml:"api_proxy,omitempty"` + + ComputeTotal int64 `json:"computeTotal,omitempty" yaml:"compute_total,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"` + + Info interface{} `json:"info,omitempty" yaml:"info,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Labels map[string]interface{} `json:"labels,omitempty" yaml:"labels,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + PhysicalHostId string `json:"physicalHostId,omitempty" yaml:"physical_host_id,omitempty"` + + PublicEndpoints []interface{} `json:"publicEndpoints,omitempty" yaml:"public_endpoints,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type HostCollection struct { + Collection + Data []Host `json:"data,omitempty"` +} + +type HostClient struct { + rancherClient *RancherClient +} + +type HostOperations interface { + List(opts *ListOpts) (*HostCollection, error) + Create(opts *Host) (*Host, error) + Update(existing *Host, updates interface{}) (*Host, error) + ById(id string) (*Host, error) + Delete(container *Host) error + + ActionActivate(*Host) (*Host, error) + + ActionCreate(*Host) (*Host, error) + + ActionDeactivate(*Host) (*Host, error) + + ActionDockersocket(*Host) (*HostAccess, error) + + ActionPurge(*Host) (*Host, error) + + ActionRemove(*Host) (*Host, error) + + ActionRestore(*Host) (*Host, error) + + ActionUpdate(*Host) (*Host, error) +} + +func newHostClient(rancherClient *RancherClient) *HostClient { + return &HostClient{ + rancherClient: rancherClient, + } +} + +func (c *HostClient) Create(container *Host) (*Host, error) { + resp := &Host{} + err := c.rancherClient.doCreate(HOST_TYPE, container, resp) + return resp, err +} + +func (c *HostClient) Update(existing *Host, updates interface{}) (*Host, error) { + resp := &Host{} + err := c.rancherClient.doUpdate(HOST_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *HostClient) List(opts *ListOpts) (*HostCollection, error) { + resp := &HostCollection{} + err := c.rancherClient.doList(HOST_TYPE, opts, resp) + return resp, err +} + +func (c *HostClient) ById(id string) (*Host, error) { + resp := &Host{} + err := c.rancherClient.doById(HOST_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *HostClient) Delete(container *Host) error { + return c.rancherClient.doResourceDelete(HOST_TYPE, &container.Resource) +} + +func (c *HostClient) ActionActivate(resource *Host) (*Host, error) { + + resp := &Host{} + + err := c.rancherClient.doAction(HOST_TYPE, "activate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *HostClient) ActionCreate(resource *Host) (*Host, error) { + + resp := &Host{} + + err := c.rancherClient.doAction(HOST_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *HostClient) ActionDeactivate(resource *Host) (*Host, error) { + + resp := &Host{} + + err := c.rancherClient.doAction(HOST_TYPE, "deactivate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *HostClient) ActionDockersocket(resource *Host) (*HostAccess, error) { + + resp := &HostAccess{} + + err := c.rancherClient.doAction(HOST_TYPE, "dockersocket", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *HostClient) ActionPurge(resource *Host) (*Host, error) { + + resp := &Host{} + + err := c.rancherClient.doAction(HOST_TYPE, "purge", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *HostClient) ActionRemove(resource *Host) (*Host, error) { + + resp := &Host{} + + err := c.rancherClient.doAction(HOST_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *HostClient) ActionRestore(resource *Host) (*Host, error) { + + resp := &Host{} + + err := c.rancherClient.doAction(HOST_TYPE, "restore", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *HostClient) ActionUpdate(resource *Host) (*Host, error) { + + resp := &Host{} + + err := c.rancherClient.doAction(HOST_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_host_access.go b/vendor/github.com/rancher/go-rancher/client/generated_host_access.go new file mode 100644 index 000000000000..ee4ab399220e --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_host_access.go @@ -0,0 +1,69 @@ +package client + +const ( + HOST_ACCESS_TYPE = "hostAccess" +) + +type HostAccess struct { + Resource + + Token string `json:"token,omitempty" yaml:"token,omitempty"` + + Url string `json:"url,omitempty" yaml:"url,omitempty"` +} + +type HostAccessCollection struct { + Collection + Data []HostAccess `json:"data,omitempty"` +} + +type HostAccessClient struct { + rancherClient *RancherClient +} + +type HostAccessOperations interface { + List(opts *ListOpts) (*HostAccessCollection, error) + Create(opts *HostAccess) (*HostAccess, error) + Update(existing *HostAccess, updates interface{}) (*HostAccess, error) + ById(id string) (*HostAccess, error) + Delete(container *HostAccess) error +} + +func newHostAccessClient(rancherClient *RancherClient) *HostAccessClient { + return &HostAccessClient{ + rancherClient: rancherClient, + } +} + +func (c *HostAccessClient) Create(container *HostAccess) (*HostAccess, error) { + resp := &HostAccess{} + err := c.rancherClient.doCreate(HOST_ACCESS_TYPE, container, resp) + return resp, err +} + +func (c *HostAccessClient) Update(existing *HostAccess, updates interface{}) (*HostAccess, error) { + resp := &HostAccess{} + err := c.rancherClient.doUpdate(HOST_ACCESS_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *HostAccessClient) List(opts *ListOpts) (*HostAccessCollection, error) { + resp := &HostAccessCollection{} + err := c.rancherClient.doList(HOST_ACCESS_TYPE, opts, resp) + return resp, err +} + +func (c *HostAccessClient) ById(id string) (*HostAccess, error) { + resp := &HostAccess{} + err := c.rancherClient.doById(HOST_ACCESS_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *HostAccessClient) Delete(container *HostAccess) error { + return c.rancherClient.doResourceDelete(HOST_ACCESS_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_host_api_proxy_token.go b/vendor/github.com/rancher/go-rancher/client/generated_host_api_proxy_token.go new file mode 100644 index 000000000000..e4c508a2f76e --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_host_api_proxy_token.go @@ -0,0 +1,71 @@ +package client + +const ( + HOST_API_PROXY_TOKEN_TYPE = "hostApiProxyToken" +) + +type HostApiProxyToken struct { + Resource + + ReportedUuid string `json:"reportedUuid,omitempty" yaml:"reported_uuid,omitempty"` + + Token string `json:"token,omitempty" yaml:"token,omitempty"` + + Url string `json:"url,omitempty" yaml:"url,omitempty"` +} + +type HostApiProxyTokenCollection struct { + Collection + Data []HostApiProxyToken `json:"data,omitempty"` +} + +type HostApiProxyTokenClient struct { + rancherClient *RancherClient +} + +type HostApiProxyTokenOperations interface { + List(opts *ListOpts) (*HostApiProxyTokenCollection, error) + Create(opts *HostApiProxyToken) (*HostApiProxyToken, error) + Update(existing *HostApiProxyToken, updates interface{}) (*HostApiProxyToken, error) + ById(id string) (*HostApiProxyToken, error) + Delete(container *HostApiProxyToken) error +} + +func newHostApiProxyTokenClient(rancherClient *RancherClient) *HostApiProxyTokenClient { + return &HostApiProxyTokenClient{ + rancherClient: rancherClient, + } +} + +func (c *HostApiProxyTokenClient) Create(container *HostApiProxyToken) (*HostApiProxyToken, error) { + resp := &HostApiProxyToken{} + err := c.rancherClient.doCreate(HOST_API_PROXY_TOKEN_TYPE, container, resp) + return resp, err +} + +func (c *HostApiProxyTokenClient) Update(existing *HostApiProxyToken, updates interface{}) (*HostApiProxyToken, error) { + resp := &HostApiProxyToken{} + err := c.rancherClient.doUpdate(HOST_API_PROXY_TOKEN_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *HostApiProxyTokenClient) List(opts *ListOpts) (*HostApiProxyTokenCollection, error) { + resp := &HostApiProxyTokenCollection{} + err := c.rancherClient.doList(HOST_API_PROXY_TOKEN_TYPE, opts, resp) + return resp, err +} + +func (c *HostApiProxyTokenClient) ById(id string) (*HostApiProxyToken, error) { + resp := &HostApiProxyToken{} + err := c.rancherClient.doById(HOST_API_PROXY_TOKEN_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *HostApiProxyTokenClient) Delete(container *HostApiProxyToken) error { + return c.rancherClient.doResourceDelete(HOST_API_PROXY_TOKEN_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_identity.go b/vendor/github.com/rancher/go-rancher/client/generated_identity.go new file mode 100644 index 000000000000..f78f7c765533 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_identity.go @@ -0,0 +1,83 @@ +package client + +const ( + IDENTITY_TYPE = "identity" +) + +type Identity struct { + Resource + + All string `json:"all,omitempty" yaml:"all,omitempty"` + + ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"` + + ExternalIdType string `json:"externalIdType,omitempty" yaml:"external_id_type,omitempty"` + + Login string `json:"login,omitempty" yaml:"login,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + ProfilePicture string `json:"profilePicture,omitempty" yaml:"profile_picture,omitempty"` + + ProfileUrl string `json:"profileUrl,omitempty" yaml:"profile_url,omitempty"` + + ProjectId string `json:"projectId,omitempty" yaml:"project_id,omitempty"` + + Role string `json:"role,omitempty" yaml:"role,omitempty"` +} + +type IdentityCollection struct { + Collection + Data []Identity `json:"data,omitempty"` +} + +type IdentityClient struct { + rancherClient *RancherClient +} + +type IdentityOperations interface { + List(opts *ListOpts) (*IdentityCollection, error) + Create(opts *Identity) (*Identity, error) + Update(existing *Identity, updates interface{}) (*Identity, error) + ById(id string) (*Identity, error) + Delete(container *Identity) error +} + +func newIdentityClient(rancherClient *RancherClient) *IdentityClient { + return &IdentityClient{ + rancherClient: rancherClient, + } +} + +func (c *IdentityClient) Create(container *Identity) (*Identity, error) { + resp := &Identity{} + err := c.rancherClient.doCreate(IDENTITY_TYPE, container, resp) + return resp, err +} + +func (c *IdentityClient) Update(existing *Identity, updates interface{}) (*Identity, error) { + resp := &Identity{} + err := c.rancherClient.doUpdate(IDENTITY_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *IdentityClient) List(opts *ListOpts) (*IdentityCollection, error) { + resp := &IdentityCollection{} + err := c.rancherClient.doList(IDENTITY_TYPE, opts, resp) + return resp, err +} + +func (c *IdentityClient) ById(id string) (*Identity, error) { + resp := &Identity{} + err := c.rancherClient.doById(IDENTITY_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *IdentityClient) Delete(container *Identity) error { + return c.rancherClient.doResourceDelete(IDENTITY_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_image.go b/vendor/github.com/rancher/go-rancher/client/generated_image.go new file mode 100644 index 000000000000..84d1d0ffc938 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_image.go @@ -0,0 +1,168 @@ +package client + +const ( + IMAGE_TYPE = "image" +) + +type Image struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type ImageCollection struct { + Collection + Data []Image `json:"data,omitempty"` +} + +type ImageClient struct { + rancherClient *RancherClient +} + +type ImageOperations interface { + List(opts *ListOpts) (*ImageCollection, error) + Create(opts *Image) (*Image, error) + Update(existing *Image, updates interface{}) (*Image, error) + ById(id string) (*Image, error) + Delete(container *Image) error + + ActionActivate(*Image) (*Image, error) + + ActionCreate(*Image) (*Image, error) + + ActionDeactivate(*Image) (*Image, error) + + ActionPurge(*Image) (*Image, error) + + ActionRemove(*Image) (*Image, error) + + ActionRestore(*Image) (*Image, error) + + ActionUpdate(*Image) (*Image, error) +} + +func newImageClient(rancherClient *RancherClient) *ImageClient { + return &ImageClient{ + rancherClient: rancherClient, + } +} + +func (c *ImageClient) Create(container *Image) (*Image, error) { + resp := &Image{} + err := c.rancherClient.doCreate(IMAGE_TYPE, container, resp) + return resp, err +} + +func (c *ImageClient) Update(existing *Image, updates interface{}) (*Image, error) { + resp := &Image{} + err := c.rancherClient.doUpdate(IMAGE_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ImageClient) List(opts *ListOpts) (*ImageCollection, error) { + resp := &ImageCollection{} + err := c.rancherClient.doList(IMAGE_TYPE, opts, resp) + return resp, err +} + +func (c *ImageClient) ById(id string) (*Image, error) { + resp := &Image{} + err := c.rancherClient.doById(IMAGE_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ImageClient) Delete(container *Image) error { + return c.rancherClient.doResourceDelete(IMAGE_TYPE, &container.Resource) +} + +func (c *ImageClient) ActionActivate(resource *Image) (*Image, error) { + + resp := &Image{} + + err := c.rancherClient.doAction(IMAGE_TYPE, "activate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ImageClient) ActionCreate(resource *Image) (*Image, error) { + + resp := &Image{} + + err := c.rancherClient.doAction(IMAGE_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ImageClient) ActionDeactivate(resource *Image) (*Image, error) { + + resp := &Image{} + + err := c.rancherClient.doAction(IMAGE_TYPE, "deactivate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ImageClient) ActionPurge(resource *Image) (*Image, error) { + + resp := &Image{} + + err := c.rancherClient.doAction(IMAGE_TYPE, "purge", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ImageClient) ActionRemove(resource *Image) (*Image, error) { + + resp := &Image{} + + err := c.rancherClient.doAction(IMAGE_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ImageClient) ActionRestore(resource *Image) (*Image, error) { + + resp := &Image{} + + err := c.rancherClient.doAction(IMAGE_TYPE, "restore", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ImageClient) ActionUpdate(resource *Image) (*Image, error) { + + resp := &Image{} + + err := c.rancherClient.doAction(IMAGE_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_in_service_upgrade_strategy.go b/vendor/github.com/rancher/go-rancher/client/generated_in_service_upgrade_strategy.go new file mode 100644 index 000000000000..a92885793ce6 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_in_service_upgrade_strategy.go @@ -0,0 +1,79 @@ +package client + +const ( + IN_SERVICE_UPGRADE_STRATEGY_TYPE = "inServiceUpgradeStrategy" +) + +type InServiceUpgradeStrategy struct { + Resource + + BatchSize int64 `json:"batchSize,omitempty" yaml:"batch_size,omitempty"` + + IntervalMillis int64 `json:"intervalMillis,omitempty" yaml:"interval_millis,omitempty"` + + LaunchConfig *LaunchConfig `json:"launchConfig,omitempty" yaml:"launch_config,omitempty"` + + PreviousLaunchConfig *LaunchConfig `json:"previousLaunchConfig,omitempty" yaml:"previous_launch_config,omitempty"` + + PreviousSecondaryLaunchConfigs []interface{} `json:"previousSecondaryLaunchConfigs,omitempty" yaml:"previous_secondary_launch_configs,omitempty"` + + SecondaryLaunchConfigs []interface{} `json:"secondaryLaunchConfigs,omitempty" yaml:"secondary_launch_configs,omitempty"` + + StartFirst bool `json:"startFirst,omitempty" yaml:"start_first,omitempty"` +} + +type InServiceUpgradeStrategyCollection struct { + Collection + Data []InServiceUpgradeStrategy `json:"data,omitempty"` +} + +type InServiceUpgradeStrategyClient struct { + rancherClient *RancherClient +} + +type InServiceUpgradeStrategyOperations interface { + List(opts *ListOpts) (*InServiceUpgradeStrategyCollection, error) + Create(opts *InServiceUpgradeStrategy) (*InServiceUpgradeStrategy, error) + Update(existing *InServiceUpgradeStrategy, updates interface{}) (*InServiceUpgradeStrategy, error) + ById(id string) (*InServiceUpgradeStrategy, error) + Delete(container *InServiceUpgradeStrategy) error +} + +func newInServiceUpgradeStrategyClient(rancherClient *RancherClient) *InServiceUpgradeStrategyClient { + return &InServiceUpgradeStrategyClient{ + rancherClient: rancherClient, + } +} + +func (c *InServiceUpgradeStrategyClient) Create(container *InServiceUpgradeStrategy) (*InServiceUpgradeStrategy, error) { + resp := &InServiceUpgradeStrategy{} + err := c.rancherClient.doCreate(IN_SERVICE_UPGRADE_STRATEGY_TYPE, container, resp) + return resp, err +} + +func (c *InServiceUpgradeStrategyClient) Update(existing *InServiceUpgradeStrategy, updates interface{}) (*InServiceUpgradeStrategy, error) { + resp := &InServiceUpgradeStrategy{} + err := c.rancherClient.doUpdate(IN_SERVICE_UPGRADE_STRATEGY_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *InServiceUpgradeStrategyClient) List(opts *ListOpts) (*InServiceUpgradeStrategyCollection, error) { + resp := &InServiceUpgradeStrategyCollection{} + err := c.rancherClient.doList(IN_SERVICE_UPGRADE_STRATEGY_TYPE, opts, resp) + return resp, err +} + +func (c *InServiceUpgradeStrategyClient) ById(id string) (*InServiceUpgradeStrategy, error) { + resp := &InServiceUpgradeStrategy{} + err := c.rancherClient.doById(IN_SERVICE_UPGRADE_STRATEGY_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *InServiceUpgradeStrategyClient) Delete(container *InServiceUpgradeStrategy) error { + return c.rancherClient.doResourceDelete(IN_SERVICE_UPGRADE_STRATEGY_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_instance.go b/vendor/github.com/rancher/go-rancher/client/generated_instance.go new file mode 100644 index 000000000000..f43f6bd57b75 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_instance.go @@ -0,0 +1,271 @@ +package client + +const ( + INSTANCE_TYPE = "instance" +) + +type Instance struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"` + + HostId string `json:"hostId,omitempty" yaml:"host_id,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type InstanceCollection struct { + Collection + Data []Instance `json:"data,omitempty"` +} + +type InstanceClient struct { + rancherClient *RancherClient +} + +type InstanceOperations interface { + List(opts *ListOpts) (*InstanceCollection, error) + Create(opts *Instance) (*Instance, error) + Update(existing *Instance, updates interface{}) (*Instance, error) + ById(id string) (*Instance, error) + Delete(container *Instance) error + + ActionAllocate(*Instance) (*Instance, error) + + ActionConsole(*Instance, *InstanceConsoleInput) (*InstanceConsole, error) + + ActionCreate(*Instance) (*Instance, error) + + ActionDeallocate(*Instance) (*Instance, error) + + ActionError(*Instance) (*Instance, error) + + ActionMigrate(*Instance) (*Instance, error) + + ActionPurge(*Instance) (*Instance, error) + + ActionRemove(*Instance) (*Instance, error) + + ActionRestart(*Instance) (*Instance, error) + + ActionRestore(*Instance) (*Instance, error) + + ActionStart(*Instance) (*Instance, error) + + ActionStop(*Instance, *InstanceStop) (*Instance, error) + + ActionUpdate(*Instance) (*Instance, error) + + ActionUpdatehealthy(*Instance) (*Instance, error) + + ActionUpdatereinitializing(*Instance) (*Instance, error) + + ActionUpdateunhealthy(*Instance) (*Instance, error) +} + +func newInstanceClient(rancherClient *RancherClient) *InstanceClient { + return &InstanceClient{ + rancherClient: rancherClient, + } +} + +func (c *InstanceClient) Create(container *Instance) (*Instance, error) { + resp := &Instance{} + err := c.rancherClient.doCreate(INSTANCE_TYPE, container, resp) + return resp, err +} + +func (c *InstanceClient) Update(existing *Instance, updates interface{}) (*Instance, error) { + resp := &Instance{} + err := c.rancherClient.doUpdate(INSTANCE_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *InstanceClient) List(opts *ListOpts) (*InstanceCollection, error) { + resp := &InstanceCollection{} + err := c.rancherClient.doList(INSTANCE_TYPE, opts, resp) + return resp, err +} + +func (c *InstanceClient) ById(id string) (*Instance, error) { + resp := &Instance{} + err := c.rancherClient.doById(INSTANCE_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *InstanceClient) Delete(container *Instance) error { + return c.rancherClient.doResourceDelete(INSTANCE_TYPE, &container.Resource) +} + +func (c *InstanceClient) ActionAllocate(resource *Instance) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(INSTANCE_TYPE, "allocate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *InstanceClient) ActionConsole(resource *Instance, input *InstanceConsoleInput) (*InstanceConsole, error) { + + resp := &InstanceConsole{} + + err := c.rancherClient.doAction(INSTANCE_TYPE, "console", &resource.Resource, input, resp) + + return resp, err +} + +func (c *InstanceClient) ActionCreate(resource *Instance) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(INSTANCE_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *InstanceClient) ActionDeallocate(resource *Instance) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(INSTANCE_TYPE, "deallocate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *InstanceClient) ActionError(resource *Instance) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(INSTANCE_TYPE, "error", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *InstanceClient) ActionMigrate(resource *Instance) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(INSTANCE_TYPE, "migrate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *InstanceClient) ActionPurge(resource *Instance) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(INSTANCE_TYPE, "purge", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *InstanceClient) ActionRemove(resource *Instance) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(INSTANCE_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *InstanceClient) ActionRestart(resource *Instance) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(INSTANCE_TYPE, "restart", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *InstanceClient) ActionRestore(resource *Instance) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(INSTANCE_TYPE, "restore", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *InstanceClient) ActionStart(resource *Instance) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(INSTANCE_TYPE, "start", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *InstanceClient) ActionStop(resource *Instance, input *InstanceStop) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(INSTANCE_TYPE, "stop", &resource.Resource, input, resp) + + return resp, err +} + +func (c *InstanceClient) ActionUpdate(resource *Instance) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(INSTANCE_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *InstanceClient) ActionUpdatehealthy(resource *Instance) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(INSTANCE_TYPE, "updatehealthy", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *InstanceClient) ActionUpdatereinitializing(resource *Instance) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(INSTANCE_TYPE, "updatereinitializing", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *InstanceClient) ActionUpdateunhealthy(resource *Instance) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(INSTANCE_TYPE, "updateunhealthy", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_instance_console.go b/vendor/github.com/rancher/go-rancher/client/generated_instance_console.go new file mode 100644 index 000000000000..bf38cb4c1c99 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_instance_console.go @@ -0,0 +1,71 @@ +package client + +const ( + INSTANCE_CONSOLE_TYPE = "instanceConsole" +) + +type InstanceConsole struct { + Resource + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Password string `json:"password,omitempty" yaml:"password,omitempty"` + + Url string `json:"url,omitempty" yaml:"url,omitempty"` +} + +type InstanceConsoleCollection struct { + Collection + Data []InstanceConsole `json:"data,omitempty"` +} + +type InstanceConsoleClient struct { + rancherClient *RancherClient +} + +type InstanceConsoleOperations interface { + List(opts *ListOpts) (*InstanceConsoleCollection, error) + Create(opts *InstanceConsole) (*InstanceConsole, error) + Update(existing *InstanceConsole, updates interface{}) (*InstanceConsole, error) + ById(id string) (*InstanceConsole, error) + Delete(container *InstanceConsole) error +} + +func newInstanceConsoleClient(rancherClient *RancherClient) *InstanceConsoleClient { + return &InstanceConsoleClient{ + rancherClient: rancherClient, + } +} + +func (c *InstanceConsoleClient) Create(container *InstanceConsole) (*InstanceConsole, error) { + resp := &InstanceConsole{} + err := c.rancherClient.doCreate(INSTANCE_CONSOLE_TYPE, container, resp) + return resp, err +} + +func (c *InstanceConsoleClient) Update(existing *InstanceConsole, updates interface{}) (*InstanceConsole, error) { + resp := &InstanceConsole{} + err := c.rancherClient.doUpdate(INSTANCE_CONSOLE_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *InstanceConsoleClient) List(opts *ListOpts) (*InstanceConsoleCollection, error) { + resp := &InstanceConsoleCollection{} + err := c.rancherClient.doList(INSTANCE_CONSOLE_TYPE, opts, resp) + return resp, err +} + +func (c *InstanceConsoleClient) ById(id string) (*InstanceConsole, error) { + resp := &InstanceConsole{} + err := c.rancherClient.doById(INSTANCE_CONSOLE_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *InstanceConsoleClient) Delete(container *InstanceConsole) error { + return c.rancherClient.doResourceDelete(INSTANCE_CONSOLE_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_instance_console_input.go b/vendor/github.com/rancher/go-rancher/client/generated_instance_console_input.go new file mode 100644 index 000000000000..11a126f79584 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_instance_console_input.go @@ -0,0 +1,65 @@ +package client + +const ( + INSTANCE_CONSOLE_INPUT_TYPE = "instanceConsoleInput" +) + +type InstanceConsoleInput struct { + Resource +} + +type InstanceConsoleInputCollection struct { + Collection + Data []InstanceConsoleInput `json:"data,omitempty"` +} + +type InstanceConsoleInputClient struct { + rancherClient *RancherClient +} + +type InstanceConsoleInputOperations interface { + List(opts *ListOpts) (*InstanceConsoleInputCollection, error) + Create(opts *InstanceConsoleInput) (*InstanceConsoleInput, error) + Update(existing *InstanceConsoleInput, updates interface{}) (*InstanceConsoleInput, error) + ById(id string) (*InstanceConsoleInput, error) + Delete(container *InstanceConsoleInput) error +} + +func newInstanceConsoleInputClient(rancherClient *RancherClient) *InstanceConsoleInputClient { + return &InstanceConsoleInputClient{ + rancherClient: rancherClient, + } +} + +func (c *InstanceConsoleInputClient) Create(container *InstanceConsoleInput) (*InstanceConsoleInput, error) { + resp := &InstanceConsoleInput{} + err := c.rancherClient.doCreate(INSTANCE_CONSOLE_INPUT_TYPE, container, resp) + return resp, err +} + +func (c *InstanceConsoleInputClient) Update(existing *InstanceConsoleInput, updates interface{}) (*InstanceConsoleInput, error) { + resp := &InstanceConsoleInput{} + err := c.rancherClient.doUpdate(INSTANCE_CONSOLE_INPUT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *InstanceConsoleInputClient) List(opts *ListOpts) (*InstanceConsoleInputCollection, error) { + resp := &InstanceConsoleInputCollection{} + err := c.rancherClient.doList(INSTANCE_CONSOLE_INPUT_TYPE, opts, resp) + return resp, err +} + +func (c *InstanceConsoleInputClient) ById(id string) (*InstanceConsoleInput, error) { + resp := &InstanceConsoleInput{} + err := c.rancherClient.doById(INSTANCE_CONSOLE_INPUT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *InstanceConsoleInputClient) Delete(container *InstanceConsoleInput) error { + return c.rancherClient.doResourceDelete(INSTANCE_CONSOLE_INPUT_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_instance_health_check.go b/vendor/github.com/rancher/go-rancher/client/generated_instance_health_check.go new file mode 100644 index 000000000000..305798bf857a --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_instance_health_check.go @@ -0,0 +1,87 @@ +package client + +const ( + INSTANCE_HEALTH_CHECK_TYPE = "instanceHealthCheck" +) + +type InstanceHealthCheck struct { + Resource + + HealthyThreshold int64 `json:"healthyThreshold,omitempty" yaml:"healthy_threshold,omitempty"` + + InitializingTimeout int64 `json:"initializingTimeout,omitempty" yaml:"initializing_timeout,omitempty"` + + Interval int64 `json:"interval,omitempty" yaml:"interval,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + Port int64 `json:"port,omitempty" yaml:"port,omitempty"` + + RecreateOnQuorumStrategyConfig *RecreateOnQuorumStrategyConfig `json:"recreateOnQuorumStrategyConfig,omitempty" yaml:"recreate_on_quorum_strategy_config,omitempty"` + + ReinitializingTimeout int64 `json:"reinitializingTimeout,omitempty" yaml:"reinitializing_timeout,omitempty"` + + RequestLine string `json:"requestLine,omitempty" yaml:"request_line,omitempty"` + + ResponseTimeout int64 `json:"responseTimeout,omitempty" yaml:"response_timeout,omitempty"` + + Strategy string `json:"strategy,omitempty" yaml:"strategy,omitempty"` + + UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty" yaml:"unhealthy_threshold,omitempty"` +} + +type InstanceHealthCheckCollection struct { + Collection + Data []InstanceHealthCheck `json:"data,omitempty"` +} + +type InstanceHealthCheckClient struct { + rancherClient *RancherClient +} + +type InstanceHealthCheckOperations interface { + List(opts *ListOpts) (*InstanceHealthCheckCollection, error) + Create(opts *InstanceHealthCheck) (*InstanceHealthCheck, error) + Update(existing *InstanceHealthCheck, updates interface{}) (*InstanceHealthCheck, error) + ById(id string) (*InstanceHealthCheck, error) + Delete(container *InstanceHealthCheck) error +} + +func newInstanceHealthCheckClient(rancherClient *RancherClient) *InstanceHealthCheckClient { + return &InstanceHealthCheckClient{ + rancherClient: rancherClient, + } +} + +func (c *InstanceHealthCheckClient) Create(container *InstanceHealthCheck) (*InstanceHealthCheck, error) { + resp := &InstanceHealthCheck{} + err := c.rancherClient.doCreate(INSTANCE_HEALTH_CHECK_TYPE, container, resp) + return resp, err +} + +func (c *InstanceHealthCheckClient) Update(existing *InstanceHealthCheck, updates interface{}) (*InstanceHealthCheck, error) { + resp := &InstanceHealthCheck{} + err := c.rancherClient.doUpdate(INSTANCE_HEALTH_CHECK_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *InstanceHealthCheckClient) List(opts *ListOpts) (*InstanceHealthCheckCollection, error) { + resp := &InstanceHealthCheckCollection{} + err := c.rancherClient.doList(INSTANCE_HEALTH_CHECK_TYPE, opts, resp) + return resp, err +} + +func (c *InstanceHealthCheckClient) ById(id string) (*InstanceHealthCheck, error) { + resp := &InstanceHealthCheck{} + err := c.rancherClient.doById(INSTANCE_HEALTH_CHECK_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *InstanceHealthCheckClient) Delete(container *InstanceHealthCheck) error { + return c.rancherClient.doResourceDelete(INSTANCE_HEALTH_CHECK_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_instance_link.go b/vendor/github.com/rancher/go-rancher/client/generated_instance_link.go new file mode 100644 index 000000000000..5e7146514f2d --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_instance_link.go @@ -0,0 +1,176 @@ +package client + +const ( + INSTANCE_LINK_TYPE = "instanceLink" +) + +type InstanceLink struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + InstanceId string `json:"instanceId,omitempty" yaml:"instance_id,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + LinkName string `json:"linkName,omitempty" yaml:"link_name,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + Ports []interface{} `json:"ports,omitempty" yaml:"ports,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + TargetInstanceId string `json:"targetInstanceId,omitempty" yaml:"target_instance_id,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type InstanceLinkCollection struct { + Collection + Data []InstanceLink `json:"data,omitempty"` +} + +type InstanceLinkClient struct { + rancherClient *RancherClient +} + +type InstanceLinkOperations interface { + List(opts *ListOpts) (*InstanceLinkCollection, error) + Create(opts *InstanceLink) (*InstanceLink, error) + Update(existing *InstanceLink, updates interface{}) (*InstanceLink, error) + ById(id string) (*InstanceLink, error) + Delete(container *InstanceLink) error + + ActionActivate(*InstanceLink) (*InstanceLink, error) + + ActionCreate(*InstanceLink) (*InstanceLink, error) + + ActionDeactivate(*InstanceLink) (*InstanceLink, error) + + ActionPurge(*InstanceLink) (*InstanceLink, error) + + ActionRemove(*InstanceLink) (*InstanceLink, error) + + ActionRestore(*InstanceLink) (*InstanceLink, error) + + ActionUpdate(*InstanceLink) (*InstanceLink, error) +} + +func newInstanceLinkClient(rancherClient *RancherClient) *InstanceLinkClient { + return &InstanceLinkClient{ + rancherClient: rancherClient, + } +} + +func (c *InstanceLinkClient) Create(container *InstanceLink) (*InstanceLink, error) { + resp := &InstanceLink{} + err := c.rancherClient.doCreate(INSTANCE_LINK_TYPE, container, resp) + return resp, err +} + +func (c *InstanceLinkClient) Update(existing *InstanceLink, updates interface{}) (*InstanceLink, error) { + resp := &InstanceLink{} + err := c.rancherClient.doUpdate(INSTANCE_LINK_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *InstanceLinkClient) List(opts *ListOpts) (*InstanceLinkCollection, error) { + resp := &InstanceLinkCollection{} + err := c.rancherClient.doList(INSTANCE_LINK_TYPE, opts, resp) + return resp, err +} + +func (c *InstanceLinkClient) ById(id string) (*InstanceLink, error) { + resp := &InstanceLink{} + err := c.rancherClient.doById(INSTANCE_LINK_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *InstanceLinkClient) Delete(container *InstanceLink) error { + return c.rancherClient.doResourceDelete(INSTANCE_LINK_TYPE, &container.Resource) +} + +func (c *InstanceLinkClient) ActionActivate(resource *InstanceLink) (*InstanceLink, error) { + + resp := &InstanceLink{} + + err := c.rancherClient.doAction(INSTANCE_LINK_TYPE, "activate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *InstanceLinkClient) ActionCreate(resource *InstanceLink) (*InstanceLink, error) { + + resp := &InstanceLink{} + + err := c.rancherClient.doAction(INSTANCE_LINK_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *InstanceLinkClient) ActionDeactivate(resource *InstanceLink) (*InstanceLink, error) { + + resp := &InstanceLink{} + + err := c.rancherClient.doAction(INSTANCE_LINK_TYPE, "deactivate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *InstanceLinkClient) ActionPurge(resource *InstanceLink) (*InstanceLink, error) { + + resp := &InstanceLink{} + + err := c.rancherClient.doAction(INSTANCE_LINK_TYPE, "purge", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *InstanceLinkClient) ActionRemove(resource *InstanceLink) (*InstanceLink, error) { + + resp := &InstanceLink{} + + err := c.rancherClient.doAction(INSTANCE_LINK_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *InstanceLinkClient) ActionRestore(resource *InstanceLink) (*InstanceLink, error) { + + resp := &InstanceLink{} + + err := c.rancherClient.doAction(INSTANCE_LINK_TYPE, "restore", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *InstanceLinkClient) ActionUpdate(resource *InstanceLink) (*InstanceLink, error) { + + resp := &InstanceLink{} + + err := c.rancherClient.doAction(INSTANCE_LINK_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_instance_stop.go b/vendor/github.com/rancher/go-rancher/client/generated_instance_stop.go new file mode 100644 index 000000000000..d034bd615722 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_instance_stop.go @@ -0,0 +1,69 @@ +package client + +const ( + INSTANCE_STOP_TYPE = "instanceStop" +) + +type InstanceStop struct { + Resource + + Remove bool `json:"remove,omitempty" yaml:"remove,omitempty"` + + Timeout int64 `json:"timeout,omitempty" yaml:"timeout,omitempty"` +} + +type InstanceStopCollection struct { + Collection + Data []InstanceStop `json:"data,omitempty"` +} + +type InstanceStopClient struct { + rancherClient *RancherClient +} + +type InstanceStopOperations interface { + List(opts *ListOpts) (*InstanceStopCollection, error) + Create(opts *InstanceStop) (*InstanceStop, error) + Update(existing *InstanceStop, updates interface{}) (*InstanceStop, error) + ById(id string) (*InstanceStop, error) + Delete(container *InstanceStop) error +} + +func newInstanceStopClient(rancherClient *RancherClient) *InstanceStopClient { + return &InstanceStopClient{ + rancherClient: rancherClient, + } +} + +func (c *InstanceStopClient) Create(container *InstanceStop) (*InstanceStop, error) { + resp := &InstanceStop{} + err := c.rancherClient.doCreate(INSTANCE_STOP_TYPE, container, resp) + return resp, err +} + +func (c *InstanceStopClient) Update(existing *InstanceStop, updates interface{}) (*InstanceStop, error) { + resp := &InstanceStop{} + err := c.rancherClient.doUpdate(INSTANCE_STOP_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *InstanceStopClient) List(opts *ListOpts) (*InstanceStopCollection, error) { + resp := &InstanceStopCollection{} + err := c.rancherClient.doList(INSTANCE_STOP_TYPE, opts, resp) + return resp, err +} + +func (c *InstanceStopClient) ById(id string) (*InstanceStop, error) { + resp := &InstanceStop{} + err := c.rancherClient.doById(INSTANCE_STOP_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *InstanceStopClient) Delete(container *InstanceStop) error { + return c.rancherClient.doResourceDelete(INSTANCE_STOP_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_ip_address.go b/vendor/github.com/rancher/go-rancher/client/generated_ip_address.go new file mode 100644 index 000000000000..ba7a0f39ae7e --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_ip_address.go @@ -0,0 +1,183 @@ +package client + +const ( + IP_ADDRESS_TYPE = "ipAddress" +) + +type IpAddress struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Address string `json:"address,omitempty" yaml:"address,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + NetworkId string `json:"networkId,omitempty" yaml:"network_id,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type IpAddressCollection struct { + Collection + Data []IpAddress `json:"data,omitempty"` +} + +type IpAddressClient struct { + rancherClient *RancherClient +} + +type IpAddressOperations interface { + List(opts *ListOpts) (*IpAddressCollection, error) + Create(opts *IpAddress) (*IpAddress, error) + Update(existing *IpAddress, updates interface{}) (*IpAddress, error) + ById(id string) (*IpAddress, error) + Delete(container *IpAddress) error + + ActionActivate(*IpAddress) (*IpAddress, error) + + ActionCreate(*IpAddress) (*IpAddress, error) + + ActionDeactivate(*IpAddress) (*IpAddress, error) + + ActionDisassociate(*IpAddress) (*IpAddress, error) + + ActionPurge(*IpAddress) (*IpAddress, error) + + ActionRemove(*IpAddress) (*IpAddress, error) + + ActionRestore(*IpAddress) (*IpAddress, error) + + ActionUpdate(*IpAddress) (*IpAddress, error) +} + +func newIpAddressClient(rancherClient *RancherClient) *IpAddressClient { + return &IpAddressClient{ + rancherClient: rancherClient, + } +} + +func (c *IpAddressClient) Create(container *IpAddress) (*IpAddress, error) { + resp := &IpAddress{} + err := c.rancherClient.doCreate(IP_ADDRESS_TYPE, container, resp) + return resp, err +} + +func (c *IpAddressClient) Update(existing *IpAddress, updates interface{}) (*IpAddress, error) { + resp := &IpAddress{} + err := c.rancherClient.doUpdate(IP_ADDRESS_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *IpAddressClient) List(opts *ListOpts) (*IpAddressCollection, error) { + resp := &IpAddressCollection{} + err := c.rancherClient.doList(IP_ADDRESS_TYPE, opts, resp) + return resp, err +} + +func (c *IpAddressClient) ById(id string) (*IpAddress, error) { + resp := &IpAddress{} + err := c.rancherClient.doById(IP_ADDRESS_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *IpAddressClient) Delete(container *IpAddress) error { + return c.rancherClient.doResourceDelete(IP_ADDRESS_TYPE, &container.Resource) +} + +func (c *IpAddressClient) ActionActivate(resource *IpAddress) (*IpAddress, error) { + + resp := &IpAddress{} + + err := c.rancherClient.doAction(IP_ADDRESS_TYPE, "activate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *IpAddressClient) ActionCreate(resource *IpAddress) (*IpAddress, error) { + + resp := &IpAddress{} + + err := c.rancherClient.doAction(IP_ADDRESS_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *IpAddressClient) ActionDeactivate(resource *IpAddress) (*IpAddress, error) { + + resp := &IpAddress{} + + err := c.rancherClient.doAction(IP_ADDRESS_TYPE, "deactivate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *IpAddressClient) ActionDisassociate(resource *IpAddress) (*IpAddress, error) { + + resp := &IpAddress{} + + err := c.rancherClient.doAction(IP_ADDRESS_TYPE, "disassociate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *IpAddressClient) ActionPurge(resource *IpAddress) (*IpAddress, error) { + + resp := &IpAddress{} + + err := c.rancherClient.doAction(IP_ADDRESS_TYPE, "purge", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *IpAddressClient) ActionRemove(resource *IpAddress) (*IpAddress, error) { + + resp := &IpAddress{} + + err := c.rancherClient.doAction(IP_ADDRESS_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *IpAddressClient) ActionRestore(resource *IpAddress) (*IpAddress, error) { + + resp := &IpAddress{} + + err := c.rancherClient.doAction(IP_ADDRESS_TYPE, "restore", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *IpAddressClient) ActionUpdate(resource *IpAddress) (*IpAddress, error) { + + resp := &IpAddress{} + + err := c.rancherClient.doAction(IP_ADDRESS_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_ip_address_associate_input.go b/vendor/github.com/rancher/go-rancher/client/generated_ip_address_associate_input.go new file mode 100644 index 000000000000..2184ae9a41e8 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_ip_address_associate_input.go @@ -0,0 +1,67 @@ +package client + +const ( + IP_ADDRESS_ASSOCIATE_INPUT_TYPE = "ipAddressAssociateInput" +) + +type IpAddressAssociateInput struct { + Resource + + IpAddressId string `json:"ipAddressId,omitempty" yaml:"ip_address_id,omitempty"` +} + +type IpAddressAssociateInputCollection struct { + Collection + Data []IpAddressAssociateInput `json:"data,omitempty"` +} + +type IpAddressAssociateInputClient struct { + rancherClient *RancherClient +} + +type IpAddressAssociateInputOperations interface { + List(opts *ListOpts) (*IpAddressAssociateInputCollection, error) + Create(opts *IpAddressAssociateInput) (*IpAddressAssociateInput, error) + Update(existing *IpAddressAssociateInput, updates interface{}) (*IpAddressAssociateInput, error) + ById(id string) (*IpAddressAssociateInput, error) + Delete(container *IpAddressAssociateInput) error +} + +func newIpAddressAssociateInputClient(rancherClient *RancherClient) *IpAddressAssociateInputClient { + return &IpAddressAssociateInputClient{ + rancherClient: rancherClient, + } +} + +func (c *IpAddressAssociateInputClient) Create(container *IpAddressAssociateInput) (*IpAddressAssociateInput, error) { + resp := &IpAddressAssociateInput{} + err := c.rancherClient.doCreate(IP_ADDRESS_ASSOCIATE_INPUT_TYPE, container, resp) + return resp, err +} + +func (c *IpAddressAssociateInputClient) Update(existing *IpAddressAssociateInput, updates interface{}) (*IpAddressAssociateInput, error) { + resp := &IpAddressAssociateInput{} + err := c.rancherClient.doUpdate(IP_ADDRESS_ASSOCIATE_INPUT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *IpAddressAssociateInputClient) List(opts *ListOpts) (*IpAddressAssociateInputCollection, error) { + resp := &IpAddressAssociateInputCollection{} + err := c.rancherClient.doList(IP_ADDRESS_ASSOCIATE_INPUT_TYPE, opts, resp) + return resp, err +} + +func (c *IpAddressAssociateInputClient) ById(id string) (*IpAddressAssociateInput, error) { + resp := &IpAddressAssociateInput{} + err := c.rancherClient.doById(IP_ADDRESS_ASSOCIATE_INPUT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *IpAddressAssociateInputClient) Delete(container *IpAddressAssociateInput) error { + return c.rancherClient.doResourceDelete(IP_ADDRESS_ASSOCIATE_INPUT_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_kubernetes_service.go b/vendor/github.com/rancher/go-rancher/client/generated_kubernetes_service.go new file mode 100644 index 000000000000..a7e6f2a1c720 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_kubernetes_service.go @@ -0,0 +1,257 @@ +package client + +const ( + KUBERNETES_SERVICE_TYPE = "kubernetesService" +) + +type KubernetesService struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + EnvironmentId string `json:"environmentId,omitempty" yaml:"environment_id,omitempty"` + + ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"` + + HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + SelectorContainer string `json:"selectorContainer,omitempty" yaml:"selector_container,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Template interface{} `json:"template,omitempty" yaml:"template,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + + Vip string `json:"vip,omitempty" yaml:"vip,omitempty"` +} + +type KubernetesServiceCollection struct { + Collection + Data []KubernetesService `json:"data,omitempty"` +} + +type KubernetesServiceClient struct { + rancherClient *RancherClient +} + +type KubernetesServiceOperations interface { + List(opts *ListOpts) (*KubernetesServiceCollection, error) + Create(opts *KubernetesService) (*KubernetesService, error) + Update(existing *KubernetesService, updates interface{}) (*KubernetesService, error) + ById(id string) (*KubernetesService, error) + Delete(container *KubernetesService) error + + ActionActivate(*KubernetesService) (*Service, error) + + ActionAddservicelink(*KubernetesService, *AddRemoveServiceLinkInput) (*Service, error) + + ActionCancelrollback(*KubernetesService) (*Service, error) + + ActionCancelupgrade(*KubernetesService) (*Service, error) + + ActionCreate(*KubernetesService) (*Service, error) + + ActionDeactivate(*KubernetesService) (*Service, error) + + ActionFinishupgrade(*KubernetesService) (*Service, error) + + ActionRemove(*KubernetesService) (*Service, error) + + ActionRemoveservicelink(*KubernetesService, *AddRemoveServiceLinkInput) (*Service, error) + + ActionRestart(*KubernetesService, *ServiceRestart) (*Service, error) + + ActionRollback(*KubernetesService) (*Service, error) + + ActionSetservicelinks(*KubernetesService, *SetServiceLinksInput) (*Service, error) + + ActionUpdate(*KubernetesService) (*Service, error) + + ActionUpgrade(*KubernetesService, *ServiceUpgrade) (*Service, error) +} + +func newKubernetesServiceClient(rancherClient *RancherClient) *KubernetesServiceClient { + return &KubernetesServiceClient{ + rancherClient: rancherClient, + } +} + +func (c *KubernetesServiceClient) Create(container *KubernetesService) (*KubernetesService, error) { + resp := &KubernetesService{} + err := c.rancherClient.doCreate(KUBERNETES_SERVICE_TYPE, container, resp) + return resp, err +} + +func (c *KubernetesServiceClient) Update(existing *KubernetesService, updates interface{}) (*KubernetesService, error) { + resp := &KubernetesService{} + err := c.rancherClient.doUpdate(KUBERNETES_SERVICE_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *KubernetesServiceClient) List(opts *ListOpts) (*KubernetesServiceCollection, error) { + resp := &KubernetesServiceCollection{} + err := c.rancherClient.doList(KUBERNETES_SERVICE_TYPE, opts, resp) + return resp, err +} + +func (c *KubernetesServiceClient) ById(id string) (*KubernetesService, error) { + resp := &KubernetesService{} + err := c.rancherClient.doById(KUBERNETES_SERVICE_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *KubernetesServiceClient) Delete(container *KubernetesService) error { + return c.rancherClient.doResourceDelete(KUBERNETES_SERVICE_TYPE, &container.Resource) +} + +func (c *KubernetesServiceClient) ActionActivate(resource *KubernetesService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "activate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *KubernetesServiceClient) ActionAddservicelink(resource *KubernetesService, input *AddRemoveServiceLinkInput) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "addservicelink", &resource.Resource, input, resp) + + return resp, err +} + +func (c *KubernetesServiceClient) ActionCancelrollback(resource *KubernetesService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "cancelrollback", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *KubernetesServiceClient) ActionCancelupgrade(resource *KubernetesService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "cancelupgrade", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *KubernetesServiceClient) ActionCreate(resource *KubernetesService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *KubernetesServiceClient) ActionDeactivate(resource *KubernetesService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "deactivate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *KubernetesServiceClient) ActionFinishupgrade(resource *KubernetesService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "finishupgrade", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *KubernetesServiceClient) ActionRemove(resource *KubernetesService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *KubernetesServiceClient) ActionRemoveservicelink(resource *KubernetesService, input *AddRemoveServiceLinkInput) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "removeservicelink", &resource.Resource, input, resp) + + return resp, err +} + +func (c *KubernetesServiceClient) ActionRestart(resource *KubernetesService, input *ServiceRestart) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "restart", &resource.Resource, input, resp) + + return resp, err +} + +func (c *KubernetesServiceClient) ActionRollback(resource *KubernetesService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "rollback", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *KubernetesServiceClient) ActionSetservicelinks(resource *KubernetesService, input *SetServiceLinksInput) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "setservicelinks", &resource.Resource, input, resp) + + return resp, err +} + +func (c *KubernetesServiceClient) ActionUpdate(resource *KubernetesService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *KubernetesServiceClient) ActionUpgrade(resource *KubernetesService, input *ServiceUpgrade) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(KUBERNETES_SERVICE_TYPE, "upgrade", &resource.Resource, input, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_kubernetes_stack.go b/vendor/github.com/rancher/go-rancher/client/generated_kubernetes_stack.go new file mode 100644 index 000000000000..e50de92daac1 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_kubernetes_stack.go @@ -0,0 +1,193 @@ +package client + +const ( + KUBERNETES_STACK_TYPE = "kubernetesStack" +) + +type KubernetesStack struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + Environment map[string]interface{} `json:"environment,omitempty" yaml:"environment,omitempty"` + + ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"` + + HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"` + + PreviousEnvironment map[string]interface{} `json:"previousEnvironment,omitempty" yaml:"previous_environment,omitempty"` + + PreviousExternalId string `json:"previousExternalId,omitempty" yaml:"previous_external_id,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Templates map[string]interface{} `json:"templates,omitempty" yaml:"templates,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type KubernetesStackCollection struct { + Collection + Data []KubernetesStack `json:"data,omitempty"` +} + +type KubernetesStackClient struct { + rancherClient *RancherClient +} + +type KubernetesStackOperations interface { + List(opts *ListOpts) (*KubernetesStackCollection, error) + Create(opts *KubernetesStack) (*KubernetesStack, error) + Update(existing *KubernetesStack, updates interface{}) (*KubernetesStack, error) + ById(id string) (*KubernetesStack, error) + Delete(container *KubernetesStack) error + + ActionCancelrollback(*KubernetesStack) (*Environment, error) + + ActionCancelupgrade(*KubernetesStack) (*Environment, error) + + ActionCreate(*KubernetesStack) (*Environment, error) + + ActionError(*KubernetesStack) (*Environment, error) + + ActionFinishupgrade(*KubernetesStack) (*Environment, error) + + ActionRemove(*KubernetesStack) (*Environment, error) + + ActionRollback(*KubernetesStack) (*Environment, error) + + ActionUpgrade(*KubernetesStack, *KubernetesStackUpgrade) (*KubernetesStack, error) +} + +func newKubernetesStackClient(rancherClient *RancherClient) *KubernetesStackClient { + return &KubernetesStackClient{ + rancherClient: rancherClient, + } +} + +func (c *KubernetesStackClient) Create(container *KubernetesStack) (*KubernetesStack, error) { + resp := &KubernetesStack{} + err := c.rancherClient.doCreate(KUBERNETES_STACK_TYPE, container, resp) + return resp, err +} + +func (c *KubernetesStackClient) Update(existing *KubernetesStack, updates interface{}) (*KubernetesStack, error) { + resp := &KubernetesStack{} + err := c.rancherClient.doUpdate(KUBERNETES_STACK_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *KubernetesStackClient) List(opts *ListOpts) (*KubernetesStackCollection, error) { + resp := &KubernetesStackCollection{} + err := c.rancherClient.doList(KUBERNETES_STACK_TYPE, opts, resp) + return resp, err +} + +func (c *KubernetesStackClient) ById(id string) (*KubernetesStack, error) { + resp := &KubernetesStack{} + err := c.rancherClient.doById(KUBERNETES_STACK_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *KubernetesStackClient) Delete(container *KubernetesStack) error { + return c.rancherClient.doResourceDelete(KUBERNETES_STACK_TYPE, &container.Resource) +} + +func (c *KubernetesStackClient) ActionCancelrollback(resource *KubernetesStack) (*Environment, error) { + + resp := &Environment{} + + err := c.rancherClient.doAction(KUBERNETES_STACK_TYPE, "cancelrollback", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *KubernetesStackClient) ActionCancelupgrade(resource *KubernetesStack) (*Environment, error) { + + resp := &Environment{} + + err := c.rancherClient.doAction(KUBERNETES_STACK_TYPE, "cancelupgrade", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *KubernetesStackClient) ActionCreate(resource *KubernetesStack) (*Environment, error) { + + resp := &Environment{} + + err := c.rancherClient.doAction(KUBERNETES_STACK_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *KubernetesStackClient) ActionError(resource *KubernetesStack) (*Environment, error) { + + resp := &Environment{} + + err := c.rancherClient.doAction(KUBERNETES_STACK_TYPE, "error", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *KubernetesStackClient) ActionFinishupgrade(resource *KubernetesStack) (*Environment, error) { + + resp := &Environment{} + + err := c.rancherClient.doAction(KUBERNETES_STACK_TYPE, "finishupgrade", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *KubernetesStackClient) ActionRemove(resource *KubernetesStack) (*Environment, error) { + + resp := &Environment{} + + err := c.rancherClient.doAction(KUBERNETES_STACK_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *KubernetesStackClient) ActionRollback(resource *KubernetesStack) (*Environment, error) { + + resp := &Environment{} + + err := c.rancherClient.doAction(KUBERNETES_STACK_TYPE, "rollback", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *KubernetesStackClient) ActionUpgrade(resource *KubernetesStack, input *KubernetesStackUpgrade) (*KubernetesStack, error) { + + resp := &KubernetesStack{} + + err := c.rancherClient.doAction(KUBERNETES_STACK_TYPE, "upgrade", &resource.Resource, input, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_kubernetes_stack_upgrade.go b/vendor/github.com/rancher/go-rancher/client/generated_kubernetes_stack_upgrade.go new file mode 100644 index 000000000000..11d7f932233c --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_kubernetes_stack_upgrade.go @@ -0,0 +1,71 @@ +package client + +const ( + KUBERNETES_STACK_UPGRADE_TYPE = "kubernetesStackUpgrade" +) + +type KubernetesStackUpgrade struct { + Resource + + Environment map[string]interface{} `json:"environment,omitempty" yaml:"environment,omitempty"` + + ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"` + + Templates map[string]interface{} `json:"templates,omitempty" yaml:"templates,omitempty"` +} + +type KubernetesStackUpgradeCollection struct { + Collection + Data []KubernetesStackUpgrade `json:"data,omitempty"` +} + +type KubernetesStackUpgradeClient struct { + rancherClient *RancherClient +} + +type KubernetesStackUpgradeOperations interface { + List(opts *ListOpts) (*KubernetesStackUpgradeCollection, error) + Create(opts *KubernetesStackUpgrade) (*KubernetesStackUpgrade, error) + Update(existing *KubernetesStackUpgrade, updates interface{}) (*KubernetesStackUpgrade, error) + ById(id string) (*KubernetesStackUpgrade, error) + Delete(container *KubernetesStackUpgrade) error +} + +func newKubernetesStackUpgradeClient(rancherClient *RancherClient) *KubernetesStackUpgradeClient { + return &KubernetesStackUpgradeClient{ + rancherClient: rancherClient, + } +} + +func (c *KubernetesStackUpgradeClient) Create(container *KubernetesStackUpgrade) (*KubernetesStackUpgrade, error) { + resp := &KubernetesStackUpgrade{} + err := c.rancherClient.doCreate(KUBERNETES_STACK_UPGRADE_TYPE, container, resp) + return resp, err +} + +func (c *KubernetesStackUpgradeClient) Update(existing *KubernetesStackUpgrade, updates interface{}) (*KubernetesStackUpgrade, error) { + resp := &KubernetesStackUpgrade{} + err := c.rancherClient.doUpdate(KUBERNETES_STACK_UPGRADE_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *KubernetesStackUpgradeClient) List(opts *ListOpts) (*KubernetesStackUpgradeCollection, error) { + resp := &KubernetesStackUpgradeCollection{} + err := c.rancherClient.doList(KUBERNETES_STACK_UPGRADE_TYPE, opts, resp) + return resp, err +} + +func (c *KubernetesStackUpgradeClient) ById(id string) (*KubernetesStackUpgrade, error) { + resp := &KubernetesStackUpgrade{} + err := c.rancherClient.doById(KUBERNETES_STACK_UPGRADE_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *KubernetesStackUpgradeClient) Delete(container *KubernetesStackUpgrade) error { + return c.rancherClient.doResourceDelete(KUBERNETES_STACK_UPGRADE_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_label.go b/vendor/github.com/rancher/go-rancher/client/generated_label.go new file mode 100644 index 000000000000..004a75d9d93e --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_label.go @@ -0,0 +1,117 @@ +package client + +const ( + LABEL_TYPE = "label" +) + +type Label struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + Key string `json:"key,omitempty" yaml:"key,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + + Value string `json:"value,omitempty" yaml:"value,omitempty"` +} + +type LabelCollection struct { + Collection + Data []Label `json:"data,omitempty"` +} + +type LabelClient struct { + rancherClient *RancherClient +} + +type LabelOperations interface { + List(opts *ListOpts) (*LabelCollection, error) + Create(opts *Label) (*Label, error) + Update(existing *Label, updates interface{}) (*Label, error) + ById(id string) (*Label, error) + Delete(container *Label) error + + ActionCreate(*Label) (*Label, error) + + ActionRemove(*Label) (*Label, error) +} + +func newLabelClient(rancherClient *RancherClient) *LabelClient { + return &LabelClient{ + rancherClient: rancherClient, + } +} + +func (c *LabelClient) Create(container *Label) (*Label, error) { + resp := &Label{} + err := c.rancherClient.doCreate(LABEL_TYPE, container, resp) + return resp, err +} + +func (c *LabelClient) Update(existing *Label, updates interface{}) (*Label, error) { + resp := &Label{} + err := c.rancherClient.doUpdate(LABEL_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *LabelClient) List(opts *ListOpts) (*LabelCollection, error) { + resp := &LabelCollection{} + err := c.rancherClient.doList(LABEL_TYPE, opts, resp) + return resp, err +} + +func (c *LabelClient) ById(id string) (*Label, error) { + resp := &Label{} + err := c.rancherClient.doById(LABEL_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *LabelClient) Delete(container *Label) error { + return c.rancherClient.doResourceDelete(LABEL_TYPE, &container.Resource) +} + +func (c *LabelClient) ActionCreate(resource *Label) (*Label, error) { + + resp := &Label{} + + err := c.rancherClient.doAction(LABEL_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *LabelClient) ActionRemove(resource *Label) (*Label, error) { + + resp := &Label{} + + err := c.rancherClient.doAction(LABEL_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_launch_config.go b/vendor/github.com/rancher/go-rancher/client/generated_launch_config.go new file mode 100644 index 000000000000..b24cf4b260e0 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_launch_config.go @@ -0,0 +1,430 @@ +package client + +const ( + LAUNCH_CONFIG_TYPE = "launchConfig" +) + +type LaunchConfig struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + AgentId string `json:"agentId,omitempty" yaml:"agent_id,omitempty"` + + AllocationState string `json:"allocationState,omitempty" yaml:"allocation_state,omitempty"` + + BlkioDeviceOptions map[string]interface{} `json:"blkioDeviceOptions,omitempty" yaml:"blkio_device_options,omitempty"` + + Build *DockerBuild `json:"build,omitempty" yaml:"build,omitempty"` + + CapAdd []string `json:"capAdd,omitempty" yaml:"cap_add,omitempty"` + + CapDrop []string `json:"capDrop,omitempty" yaml:"cap_drop,omitempty"` + + Command []string `json:"command,omitempty" yaml:"command,omitempty"` + + Count int64 `json:"count,omitempty" yaml:"count,omitempty"` + + CpuSet string `json:"cpuSet,omitempty" yaml:"cpu_set,omitempty"` + + CpuShares int64 `json:"cpuShares,omitempty" yaml:"cpu_shares,omitempty"` + + CreateIndex int64 `json:"createIndex,omitempty" yaml:"create_index,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + DataVolumeMounts map[string]interface{} `json:"dataVolumeMounts,omitempty" yaml:"data_volume_mounts,omitempty"` + + DataVolumes []string `json:"dataVolumes,omitempty" yaml:"data_volumes,omitempty"` + + DataVolumesFrom []string `json:"dataVolumesFrom,omitempty" yaml:"data_volumes_from,omitempty"` + + DataVolumesFromLaunchConfigs []string `json:"dataVolumesFromLaunchConfigs,omitempty" yaml:"data_volumes_from_launch_configs,omitempty"` + + DeploymentUnitUuid string `json:"deploymentUnitUuid,omitempty" yaml:"deployment_unit_uuid,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + Devices []string `json:"devices,omitempty" yaml:"devices,omitempty"` + + Disks []interface{} `json:"disks,omitempty" yaml:"disks,omitempty"` + + Dns []string `json:"dns,omitempty" yaml:"dns,omitempty"` + + DnsSearch []string `json:"dnsSearch,omitempty" yaml:"dns_search,omitempty"` + + DomainName string `json:"domainName,omitempty" yaml:"domain_name,omitempty"` + + EntryPoint []string `json:"entryPoint,omitempty" yaml:"entry_point,omitempty"` + + Environment map[string]interface{} `json:"environment,omitempty" yaml:"environment,omitempty"` + + Expose []string `json:"expose,omitempty" yaml:"expose,omitempty"` + + ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"` + + ExtraHosts []string `json:"extraHosts,omitempty" yaml:"extra_hosts,omitempty"` + + FirstRunning string `json:"firstRunning,omitempty" yaml:"first_running,omitempty"` + + HealthCheck *InstanceHealthCheck `json:"healthCheck,omitempty" yaml:"health_check,omitempty"` + + HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"` + + HostId string `json:"hostId,omitempty" yaml:"host_id,omitempty"` + + Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"` + + ImageUuid string `json:"imageUuid,omitempty" yaml:"image_uuid,omitempty"` + + InstanceLinks map[string]interface{} `json:"instanceLinks,omitempty" yaml:"instance_links,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Labels map[string]interface{} `json:"labels,omitempty" yaml:"labels,omitempty"` + + LogConfig *LogConfig `json:"logConfig,omitempty" yaml:"log_config,omitempty"` + + LxcConf map[string]interface{} `json:"lxcConf,omitempty" yaml:"lxc_conf,omitempty"` + + Memory int64 `json:"memory,omitempty" yaml:"memory,omitempty"` + + MemoryMb int64 `json:"memoryMb,omitempty" yaml:"memory_mb,omitempty"` + + MemorySwap int64 `json:"memorySwap,omitempty" yaml:"memory_swap,omitempty"` + + NativeContainer bool `json:"nativeContainer,omitempty" yaml:"native_container,omitempty"` + + NetworkContainerId string `json:"networkContainerId,omitempty" yaml:"network_container_id,omitempty"` + + NetworkIds []string `json:"networkIds,omitempty" yaml:"network_ids,omitempty"` + + NetworkLaunchConfig string `json:"networkLaunchConfig,omitempty" yaml:"network_launch_config,omitempty"` + + NetworkMode string `json:"networkMode,omitempty" yaml:"network_mode,omitempty"` + + PidMode string `json:"pidMode,omitempty" yaml:"pid_mode,omitempty"` + + Ports []string `json:"ports,omitempty" yaml:"ports,omitempty"` + + PrimaryIpAddress string `json:"primaryIpAddress,omitempty" yaml:"primary_ip_address,omitempty"` + + Privileged bool `json:"privileged,omitempty" yaml:"privileged,omitempty"` + + PublishAllPorts bool `json:"publishAllPorts,omitempty" yaml:"publish_all_ports,omitempty"` + + ReadOnly bool `json:"readOnly,omitempty" yaml:"read_only,omitempty"` + + RegistryCredentialId string `json:"registryCredentialId,omitempty" yaml:"registry_credential_id,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + RequestedHostId string `json:"requestedHostId,omitempty" yaml:"requested_host_id,omitempty"` + + RequestedIpAddress string `json:"requestedIpAddress,omitempty" yaml:"requested_ip_address,omitempty"` + + SecurityOpt []string `json:"securityOpt,omitempty" yaml:"security_opt,omitempty"` + + StartCount int64 `json:"startCount,omitempty" yaml:"start_count,omitempty"` + + StartOnCreate bool `json:"startOnCreate,omitempty" yaml:"start_on_create,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + StdinOpen bool `json:"stdinOpen,omitempty" yaml:"stdin_open,omitempty"` + + SystemContainer string `json:"systemContainer,omitempty" yaml:"system_container,omitempty"` + + Token string `json:"token,omitempty" yaml:"token,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Tty bool `json:"tty,omitempty" yaml:"tty,omitempty"` + + User string `json:"user,omitempty" yaml:"user,omitempty"` + + Userdata string `json:"userdata,omitempty" yaml:"userdata,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + + Vcpu int64 `json:"vcpu,omitempty" yaml:"vcpu,omitempty"` + + Version string `json:"version,omitempty" yaml:"version,omitempty"` + + VolumeDriver string `json:"volumeDriver,omitempty" yaml:"volume_driver,omitempty"` + + WorkingDir string `json:"workingDir,omitempty" yaml:"working_dir,omitempty"` +} + +type LaunchConfigCollection struct { + Collection + Data []LaunchConfig `json:"data,omitempty"` +} + +type LaunchConfigClient struct { + rancherClient *RancherClient +} + +type LaunchConfigOperations interface { + List(opts *ListOpts) (*LaunchConfigCollection, error) + Create(opts *LaunchConfig) (*LaunchConfig, error) + Update(existing *LaunchConfig, updates interface{}) (*LaunchConfig, error) + ById(id string) (*LaunchConfig, error) + Delete(container *LaunchConfig) error + + ActionAllocate(*LaunchConfig) (*Instance, error) + + ActionConsole(*LaunchConfig, *InstanceConsoleInput) (*InstanceConsole, error) + + ActionCreate(*LaunchConfig) (*Instance, error) + + ActionDeallocate(*LaunchConfig) (*Instance, error) + + ActionError(*LaunchConfig) (*Instance, error) + + ActionExecute(*LaunchConfig, *ContainerExec) (*HostAccess, error) + + ActionMigrate(*LaunchConfig) (*Instance, error) + + ActionProxy(*LaunchConfig, *ContainerProxy) (*HostAccess, error) + + ActionPurge(*LaunchConfig) (*Instance, error) + + ActionRemove(*LaunchConfig) (*Instance, error) + + ActionRestart(*LaunchConfig) (*Instance, error) + + ActionRestore(*LaunchConfig) (*Instance, error) + + ActionSetlabels(*LaunchConfig, *SetLabelsInput) (*Container, error) + + ActionStart(*LaunchConfig) (*Instance, error) + + ActionStop(*LaunchConfig, *InstanceStop) (*Instance, error) + + ActionUpdate(*LaunchConfig) (*Instance, error) + + ActionUpdatehealthy(*LaunchConfig) (*Instance, error) + + ActionUpdatereinitializing(*LaunchConfig) (*Instance, error) + + ActionUpdateunhealthy(*LaunchConfig) (*Instance, error) +} + +func newLaunchConfigClient(rancherClient *RancherClient) *LaunchConfigClient { + return &LaunchConfigClient{ + rancherClient: rancherClient, + } +} + +func (c *LaunchConfigClient) Create(container *LaunchConfig) (*LaunchConfig, error) { + resp := &LaunchConfig{} + err := c.rancherClient.doCreate(LAUNCH_CONFIG_TYPE, container, resp) + return resp, err +} + +func (c *LaunchConfigClient) Update(existing *LaunchConfig, updates interface{}) (*LaunchConfig, error) { + resp := &LaunchConfig{} + err := c.rancherClient.doUpdate(LAUNCH_CONFIG_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *LaunchConfigClient) List(opts *ListOpts) (*LaunchConfigCollection, error) { + resp := &LaunchConfigCollection{} + err := c.rancherClient.doList(LAUNCH_CONFIG_TYPE, opts, resp) + return resp, err +} + +func (c *LaunchConfigClient) ById(id string) (*LaunchConfig, error) { + resp := &LaunchConfig{} + err := c.rancherClient.doById(LAUNCH_CONFIG_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *LaunchConfigClient) Delete(container *LaunchConfig) error { + return c.rancherClient.doResourceDelete(LAUNCH_CONFIG_TYPE, &container.Resource) +} + +func (c *LaunchConfigClient) ActionAllocate(resource *LaunchConfig) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "allocate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *LaunchConfigClient) ActionConsole(resource *LaunchConfig, input *InstanceConsoleInput) (*InstanceConsole, error) { + + resp := &InstanceConsole{} + + err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "console", &resource.Resource, input, resp) + + return resp, err +} + +func (c *LaunchConfigClient) ActionCreate(resource *LaunchConfig) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *LaunchConfigClient) ActionDeallocate(resource *LaunchConfig) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "deallocate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *LaunchConfigClient) ActionError(resource *LaunchConfig) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "error", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *LaunchConfigClient) ActionExecute(resource *LaunchConfig, input *ContainerExec) (*HostAccess, error) { + + resp := &HostAccess{} + + err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "execute", &resource.Resource, input, resp) + + return resp, err +} + +func (c *LaunchConfigClient) ActionMigrate(resource *LaunchConfig) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "migrate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *LaunchConfigClient) ActionProxy(resource *LaunchConfig, input *ContainerProxy) (*HostAccess, error) { + + resp := &HostAccess{} + + err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "proxy", &resource.Resource, input, resp) + + return resp, err +} + +func (c *LaunchConfigClient) ActionPurge(resource *LaunchConfig) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "purge", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *LaunchConfigClient) ActionRemove(resource *LaunchConfig) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *LaunchConfigClient) ActionRestart(resource *LaunchConfig) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "restart", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *LaunchConfigClient) ActionRestore(resource *LaunchConfig) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "restore", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *LaunchConfigClient) ActionSetlabels(resource *LaunchConfig, input *SetLabelsInput) (*Container, error) { + + resp := &Container{} + + err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "setlabels", &resource.Resource, input, resp) + + return resp, err +} + +func (c *LaunchConfigClient) ActionStart(resource *LaunchConfig) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "start", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *LaunchConfigClient) ActionStop(resource *LaunchConfig, input *InstanceStop) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "stop", &resource.Resource, input, resp) + + return resp, err +} + +func (c *LaunchConfigClient) ActionUpdate(resource *LaunchConfig) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *LaunchConfigClient) ActionUpdatehealthy(resource *LaunchConfig) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "updatehealthy", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *LaunchConfigClient) ActionUpdatereinitializing(resource *LaunchConfig) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "updatereinitializing", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *LaunchConfigClient) ActionUpdateunhealthy(resource *LaunchConfig) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(LAUNCH_CONFIG_TYPE, "updateunhealthy", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_ldapconfig.go b/vendor/github.com/rancher/go-rancher/client/generated_ldapconfig.go new file mode 100644 index 000000000000..f760cfc95252 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_ldapconfig.go @@ -0,0 +1,111 @@ +package client + +const ( + LDAPCONFIG_TYPE = "ldapconfig" +) + +type Ldapconfig struct { + Resource + + AccessMode string `json:"accessMode,omitempty" yaml:"access_mode,omitempty"` + + AllowedIdentities []interface{} `json:"allowedIdentities,omitempty" yaml:"allowed_identities,omitempty"` + + ConnectionTimeout int64 `json:"connectionTimeout,omitempty" yaml:"connection_timeout,omitempty"` + + Domain string `json:"domain,omitempty" yaml:"domain,omitempty"` + + Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` + + GroupMemberMappingAttribute string `json:"groupMemberMappingAttribute,omitempty" yaml:"group_member_mapping_attribute,omitempty"` + + GroupNameField string `json:"groupNameField,omitempty" yaml:"group_name_field,omitempty"` + + GroupObjectClass string `json:"groupObjectClass,omitempty" yaml:"group_object_class,omitempty"` + + GroupSearchField string `json:"groupSearchField,omitempty" yaml:"group_search_field,omitempty"` + + LoginDomain string `json:"loginDomain,omitempty" yaml:"login_domain,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + Port int64 `json:"port,omitempty" yaml:"port,omitempty"` + + Server string `json:"server,omitempty" yaml:"server,omitempty"` + + ServiceAccountPassword string `json:"serviceAccountPassword,omitempty" yaml:"service_account_password,omitempty"` + + ServiceAccountUsername string `json:"serviceAccountUsername,omitempty" yaml:"service_account_username,omitempty"` + + Tls bool `json:"tls,omitempty" yaml:"tls,omitempty"` + + UserDisabledBitMask int64 `json:"userDisabledBitMask,omitempty" yaml:"user_disabled_bit_mask,omitempty"` + + UserEnabledAttribute string `json:"userEnabledAttribute,omitempty" yaml:"user_enabled_attribute,omitempty"` + + UserLoginField string `json:"userLoginField,omitempty" yaml:"user_login_field,omitempty"` + + UserMemberAttribute string `json:"userMemberAttribute,omitempty" yaml:"user_member_attribute,omitempty"` + + UserNameField string `json:"userNameField,omitempty" yaml:"user_name_field,omitempty"` + + UserObjectClass string `json:"userObjectClass,omitempty" yaml:"user_object_class,omitempty"` + + UserSearchField string `json:"userSearchField,omitempty" yaml:"user_search_field,omitempty"` +} + +type LdapconfigCollection struct { + Collection + Data []Ldapconfig `json:"data,omitempty"` +} + +type LdapconfigClient struct { + rancherClient *RancherClient +} + +type LdapconfigOperations interface { + List(opts *ListOpts) (*LdapconfigCollection, error) + Create(opts *Ldapconfig) (*Ldapconfig, error) + Update(existing *Ldapconfig, updates interface{}) (*Ldapconfig, error) + ById(id string) (*Ldapconfig, error) + Delete(container *Ldapconfig) error +} + +func newLdapconfigClient(rancherClient *RancherClient) *LdapconfigClient { + return &LdapconfigClient{ + rancherClient: rancherClient, + } +} + +func (c *LdapconfigClient) Create(container *Ldapconfig) (*Ldapconfig, error) { + resp := &Ldapconfig{} + err := c.rancherClient.doCreate(LDAPCONFIG_TYPE, container, resp) + return resp, err +} + +func (c *LdapconfigClient) Update(existing *Ldapconfig, updates interface{}) (*Ldapconfig, error) { + resp := &Ldapconfig{} + err := c.rancherClient.doUpdate(LDAPCONFIG_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *LdapconfigClient) List(opts *ListOpts) (*LdapconfigCollection, error) { + resp := &LdapconfigCollection{} + err := c.rancherClient.doList(LDAPCONFIG_TYPE, opts, resp) + return resp, err +} + +func (c *LdapconfigClient) ById(id string) (*Ldapconfig, error) { + resp := &Ldapconfig{} + err := c.rancherClient.doById(LDAPCONFIG_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *LdapconfigClient) Delete(container *Ldapconfig) error { + return c.rancherClient.doResourceDelete(LDAPCONFIG_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_load_balancer.go b/vendor/github.com/rancher/go-rancher/client/generated_load_balancer.go new file mode 100644 index 000000000000..6b870b825386 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_load_balancer.go @@ -0,0 +1,224 @@ +package client + +const ( + LOAD_BALANCER_TYPE = "loadBalancer" +) + +type LoadBalancer struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + CertificateIds []string `json:"certificateIds,omitempty" yaml:"certificate_ids,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + DefaultCertificateId string `json:"defaultCertificateId,omitempty" yaml:"default_certificate_id,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + GlobalLoadBalancerId string `json:"globalLoadBalancerId,omitempty" yaml:"global_load_balancer_id,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + LoadBalancerConfigId string `json:"loadBalancerConfigId,omitempty" yaml:"load_balancer_config_id,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + ServiceId string `json:"serviceId,omitempty" yaml:"service_id,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + + Weight int64 `json:"weight,omitempty" yaml:"weight,omitempty"` +} + +type LoadBalancerCollection struct { + Collection + Data []LoadBalancer `json:"data,omitempty"` +} + +type LoadBalancerClient struct { + rancherClient *RancherClient +} + +type LoadBalancerOperations interface { + List(opts *ListOpts) (*LoadBalancerCollection, error) + Create(opts *LoadBalancer) (*LoadBalancer, error) + Update(existing *LoadBalancer, updates interface{}) (*LoadBalancer, error) + ById(id string) (*LoadBalancer, error) + Delete(container *LoadBalancer) error + + ActionActivate(*LoadBalancer) (*LoadBalancer, error) + + ActionAddhost(*LoadBalancer, *AddRemoveLoadBalancerHostInput) (*LoadBalancer, error) + + ActionAddtarget(*LoadBalancer, *AddRemoveLoadBalancerTargetInput) (*LoadBalancer, error) + + ActionCreate(*LoadBalancer) (*LoadBalancer, error) + + ActionDeactivate(*LoadBalancer) (*LoadBalancer, error) + + ActionRemove(*LoadBalancer) (*LoadBalancer, error) + + ActionRemovehost(*LoadBalancer, *AddRemoveLoadBalancerHostInput) (*LoadBalancer, error) + + ActionRemovetarget(*LoadBalancer, *AddRemoveLoadBalancerTargetInput) (*LoadBalancer, error) + + ActionSethosts(*LoadBalancer, *SetLoadBalancerHostsInput) (*LoadBalancer, error) + + ActionSettargets(*LoadBalancer, *SetLoadBalancerTargetsInput) (*LoadBalancer, error) + + ActionUpdate(*LoadBalancer) (*LoadBalancer, error) +} + +func newLoadBalancerClient(rancherClient *RancherClient) *LoadBalancerClient { + return &LoadBalancerClient{ + rancherClient: rancherClient, + } +} + +func (c *LoadBalancerClient) Create(container *LoadBalancer) (*LoadBalancer, error) { + resp := &LoadBalancer{} + err := c.rancherClient.doCreate(LOAD_BALANCER_TYPE, container, resp) + return resp, err +} + +func (c *LoadBalancerClient) Update(existing *LoadBalancer, updates interface{}) (*LoadBalancer, error) { + resp := &LoadBalancer{} + err := c.rancherClient.doUpdate(LOAD_BALANCER_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *LoadBalancerClient) List(opts *ListOpts) (*LoadBalancerCollection, error) { + resp := &LoadBalancerCollection{} + err := c.rancherClient.doList(LOAD_BALANCER_TYPE, opts, resp) + return resp, err +} + +func (c *LoadBalancerClient) ById(id string) (*LoadBalancer, error) { + resp := &LoadBalancer{} + err := c.rancherClient.doById(LOAD_BALANCER_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *LoadBalancerClient) Delete(container *LoadBalancer) error { + return c.rancherClient.doResourceDelete(LOAD_BALANCER_TYPE, &container.Resource) +} + +func (c *LoadBalancerClient) ActionActivate(resource *LoadBalancer) (*LoadBalancer, error) { + + resp := &LoadBalancer{} + + err := c.rancherClient.doAction(LOAD_BALANCER_TYPE, "activate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *LoadBalancerClient) ActionAddhost(resource *LoadBalancer, input *AddRemoveLoadBalancerHostInput) (*LoadBalancer, error) { + + resp := &LoadBalancer{} + + err := c.rancherClient.doAction(LOAD_BALANCER_TYPE, "addhost", &resource.Resource, input, resp) + + return resp, err +} + +func (c *LoadBalancerClient) ActionAddtarget(resource *LoadBalancer, input *AddRemoveLoadBalancerTargetInput) (*LoadBalancer, error) { + + resp := &LoadBalancer{} + + err := c.rancherClient.doAction(LOAD_BALANCER_TYPE, "addtarget", &resource.Resource, input, resp) + + return resp, err +} + +func (c *LoadBalancerClient) ActionCreate(resource *LoadBalancer) (*LoadBalancer, error) { + + resp := &LoadBalancer{} + + err := c.rancherClient.doAction(LOAD_BALANCER_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *LoadBalancerClient) ActionDeactivate(resource *LoadBalancer) (*LoadBalancer, error) { + + resp := &LoadBalancer{} + + err := c.rancherClient.doAction(LOAD_BALANCER_TYPE, "deactivate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *LoadBalancerClient) ActionRemove(resource *LoadBalancer) (*LoadBalancer, error) { + + resp := &LoadBalancer{} + + err := c.rancherClient.doAction(LOAD_BALANCER_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *LoadBalancerClient) ActionRemovehost(resource *LoadBalancer, input *AddRemoveLoadBalancerHostInput) (*LoadBalancer, error) { + + resp := &LoadBalancer{} + + err := c.rancherClient.doAction(LOAD_BALANCER_TYPE, "removehost", &resource.Resource, input, resp) + + return resp, err +} + +func (c *LoadBalancerClient) ActionRemovetarget(resource *LoadBalancer, input *AddRemoveLoadBalancerTargetInput) (*LoadBalancer, error) { + + resp := &LoadBalancer{} + + err := c.rancherClient.doAction(LOAD_BALANCER_TYPE, "removetarget", &resource.Resource, input, resp) + + return resp, err +} + +func (c *LoadBalancerClient) ActionSethosts(resource *LoadBalancer, input *SetLoadBalancerHostsInput) (*LoadBalancer, error) { + + resp := &LoadBalancer{} + + err := c.rancherClient.doAction(LOAD_BALANCER_TYPE, "sethosts", &resource.Resource, input, resp) + + return resp, err +} + +func (c *LoadBalancerClient) ActionSettargets(resource *LoadBalancer, input *SetLoadBalancerTargetsInput) (*LoadBalancer, error) { + + resp := &LoadBalancer{} + + err := c.rancherClient.doAction(LOAD_BALANCER_TYPE, "settargets", &resource.Resource, input, resp) + + return resp, err +} + +func (c *LoadBalancerClient) ActionUpdate(resource *LoadBalancer) (*LoadBalancer, error) { + + resp := &LoadBalancer{} + + err := c.rancherClient.doAction(LOAD_BALANCER_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_app_cookie_stickiness_policy.go b/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_app_cookie_stickiness_policy.go new file mode 100644 index 000000000000..235252cd3551 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_app_cookie_stickiness_policy.go @@ -0,0 +1,79 @@ +package client + +const ( + LOAD_BALANCER_APP_COOKIE_STICKINESS_POLICY_TYPE = "loadBalancerAppCookieStickinessPolicy" +) + +type LoadBalancerAppCookieStickinessPolicy struct { + Resource + + Cookie string `json:"cookie,omitempty" yaml:"cookie,omitempty"` + + MaxLength int64 `json:"maxLength,omitempty" yaml:"max_length,omitempty"` + + Mode string `json:"mode,omitempty" yaml:"mode,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + Prefix bool `json:"prefix,omitempty" yaml:"prefix,omitempty"` + + RequestLearn bool `json:"requestLearn,omitempty" yaml:"request_learn,omitempty"` + + Timeout int64 `json:"timeout,omitempty" yaml:"timeout,omitempty"` +} + +type LoadBalancerAppCookieStickinessPolicyCollection struct { + Collection + Data []LoadBalancerAppCookieStickinessPolicy `json:"data,omitempty"` +} + +type LoadBalancerAppCookieStickinessPolicyClient struct { + rancherClient *RancherClient +} + +type LoadBalancerAppCookieStickinessPolicyOperations interface { + List(opts *ListOpts) (*LoadBalancerAppCookieStickinessPolicyCollection, error) + Create(opts *LoadBalancerAppCookieStickinessPolicy) (*LoadBalancerAppCookieStickinessPolicy, error) + Update(existing *LoadBalancerAppCookieStickinessPolicy, updates interface{}) (*LoadBalancerAppCookieStickinessPolicy, error) + ById(id string) (*LoadBalancerAppCookieStickinessPolicy, error) + Delete(container *LoadBalancerAppCookieStickinessPolicy) error +} + +func newLoadBalancerAppCookieStickinessPolicyClient(rancherClient *RancherClient) *LoadBalancerAppCookieStickinessPolicyClient { + return &LoadBalancerAppCookieStickinessPolicyClient{ + rancherClient: rancherClient, + } +} + +func (c *LoadBalancerAppCookieStickinessPolicyClient) Create(container *LoadBalancerAppCookieStickinessPolicy) (*LoadBalancerAppCookieStickinessPolicy, error) { + resp := &LoadBalancerAppCookieStickinessPolicy{} + err := c.rancherClient.doCreate(LOAD_BALANCER_APP_COOKIE_STICKINESS_POLICY_TYPE, container, resp) + return resp, err +} + +func (c *LoadBalancerAppCookieStickinessPolicyClient) Update(existing *LoadBalancerAppCookieStickinessPolicy, updates interface{}) (*LoadBalancerAppCookieStickinessPolicy, error) { + resp := &LoadBalancerAppCookieStickinessPolicy{} + err := c.rancherClient.doUpdate(LOAD_BALANCER_APP_COOKIE_STICKINESS_POLICY_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *LoadBalancerAppCookieStickinessPolicyClient) List(opts *ListOpts) (*LoadBalancerAppCookieStickinessPolicyCollection, error) { + resp := &LoadBalancerAppCookieStickinessPolicyCollection{} + err := c.rancherClient.doList(LOAD_BALANCER_APP_COOKIE_STICKINESS_POLICY_TYPE, opts, resp) + return resp, err +} + +func (c *LoadBalancerAppCookieStickinessPolicyClient) ById(id string) (*LoadBalancerAppCookieStickinessPolicy, error) { + resp := &LoadBalancerAppCookieStickinessPolicy{} + err := c.rancherClient.doById(LOAD_BALANCER_APP_COOKIE_STICKINESS_POLICY_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *LoadBalancerAppCookieStickinessPolicyClient) Delete(container *LoadBalancerAppCookieStickinessPolicy) error { + return c.rancherClient.doResourceDelete(LOAD_BALANCER_APP_COOKIE_STICKINESS_POLICY_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_config.go b/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_config.go new file mode 100644 index 000000000000..8c23c42e3871 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_config.go @@ -0,0 +1,69 @@ +package client + +const ( + LOAD_BALANCER_CONFIG_TYPE = "loadBalancerConfig" +) + +type LoadBalancerConfig struct { + Resource + + HaproxyConfig *HaproxyConfig `json:"haproxyConfig,omitempty" yaml:"haproxy_config,omitempty"` + + LbCookieStickinessPolicy *LoadBalancerCookieStickinessPolicy `json:"lbCookieStickinessPolicy,omitempty" yaml:"lb_cookie_stickiness_policy,omitempty"` +} + +type LoadBalancerConfigCollection struct { + Collection + Data []LoadBalancerConfig `json:"data,omitempty"` +} + +type LoadBalancerConfigClient struct { + rancherClient *RancherClient +} + +type LoadBalancerConfigOperations interface { + List(opts *ListOpts) (*LoadBalancerConfigCollection, error) + Create(opts *LoadBalancerConfig) (*LoadBalancerConfig, error) + Update(existing *LoadBalancerConfig, updates interface{}) (*LoadBalancerConfig, error) + ById(id string) (*LoadBalancerConfig, error) + Delete(container *LoadBalancerConfig) error +} + +func newLoadBalancerConfigClient(rancherClient *RancherClient) *LoadBalancerConfigClient { + return &LoadBalancerConfigClient{ + rancherClient: rancherClient, + } +} + +func (c *LoadBalancerConfigClient) Create(container *LoadBalancerConfig) (*LoadBalancerConfig, error) { + resp := &LoadBalancerConfig{} + err := c.rancherClient.doCreate(LOAD_BALANCER_CONFIG_TYPE, container, resp) + return resp, err +} + +func (c *LoadBalancerConfigClient) Update(existing *LoadBalancerConfig, updates interface{}) (*LoadBalancerConfig, error) { + resp := &LoadBalancerConfig{} + err := c.rancherClient.doUpdate(LOAD_BALANCER_CONFIG_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *LoadBalancerConfigClient) List(opts *ListOpts) (*LoadBalancerConfigCollection, error) { + resp := &LoadBalancerConfigCollection{} + err := c.rancherClient.doList(LOAD_BALANCER_CONFIG_TYPE, opts, resp) + return resp, err +} + +func (c *LoadBalancerConfigClient) ById(id string) (*LoadBalancerConfig, error) { + resp := &LoadBalancerConfig{} + err := c.rancherClient.doById(LOAD_BALANCER_CONFIG_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *LoadBalancerConfigClient) Delete(container *LoadBalancerConfig) error { + return c.rancherClient.doResourceDelete(LOAD_BALANCER_CONFIG_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_config_listener_map.go b/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_config_listener_map.go new file mode 100644 index 000000000000..b8e4d51575db --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_config_listener_map.go @@ -0,0 +1,117 @@ +package client + +const ( + LOAD_BALANCER_CONFIG_LISTENER_MAP_TYPE = "loadBalancerConfigListenerMap" +) + +type LoadBalancerConfigListenerMap struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + LoadBalancerConfigId string `json:"loadBalancerConfigId,omitempty" yaml:"load_balancer_config_id,omitempty"` + + LoadBalancerListenerId string `json:"loadBalancerListenerId,omitempty" yaml:"load_balancer_listener_id,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type LoadBalancerConfigListenerMapCollection struct { + Collection + Data []LoadBalancerConfigListenerMap `json:"data,omitempty"` +} + +type LoadBalancerConfigListenerMapClient struct { + rancherClient *RancherClient +} + +type LoadBalancerConfigListenerMapOperations interface { + List(opts *ListOpts) (*LoadBalancerConfigListenerMapCollection, error) + Create(opts *LoadBalancerConfigListenerMap) (*LoadBalancerConfigListenerMap, error) + Update(existing *LoadBalancerConfigListenerMap, updates interface{}) (*LoadBalancerConfigListenerMap, error) + ById(id string) (*LoadBalancerConfigListenerMap, error) + Delete(container *LoadBalancerConfigListenerMap) error + + ActionCreate(*LoadBalancerConfigListenerMap) (*LoadBalancerConfigListenerMap, error) + + ActionRemove(*LoadBalancerConfigListenerMap) (*LoadBalancerConfigListenerMap, error) +} + +func newLoadBalancerConfigListenerMapClient(rancherClient *RancherClient) *LoadBalancerConfigListenerMapClient { + return &LoadBalancerConfigListenerMapClient{ + rancherClient: rancherClient, + } +} + +func (c *LoadBalancerConfigListenerMapClient) Create(container *LoadBalancerConfigListenerMap) (*LoadBalancerConfigListenerMap, error) { + resp := &LoadBalancerConfigListenerMap{} + err := c.rancherClient.doCreate(LOAD_BALANCER_CONFIG_LISTENER_MAP_TYPE, container, resp) + return resp, err +} + +func (c *LoadBalancerConfigListenerMapClient) Update(existing *LoadBalancerConfigListenerMap, updates interface{}) (*LoadBalancerConfigListenerMap, error) { + resp := &LoadBalancerConfigListenerMap{} + err := c.rancherClient.doUpdate(LOAD_BALANCER_CONFIG_LISTENER_MAP_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *LoadBalancerConfigListenerMapClient) List(opts *ListOpts) (*LoadBalancerConfigListenerMapCollection, error) { + resp := &LoadBalancerConfigListenerMapCollection{} + err := c.rancherClient.doList(LOAD_BALANCER_CONFIG_LISTENER_MAP_TYPE, opts, resp) + return resp, err +} + +func (c *LoadBalancerConfigListenerMapClient) ById(id string) (*LoadBalancerConfigListenerMap, error) { + resp := &LoadBalancerConfigListenerMap{} + err := c.rancherClient.doById(LOAD_BALANCER_CONFIG_LISTENER_MAP_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *LoadBalancerConfigListenerMapClient) Delete(container *LoadBalancerConfigListenerMap) error { + return c.rancherClient.doResourceDelete(LOAD_BALANCER_CONFIG_LISTENER_MAP_TYPE, &container.Resource) +} + +func (c *LoadBalancerConfigListenerMapClient) ActionCreate(resource *LoadBalancerConfigListenerMap) (*LoadBalancerConfigListenerMap, error) { + + resp := &LoadBalancerConfigListenerMap{} + + err := c.rancherClient.doAction(LOAD_BALANCER_CONFIG_LISTENER_MAP_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *LoadBalancerConfigListenerMapClient) ActionRemove(resource *LoadBalancerConfigListenerMap) (*LoadBalancerConfigListenerMap, error) { + + resp := &LoadBalancerConfigListenerMap{} + + err := c.rancherClient.doAction(LOAD_BALANCER_CONFIG_LISTENER_MAP_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_cookie_stickiness_policy.go b/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_cookie_stickiness_policy.go new file mode 100644 index 000000000000..0fc5699a502c --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_cookie_stickiness_policy.go @@ -0,0 +1,79 @@ +package client + +const ( + LOAD_BALANCER_COOKIE_STICKINESS_POLICY_TYPE = "loadBalancerCookieStickinessPolicy" +) + +type LoadBalancerCookieStickinessPolicy struct { + Resource + + Cookie string `json:"cookie,omitempty" yaml:"cookie,omitempty"` + + Domain string `json:"domain,omitempty" yaml:"domain,omitempty"` + + Indirect bool `json:"indirect,omitempty" yaml:"indirect,omitempty"` + + Mode string `json:"mode,omitempty" yaml:"mode,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + Nocache bool `json:"nocache,omitempty" yaml:"nocache,omitempty"` + + Postonly bool `json:"postonly,omitempty" yaml:"postonly,omitempty"` +} + +type LoadBalancerCookieStickinessPolicyCollection struct { + Collection + Data []LoadBalancerCookieStickinessPolicy `json:"data,omitempty"` +} + +type LoadBalancerCookieStickinessPolicyClient struct { + rancherClient *RancherClient +} + +type LoadBalancerCookieStickinessPolicyOperations interface { + List(opts *ListOpts) (*LoadBalancerCookieStickinessPolicyCollection, error) + Create(opts *LoadBalancerCookieStickinessPolicy) (*LoadBalancerCookieStickinessPolicy, error) + Update(existing *LoadBalancerCookieStickinessPolicy, updates interface{}) (*LoadBalancerCookieStickinessPolicy, error) + ById(id string) (*LoadBalancerCookieStickinessPolicy, error) + Delete(container *LoadBalancerCookieStickinessPolicy) error +} + +func newLoadBalancerCookieStickinessPolicyClient(rancherClient *RancherClient) *LoadBalancerCookieStickinessPolicyClient { + return &LoadBalancerCookieStickinessPolicyClient{ + rancherClient: rancherClient, + } +} + +func (c *LoadBalancerCookieStickinessPolicyClient) Create(container *LoadBalancerCookieStickinessPolicy) (*LoadBalancerCookieStickinessPolicy, error) { + resp := &LoadBalancerCookieStickinessPolicy{} + err := c.rancherClient.doCreate(LOAD_BALANCER_COOKIE_STICKINESS_POLICY_TYPE, container, resp) + return resp, err +} + +func (c *LoadBalancerCookieStickinessPolicyClient) Update(existing *LoadBalancerCookieStickinessPolicy, updates interface{}) (*LoadBalancerCookieStickinessPolicy, error) { + resp := &LoadBalancerCookieStickinessPolicy{} + err := c.rancherClient.doUpdate(LOAD_BALANCER_COOKIE_STICKINESS_POLICY_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *LoadBalancerCookieStickinessPolicyClient) List(opts *ListOpts) (*LoadBalancerCookieStickinessPolicyCollection, error) { + resp := &LoadBalancerCookieStickinessPolicyCollection{} + err := c.rancherClient.doList(LOAD_BALANCER_COOKIE_STICKINESS_POLICY_TYPE, opts, resp) + return resp, err +} + +func (c *LoadBalancerCookieStickinessPolicyClient) ById(id string) (*LoadBalancerCookieStickinessPolicy, error) { + resp := &LoadBalancerCookieStickinessPolicy{} + err := c.rancherClient.doById(LOAD_BALANCER_COOKIE_STICKINESS_POLICY_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *LoadBalancerCookieStickinessPolicyClient) Delete(container *LoadBalancerCookieStickinessPolicy) error { + return c.rancherClient.doResourceDelete(LOAD_BALANCER_COOKIE_STICKINESS_POLICY_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_health_check.go b/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_health_check.go new file mode 100644 index 000000000000..1d96ec648063 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_health_check.go @@ -0,0 +1,79 @@ +package client + +const ( + LOAD_BALANCER_HEALTH_CHECK_TYPE = "loadBalancerHealthCheck" +) + +type LoadBalancerHealthCheck struct { + Resource + + HealthyThreshold int64 `json:"healthyThreshold,omitempty" yaml:"healthy_threshold,omitempty"` + + Interval int64 `json:"interval,omitempty" yaml:"interval,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + Port int64 `json:"port,omitempty" yaml:"port,omitempty"` + + RequestLine string `json:"requestLine,omitempty" yaml:"request_line,omitempty"` + + ResponseTimeout int64 `json:"responseTimeout,omitempty" yaml:"response_timeout,omitempty"` + + UnhealthyThreshold int64 `json:"unhealthyThreshold,omitempty" yaml:"unhealthy_threshold,omitempty"` +} + +type LoadBalancerHealthCheckCollection struct { + Collection + Data []LoadBalancerHealthCheck `json:"data,omitempty"` +} + +type LoadBalancerHealthCheckClient struct { + rancherClient *RancherClient +} + +type LoadBalancerHealthCheckOperations interface { + List(opts *ListOpts) (*LoadBalancerHealthCheckCollection, error) + Create(opts *LoadBalancerHealthCheck) (*LoadBalancerHealthCheck, error) + Update(existing *LoadBalancerHealthCheck, updates interface{}) (*LoadBalancerHealthCheck, error) + ById(id string) (*LoadBalancerHealthCheck, error) + Delete(container *LoadBalancerHealthCheck) error +} + +func newLoadBalancerHealthCheckClient(rancherClient *RancherClient) *LoadBalancerHealthCheckClient { + return &LoadBalancerHealthCheckClient{ + rancherClient: rancherClient, + } +} + +func (c *LoadBalancerHealthCheckClient) Create(container *LoadBalancerHealthCheck) (*LoadBalancerHealthCheck, error) { + resp := &LoadBalancerHealthCheck{} + err := c.rancherClient.doCreate(LOAD_BALANCER_HEALTH_CHECK_TYPE, container, resp) + return resp, err +} + +func (c *LoadBalancerHealthCheckClient) Update(existing *LoadBalancerHealthCheck, updates interface{}) (*LoadBalancerHealthCheck, error) { + resp := &LoadBalancerHealthCheck{} + err := c.rancherClient.doUpdate(LOAD_BALANCER_HEALTH_CHECK_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *LoadBalancerHealthCheckClient) List(opts *ListOpts) (*LoadBalancerHealthCheckCollection, error) { + resp := &LoadBalancerHealthCheckCollection{} + err := c.rancherClient.doList(LOAD_BALANCER_HEALTH_CHECK_TYPE, opts, resp) + return resp, err +} + +func (c *LoadBalancerHealthCheckClient) ById(id string) (*LoadBalancerHealthCheck, error) { + resp := &LoadBalancerHealthCheck{} + err := c.rancherClient.doById(LOAD_BALANCER_HEALTH_CHECK_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *LoadBalancerHealthCheckClient) Delete(container *LoadBalancerHealthCheck) error { + return c.rancherClient.doResourceDelete(LOAD_BALANCER_HEALTH_CHECK_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_host_map.go b/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_host_map.go new file mode 100644 index 000000000000..b135d29cc930 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_host_map.go @@ -0,0 +1,89 @@ +package client + +const ( + LOAD_BALANCER_HOST_MAP_TYPE = "loadBalancerHostMap" +) + +type LoadBalancerHostMap struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + HostId string `json:"hostId,omitempty" yaml:"host_id,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + LoadBalancerId string `json:"loadBalancerId,omitempty" yaml:"load_balancer_id,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type LoadBalancerHostMapCollection struct { + Collection + Data []LoadBalancerHostMap `json:"data,omitempty"` +} + +type LoadBalancerHostMapClient struct { + rancherClient *RancherClient +} + +type LoadBalancerHostMapOperations interface { + List(opts *ListOpts) (*LoadBalancerHostMapCollection, error) + Create(opts *LoadBalancerHostMap) (*LoadBalancerHostMap, error) + Update(existing *LoadBalancerHostMap, updates interface{}) (*LoadBalancerHostMap, error) + ById(id string) (*LoadBalancerHostMap, error) + Delete(container *LoadBalancerHostMap) error +} + +func newLoadBalancerHostMapClient(rancherClient *RancherClient) *LoadBalancerHostMapClient { + return &LoadBalancerHostMapClient{ + rancherClient: rancherClient, + } +} + +func (c *LoadBalancerHostMapClient) Create(container *LoadBalancerHostMap) (*LoadBalancerHostMap, error) { + resp := &LoadBalancerHostMap{} + err := c.rancherClient.doCreate(LOAD_BALANCER_HOST_MAP_TYPE, container, resp) + return resp, err +} + +func (c *LoadBalancerHostMapClient) Update(existing *LoadBalancerHostMap, updates interface{}) (*LoadBalancerHostMap, error) { + resp := &LoadBalancerHostMap{} + err := c.rancherClient.doUpdate(LOAD_BALANCER_HOST_MAP_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *LoadBalancerHostMapClient) List(opts *ListOpts) (*LoadBalancerHostMapCollection, error) { + resp := &LoadBalancerHostMapCollection{} + err := c.rancherClient.doList(LOAD_BALANCER_HOST_MAP_TYPE, opts, resp) + return resp, err +} + +func (c *LoadBalancerHostMapClient) ById(id string) (*LoadBalancerHostMap, error) { + resp := &LoadBalancerHostMap{} + err := c.rancherClient.doById(LOAD_BALANCER_HOST_MAP_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *LoadBalancerHostMapClient) Delete(container *LoadBalancerHostMap) error { + return c.rancherClient.doResourceDelete(LOAD_BALANCER_HOST_MAP_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_listener.go b/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_listener.go new file mode 100644 index 000000000000..5d0e983f994b --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_listener.go @@ -0,0 +1,127 @@ +package client + +const ( + LOAD_BALANCER_LISTENER_TYPE = "loadBalancerListener" +) + +type LoadBalancerListener struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Algorithm string `json:"algorithm,omitempty" yaml:"algorithm,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + PrivatePort int64 `json:"privatePort,omitempty" yaml:"private_port,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + ServiceId string `json:"serviceId,omitempty" yaml:"service_id,omitempty"` + + SourcePort int64 `json:"sourcePort,omitempty" yaml:"source_port,omitempty"` + + SourceProtocol string `json:"sourceProtocol,omitempty" yaml:"source_protocol,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + TargetPort int64 `json:"targetPort,omitempty" yaml:"target_port,omitempty"` + + TargetProtocol string `json:"targetProtocol,omitempty" yaml:"target_protocol,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type LoadBalancerListenerCollection struct { + Collection + Data []LoadBalancerListener `json:"data,omitempty"` +} + +type LoadBalancerListenerClient struct { + rancherClient *RancherClient +} + +type LoadBalancerListenerOperations interface { + List(opts *ListOpts) (*LoadBalancerListenerCollection, error) + Create(opts *LoadBalancerListener) (*LoadBalancerListener, error) + Update(existing *LoadBalancerListener, updates interface{}) (*LoadBalancerListener, error) + ById(id string) (*LoadBalancerListener, error) + Delete(container *LoadBalancerListener) error + + ActionCreate(*LoadBalancerListener) (*LoadBalancerListener, error) + + ActionRemove(*LoadBalancerListener) (*LoadBalancerListener, error) +} + +func newLoadBalancerListenerClient(rancherClient *RancherClient) *LoadBalancerListenerClient { + return &LoadBalancerListenerClient{ + rancherClient: rancherClient, + } +} + +func (c *LoadBalancerListenerClient) Create(container *LoadBalancerListener) (*LoadBalancerListener, error) { + resp := &LoadBalancerListener{} + err := c.rancherClient.doCreate(LOAD_BALANCER_LISTENER_TYPE, container, resp) + return resp, err +} + +func (c *LoadBalancerListenerClient) Update(existing *LoadBalancerListener, updates interface{}) (*LoadBalancerListener, error) { + resp := &LoadBalancerListener{} + err := c.rancherClient.doUpdate(LOAD_BALANCER_LISTENER_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *LoadBalancerListenerClient) List(opts *ListOpts) (*LoadBalancerListenerCollection, error) { + resp := &LoadBalancerListenerCollection{} + err := c.rancherClient.doList(LOAD_BALANCER_LISTENER_TYPE, opts, resp) + return resp, err +} + +func (c *LoadBalancerListenerClient) ById(id string) (*LoadBalancerListener, error) { + resp := &LoadBalancerListener{} + err := c.rancherClient.doById(LOAD_BALANCER_LISTENER_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *LoadBalancerListenerClient) Delete(container *LoadBalancerListener) error { + return c.rancherClient.doResourceDelete(LOAD_BALANCER_LISTENER_TYPE, &container.Resource) +} + +func (c *LoadBalancerListenerClient) ActionCreate(resource *LoadBalancerListener) (*LoadBalancerListener, error) { + + resp := &LoadBalancerListener{} + + err := c.rancherClient.doAction(LOAD_BALANCER_LISTENER_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *LoadBalancerListenerClient) ActionRemove(resource *LoadBalancerListener) (*LoadBalancerListener, error) { + + resp := &LoadBalancerListener{} + + err := c.rancherClient.doAction(LOAD_BALANCER_LISTENER_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_service.go b/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_service.go new file mode 100644 index 000000000000..ad6b7ba2d914 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_service.go @@ -0,0 +1,283 @@ +package client + +const ( + LOAD_BALANCER_SERVICE_TYPE = "loadBalancerService" +) + +type LoadBalancerService struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + AssignServiceIpAddress bool `json:"assignServiceIpAddress,omitempty" yaml:"assign_service_ip_address,omitempty"` + + CertificateIds []string `json:"certificateIds,omitempty" yaml:"certificate_ids,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + CurrentScale int64 `json:"currentScale,omitempty" yaml:"current_scale,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + DefaultCertificateId string `json:"defaultCertificateId,omitempty" yaml:"default_certificate_id,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + EnvironmentId string `json:"environmentId,omitempty" yaml:"environment_id,omitempty"` + + ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"` + + Fqdn string `json:"fqdn,omitempty" yaml:"fqdn,omitempty"` + + HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + LaunchConfig *LaunchConfig `json:"launchConfig,omitempty" yaml:"launch_config,omitempty"` + + LoadBalancerConfig *LoadBalancerConfig `json:"loadBalancerConfig,omitempty" yaml:"load_balancer_config,omitempty"` + + Metadata map[string]interface{} `json:"metadata,omitempty" yaml:"metadata,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + PublicEndpoints []interface{} `json:"publicEndpoints,omitempty" yaml:"public_endpoints,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + RetainIp bool `json:"retainIp,omitempty" yaml:"retain_ip,omitempty"` + + Scale int64 `json:"scale,omitempty" yaml:"scale,omitempty"` + + ScalePolicy *ScalePolicy `json:"scalePolicy,omitempty" yaml:"scale_policy,omitempty"` + + SelectorLink string `json:"selectorLink,omitempty" yaml:"selector_link,omitempty"` + + StartOnCreate bool `json:"startOnCreate,omitempty" yaml:"start_on_create,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Upgrade *ServiceUpgrade `json:"upgrade,omitempty" yaml:"upgrade,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + + Vip string `json:"vip,omitempty" yaml:"vip,omitempty"` +} + +type LoadBalancerServiceCollection struct { + Collection + Data []LoadBalancerService `json:"data,omitempty"` +} + +type LoadBalancerServiceClient struct { + rancherClient *RancherClient +} + +type LoadBalancerServiceOperations interface { + List(opts *ListOpts) (*LoadBalancerServiceCollection, error) + Create(opts *LoadBalancerService) (*LoadBalancerService, error) + Update(existing *LoadBalancerService, updates interface{}) (*LoadBalancerService, error) + ById(id string) (*LoadBalancerService, error) + Delete(container *LoadBalancerService) error + + ActionActivate(*LoadBalancerService) (*Service, error) + + ActionAddservicelink(*LoadBalancerService, *AddRemoveLoadBalancerServiceLinkInput) (*Service, error) + + ActionCancelrollback(*LoadBalancerService) (*Service, error) + + ActionCancelupgrade(*LoadBalancerService) (*Service, error) + + ActionCreate(*LoadBalancerService) (*Service, error) + + ActionDeactivate(*LoadBalancerService) (*Service, error) + + ActionFinishupgrade(*LoadBalancerService) (*Service, error) + + ActionRemove(*LoadBalancerService) (*Service, error) + + ActionRemoveservicelink(*LoadBalancerService, *AddRemoveLoadBalancerServiceLinkInput) (*Service, error) + + ActionRestart(*LoadBalancerService, *ServiceRestart) (*Service, error) + + ActionRollback(*LoadBalancerService) (*Service, error) + + ActionSetservicelinks(*LoadBalancerService, *SetLoadBalancerServiceLinksInput) (*Service, error) + + ActionUpdate(*LoadBalancerService) (*Service, error) + + ActionUpgrade(*LoadBalancerService, *ServiceUpgrade) (*Service, error) +} + +func newLoadBalancerServiceClient(rancherClient *RancherClient) *LoadBalancerServiceClient { + return &LoadBalancerServiceClient{ + rancherClient: rancherClient, + } +} + +func (c *LoadBalancerServiceClient) Create(container *LoadBalancerService) (*LoadBalancerService, error) { + resp := &LoadBalancerService{} + err := c.rancherClient.doCreate(LOAD_BALANCER_SERVICE_TYPE, container, resp) + return resp, err +} + +func (c *LoadBalancerServiceClient) Update(existing *LoadBalancerService, updates interface{}) (*LoadBalancerService, error) { + resp := &LoadBalancerService{} + err := c.rancherClient.doUpdate(LOAD_BALANCER_SERVICE_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *LoadBalancerServiceClient) List(opts *ListOpts) (*LoadBalancerServiceCollection, error) { + resp := &LoadBalancerServiceCollection{} + err := c.rancherClient.doList(LOAD_BALANCER_SERVICE_TYPE, opts, resp) + return resp, err +} + +func (c *LoadBalancerServiceClient) ById(id string) (*LoadBalancerService, error) { + resp := &LoadBalancerService{} + err := c.rancherClient.doById(LOAD_BALANCER_SERVICE_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *LoadBalancerServiceClient) Delete(container *LoadBalancerService) error { + return c.rancherClient.doResourceDelete(LOAD_BALANCER_SERVICE_TYPE, &container.Resource) +} + +func (c *LoadBalancerServiceClient) ActionActivate(resource *LoadBalancerService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "activate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *LoadBalancerServiceClient) ActionAddservicelink(resource *LoadBalancerService, input *AddRemoveLoadBalancerServiceLinkInput) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "addservicelink", &resource.Resource, input, resp) + + return resp, err +} + +func (c *LoadBalancerServiceClient) ActionCancelrollback(resource *LoadBalancerService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "cancelrollback", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *LoadBalancerServiceClient) ActionCancelupgrade(resource *LoadBalancerService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "cancelupgrade", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *LoadBalancerServiceClient) ActionCreate(resource *LoadBalancerService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *LoadBalancerServiceClient) ActionDeactivate(resource *LoadBalancerService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "deactivate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *LoadBalancerServiceClient) ActionFinishupgrade(resource *LoadBalancerService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "finishupgrade", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *LoadBalancerServiceClient) ActionRemove(resource *LoadBalancerService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *LoadBalancerServiceClient) ActionRemoveservicelink(resource *LoadBalancerService, input *AddRemoveLoadBalancerServiceLinkInput) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "removeservicelink", &resource.Resource, input, resp) + + return resp, err +} + +func (c *LoadBalancerServiceClient) ActionRestart(resource *LoadBalancerService, input *ServiceRestart) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "restart", &resource.Resource, input, resp) + + return resp, err +} + +func (c *LoadBalancerServiceClient) ActionRollback(resource *LoadBalancerService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "rollback", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *LoadBalancerServiceClient) ActionSetservicelinks(resource *LoadBalancerService, input *SetLoadBalancerServiceLinksInput) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "setservicelinks", &resource.Resource, input, resp) + + return resp, err +} + +func (c *LoadBalancerServiceClient) ActionUpdate(resource *LoadBalancerService) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *LoadBalancerServiceClient) ActionUpgrade(resource *LoadBalancerService, input *ServiceUpgrade) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(LOAD_BALANCER_SERVICE_TYPE, "upgrade", &resource.Resource, input, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_service_link.go b/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_service_link.go new file mode 100644 index 000000000000..b30c45be9258 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_service_link.go @@ -0,0 +1,71 @@ +package client + +const ( + LOAD_BALANCER_SERVICE_LINK_TYPE = "loadBalancerServiceLink" +) + +type LoadBalancerServiceLink struct { + Resource + + Ports []string `json:"ports,omitempty" yaml:"ports,omitempty"` + + ServiceId string `json:"serviceId,omitempty" yaml:"service_id,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type LoadBalancerServiceLinkCollection struct { + Collection + Data []LoadBalancerServiceLink `json:"data,omitempty"` +} + +type LoadBalancerServiceLinkClient struct { + rancherClient *RancherClient +} + +type LoadBalancerServiceLinkOperations interface { + List(opts *ListOpts) (*LoadBalancerServiceLinkCollection, error) + Create(opts *LoadBalancerServiceLink) (*LoadBalancerServiceLink, error) + Update(existing *LoadBalancerServiceLink, updates interface{}) (*LoadBalancerServiceLink, error) + ById(id string) (*LoadBalancerServiceLink, error) + Delete(container *LoadBalancerServiceLink) error +} + +func newLoadBalancerServiceLinkClient(rancherClient *RancherClient) *LoadBalancerServiceLinkClient { + return &LoadBalancerServiceLinkClient{ + rancherClient: rancherClient, + } +} + +func (c *LoadBalancerServiceLinkClient) Create(container *LoadBalancerServiceLink) (*LoadBalancerServiceLink, error) { + resp := &LoadBalancerServiceLink{} + err := c.rancherClient.doCreate(LOAD_BALANCER_SERVICE_LINK_TYPE, container, resp) + return resp, err +} + +func (c *LoadBalancerServiceLinkClient) Update(existing *LoadBalancerServiceLink, updates interface{}) (*LoadBalancerServiceLink, error) { + resp := &LoadBalancerServiceLink{} + err := c.rancherClient.doUpdate(LOAD_BALANCER_SERVICE_LINK_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *LoadBalancerServiceLinkClient) List(opts *ListOpts) (*LoadBalancerServiceLinkCollection, error) { + resp := &LoadBalancerServiceLinkCollection{} + err := c.rancherClient.doList(LOAD_BALANCER_SERVICE_LINK_TYPE, opts, resp) + return resp, err +} + +func (c *LoadBalancerServiceLinkClient) ById(id string) (*LoadBalancerServiceLink, error) { + resp := &LoadBalancerServiceLink{} + err := c.rancherClient.doById(LOAD_BALANCER_SERVICE_LINK_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *LoadBalancerServiceLinkClient) Delete(container *LoadBalancerServiceLink) error { + return c.rancherClient.doResourceDelete(LOAD_BALANCER_SERVICE_LINK_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_target.go b/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_target.go new file mode 100644 index 000000000000..b0037f7be065 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_load_balancer_target.go @@ -0,0 +1,132 @@ +package client + +const ( + LOAD_BALANCER_TARGET_TYPE = "loadBalancerTarget" +) + +type LoadBalancerTarget struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + InstanceId string `json:"instanceId,omitempty" yaml:"instance_id,omitempty"` + + IpAddress string `json:"ipAddress,omitempty" yaml:"ip_address,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + LoadBalancerId string `json:"loadBalancerId,omitempty" yaml:"load_balancer_id,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + Ports []string `json:"ports,omitempty" yaml:"ports,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type LoadBalancerTargetCollection struct { + Collection + Data []LoadBalancerTarget `json:"data,omitempty"` +} + +type LoadBalancerTargetClient struct { + rancherClient *RancherClient +} + +type LoadBalancerTargetOperations interface { + List(opts *ListOpts) (*LoadBalancerTargetCollection, error) + Create(opts *LoadBalancerTarget) (*LoadBalancerTarget, error) + Update(existing *LoadBalancerTarget, updates interface{}) (*LoadBalancerTarget, error) + ById(id string) (*LoadBalancerTarget, error) + Delete(container *LoadBalancerTarget) error + + ActionCreate(*LoadBalancerTarget) (*LoadBalancerTarget, error) + + ActionRemove(*LoadBalancerTarget) (*LoadBalancerTarget, error) + + ActionUpdate(*LoadBalancerTarget) (*LoadBalancerTarget, error) +} + +func newLoadBalancerTargetClient(rancherClient *RancherClient) *LoadBalancerTargetClient { + return &LoadBalancerTargetClient{ + rancherClient: rancherClient, + } +} + +func (c *LoadBalancerTargetClient) Create(container *LoadBalancerTarget) (*LoadBalancerTarget, error) { + resp := &LoadBalancerTarget{} + err := c.rancherClient.doCreate(LOAD_BALANCER_TARGET_TYPE, container, resp) + return resp, err +} + +func (c *LoadBalancerTargetClient) Update(existing *LoadBalancerTarget, updates interface{}) (*LoadBalancerTarget, error) { + resp := &LoadBalancerTarget{} + err := c.rancherClient.doUpdate(LOAD_BALANCER_TARGET_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *LoadBalancerTargetClient) List(opts *ListOpts) (*LoadBalancerTargetCollection, error) { + resp := &LoadBalancerTargetCollection{} + err := c.rancherClient.doList(LOAD_BALANCER_TARGET_TYPE, opts, resp) + return resp, err +} + +func (c *LoadBalancerTargetClient) ById(id string) (*LoadBalancerTarget, error) { + resp := &LoadBalancerTarget{} + err := c.rancherClient.doById(LOAD_BALANCER_TARGET_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *LoadBalancerTargetClient) Delete(container *LoadBalancerTarget) error { + return c.rancherClient.doResourceDelete(LOAD_BALANCER_TARGET_TYPE, &container.Resource) +} + +func (c *LoadBalancerTargetClient) ActionCreate(resource *LoadBalancerTarget) (*LoadBalancerTarget, error) { + + resp := &LoadBalancerTarget{} + + err := c.rancherClient.doAction(LOAD_BALANCER_TARGET_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *LoadBalancerTargetClient) ActionRemove(resource *LoadBalancerTarget) (*LoadBalancerTarget, error) { + + resp := &LoadBalancerTarget{} + + err := c.rancherClient.doAction(LOAD_BALANCER_TARGET_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *LoadBalancerTargetClient) ActionUpdate(resource *LoadBalancerTarget) (*LoadBalancerTarget, error) { + + resp := &LoadBalancerTarget{} + + err := c.rancherClient.doAction(LOAD_BALANCER_TARGET_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_local_auth_config.go b/vendor/github.com/rancher/go-rancher/client/generated_local_auth_config.go new file mode 100644 index 000000000000..16d98554586f --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_local_auth_config.go @@ -0,0 +1,75 @@ +package client + +const ( + LOCAL_AUTH_CONFIG_TYPE = "localAuthConfig" +) + +type LocalAuthConfig struct { + Resource + + AccessMode string `json:"accessMode,omitempty" yaml:"access_mode,omitempty"` + + Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + Password string `json:"password,omitempty" yaml:"password,omitempty"` + + Username string `json:"username,omitempty" yaml:"username,omitempty"` +} + +type LocalAuthConfigCollection struct { + Collection + Data []LocalAuthConfig `json:"data,omitempty"` +} + +type LocalAuthConfigClient struct { + rancherClient *RancherClient +} + +type LocalAuthConfigOperations interface { + List(opts *ListOpts) (*LocalAuthConfigCollection, error) + Create(opts *LocalAuthConfig) (*LocalAuthConfig, error) + Update(existing *LocalAuthConfig, updates interface{}) (*LocalAuthConfig, error) + ById(id string) (*LocalAuthConfig, error) + Delete(container *LocalAuthConfig) error +} + +func newLocalAuthConfigClient(rancherClient *RancherClient) *LocalAuthConfigClient { + return &LocalAuthConfigClient{ + rancherClient: rancherClient, + } +} + +func (c *LocalAuthConfigClient) Create(container *LocalAuthConfig) (*LocalAuthConfig, error) { + resp := &LocalAuthConfig{} + err := c.rancherClient.doCreate(LOCAL_AUTH_CONFIG_TYPE, container, resp) + return resp, err +} + +func (c *LocalAuthConfigClient) Update(existing *LocalAuthConfig, updates interface{}) (*LocalAuthConfig, error) { + resp := &LocalAuthConfig{} + err := c.rancherClient.doUpdate(LOCAL_AUTH_CONFIG_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *LocalAuthConfigClient) List(opts *ListOpts) (*LocalAuthConfigCollection, error) { + resp := &LocalAuthConfigCollection{} + err := c.rancherClient.doList(LOCAL_AUTH_CONFIG_TYPE, opts, resp) + return resp, err +} + +func (c *LocalAuthConfigClient) ById(id string) (*LocalAuthConfig, error) { + resp := &LocalAuthConfig{} + err := c.rancherClient.doById(LOCAL_AUTH_CONFIG_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *LocalAuthConfigClient) Delete(container *LocalAuthConfig) error { + return c.rancherClient.doResourceDelete(LOCAL_AUTH_CONFIG_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_log_config.go b/vendor/github.com/rancher/go-rancher/client/generated_log_config.go new file mode 100644 index 000000000000..1abfc4c93773 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_log_config.go @@ -0,0 +1,69 @@ +package client + +const ( + LOG_CONFIG_TYPE = "logConfig" +) + +type LogConfig struct { + Resource + + Config map[string]interface{} `json:"config,omitempty" yaml:"config,omitempty"` + + Driver string `json:"driver,omitempty" yaml:"driver,omitempty"` +} + +type LogConfigCollection struct { + Collection + Data []LogConfig `json:"data,omitempty"` +} + +type LogConfigClient struct { + rancherClient *RancherClient +} + +type LogConfigOperations interface { + List(opts *ListOpts) (*LogConfigCollection, error) + Create(opts *LogConfig) (*LogConfig, error) + Update(existing *LogConfig, updates interface{}) (*LogConfig, error) + ById(id string) (*LogConfig, error) + Delete(container *LogConfig) error +} + +func newLogConfigClient(rancherClient *RancherClient) *LogConfigClient { + return &LogConfigClient{ + rancherClient: rancherClient, + } +} + +func (c *LogConfigClient) Create(container *LogConfig) (*LogConfig, error) { + resp := &LogConfig{} + err := c.rancherClient.doCreate(LOG_CONFIG_TYPE, container, resp) + return resp, err +} + +func (c *LogConfigClient) Update(existing *LogConfig, updates interface{}) (*LogConfig, error) { + resp := &LogConfig{} + err := c.rancherClient.doUpdate(LOG_CONFIG_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *LogConfigClient) List(opts *ListOpts) (*LogConfigCollection, error) { + resp := &LogConfigCollection{} + err := c.rancherClient.doList(LOG_CONFIG_TYPE, opts, resp) + return resp, err +} + +func (c *LogConfigClient) ById(id string) (*LogConfig, error) { + resp := &LogConfig{} + err := c.rancherClient.doById(LOG_CONFIG_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *LogConfigClient) Delete(container *LogConfig) error { + return c.rancherClient.doResourceDelete(LOG_CONFIG_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_machine.go b/vendor/github.com/rancher/go-rancher/client/generated_machine.go new file mode 100644 index 000000000000..a62d0779d579 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_machine.go @@ -0,0 +1,174 @@ +package client + +const ( + MACHINE_TYPE = "machine" +) + +type Machine struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + AuthCertificateAuthority string `json:"authCertificateAuthority,omitempty" yaml:"auth_certificate_authority,omitempty"` + + AuthKey string `json:"authKey,omitempty" yaml:"auth_key,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + DockerVersion string `json:"dockerVersion,omitempty" yaml:"docker_version,omitempty"` + + Driver string `json:"driver,omitempty" yaml:"driver,omitempty"` + + EngineEnv map[string]interface{} `json:"engineEnv,omitempty" yaml:"engine_env,omitempty"` + + EngineInsecureRegistry []string `json:"engineInsecureRegistry,omitempty" yaml:"engine_insecure_registry,omitempty"` + + EngineInstallUrl string `json:"engineInstallUrl,omitempty" yaml:"engine_install_url,omitempty"` + + EngineLabel map[string]interface{} `json:"engineLabel,omitempty" yaml:"engine_label,omitempty"` + + EngineOpt map[string]interface{} `json:"engineOpt,omitempty" yaml:"engine_opt,omitempty"` + + EngineRegistryMirror []string `json:"engineRegistryMirror,omitempty" yaml:"engine_registry_mirror,omitempty"` + + EngineStorageDriver string `json:"engineStorageDriver,omitempty" yaml:"engine_storage_driver,omitempty"` + + ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"` + + ExtractedConfig string `json:"extractedConfig,omitempty" yaml:"extracted_config,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Labels map[string]interface{} `json:"labels,omitempty" yaml:"labels,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type MachineCollection struct { + Collection + Data []Machine `json:"data,omitempty"` +} + +type MachineClient struct { + rancherClient *RancherClient +} + +type MachineOperations interface { + List(opts *ListOpts) (*MachineCollection, error) + Create(opts *Machine) (*Machine, error) + Update(existing *Machine, updates interface{}) (*Machine, error) + ById(id string) (*Machine, error) + Delete(container *Machine) error + + ActionBootstrap(*Machine) (*PhysicalHost, error) + + ActionCreate(*Machine) (*PhysicalHost, error) + + ActionError(*Machine) (*PhysicalHost, error) + + ActionRemove(*Machine) (*PhysicalHost, error) + + ActionUpdate(*Machine) (*PhysicalHost, error) +} + +func newMachineClient(rancherClient *RancherClient) *MachineClient { + return &MachineClient{ + rancherClient: rancherClient, + } +} + +func (c *MachineClient) Create(container *Machine) (*Machine, error) { + resp := &Machine{} + err := c.rancherClient.doCreate(MACHINE_TYPE, container, resp) + return resp, err +} + +func (c *MachineClient) Update(existing *Machine, updates interface{}) (*Machine, error) { + resp := &Machine{} + err := c.rancherClient.doUpdate(MACHINE_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *MachineClient) List(opts *ListOpts) (*MachineCollection, error) { + resp := &MachineCollection{} + err := c.rancherClient.doList(MACHINE_TYPE, opts, resp) + return resp, err +} + +func (c *MachineClient) ById(id string) (*Machine, error) { + resp := &Machine{} + err := c.rancherClient.doById(MACHINE_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *MachineClient) Delete(container *Machine) error { + return c.rancherClient.doResourceDelete(MACHINE_TYPE, &container.Resource) +} + +func (c *MachineClient) ActionBootstrap(resource *Machine) (*PhysicalHost, error) { + + resp := &PhysicalHost{} + + err := c.rancherClient.doAction(MACHINE_TYPE, "bootstrap", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *MachineClient) ActionCreate(resource *Machine) (*PhysicalHost, error) { + + resp := &PhysicalHost{} + + err := c.rancherClient.doAction(MACHINE_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *MachineClient) ActionError(resource *Machine) (*PhysicalHost, error) { + + resp := &PhysicalHost{} + + err := c.rancherClient.doAction(MACHINE_TYPE, "error", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *MachineClient) ActionRemove(resource *Machine) (*PhysicalHost, error) { + + resp := &PhysicalHost{} + + err := c.rancherClient.doAction(MACHINE_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *MachineClient) ActionUpdate(resource *Machine) (*PhysicalHost, error) { + + resp := &PhysicalHost{} + + err := c.rancherClient.doAction(MACHINE_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_machine_driver.go b/vendor/github.com/rancher/go-rancher/client/generated_machine_driver.go new file mode 100644 index 000000000000..c54bcd4b6826 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_machine_driver.go @@ -0,0 +1,169 @@ +package client + +const ( + MACHINE_DRIVER_TYPE = "machineDriver" +) + +type MachineDriver struct { + Resource + + ActivateOnCreate bool `json:"activateOnCreate,omitempty" yaml:"activate_on_create,omitempty"` + + Builtin bool `json:"builtin,omitempty" yaml:"builtin,omitempty"` + + Checksum string `json:"checksum,omitempty" yaml:"checksum,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + DefaultActive bool `json:"defaultActive,omitempty" yaml:"default_active,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + UiUrl string `json:"uiUrl,omitempty" yaml:"ui_url,omitempty"` + + Url string `json:"url,omitempty" yaml:"url,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type MachineDriverCollection struct { + Collection + Data []MachineDriver `json:"data,omitempty"` +} + +type MachineDriverClient struct { + rancherClient *RancherClient +} + +type MachineDriverOperations interface { + List(opts *ListOpts) (*MachineDriverCollection, error) + Create(opts *MachineDriver) (*MachineDriver, error) + Update(existing *MachineDriver, updates interface{}) (*MachineDriver, error) + ById(id string) (*MachineDriver, error) + Delete(container *MachineDriver) error + + ActionActivate(*MachineDriver) (*MachineDriver, error) + + ActionDeactivate(*MachineDriver) (*MachineDriver, error) + + ActionError(*MachineDriver) (*MachineDriver, error) + + ActionReactivate(*MachineDriver) (*MachineDriver, error) + + ActionRemove(*MachineDriver) (*MachineDriver, error) + + ActionUpdate(*MachineDriver) (*MachineDriver, error) +} + +func newMachineDriverClient(rancherClient *RancherClient) *MachineDriverClient { + return &MachineDriverClient{ + rancherClient: rancherClient, + } +} + +func (c *MachineDriverClient) Create(container *MachineDriver) (*MachineDriver, error) { + resp := &MachineDriver{} + err := c.rancherClient.doCreate(MACHINE_DRIVER_TYPE, container, resp) + return resp, err +} + +func (c *MachineDriverClient) Update(existing *MachineDriver, updates interface{}) (*MachineDriver, error) { + resp := &MachineDriver{} + err := c.rancherClient.doUpdate(MACHINE_DRIVER_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *MachineDriverClient) List(opts *ListOpts) (*MachineDriverCollection, error) { + resp := &MachineDriverCollection{} + err := c.rancherClient.doList(MACHINE_DRIVER_TYPE, opts, resp) + return resp, err +} + +func (c *MachineDriverClient) ById(id string) (*MachineDriver, error) { + resp := &MachineDriver{} + err := c.rancherClient.doById(MACHINE_DRIVER_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *MachineDriverClient) Delete(container *MachineDriver) error { + return c.rancherClient.doResourceDelete(MACHINE_DRIVER_TYPE, &container.Resource) +} + +func (c *MachineDriverClient) ActionActivate(resource *MachineDriver) (*MachineDriver, error) { + + resp := &MachineDriver{} + + err := c.rancherClient.doAction(MACHINE_DRIVER_TYPE, "activate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *MachineDriverClient) ActionDeactivate(resource *MachineDriver) (*MachineDriver, error) { + + resp := &MachineDriver{} + + err := c.rancherClient.doAction(MACHINE_DRIVER_TYPE, "deactivate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *MachineDriverClient) ActionError(resource *MachineDriver) (*MachineDriver, error) { + + resp := &MachineDriver{} + + err := c.rancherClient.doAction(MACHINE_DRIVER_TYPE, "error", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *MachineDriverClient) ActionReactivate(resource *MachineDriver) (*MachineDriver, error) { + + resp := &MachineDriver{} + + err := c.rancherClient.doAction(MACHINE_DRIVER_TYPE, "reactivate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *MachineDriverClient) ActionRemove(resource *MachineDriver) (*MachineDriver, error) { + + resp := &MachineDriver{} + + err := c.rancherClient.doAction(MACHINE_DRIVER_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *MachineDriverClient) ActionUpdate(resource *MachineDriver) (*MachineDriver, error) { + + resp := &MachineDriver{} + + err := c.rancherClient.doAction(MACHINE_DRIVER_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_machine_driver_error_input.go b/vendor/github.com/rancher/go-rancher/client/generated_machine_driver_error_input.go new file mode 100644 index 000000000000..f00ec798b904 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_machine_driver_error_input.go @@ -0,0 +1,67 @@ +package client + +const ( + MACHINE_DRIVER_ERROR_INPUT_TYPE = "machineDriverErrorInput" +) + +type MachineDriverErrorInput struct { + Resource + + ErrorMessage string `json:"errorMessage,omitempty" yaml:"error_message,omitempty"` +} + +type MachineDriverErrorInputCollection struct { + Collection + Data []MachineDriverErrorInput `json:"data,omitempty"` +} + +type MachineDriverErrorInputClient struct { + rancherClient *RancherClient +} + +type MachineDriverErrorInputOperations interface { + List(opts *ListOpts) (*MachineDriverErrorInputCollection, error) + Create(opts *MachineDriverErrorInput) (*MachineDriverErrorInput, error) + Update(existing *MachineDriverErrorInput, updates interface{}) (*MachineDriverErrorInput, error) + ById(id string) (*MachineDriverErrorInput, error) + Delete(container *MachineDriverErrorInput) error +} + +func newMachineDriverErrorInputClient(rancherClient *RancherClient) *MachineDriverErrorInputClient { + return &MachineDriverErrorInputClient{ + rancherClient: rancherClient, + } +} + +func (c *MachineDriverErrorInputClient) Create(container *MachineDriverErrorInput) (*MachineDriverErrorInput, error) { + resp := &MachineDriverErrorInput{} + err := c.rancherClient.doCreate(MACHINE_DRIVER_ERROR_INPUT_TYPE, container, resp) + return resp, err +} + +func (c *MachineDriverErrorInputClient) Update(existing *MachineDriverErrorInput, updates interface{}) (*MachineDriverErrorInput, error) { + resp := &MachineDriverErrorInput{} + err := c.rancherClient.doUpdate(MACHINE_DRIVER_ERROR_INPUT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *MachineDriverErrorInputClient) List(opts *ListOpts) (*MachineDriverErrorInputCollection, error) { + resp := &MachineDriverErrorInputCollection{} + err := c.rancherClient.doList(MACHINE_DRIVER_ERROR_INPUT_TYPE, opts, resp) + return resp, err +} + +func (c *MachineDriverErrorInputClient) ById(id string) (*MachineDriverErrorInput, error) { + resp := &MachineDriverErrorInput{} + err := c.rancherClient.doById(MACHINE_DRIVER_ERROR_INPUT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *MachineDriverErrorInputClient) Delete(container *MachineDriverErrorInput) error { + return c.rancherClient.doResourceDelete(MACHINE_DRIVER_ERROR_INPUT_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_machine_driver_update_input.go b/vendor/github.com/rancher/go-rancher/client/generated_machine_driver_update_input.go new file mode 100644 index 000000000000..7e046af56eda --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_machine_driver_update_input.go @@ -0,0 +1,71 @@ +package client + +const ( + MACHINE_DRIVER_UPDATE_INPUT_TYPE = "machineDriverUpdateInput" +) + +type MachineDriverUpdateInput struct { + Resource + + Md5checksum string `json:"md5checksum,omitempty" yaml:"md5checksum,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + Uri string `json:"uri,omitempty" yaml:"uri,omitempty"` +} + +type MachineDriverUpdateInputCollection struct { + Collection + Data []MachineDriverUpdateInput `json:"data,omitempty"` +} + +type MachineDriverUpdateInputClient struct { + rancherClient *RancherClient +} + +type MachineDriverUpdateInputOperations interface { + List(opts *ListOpts) (*MachineDriverUpdateInputCollection, error) + Create(opts *MachineDriverUpdateInput) (*MachineDriverUpdateInput, error) + Update(existing *MachineDriverUpdateInput, updates interface{}) (*MachineDriverUpdateInput, error) + ById(id string) (*MachineDriverUpdateInput, error) + Delete(container *MachineDriverUpdateInput) error +} + +func newMachineDriverUpdateInputClient(rancherClient *RancherClient) *MachineDriverUpdateInputClient { + return &MachineDriverUpdateInputClient{ + rancherClient: rancherClient, + } +} + +func (c *MachineDriverUpdateInputClient) Create(container *MachineDriverUpdateInput) (*MachineDriverUpdateInput, error) { + resp := &MachineDriverUpdateInput{} + err := c.rancherClient.doCreate(MACHINE_DRIVER_UPDATE_INPUT_TYPE, container, resp) + return resp, err +} + +func (c *MachineDriverUpdateInputClient) Update(existing *MachineDriverUpdateInput, updates interface{}) (*MachineDriverUpdateInput, error) { + resp := &MachineDriverUpdateInput{} + err := c.rancherClient.doUpdate(MACHINE_DRIVER_UPDATE_INPUT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *MachineDriverUpdateInputClient) List(opts *ListOpts) (*MachineDriverUpdateInputCollection, error) { + resp := &MachineDriverUpdateInputCollection{} + err := c.rancherClient.doList(MACHINE_DRIVER_UPDATE_INPUT_TYPE, opts, resp) + return resp, err +} + +func (c *MachineDriverUpdateInputClient) ById(id string) (*MachineDriverUpdateInput, error) { + resp := &MachineDriverUpdateInput{} + err := c.rancherClient.doById(MACHINE_DRIVER_UPDATE_INPUT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *MachineDriverUpdateInputClient) Delete(container *MachineDriverUpdateInput) error { + return c.rancherClient.doResourceDelete(MACHINE_DRIVER_UPDATE_INPUT_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_mount.go b/vendor/github.com/rancher/go-rancher/client/generated_mount.go new file mode 100644 index 000000000000..59c976303fb2 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_mount.go @@ -0,0 +1,132 @@ +package client + +const ( + MOUNT_TYPE = "mount" +) + +type Mount struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + InstanceId string `json:"instanceId,omitempty" yaml:"instance_id,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + Path string `json:"path,omitempty" yaml:"path,omitempty"` + + Permissions string `json:"permissions,omitempty" yaml:"permissions,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + + VolumeId string `json:"volumeId,omitempty" yaml:"volume_id,omitempty"` +} + +type MountCollection struct { + Collection + Data []Mount `json:"data,omitempty"` +} + +type MountClient struct { + rancherClient *RancherClient +} + +type MountOperations interface { + List(opts *ListOpts) (*MountCollection, error) + Create(opts *Mount) (*Mount, error) + Update(existing *Mount, updates interface{}) (*Mount, error) + ById(id string) (*Mount, error) + Delete(container *Mount) error + + ActionCreate(*Mount) (*Mount, error) + + ActionDeactivate(*Mount) (*Mount, error) + + ActionRemove(*Mount) (*Mount, error) +} + +func newMountClient(rancherClient *RancherClient) *MountClient { + return &MountClient{ + rancherClient: rancherClient, + } +} + +func (c *MountClient) Create(container *Mount) (*Mount, error) { + resp := &Mount{} + err := c.rancherClient.doCreate(MOUNT_TYPE, container, resp) + return resp, err +} + +func (c *MountClient) Update(existing *Mount, updates interface{}) (*Mount, error) { + resp := &Mount{} + err := c.rancherClient.doUpdate(MOUNT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *MountClient) List(opts *ListOpts) (*MountCollection, error) { + resp := &MountCollection{} + err := c.rancherClient.doList(MOUNT_TYPE, opts, resp) + return resp, err +} + +func (c *MountClient) ById(id string) (*Mount, error) { + resp := &Mount{} + err := c.rancherClient.doById(MOUNT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *MountClient) Delete(container *Mount) error { + return c.rancherClient.doResourceDelete(MOUNT_TYPE, &container.Resource) +} + +func (c *MountClient) ActionCreate(resource *Mount) (*Mount, error) { + + resp := &Mount{} + + err := c.rancherClient.doAction(MOUNT_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *MountClient) ActionDeactivate(resource *Mount) (*Mount, error) { + + resp := &Mount{} + + err := c.rancherClient.doAction(MOUNT_TYPE, "deactivate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *MountClient) ActionRemove(resource *Mount) (*Mount, error) { + + resp := &Mount{} + + err := c.rancherClient.doAction(MOUNT_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_network.go b/vendor/github.com/rancher/go-rancher/client/generated_network.go new file mode 100644 index 000000000000..53c59be4bda8 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_network.go @@ -0,0 +1,168 @@ +package client + +const ( + NETWORK_TYPE = "network" +) + +type Network struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type NetworkCollection struct { + Collection + Data []Network `json:"data,omitempty"` +} + +type NetworkClient struct { + rancherClient *RancherClient +} + +type NetworkOperations interface { + List(opts *ListOpts) (*NetworkCollection, error) + Create(opts *Network) (*Network, error) + Update(existing *Network, updates interface{}) (*Network, error) + ById(id string) (*Network, error) + Delete(container *Network) error + + ActionActivate(*Network) (*Network, error) + + ActionCreate(*Network) (*Network, error) + + ActionDeactivate(*Network) (*Network, error) + + ActionPurge(*Network) (*Network, error) + + ActionRemove(*Network) (*Network, error) + + ActionRestore(*Network) (*Network, error) + + ActionUpdate(*Network) (*Network, error) +} + +func newNetworkClient(rancherClient *RancherClient) *NetworkClient { + return &NetworkClient{ + rancherClient: rancherClient, + } +} + +func (c *NetworkClient) Create(container *Network) (*Network, error) { + resp := &Network{} + err := c.rancherClient.doCreate(NETWORK_TYPE, container, resp) + return resp, err +} + +func (c *NetworkClient) Update(existing *Network, updates interface{}) (*Network, error) { + resp := &Network{} + err := c.rancherClient.doUpdate(NETWORK_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *NetworkClient) List(opts *ListOpts) (*NetworkCollection, error) { + resp := &NetworkCollection{} + err := c.rancherClient.doList(NETWORK_TYPE, opts, resp) + return resp, err +} + +func (c *NetworkClient) ById(id string) (*Network, error) { + resp := &Network{} + err := c.rancherClient.doById(NETWORK_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *NetworkClient) Delete(container *Network) error { + return c.rancherClient.doResourceDelete(NETWORK_TYPE, &container.Resource) +} + +func (c *NetworkClient) ActionActivate(resource *Network) (*Network, error) { + + resp := &Network{} + + err := c.rancherClient.doAction(NETWORK_TYPE, "activate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *NetworkClient) ActionCreate(resource *Network) (*Network, error) { + + resp := &Network{} + + err := c.rancherClient.doAction(NETWORK_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *NetworkClient) ActionDeactivate(resource *Network) (*Network, error) { + + resp := &Network{} + + err := c.rancherClient.doAction(NETWORK_TYPE, "deactivate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *NetworkClient) ActionPurge(resource *Network) (*Network, error) { + + resp := &Network{} + + err := c.rancherClient.doAction(NETWORK_TYPE, "purge", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *NetworkClient) ActionRemove(resource *Network) (*Network, error) { + + resp := &Network{} + + err := c.rancherClient.doAction(NETWORK_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *NetworkClient) ActionRestore(resource *Network) (*Network, error) { + + resp := &Network{} + + err := c.rancherClient.doAction(NETWORK_TYPE, "restore", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *NetworkClient) ActionUpdate(resource *Network) (*Network, error) { + + resp := &Network{} + + err := c.rancherClient.doAction(NETWORK_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_nfs_config.go b/vendor/github.com/rancher/go-rancher/client/generated_nfs_config.go new file mode 100644 index 000000000000..d7fecc47321c --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_nfs_config.go @@ -0,0 +1,71 @@ +package client + +const ( + NFS_CONFIG_TYPE = "nfsConfig" +) + +type NfsConfig struct { + Resource + + MountOptions string `json:"mountOptions,omitempty" yaml:"mount_options,omitempty"` + + Server string `json:"server,omitempty" yaml:"server,omitempty"` + + Share string `json:"share,omitempty" yaml:"share,omitempty"` +} + +type NfsConfigCollection struct { + Collection + Data []NfsConfig `json:"data,omitempty"` +} + +type NfsConfigClient struct { + rancherClient *RancherClient +} + +type NfsConfigOperations interface { + List(opts *ListOpts) (*NfsConfigCollection, error) + Create(opts *NfsConfig) (*NfsConfig, error) + Update(existing *NfsConfig, updates interface{}) (*NfsConfig, error) + ById(id string) (*NfsConfig, error) + Delete(container *NfsConfig) error +} + +func newNfsConfigClient(rancherClient *RancherClient) *NfsConfigClient { + return &NfsConfigClient{ + rancherClient: rancherClient, + } +} + +func (c *NfsConfigClient) Create(container *NfsConfig) (*NfsConfig, error) { + resp := &NfsConfig{} + err := c.rancherClient.doCreate(NFS_CONFIG_TYPE, container, resp) + return resp, err +} + +func (c *NfsConfigClient) Update(existing *NfsConfig, updates interface{}) (*NfsConfig, error) { + resp := &NfsConfig{} + err := c.rancherClient.doUpdate(NFS_CONFIG_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *NfsConfigClient) List(opts *ListOpts) (*NfsConfigCollection, error) { + resp := &NfsConfigCollection{} + err := c.rancherClient.doList(NFS_CONFIG_TYPE, opts, resp) + return resp, err +} + +func (c *NfsConfigClient) ById(id string) (*NfsConfig, error) { + resp := &NfsConfig{} + err := c.rancherClient.doById(NFS_CONFIG_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *NfsConfigClient) Delete(container *NfsConfig) error { + return c.rancherClient.doResourceDelete(NFS_CONFIG_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_openldapconfig.go b/vendor/github.com/rancher/go-rancher/client/generated_openldapconfig.go new file mode 100644 index 000000000000..7b24f4132817 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_openldapconfig.go @@ -0,0 +1,109 @@ +package client + +const ( + OPENLDAPCONFIG_TYPE = "openldapconfig" +) + +type Openldapconfig struct { + Resource + + AccessMode string `json:"accessMode,omitempty" yaml:"access_mode,omitempty"` + + ConnectionTimeout int64 `json:"connectionTimeout,omitempty" yaml:"connection_timeout,omitempty"` + + Domain string `json:"domain,omitempty" yaml:"domain,omitempty"` + + Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"` + + GroupMemberMappingAttribute string `json:"groupMemberMappingAttribute,omitempty" yaml:"group_member_mapping_attribute,omitempty"` + + GroupNameField string `json:"groupNameField,omitempty" yaml:"group_name_field,omitempty"` + + GroupObjectClass string `json:"groupObjectClass,omitempty" yaml:"group_object_class,omitempty"` + + GroupSearchField string `json:"groupSearchField,omitempty" yaml:"group_search_field,omitempty"` + + LoginDomain string `json:"loginDomain,omitempty" yaml:"login_domain,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + Port int64 `json:"port,omitempty" yaml:"port,omitempty"` + + Server string `json:"server,omitempty" yaml:"server,omitempty"` + + ServiceAccountPassword string `json:"serviceAccountPassword,omitempty" yaml:"service_account_password,omitempty"` + + ServiceAccountUsername string `json:"serviceAccountUsername,omitempty" yaml:"service_account_username,omitempty"` + + Tls bool `json:"tls,omitempty" yaml:"tls,omitempty"` + + UserDisabledBitMask int64 `json:"userDisabledBitMask,omitempty" yaml:"user_disabled_bit_mask,omitempty"` + + UserEnabledAttribute string `json:"userEnabledAttribute,omitempty" yaml:"user_enabled_attribute,omitempty"` + + UserLoginField string `json:"userLoginField,omitempty" yaml:"user_login_field,omitempty"` + + UserMemberAttribute string `json:"userMemberAttribute,omitempty" yaml:"user_member_attribute,omitempty"` + + UserNameField string `json:"userNameField,omitempty" yaml:"user_name_field,omitempty"` + + UserObjectClass string `json:"userObjectClass,omitempty" yaml:"user_object_class,omitempty"` + + UserSearchField string `json:"userSearchField,omitempty" yaml:"user_search_field,omitempty"` +} + +type OpenldapconfigCollection struct { + Collection + Data []Openldapconfig `json:"data,omitempty"` +} + +type OpenldapconfigClient struct { + rancherClient *RancherClient +} + +type OpenldapconfigOperations interface { + List(opts *ListOpts) (*OpenldapconfigCollection, error) + Create(opts *Openldapconfig) (*Openldapconfig, error) + Update(existing *Openldapconfig, updates interface{}) (*Openldapconfig, error) + ById(id string) (*Openldapconfig, error) + Delete(container *Openldapconfig) error +} + +func newOpenldapconfigClient(rancherClient *RancherClient) *OpenldapconfigClient { + return &OpenldapconfigClient{ + rancherClient: rancherClient, + } +} + +func (c *OpenldapconfigClient) Create(container *Openldapconfig) (*Openldapconfig, error) { + resp := &Openldapconfig{} + err := c.rancherClient.doCreate(OPENLDAPCONFIG_TYPE, container, resp) + return resp, err +} + +func (c *OpenldapconfigClient) Update(existing *Openldapconfig, updates interface{}) (*Openldapconfig, error) { + resp := &Openldapconfig{} + err := c.rancherClient.doUpdate(OPENLDAPCONFIG_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *OpenldapconfigClient) List(opts *ListOpts) (*OpenldapconfigCollection, error) { + resp := &OpenldapconfigCollection{} + err := c.rancherClient.doList(OPENLDAPCONFIG_TYPE, opts, resp) + return resp, err +} + +func (c *OpenldapconfigClient) ById(id string) (*Openldapconfig, error) { + resp := &Openldapconfig{} + err := c.rancherClient.doById(OPENLDAPCONFIG_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *OpenldapconfigClient) Delete(container *Openldapconfig) error { + return c.rancherClient.doResourceDelete(OPENLDAPCONFIG_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_openstack_config.go b/vendor/github.com/rancher/go-rancher/client/generated_openstack_config.go new file mode 100644 index 000000000000..db914acf05b1 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_openstack_config.go @@ -0,0 +1,107 @@ +package client + +const ( + OPENSTACK_CONFIG_TYPE = "openstackConfig" +) + +type OpenstackConfig struct { + Resource + + AuthUrl string `json:"authUrl,omitempty" yaml:"auth_url,omitempty"` + + AvailabilityZone string `json:"availabilityZone,omitempty" yaml:"availability_zone,omitempty"` + + DomainId string `json:"domainId,omitempty" yaml:"domain_id,omitempty"` + + DomainName string `json:"domainName,omitempty" yaml:"domain_name,omitempty"` + + EndpointType string `json:"endpointType,omitempty" yaml:"endpoint_type,omitempty"` + + FlavorId string `json:"flavorId,omitempty" yaml:"flavor_id,omitempty"` + + FlavorName string `json:"flavorName,omitempty" yaml:"flavor_name,omitempty"` + + FloatingipPool string `json:"floatingipPool,omitempty" yaml:"floatingip_pool,omitempty"` + + ImageId string `json:"imageId,omitempty" yaml:"image_id,omitempty"` + + ImageName string `json:"imageName,omitempty" yaml:"image_name,omitempty"` + + Insecure bool `json:"insecure,omitempty" yaml:"insecure,omitempty"` + + NetId string `json:"netId,omitempty" yaml:"net_id,omitempty"` + + NetName string `json:"netName,omitempty" yaml:"net_name,omitempty"` + + Password string `json:"password,omitempty" yaml:"password,omitempty"` + + Region string `json:"region,omitempty" yaml:"region,omitempty"` + + SecGroups string `json:"secGroups,omitempty" yaml:"sec_groups,omitempty"` + + SshPort string `json:"sshPort,omitempty" yaml:"ssh_port,omitempty"` + + SshUser string `json:"sshUser,omitempty" yaml:"ssh_user,omitempty"` + + TenantId string `json:"tenantId,omitempty" yaml:"tenant_id,omitempty"` + + TenantName string `json:"tenantName,omitempty" yaml:"tenant_name,omitempty"` + + Username string `json:"username,omitempty" yaml:"username,omitempty"` +} + +type OpenstackConfigCollection struct { + Collection + Data []OpenstackConfig `json:"data,omitempty"` +} + +type OpenstackConfigClient struct { + rancherClient *RancherClient +} + +type OpenstackConfigOperations interface { + List(opts *ListOpts) (*OpenstackConfigCollection, error) + Create(opts *OpenstackConfig) (*OpenstackConfig, error) + Update(existing *OpenstackConfig, updates interface{}) (*OpenstackConfig, error) + ById(id string) (*OpenstackConfig, error) + Delete(container *OpenstackConfig) error +} + +func newOpenstackConfigClient(rancherClient *RancherClient) *OpenstackConfigClient { + return &OpenstackConfigClient{ + rancherClient: rancherClient, + } +} + +func (c *OpenstackConfigClient) Create(container *OpenstackConfig) (*OpenstackConfig, error) { + resp := &OpenstackConfig{} + err := c.rancherClient.doCreate(OPENSTACK_CONFIG_TYPE, container, resp) + return resp, err +} + +func (c *OpenstackConfigClient) Update(existing *OpenstackConfig, updates interface{}) (*OpenstackConfig, error) { + resp := &OpenstackConfig{} + err := c.rancherClient.doUpdate(OPENSTACK_CONFIG_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *OpenstackConfigClient) List(opts *ListOpts) (*OpenstackConfigCollection, error) { + resp := &OpenstackConfigCollection{} + err := c.rancherClient.doList(OPENSTACK_CONFIG_TYPE, opts, resp) + return resp, err +} + +func (c *OpenstackConfigClient) ById(id string) (*OpenstackConfig, error) { + resp := &OpenstackConfig{} + err := c.rancherClient.doById(OPENSTACK_CONFIG_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *OpenstackConfigClient) Delete(container *OpenstackConfig) error { + return c.rancherClient.doResourceDelete(OPENSTACK_CONFIG_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_packet_config.go b/vendor/github.com/rancher/go-rancher/client/generated_packet_config.go new file mode 100644 index 000000000000..f0d03e51fb1c --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_packet_config.go @@ -0,0 +1,77 @@ +package client + +const ( + PACKET_CONFIG_TYPE = "packetConfig" +) + +type PacketConfig struct { + Resource + + ApiKey string `json:"apiKey,omitempty" yaml:"api_key,omitempty"` + + BillingCycle string `json:"billingCycle,omitempty" yaml:"billing_cycle,omitempty"` + + FacilityCode string `json:"facilityCode,omitempty" yaml:"facility_code,omitempty"` + + Os string `json:"os,omitempty" yaml:"os,omitempty"` + + Plan string `json:"plan,omitempty" yaml:"plan,omitempty"` + + ProjectId string `json:"projectId,omitempty" yaml:"project_id,omitempty"` +} + +type PacketConfigCollection struct { + Collection + Data []PacketConfig `json:"data,omitempty"` +} + +type PacketConfigClient struct { + rancherClient *RancherClient +} + +type PacketConfigOperations interface { + List(opts *ListOpts) (*PacketConfigCollection, error) + Create(opts *PacketConfig) (*PacketConfig, error) + Update(existing *PacketConfig, updates interface{}) (*PacketConfig, error) + ById(id string) (*PacketConfig, error) + Delete(container *PacketConfig) error +} + +func newPacketConfigClient(rancherClient *RancherClient) *PacketConfigClient { + return &PacketConfigClient{ + rancherClient: rancherClient, + } +} + +func (c *PacketConfigClient) Create(container *PacketConfig) (*PacketConfig, error) { + resp := &PacketConfig{} + err := c.rancherClient.doCreate(PACKET_CONFIG_TYPE, container, resp) + return resp, err +} + +func (c *PacketConfigClient) Update(existing *PacketConfig, updates interface{}) (*PacketConfig, error) { + resp := &PacketConfig{} + err := c.rancherClient.doUpdate(PACKET_CONFIG_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *PacketConfigClient) List(opts *ListOpts) (*PacketConfigCollection, error) { + resp := &PacketConfigCollection{} + err := c.rancherClient.doList(PACKET_CONFIG_TYPE, opts, resp) + return resp, err +} + +func (c *PacketConfigClient) ById(id string) (*PacketConfig, error) { + resp := &PacketConfig{} + err := c.rancherClient.doById(PACKET_CONFIG_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *PacketConfigClient) Delete(container *PacketConfig) error { + return c.rancherClient.doResourceDelete(PACKET_CONFIG_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_password.go b/vendor/github.com/rancher/go-rancher/client/generated_password.go new file mode 100644 index 000000000000..427eca3125ad --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_password.go @@ -0,0 +1,172 @@ +package client + +const ( + PASSWORD_TYPE = "password" +) + +type Password struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + PublicValue string `json:"publicValue,omitempty" yaml:"public_value,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + SecretValue string `json:"secretValue,omitempty" yaml:"secret_value,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type PasswordCollection struct { + Collection + Data []Password `json:"data,omitempty"` +} + +type PasswordClient struct { + rancherClient *RancherClient +} + +type PasswordOperations interface { + List(opts *ListOpts) (*PasswordCollection, error) + Create(opts *Password) (*Password, error) + Update(existing *Password, updates interface{}) (*Password, error) + ById(id string) (*Password, error) + Delete(container *Password) error + + ActionActivate(*Password) (*Credential, error) + + ActionChangesecret(*Password, *ChangeSecretInput) (*ChangeSecretInput, error) + + ActionCreate(*Password) (*Credential, error) + + ActionDeactivate(*Password) (*Credential, error) + + ActionPurge(*Password) (*Credential, error) + + ActionRemove(*Password) (*Credential, error) + + ActionUpdate(*Password) (*Credential, error) +} + +func newPasswordClient(rancherClient *RancherClient) *PasswordClient { + return &PasswordClient{ + rancherClient: rancherClient, + } +} + +func (c *PasswordClient) Create(container *Password) (*Password, error) { + resp := &Password{} + err := c.rancherClient.doCreate(PASSWORD_TYPE, container, resp) + return resp, err +} + +func (c *PasswordClient) Update(existing *Password, updates interface{}) (*Password, error) { + resp := &Password{} + err := c.rancherClient.doUpdate(PASSWORD_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *PasswordClient) List(opts *ListOpts) (*PasswordCollection, error) { + resp := &PasswordCollection{} + err := c.rancherClient.doList(PASSWORD_TYPE, opts, resp) + return resp, err +} + +func (c *PasswordClient) ById(id string) (*Password, error) { + resp := &Password{} + err := c.rancherClient.doById(PASSWORD_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *PasswordClient) Delete(container *Password) error { + return c.rancherClient.doResourceDelete(PASSWORD_TYPE, &container.Resource) +} + +func (c *PasswordClient) ActionActivate(resource *Password) (*Credential, error) { + + resp := &Credential{} + + err := c.rancherClient.doAction(PASSWORD_TYPE, "activate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *PasswordClient) ActionChangesecret(resource *Password, input *ChangeSecretInput) (*ChangeSecretInput, error) { + + resp := &ChangeSecretInput{} + + err := c.rancherClient.doAction(PASSWORD_TYPE, "changesecret", &resource.Resource, input, resp) + + return resp, err +} + +func (c *PasswordClient) ActionCreate(resource *Password) (*Credential, error) { + + resp := &Credential{} + + err := c.rancherClient.doAction(PASSWORD_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *PasswordClient) ActionDeactivate(resource *Password) (*Credential, error) { + + resp := &Credential{} + + err := c.rancherClient.doAction(PASSWORD_TYPE, "deactivate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *PasswordClient) ActionPurge(resource *Password) (*Credential, error) { + + resp := &Credential{} + + err := c.rancherClient.doAction(PASSWORD_TYPE, "purge", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *PasswordClient) ActionRemove(resource *Password) (*Credential, error) { + + resp := &Credential{} + + err := c.rancherClient.doAction(PASSWORD_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *PasswordClient) ActionUpdate(resource *Password) (*Credential, error) { + + resp := &Credential{} + + err := c.rancherClient.doAction(PASSWORD_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_physical_host.go b/vendor/github.com/rancher/go-rancher/client/generated_physical_host.go new file mode 100644 index 000000000000..99b623677419 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_physical_host.go @@ -0,0 +1,150 @@ +package client + +const ( + PHYSICAL_HOST_TYPE = "physicalHost" +) + +type PhysicalHost struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + Driver string `json:"driver,omitempty" yaml:"driver,omitempty"` + + ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type PhysicalHostCollection struct { + Collection + Data []PhysicalHost `json:"data,omitempty"` +} + +type PhysicalHostClient struct { + rancherClient *RancherClient +} + +type PhysicalHostOperations interface { + List(opts *ListOpts) (*PhysicalHostCollection, error) + Create(opts *PhysicalHost) (*PhysicalHost, error) + Update(existing *PhysicalHost, updates interface{}) (*PhysicalHost, error) + ById(id string) (*PhysicalHost, error) + Delete(container *PhysicalHost) error + + ActionBootstrap(*PhysicalHost) (*PhysicalHost, error) + + ActionCreate(*PhysicalHost) (*PhysicalHost, error) + + ActionError(*PhysicalHost) (*PhysicalHost, error) + + ActionRemove(*PhysicalHost) (*PhysicalHost, error) + + ActionUpdate(*PhysicalHost) (*PhysicalHost, error) +} + +func newPhysicalHostClient(rancherClient *RancherClient) *PhysicalHostClient { + return &PhysicalHostClient{ + rancherClient: rancherClient, + } +} + +func (c *PhysicalHostClient) Create(container *PhysicalHost) (*PhysicalHost, error) { + resp := &PhysicalHost{} + err := c.rancherClient.doCreate(PHYSICAL_HOST_TYPE, container, resp) + return resp, err +} + +func (c *PhysicalHostClient) Update(existing *PhysicalHost, updates interface{}) (*PhysicalHost, error) { + resp := &PhysicalHost{} + err := c.rancherClient.doUpdate(PHYSICAL_HOST_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *PhysicalHostClient) List(opts *ListOpts) (*PhysicalHostCollection, error) { + resp := &PhysicalHostCollection{} + err := c.rancherClient.doList(PHYSICAL_HOST_TYPE, opts, resp) + return resp, err +} + +func (c *PhysicalHostClient) ById(id string) (*PhysicalHost, error) { + resp := &PhysicalHost{} + err := c.rancherClient.doById(PHYSICAL_HOST_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *PhysicalHostClient) Delete(container *PhysicalHost) error { + return c.rancherClient.doResourceDelete(PHYSICAL_HOST_TYPE, &container.Resource) +} + +func (c *PhysicalHostClient) ActionBootstrap(resource *PhysicalHost) (*PhysicalHost, error) { + + resp := &PhysicalHost{} + + err := c.rancherClient.doAction(PHYSICAL_HOST_TYPE, "bootstrap", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *PhysicalHostClient) ActionCreate(resource *PhysicalHost) (*PhysicalHost, error) { + + resp := &PhysicalHost{} + + err := c.rancherClient.doAction(PHYSICAL_HOST_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *PhysicalHostClient) ActionError(resource *PhysicalHost) (*PhysicalHost, error) { + + resp := &PhysicalHost{} + + err := c.rancherClient.doAction(PHYSICAL_HOST_TYPE, "error", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *PhysicalHostClient) ActionRemove(resource *PhysicalHost) (*PhysicalHost, error) { + + resp := &PhysicalHost{} + + err := c.rancherClient.doAction(PHYSICAL_HOST_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *PhysicalHostClient) ActionUpdate(resource *PhysicalHost) (*PhysicalHost, error) { + + resp := &PhysicalHost{} + + err := c.rancherClient.doAction(PHYSICAL_HOST_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_port.go b/vendor/github.com/rancher/go-rancher/client/generated_port.go new file mode 100644 index 000000000000..3db9283d295f --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_port.go @@ -0,0 +1,182 @@ +package client + +const ( + PORT_TYPE = "port" +) + +type Port struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + BindAddress string `json:"bindAddress,omitempty" yaml:"bind_address,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + InstanceId string `json:"instanceId,omitempty" yaml:"instance_id,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + PrivateIpAddressId string `json:"privateIpAddressId,omitempty" yaml:"private_ip_address_id,omitempty"` + + PrivatePort int64 `json:"privatePort,omitempty" yaml:"private_port,omitempty"` + + Protocol string `json:"protocol,omitempty" yaml:"protocol,omitempty"` + + PublicIpAddressId string `json:"publicIpAddressId,omitempty" yaml:"public_ip_address_id,omitempty"` + + PublicPort int64 `json:"publicPort,omitempty" yaml:"public_port,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type PortCollection struct { + Collection + Data []Port `json:"data,omitempty"` +} + +type PortClient struct { + rancherClient *RancherClient +} + +type PortOperations interface { + List(opts *ListOpts) (*PortCollection, error) + Create(opts *Port) (*Port, error) + Update(existing *Port, updates interface{}) (*Port, error) + ById(id string) (*Port, error) + Delete(container *Port) error + + ActionActivate(*Port) (*Port, error) + + ActionCreate(*Port) (*Port, error) + + ActionDeactivate(*Port) (*Port, error) + + ActionPurge(*Port) (*Port, error) + + ActionRemove(*Port) (*Port, error) + + ActionRestore(*Port) (*Port, error) + + ActionUpdate(*Port) (*Port, error) +} + +func newPortClient(rancherClient *RancherClient) *PortClient { + return &PortClient{ + rancherClient: rancherClient, + } +} + +func (c *PortClient) Create(container *Port) (*Port, error) { + resp := &Port{} + err := c.rancherClient.doCreate(PORT_TYPE, container, resp) + return resp, err +} + +func (c *PortClient) Update(existing *Port, updates interface{}) (*Port, error) { + resp := &Port{} + err := c.rancherClient.doUpdate(PORT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *PortClient) List(opts *ListOpts) (*PortCollection, error) { + resp := &PortCollection{} + err := c.rancherClient.doList(PORT_TYPE, opts, resp) + return resp, err +} + +func (c *PortClient) ById(id string) (*Port, error) { + resp := &Port{} + err := c.rancherClient.doById(PORT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *PortClient) Delete(container *Port) error { + return c.rancherClient.doResourceDelete(PORT_TYPE, &container.Resource) +} + +func (c *PortClient) ActionActivate(resource *Port) (*Port, error) { + + resp := &Port{} + + err := c.rancherClient.doAction(PORT_TYPE, "activate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *PortClient) ActionCreate(resource *Port) (*Port, error) { + + resp := &Port{} + + err := c.rancherClient.doAction(PORT_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *PortClient) ActionDeactivate(resource *Port) (*Port, error) { + + resp := &Port{} + + err := c.rancherClient.doAction(PORT_TYPE, "deactivate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *PortClient) ActionPurge(resource *Port) (*Port, error) { + + resp := &Port{} + + err := c.rancherClient.doAction(PORT_TYPE, "purge", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *PortClient) ActionRemove(resource *Port) (*Port, error) { + + resp := &Port{} + + err := c.rancherClient.doAction(PORT_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *PortClient) ActionRestore(resource *Port) (*Port, error) { + + resp := &Port{} + + err := c.rancherClient.doAction(PORT_TYPE, "restore", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *PortClient) ActionUpdate(resource *Port) (*Port, error) { + + resp := &Port{} + + err := c.rancherClient.doAction(PORT_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_process_definition.go b/vendor/github.com/rancher/go-rancher/client/generated_process_definition.go new file mode 100644 index 000000000000..e6403303f136 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_process_definition.go @@ -0,0 +1,79 @@ +package client + +const ( + PROCESS_DEFINITION_TYPE = "processDefinition" +) + +type ProcessDefinition struct { + Resource + + ExtensionBased bool `json:"extensionBased,omitempty" yaml:"extension_based,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + PostProcessListeners interface{} `json:"postProcessListeners,omitempty" yaml:"post_process_listeners,omitempty"` + + PreProcessListeners interface{} `json:"preProcessListeners,omitempty" yaml:"pre_process_listeners,omitempty"` + + ProcessHandlers interface{} `json:"processHandlers,omitempty" yaml:"process_handlers,omitempty"` + + ResourceType string `json:"resourceType,omitempty" yaml:"resource_type,omitempty"` + + StateTransitions []interface{} `json:"stateTransitions,omitempty" yaml:"state_transitions,omitempty"` +} + +type ProcessDefinitionCollection struct { + Collection + Data []ProcessDefinition `json:"data,omitempty"` +} + +type ProcessDefinitionClient struct { + rancherClient *RancherClient +} + +type ProcessDefinitionOperations interface { + List(opts *ListOpts) (*ProcessDefinitionCollection, error) + Create(opts *ProcessDefinition) (*ProcessDefinition, error) + Update(existing *ProcessDefinition, updates interface{}) (*ProcessDefinition, error) + ById(id string) (*ProcessDefinition, error) + Delete(container *ProcessDefinition) error +} + +func newProcessDefinitionClient(rancherClient *RancherClient) *ProcessDefinitionClient { + return &ProcessDefinitionClient{ + rancherClient: rancherClient, + } +} + +func (c *ProcessDefinitionClient) Create(container *ProcessDefinition) (*ProcessDefinition, error) { + resp := &ProcessDefinition{} + err := c.rancherClient.doCreate(PROCESS_DEFINITION_TYPE, container, resp) + return resp, err +} + +func (c *ProcessDefinitionClient) Update(existing *ProcessDefinition, updates interface{}) (*ProcessDefinition, error) { + resp := &ProcessDefinition{} + err := c.rancherClient.doUpdate(PROCESS_DEFINITION_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ProcessDefinitionClient) List(opts *ListOpts) (*ProcessDefinitionCollection, error) { + resp := &ProcessDefinitionCollection{} + err := c.rancherClient.doList(PROCESS_DEFINITION_TYPE, opts, resp) + return resp, err +} + +func (c *ProcessDefinitionClient) ById(id string) (*ProcessDefinition, error) { + resp := &ProcessDefinition{} + err := c.rancherClient.doById(PROCESS_DEFINITION_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ProcessDefinitionClient) Delete(container *ProcessDefinition) error { + return c.rancherClient.doResourceDelete(PROCESS_DEFINITION_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_process_execution.go b/vendor/github.com/rancher/go-rancher/client/generated_process_execution.go new file mode 100644 index 000000000000..05e12914afeb --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_process_execution.go @@ -0,0 +1,73 @@ +package client + +const ( + PROCESS_EXECUTION_TYPE = "processExecution" +) + +type ProcessExecution struct { + Resource + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Log map[string]interface{} `json:"log,omitempty" yaml:"log,omitempty"` + + ProcessInstanceId string `json:"processInstanceId,omitempty" yaml:"process_instance_id,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type ProcessExecutionCollection struct { + Collection + Data []ProcessExecution `json:"data,omitempty"` +} + +type ProcessExecutionClient struct { + rancherClient *RancherClient +} + +type ProcessExecutionOperations interface { + List(opts *ListOpts) (*ProcessExecutionCollection, error) + Create(opts *ProcessExecution) (*ProcessExecution, error) + Update(existing *ProcessExecution, updates interface{}) (*ProcessExecution, error) + ById(id string) (*ProcessExecution, error) + Delete(container *ProcessExecution) error +} + +func newProcessExecutionClient(rancherClient *RancherClient) *ProcessExecutionClient { + return &ProcessExecutionClient{ + rancherClient: rancherClient, + } +} + +func (c *ProcessExecutionClient) Create(container *ProcessExecution) (*ProcessExecution, error) { + resp := &ProcessExecution{} + err := c.rancherClient.doCreate(PROCESS_EXECUTION_TYPE, container, resp) + return resp, err +} + +func (c *ProcessExecutionClient) Update(existing *ProcessExecution, updates interface{}) (*ProcessExecution, error) { + resp := &ProcessExecution{} + err := c.rancherClient.doUpdate(PROCESS_EXECUTION_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ProcessExecutionClient) List(opts *ListOpts) (*ProcessExecutionCollection, error) { + resp := &ProcessExecutionCollection{} + err := c.rancherClient.doList(PROCESS_EXECUTION_TYPE, opts, resp) + return resp, err +} + +func (c *ProcessExecutionClient) ById(id string) (*ProcessExecution, error) { + resp := &ProcessExecution{} + err := c.rancherClient.doById(PROCESS_EXECUTION_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ProcessExecutionClient) Delete(container *ProcessExecution) error { + return c.rancherClient.doResourceDelete(PROCESS_EXECUTION_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_process_instance.go b/vendor/github.com/rancher/go-rancher/client/generated_process_instance.go new file mode 100644 index 000000000000..6ba08dfea457 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_process_instance.go @@ -0,0 +1,89 @@ +package client + +const ( + PROCESS_INSTANCE_TYPE = "processInstance" +) + +type ProcessInstance struct { + Resource + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + EndTime string `json:"endTime,omitempty" yaml:"end_time,omitempty"` + + ExitReason string `json:"exitReason,omitempty" yaml:"exit_reason,omitempty"` + + Phase string `json:"phase,omitempty" yaml:"phase,omitempty"` + + Priority int64 `json:"priority,omitempty" yaml:"priority,omitempty"` + + ProcessName string `json:"processName,omitempty" yaml:"process_name,omitempty"` + + ResourceId string `json:"resourceId,omitempty" yaml:"resource_id,omitempty"` + + ResourceType string `json:"resourceType,omitempty" yaml:"resource_type,omitempty"` + + Result string `json:"result,omitempty" yaml:"result,omitempty"` + + RunningProcessServerId string `json:"runningProcessServerId,omitempty" yaml:"running_process_server_id,omitempty"` + + StartProcessServerId string `json:"startProcessServerId,omitempty" yaml:"start_process_server_id,omitempty"` + + StartTime string `json:"startTime,omitempty" yaml:"start_time,omitempty"` +} + +type ProcessInstanceCollection struct { + Collection + Data []ProcessInstance `json:"data,omitempty"` +} + +type ProcessInstanceClient struct { + rancherClient *RancherClient +} + +type ProcessInstanceOperations interface { + List(opts *ListOpts) (*ProcessInstanceCollection, error) + Create(opts *ProcessInstance) (*ProcessInstance, error) + Update(existing *ProcessInstance, updates interface{}) (*ProcessInstance, error) + ById(id string) (*ProcessInstance, error) + Delete(container *ProcessInstance) error +} + +func newProcessInstanceClient(rancherClient *RancherClient) *ProcessInstanceClient { + return &ProcessInstanceClient{ + rancherClient: rancherClient, + } +} + +func (c *ProcessInstanceClient) Create(container *ProcessInstance) (*ProcessInstance, error) { + resp := &ProcessInstance{} + err := c.rancherClient.doCreate(PROCESS_INSTANCE_TYPE, container, resp) + return resp, err +} + +func (c *ProcessInstanceClient) Update(existing *ProcessInstance, updates interface{}) (*ProcessInstance, error) { + resp := &ProcessInstance{} + err := c.rancherClient.doUpdate(PROCESS_INSTANCE_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ProcessInstanceClient) List(opts *ListOpts) (*ProcessInstanceCollection, error) { + resp := &ProcessInstanceCollection{} + err := c.rancherClient.doList(PROCESS_INSTANCE_TYPE, opts, resp) + return resp, err +} + +func (c *ProcessInstanceClient) ById(id string) (*ProcessInstance, error) { + resp := &ProcessInstance{} + err := c.rancherClient.doById(PROCESS_INSTANCE_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ProcessInstanceClient) Delete(container *ProcessInstance) error { + return c.rancherClient.doResourceDelete(PROCESS_INSTANCE_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_project.go b/vendor/github.com/rancher/go-rancher/client/generated_project.go new file mode 100644 index 000000000000..17f21401c5a6 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_project.go @@ -0,0 +1,193 @@ +package client + +const ( + PROJECT_TYPE = "project" +) + +type Project struct { + Resource + + AllowSystemRole bool `json:"allowSystemRole,omitempty" yaml:"allow_system_role,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Kubernetes bool `json:"kubernetes,omitempty" yaml:"kubernetes,omitempty"` + + Members []interface{} `json:"members,omitempty" yaml:"members,omitempty"` + + Mesos bool `json:"mesos,omitempty" yaml:"mesos,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + PublicDns bool `json:"publicDns,omitempty" yaml:"public_dns,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + ServicesPortRange *ServicesPortRange `json:"servicesPortRange,omitempty" yaml:"services_port_range,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Swarm bool `json:"swarm,omitempty" yaml:"swarm,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + + VirtualMachine bool `json:"virtualMachine,omitempty" yaml:"virtual_machine,omitempty"` +} + +type ProjectCollection struct { + Collection + Data []Project `json:"data,omitempty"` +} + +type ProjectClient struct { + rancherClient *RancherClient +} + +type ProjectOperations interface { + List(opts *ListOpts) (*ProjectCollection, error) + Create(opts *Project) (*Project, error) + Update(existing *Project, updates interface{}) (*Project, error) + ById(id string) (*Project, error) + Delete(container *Project) error + + ActionActivate(*Project) (*Account, error) + + ActionCreate(*Project) (*Account, error) + + ActionDeactivate(*Project) (*Account, error) + + ActionPurge(*Project) (*Account, error) + + ActionRemove(*Project) (*Account, error) + + ActionRestore(*Project) (*Account, error) + + ActionSetmembers(*Project, *SetProjectMembersInput) (*SetProjectMembersInput, error) + + ActionUpdate(*Project) (*Account, error) +} + +func newProjectClient(rancherClient *RancherClient) *ProjectClient { + return &ProjectClient{ + rancherClient: rancherClient, + } +} + +func (c *ProjectClient) Create(container *Project) (*Project, error) { + resp := &Project{} + err := c.rancherClient.doCreate(PROJECT_TYPE, container, resp) + return resp, err +} + +func (c *ProjectClient) Update(existing *Project, updates interface{}) (*Project, error) { + resp := &Project{} + err := c.rancherClient.doUpdate(PROJECT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ProjectClient) List(opts *ListOpts) (*ProjectCollection, error) { + resp := &ProjectCollection{} + err := c.rancherClient.doList(PROJECT_TYPE, opts, resp) + return resp, err +} + +func (c *ProjectClient) ById(id string) (*Project, error) { + resp := &Project{} + err := c.rancherClient.doById(PROJECT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ProjectClient) Delete(container *Project) error { + return c.rancherClient.doResourceDelete(PROJECT_TYPE, &container.Resource) +} + +func (c *ProjectClient) ActionActivate(resource *Project) (*Account, error) { + + resp := &Account{} + + err := c.rancherClient.doAction(PROJECT_TYPE, "activate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ProjectClient) ActionCreate(resource *Project) (*Account, error) { + + resp := &Account{} + + err := c.rancherClient.doAction(PROJECT_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ProjectClient) ActionDeactivate(resource *Project) (*Account, error) { + + resp := &Account{} + + err := c.rancherClient.doAction(PROJECT_TYPE, "deactivate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ProjectClient) ActionPurge(resource *Project) (*Account, error) { + + resp := &Account{} + + err := c.rancherClient.doAction(PROJECT_TYPE, "purge", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ProjectClient) ActionRemove(resource *Project) (*Account, error) { + + resp := &Account{} + + err := c.rancherClient.doAction(PROJECT_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ProjectClient) ActionRestore(resource *Project) (*Account, error) { + + resp := &Account{} + + err := c.rancherClient.doAction(PROJECT_TYPE, "restore", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ProjectClient) ActionSetmembers(resource *Project, input *SetProjectMembersInput) (*SetProjectMembersInput, error) { + + resp := &SetProjectMembersInput{} + + err := c.rancherClient.doAction(PROJECT_TYPE, "setmembers", &resource.Resource, input, resp) + + return resp, err +} + +func (c *ProjectClient) ActionUpdate(resource *Project) (*Account, error) { + + resp := &Account{} + + err := c.rancherClient.doAction(PROJECT_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_project_member.go b/vendor/github.com/rancher/go-rancher/client/generated_project_member.go new file mode 100644 index 000000000000..82ba10bd44e5 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_project_member.go @@ -0,0 +1,174 @@ +package client + +const ( + PROJECT_MEMBER_TYPE = "projectMember" +) + +type ProjectMember struct { + Resource + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"` + + ExternalIdType string `json:"externalIdType,omitempty" yaml:"external_id_type,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + ProjectId string `json:"projectId,omitempty" yaml:"project_id,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + Role string `json:"role,omitempty" yaml:"role,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type ProjectMemberCollection struct { + Collection + Data []ProjectMember `json:"data,omitempty"` +} + +type ProjectMemberClient struct { + rancherClient *RancherClient +} + +type ProjectMemberOperations interface { + List(opts *ListOpts) (*ProjectMemberCollection, error) + Create(opts *ProjectMember) (*ProjectMember, error) + Update(existing *ProjectMember, updates interface{}) (*ProjectMember, error) + ById(id string) (*ProjectMember, error) + Delete(container *ProjectMember) error + + ActionActivate(*ProjectMember) (*ProjectMember, error) + + ActionCreate(*ProjectMember) (*ProjectMember, error) + + ActionDeactivate(*ProjectMember) (*ProjectMember, error) + + ActionPurge(*ProjectMember) (*ProjectMember, error) + + ActionRemove(*ProjectMember) (*ProjectMember, error) + + ActionRestore(*ProjectMember) (*ProjectMember, error) + + ActionUpdate(*ProjectMember) (*ProjectMember, error) +} + +func newProjectMemberClient(rancherClient *RancherClient) *ProjectMemberClient { + return &ProjectMemberClient{ + rancherClient: rancherClient, + } +} + +func (c *ProjectMemberClient) Create(container *ProjectMember) (*ProjectMember, error) { + resp := &ProjectMember{} + err := c.rancherClient.doCreate(PROJECT_MEMBER_TYPE, container, resp) + return resp, err +} + +func (c *ProjectMemberClient) Update(existing *ProjectMember, updates interface{}) (*ProjectMember, error) { + resp := &ProjectMember{} + err := c.rancherClient.doUpdate(PROJECT_MEMBER_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ProjectMemberClient) List(opts *ListOpts) (*ProjectMemberCollection, error) { + resp := &ProjectMemberCollection{} + err := c.rancherClient.doList(PROJECT_MEMBER_TYPE, opts, resp) + return resp, err +} + +func (c *ProjectMemberClient) ById(id string) (*ProjectMember, error) { + resp := &ProjectMember{} + err := c.rancherClient.doById(PROJECT_MEMBER_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ProjectMemberClient) Delete(container *ProjectMember) error { + return c.rancherClient.doResourceDelete(PROJECT_MEMBER_TYPE, &container.Resource) +} + +func (c *ProjectMemberClient) ActionActivate(resource *ProjectMember) (*ProjectMember, error) { + + resp := &ProjectMember{} + + err := c.rancherClient.doAction(PROJECT_MEMBER_TYPE, "activate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ProjectMemberClient) ActionCreate(resource *ProjectMember) (*ProjectMember, error) { + + resp := &ProjectMember{} + + err := c.rancherClient.doAction(PROJECT_MEMBER_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ProjectMemberClient) ActionDeactivate(resource *ProjectMember) (*ProjectMember, error) { + + resp := &ProjectMember{} + + err := c.rancherClient.doAction(PROJECT_MEMBER_TYPE, "deactivate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ProjectMemberClient) ActionPurge(resource *ProjectMember) (*ProjectMember, error) { + + resp := &ProjectMember{} + + err := c.rancherClient.doAction(PROJECT_MEMBER_TYPE, "purge", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ProjectMemberClient) ActionRemove(resource *ProjectMember) (*ProjectMember, error) { + + resp := &ProjectMember{} + + err := c.rancherClient.doAction(PROJECT_MEMBER_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ProjectMemberClient) ActionRestore(resource *ProjectMember) (*ProjectMember, error) { + + resp := &ProjectMember{} + + err := c.rancherClient.doAction(PROJECT_MEMBER_TYPE, "restore", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ProjectMemberClient) ActionUpdate(resource *ProjectMember) (*ProjectMember, error) { + + resp := &ProjectMember{} + + err := c.rancherClient.doAction(PROJECT_MEMBER_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_public_endpoint.go b/vendor/github.com/rancher/go-rancher/client/generated_public_endpoint.go new file mode 100644 index 000000000000..3d85858effbb --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_public_endpoint.go @@ -0,0 +1,75 @@ +package client + +const ( + PUBLIC_ENDPOINT_TYPE = "publicEndpoint" +) + +type PublicEndpoint struct { + Resource + + HostId string `json:"hostId,omitempty" yaml:"host_id,omitempty"` + + InstanceId string `json:"instanceId,omitempty" yaml:"instance_id,omitempty"` + + IpAddress string `json:"ipAddress,omitempty" yaml:"ip_address,omitempty"` + + Port int64 `json:"port,omitempty" yaml:"port,omitempty"` + + ServiceId string `json:"serviceId,omitempty" yaml:"service_id,omitempty"` +} + +type PublicEndpointCollection struct { + Collection + Data []PublicEndpoint `json:"data,omitempty"` +} + +type PublicEndpointClient struct { + rancherClient *RancherClient +} + +type PublicEndpointOperations interface { + List(opts *ListOpts) (*PublicEndpointCollection, error) + Create(opts *PublicEndpoint) (*PublicEndpoint, error) + Update(existing *PublicEndpoint, updates interface{}) (*PublicEndpoint, error) + ById(id string) (*PublicEndpoint, error) + Delete(container *PublicEndpoint) error +} + +func newPublicEndpointClient(rancherClient *RancherClient) *PublicEndpointClient { + return &PublicEndpointClient{ + rancherClient: rancherClient, + } +} + +func (c *PublicEndpointClient) Create(container *PublicEndpoint) (*PublicEndpoint, error) { + resp := &PublicEndpoint{} + err := c.rancherClient.doCreate(PUBLIC_ENDPOINT_TYPE, container, resp) + return resp, err +} + +func (c *PublicEndpointClient) Update(existing *PublicEndpoint, updates interface{}) (*PublicEndpoint, error) { + resp := &PublicEndpoint{} + err := c.rancherClient.doUpdate(PUBLIC_ENDPOINT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *PublicEndpointClient) List(opts *ListOpts) (*PublicEndpointCollection, error) { + resp := &PublicEndpointCollection{} + err := c.rancherClient.doList(PUBLIC_ENDPOINT_TYPE, opts, resp) + return resp, err +} + +func (c *PublicEndpointClient) ById(id string) (*PublicEndpoint, error) { + resp := &PublicEndpoint{} + err := c.rancherClient.doById(PUBLIC_ENDPOINT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *PublicEndpointClient) Delete(container *PublicEndpoint) error { + return c.rancherClient.doResourceDelete(PUBLIC_ENDPOINT_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_publish.go b/vendor/github.com/rancher/go-rancher/client/generated_publish.go new file mode 100644 index 000000000000..9071207f50cf --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_publish.go @@ -0,0 +1,87 @@ +package client + +const ( + PUBLISH_TYPE = "publish" +) + +type Publish struct { + Resource + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + PreviousIds []string `json:"previousIds,omitempty" yaml:"previous_ids,omitempty"` + + Publisher string `json:"publisher,omitempty" yaml:"publisher,omitempty"` + + ResourceId string `json:"resourceId,omitempty" yaml:"resource_id,omitempty"` + + ResourceType string `json:"resourceType,omitempty" yaml:"resource_type,omitempty"` + + Time int64 `json:"time,omitempty" yaml:"time,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningInternalMessage string `json:"transitioningInternalMessage,omitempty" yaml:"transitioning_internal_message,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` +} + +type PublishCollection struct { + Collection + Data []Publish `json:"data,omitempty"` +} + +type PublishClient struct { + rancherClient *RancherClient +} + +type PublishOperations interface { + List(opts *ListOpts) (*PublishCollection, error) + Create(opts *Publish) (*Publish, error) + Update(existing *Publish, updates interface{}) (*Publish, error) + ById(id string) (*Publish, error) + Delete(container *Publish) error +} + +func newPublishClient(rancherClient *RancherClient) *PublishClient { + return &PublishClient{ + rancherClient: rancherClient, + } +} + +func (c *PublishClient) Create(container *Publish) (*Publish, error) { + resp := &Publish{} + err := c.rancherClient.doCreate(PUBLISH_TYPE, container, resp) + return resp, err +} + +func (c *PublishClient) Update(existing *Publish, updates interface{}) (*Publish, error) { + resp := &Publish{} + err := c.rancherClient.doUpdate(PUBLISH_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *PublishClient) List(opts *ListOpts) (*PublishCollection, error) { + resp := &PublishCollection{} + err := c.rancherClient.doList(PUBLISH_TYPE, opts, resp) + return resp, err +} + +func (c *PublishClient) ById(id string) (*Publish, error) { + resp := &Publish{} + err := c.rancherClient.doById(PUBLISH_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *PublishClient) Delete(container *Publish) error { + return c.rancherClient.doResourceDelete(PUBLISH_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_pull_task.go b/vendor/github.com/rancher/go-rancher/client/generated_pull_task.go new file mode 100644 index 000000000000..a077e8885a51 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_pull_task.go @@ -0,0 +1,99 @@ +package client + +const ( + PULL_TASK_TYPE = "pullTask" +) + +type PullTask struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + Image string `json:"image,omitempty" yaml:"image,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Labels map[string]interface{} `json:"labels,omitempty" yaml:"labels,omitempty"` + + Mode string `json:"mode,omitempty" yaml:"mode,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Status map[string]interface{} `json:"status,omitempty" yaml:"status,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type PullTaskCollection struct { + Collection + Data []PullTask `json:"data,omitempty"` +} + +type PullTaskClient struct { + rancherClient *RancherClient +} + +type PullTaskOperations interface { + List(opts *ListOpts) (*PullTaskCollection, error) + Create(opts *PullTask) (*PullTask, error) + Update(existing *PullTask, updates interface{}) (*PullTask, error) + ById(id string) (*PullTask, error) + Delete(container *PullTask) error +} + +func newPullTaskClient(rancherClient *RancherClient) *PullTaskClient { + return &PullTaskClient{ + rancherClient: rancherClient, + } +} + +func (c *PullTaskClient) Create(container *PullTask) (*PullTask, error) { + resp := &PullTask{} + err := c.rancherClient.doCreate(PULL_TASK_TYPE, container, resp) + return resp, err +} + +func (c *PullTaskClient) Update(existing *PullTask, updates interface{}) (*PullTask, error) { + resp := &PullTask{} + err := c.rancherClient.doUpdate(PULL_TASK_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *PullTaskClient) List(opts *ListOpts) (*PullTaskCollection, error) { + resp := &PullTaskCollection{} + err := c.rancherClient.doList(PULL_TASK_TYPE, opts, resp) + return resp, err +} + +func (c *PullTaskClient) ById(id string) (*PullTask, error) { + resp := &PullTask{} + err := c.rancherClient.doById(PULL_TASK_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *PullTaskClient) Delete(container *PullTask) error { + return c.rancherClient.doResourceDelete(PULL_TASK_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_rackspace_config.go b/vendor/github.com/rancher/go-rancher/client/generated_rackspace_config.go new file mode 100644 index 000000000000..868e96f4eb86 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_rackspace_config.go @@ -0,0 +1,83 @@ +package client + +const ( + RACKSPACE_CONFIG_TYPE = "rackspaceConfig" +) + +type RackspaceConfig struct { + Resource + + ApiKey string `json:"apiKey,omitempty" yaml:"api_key,omitempty"` + + DockerInstall string `json:"dockerInstall,omitempty" yaml:"docker_install,omitempty"` + + EndpointType string `json:"endpointType,omitempty" yaml:"endpoint_type,omitempty"` + + FlavorId string `json:"flavorId,omitempty" yaml:"flavor_id,omitempty"` + + ImageId string `json:"imageId,omitempty" yaml:"image_id,omitempty"` + + Region string `json:"region,omitempty" yaml:"region,omitempty"` + + SshPort string `json:"sshPort,omitempty" yaml:"ssh_port,omitempty"` + + SshUser string `json:"sshUser,omitempty" yaml:"ssh_user,omitempty"` + + Username string `json:"username,omitempty" yaml:"username,omitempty"` +} + +type RackspaceConfigCollection struct { + Collection + Data []RackspaceConfig `json:"data,omitempty"` +} + +type RackspaceConfigClient struct { + rancherClient *RancherClient +} + +type RackspaceConfigOperations interface { + List(opts *ListOpts) (*RackspaceConfigCollection, error) + Create(opts *RackspaceConfig) (*RackspaceConfig, error) + Update(existing *RackspaceConfig, updates interface{}) (*RackspaceConfig, error) + ById(id string) (*RackspaceConfig, error) + Delete(container *RackspaceConfig) error +} + +func newRackspaceConfigClient(rancherClient *RancherClient) *RackspaceConfigClient { + return &RackspaceConfigClient{ + rancherClient: rancherClient, + } +} + +func (c *RackspaceConfigClient) Create(container *RackspaceConfig) (*RackspaceConfig, error) { + resp := &RackspaceConfig{} + err := c.rancherClient.doCreate(RACKSPACE_CONFIG_TYPE, container, resp) + return resp, err +} + +func (c *RackspaceConfigClient) Update(existing *RackspaceConfig, updates interface{}) (*RackspaceConfig, error) { + resp := &RackspaceConfig{} + err := c.rancherClient.doUpdate(RACKSPACE_CONFIG_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *RackspaceConfigClient) List(opts *ListOpts) (*RackspaceConfigCollection, error) { + resp := &RackspaceConfigCollection{} + err := c.rancherClient.doList(RACKSPACE_CONFIG_TYPE, opts, resp) + return resp, err +} + +func (c *RackspaceConfigClient) ById(id string) (*RackspaceConfig, error) { + resp := &RackspaceConfig{} + err := c.rancherClient.doById(RACKSPACE_CONFIG_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *RackspaceConfigClient) Delete(container *RackspaceConfig) error { + return c.rancherClient.doResourceDelete(RACKSPACE_CONFIG_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_recreate_on_quorum_strategy_config.go b/vendor/github.com/rancher/go-rancher/client/generated_recreate_on_quorum_strategy_config.go new file mode 100644 index 000000000000..a8a89ed8c0c6 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_recreate_on_quorum_strategy_config.go @@ -0,0 +1,67 @@ +package client + +const ( + RECREATE_ON_QUORUM_STRATEGY_CONFIG_TYPE = "recreateOnQuorumStrategyConfig" +) + +type RecreateOnQuorumStrategyConfig struct { + Resource + + Quorum int64 `json:"quorum,omitempty" yaml:"quorum,omitempty"` +} + +type RecreateOnQuorumStrategyConfigCollection struct { + Collection + Data []RecreateOnQuorumStrategyConfig `json:"data,omitempty"` +} + +type RecreateOnQuorumStrategyConfigClient struct { + rancherClient *RancherClient +} + +type RecreateOnQuorumStrategyConfigOperations interface { + List(opts *ListOpts) (*RecreateOnQuorumStrategyConfigCollection, error) + Create(opts *RecreateOnQuorumStrategyConfig) (*RecreateOnQuorumStrategyConfig, error) + Update(existing *RecreateOnQuorumStrategyConfig, updates interface{}) (*RecreateOnQuorumStrategyConfig, error) + ById(id string) (*RecreateOnQuorumStrategyConfig, error) + Delete(container *RecreateOnQuorumStrategyConfig) error +} + +func newRecreateOnQuorumStrategyConfigClient(rancherClient *RancherClient) *RecreateOnQuorumStrategyConfigClient { + return &RecreateOnQuorumStrategyConfigClient{ + rancherClient: rancherClient, + } +} + +func (c *RecreateOnQuorumStrategyConfigClient) Create(container *RecreateOnQuorumStrategyConfig) (*RecreateOnQuorumStrategyConfig, error) { + resp := &RecreateOnQuorumStrategyConfig{} + err := c.rancherClient.doCreate(RECREATE_ON_QUORUM_STRATEGY_CONFIG_TYPE, container, resp) + return resp, err +} + +func (c *RecreateOnQuorumStrategyConfigClient) Update(existing *RecreateOnQuorumStrategyConfig, updates interface{}) (*RecreateOnQuorumStrategyConfig, error) { + resp := &RecreateOnQuorumStrategyConfig{} + err := c.rancherClient.doUpdate(RECREATE_ON_QUORUM_STRATEGY_CONFIG_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *RecreateOnQuorumStrategyConfigClient) List(opts *ListOpts) (*RecreateOnQuorumStrategyConfigCollection, error) { + resp := &RecreateOnQuorumStrategyConfigCollection{} + err := c.rancherClient.doList(RECREATE_ON_QUORUM_STRATEGY_CONFIG_TYPE, opts, resp) + return resp, err +} + +func (c *RecreateOnQuorumStrategyConfigClient) ById(id string) (*RecreateOnQuorumStrategyConfig, error) { + resp := &RecreateOnQuorumStrategyConfig{} + err := c.rancherClient.doById(RECREATE_ON_QUORUM_STRATEGY_CONFIG_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *RecreateOnQuorumStrategyConfigClient) Delete(container *RecreateOnQuorumStrategyConfig) error { + return c.rancherClient.doResourceDelete(RECREATE_ON_QUORUM_STRATEGY_CONFIG_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_register.go b/vendor/github.com/rancher/go-rancher/client/generated_register.go new file mode 100644 index 000000000000..510cd1602993 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_register.go @@ -0,0 +1,108 @@ +package client + +const ( + REGISTER_TYPE = "register" +) + +type Register struct { + Resource + + AccessKey string `json:"accessKey,omitempty" yaml:"access_key,omitempty"` + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + Key string `json:"key,omitempty" yaml:"key,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + SecretKey string `json:"secretKey,omitempty" yaml:"secret_key,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type RegisterCollection struct { + Collection + Data []Register `json:"data,omitempty"` +} + +type RegisterClient struct { + rancherClient *RancherClient +} + +type RegisterOperations interface { + List(opts *ListOpts) (*RegisterCollection, error) + Create(opts *Register) (*Register, error) + Update(existing *Register, updates interface{}) (*Register, error) + ById(id string) (*Register, error) + Delete(container *Register) error + + ActionStop(*Register, *InstanceStop) (*Instance, error) +} + +func newRegisterClient(rancherClient *RancherClient) *RegisterClient { + return &RegisterClient{ + rancherClient: rancherClient, + } +} + +func (c *RegisterClient) Create(container *Register) (*Register, error) { + resp := &Register{} + err := c.rancherClient.doCreate(REGISTER_TYPE, container, resp) + return resp, err +} + +func (c *RegisterClient) Update(existing *Register, updates interface{}) (*Register, error) { + resp := &Register{} + err := c.rancherClient.doUpdate(REGISTER_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *RegisterClient) List(opts *ListOpts) (*RegisterCollection, error) { + resp := &RegisterCollection{} + err := c.rancherClient.doList(REGISTER_TYPE, opts, resp) + return resp, err +} + +func (c *RegisterClient) ById(id string) (*Register, error) { + resp := &Register{} + err := c.rancherClient.doById(REGISTER_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *RegisterClient) Delete(container *Register) error { + return c.rancherClient.doResourceDelete(REGISTER_TYPE, &container.Resource) +} + +func (c *RegisterClient) ActionStop(resource *Register, input *InstanceStop) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(REGISTER_TYPE, "stop", &resource.Resource, input, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_registration_token.go b/vendor/github.com/rancher/go-rancher/client/generated_registration_token.go new file mode 100644 index 000000000000..01b8cd8e185b --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_registration_token.go @@ -0,0 +1,165 @@ +package client + +const ( + REGISTRATION_TOKEN_TYPE = "registrationToken" +) + +type RegistrationToken struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Command string `json:"command,omitempty" yaml:"command,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + Image string `json:"image,omitempty" yaml:"image,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + RegistrationUrl string `json:"registrationUrl,omitempty" yaml:"registration_url,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Token string `json:"token,omitempty" yaml:"token,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type RegistrationTokenCollection struct { + Collection + Data []RegistrationToken `json:"data,omitempty"` +} + +type RegistrationTokenClient struct { + rancherClient *RancherClient +} + +type RegistrationTokenOperations interface { + List(opts *ListOpts) (*RegistrationTokenCollection, error) + Create(opts *RegistrationToken) (*RegistrationToken, error) + Update(existing *RegistrationToken, updates interface{}) (*RegistrationToken, error) + ById(id string) (*RegistrationToken, error) + Delete(container *RegistrationToken) error + + ActionActivate(*RegistrationToken) (*Credential, error) + + ActionCreate(*RegistrationToken) (*Credential, error) + + ActionDeactivate(*RegistrationToken) (*Credential, error) + + ActionPurge(*RegistrationToken) (*Credential, error) + + ActionRemove(*RegistrationToken) (*Credential, error) + + ActionUpdate(*RegistrationToken) (*Credential, error) +} + +func newRegistrationTokenClient(rancherClient *RancherClient) *RegistrationTokenClient { + return &RegistrationTokenClient{ + rancherClient: rancherClient, + } +} + +func (c *RegistrationTokenClient) Create(container *RegistrationToken) (*RegistrationToken, error) { + resp := &RegistrationToken{} + err := c.rancherClient.doCreate(REGISTRATION_TOKEN_TYPE, container, resp) + return resp, err +} + +func (c *RegistrationTokenClient) Update(existing *RegistrationToken, updates interface{}) (*RegistrationToken, error) { + resp := &RegistrationToken{} + err := c.rancherClient.doUpdate(REGISTRATION_TOKEN_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *RegistrationTokenClient) List(opts *ListOpts) (*RegistrationTokenCollection, error) { + resp := &RegistrationTokenCollection{} + err := c.rancherClient.doList(REGISTRATION_TOKEN_TYPE, opts, resp) + return resp, err +} + +func (c *RegistrationTokenClient) ById(id string) (*RegistrationToken, error) { + resp := &RegistrationToken{} + err := c.rancherClient.doById(REGISTRATION_TOKEN_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *RegistrationTokenClient) Delete(container *RegistrationToken) error { + return c.rancherClient.doResourceDelete(REGISTRATION_TOKEN_TYPE, &container.Resource) +} + +func (c *RegistrationTokenClient) ActionActivate(resource *RegistrationToken) (*Credential, error) { + + resp := &Credential{} + + err := c.rancherClient.doAction(REGISTRATION_TOKEN_TYPE, "activate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *RegistrationTokenClient) ActionCreate(resource *RegistrationToken) (*Credential, error) { + + resp := &Credential{} + + err := c.rancherClient.doAction(REGISTRATION_TOKEN_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *RegistrationTokenClient) ActionDeactivate(resource *RegistrationToken) (*Credential, error) { + + resp := &Credential{} + + err := c.rancherClient.doAction(REGISTRATION_TOKEN_TYPE, "deactivate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *RegistrationTokenClient) ActionPurge(resource *RegistrationToken) (*Credential, error) { + + resp := &Credential{} + + err := c.rancherClient.doAction(REGISTRATION_TOKEN_TYPE, "purge", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *RegistrationTokenClient) ActionRemove(resource *RegistrationToken) (*Credential, error) { + + resp := &Credential{} + + err := c.rancherClient.doAction(REGISTRATION_TOKEN_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *RegistrationTokenClient) ActionUpdate(resource *RegistrationToken) (*Credential, error) { + + resp := &Credential{} + + err := c.rancherClient.doAction(REGISTRATION_TOKEN_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_registry.go b/vendor/github.com/rancher/go-rancher/client/generated_registry.go new file mode 100644 index 000000000000..6dbeb4fb7a96 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_registry.go @@ -0,0 +1,180 @@ +package client + +const ( + REGISTRY_TYPE = "registry" +) + +type Registry struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + BlockDevicePath string `json:"blockDevicePath,omitempty" yaml:"block_device_path,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + DriverName string `json:"driverName,omitempty" yaml:"driver_name,omitempty"` + + ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + ServerAddress string `json:"serverAddress,omitempty" yaml:"server_address,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + + VolumeAccessMode string `json:"volumeAccessMode,omitempty" yaml:"volume_access_mode,omitempty"` + + VolumeCapabilities []string `json:"volumeCapabilities,omitempty" yaml:"volume_capabilities,omitempty"` +} + +type RegistryCollection struct { + Collection + Data []Registry `json:"data,omitempty"` +} + +type RegistryClient struct { + rancherClient *RancherClient +} + +type RegistryOperations interface { + List(opts *ListOpts) (*RegistryCollection, error) + Create(opts *Registry) (*Registry, error) + Update(existing *Registry, updates interface{}) (*Registry, error) + ById(id string) (*Registry, error) + Delete(container *Registry) error + + ActionActivate(*Registry) (*StoragePool, error) + + ActionCreate(*Registry) (*StoragePool, error) + + ActionDeactivate(*Registry) (*StoragePool, error) + + ActionPurge(*Registry) (*StoragePool, error) + + ActionRemove(*Registry) (*StoragePool, error) + + ActionRestore(*Registry) (*StoragePool, error) + + ActionUpdate(*Registry) (*StoragePool, error) +} + +func newRegistryClient(rancherClient *RancherClient) *RegistryClient { + return &RegistryClient{ + rancherClient: rancherClient, + } +} + +func (c *RegistryClient) Create(container *Registry) (*Registry, error) { + resp := &Registry{} + err := c.rancherClient.doCreate(REGISTRY_TYPE, container, resp) + return resp, err +} + +func (c *RegistryClient) Update(existing *Registry, updates interface{}) (*Registry, error) { + resp := &Registry{} + err := c.rancherClient.doUpdate(REGISTRY_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *RegistryClient) List(opts *ListOpts) (*RegistryCollection, error) { + resp := &RegistryCollection{} + err := c.rancherClient.doList(REGISTRY_TYPE, opts, resp) + return resp, err +} + +func (c *RegistryClient) ById(id string) (*Registry, error) { + resp := &Registry{} + err := c.rancherClient.doById(REGISTRY_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *RegistryClient) Delete(container *Registry) error { + return c.rancherClient.doResourceDelete(REGISTRY_TYPE, &container.Resource) +} + +func (c *RegistryClient) ActionActivate(resource *Registry) (*StoragePool, error) { + + resp := &StoragePool{} + + err := c.rancherClient.doAction(REGISTRY_TYPE, "activate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *RegistryClient) ActionCreate(resource *Registry) (*StoragePool, error) { + + resp := &StoragePool{} + + err := c.rancherClient.doAction(REGISTRY_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *RegistryClient) ActionDeactivate(resource *Registry) (*StoragePool, error) { + + resp := &StoragePool{} + + err := c.rancherClient.doAction(REGISTRY_TYPE, "deactivate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *RegistryClient) ActionPurge(resource *Registry) (*StoragePool, error) { + + resp := &StoragePool{} + + err := c.rancherClient.doAction(REGISTRY_TYPE, "purge", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *RegistryClient) ActionRemove(resource *Registry) (*StoragePool, error) { + + resp := &StoragePool{} + + err := c.rancherClient.doAction(REGISTRY_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *RegistryClient) ActionRestore(resource *Registry) (*StoragePool, error) { + + resp := &StoragePool{} + + err := c.rancherClient.doAction(REGISTRY_TYPE, "restore", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *RegistryClient) ActionUpdate(resource *Registry) (*StoragePool, error) { + + resp := &StoragePool{} + + err := c.rancherClient.doAction(REGISTRY_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_registry_credential.go b/vendor/github.com/rancher/go-rancher/client/generated_registry_credential.go new file mode 100644 index 000000000000..e17ab42df067 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_registry_credential.go @@ -0,0 +1,165 @@ +package client + +const ( + REGISTRY_CREDENTIAL_TYPE = "registryCredential" +) + +type RegistryCredential struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + Email string `json:"email,omitempty" yaml:"email,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + PublicValue string `json:"publicValue,omitempty" yaml:"public_value,omitempty"` + + RegistryId string `json:"registryId,omitempty" yaml:"registry_id,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + SecretValue string `json:"secretValue,omitempty" yaml:"secret_value,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type RegistryCredentialCollection struct { + Collection + Data []RegistryCredential `json:"data,omitempty"` +} + +type RegistryCredentialClient struct { + rancherClient *RancherClient +} + +type RegistryCredentialOperations interface { + List(opts *ListOpts) (*RegistryCredentialCollection, error) + Create(opts *RegistryCredential) (*RegistryCredential, error) + Update(existing *RegistryCredential, updates interface{}) (*RegistryCredential, error) + ById(id string) (*RegistryCredential, error) + Delete(container *RegistryCredential) error + + ActionActivate(*RegistryCredential) (*Credential, error) + + ActionCreate(*RegistryCredential) (*Credential, error) + + ActionDeactivate(*RegistryCredential) (*Credential, error) + + ActionPurge(*RegistryCredential) (*Credential, error) + + ActionRemove(*RegistryCredential) (*Credential, error) + + ActionUpdate(*RegistryCredential) (*Credential, error) +} + +func newRegistryCredentialClient(rancherClient *RancherClient) *RegistryCredentialClient { + return &RegistryCredentialClient{ + rancherClient: rancherClient, + } +} + +func (c *RegistryCredentialClient) Create(container *RegistryCredential) (*RegistryCredential, error) { + resp := &RegistryCredential{} + err := c.rancherClient.doCreate(REGISTRY_CREDENTIAL_TYPE, container, resp) + return resp, err +} + +func (c *RegistryCredentialClient) Update(existing *RegistryCredential, updates interface{}) (*RegistryCredential, error) { + resp := &RegistryCredential{} + err := c.rancherClient.doUpdate(REGISTRY_CREDENTIAL_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *RegistryCredentialClient) List(opts *ListOpts) (*RegistryCredentialCollection, error) { + resp := &RegistryCredentialCollection{} + err := c.rancherClient.doList(REGISTRY_CREDENTIAL_TYPE, opts, resp) + return resp, err +} + +func (c *RegistryCredentialClient) ById(id string) (*RegistryCredential, error) { + resp := &RegistryCredential{} + err := c.rancherClient.doById(REGISTRY_CREDENTIAL_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *RegistryCredentialClient) Delete(container *RegistryCredential) error { + return c.rancherClient.doResourceDelete(REGISTRY_CREDENTIAL_TYPE, &container.Resource) +} + +func (c *RegistryCredentialClient) ActionActivate(resource *RegistryCredential) (*Credential, error) { + + resp := &Credential{} + + err := c.rancherClient.doAction(REGISTRY_CREDENTIAL_TYPE, "activate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *RegistryCredentialClient) ActionCreate(resource *RegistryCredential) (*Credential, error) { + + resp := &Credential{} + + err := c.rancherClient.doAction(REGISTRY_CREDENTIAL_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *RegistryCredentialClient) ActionDeactivate(resource *RegistryCredential) (*Credential, error) { + + resp := &Credential{} + + err := c.rancherClient.doAction(REGISTRY_CREDENTIAL_TYPE, "deactivate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *RegistryCredentialClient) ActionPurge(resource *RegistryCredential) (*Credential, error) { + + resp := &Credential{} + + err := c.rancherClient.doAction(REGISTRY_CREDENTIAL_TYPE, "purge", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *RegistryCredentialClient) ActionRemove(resource *RegistryCredential) (*Credential, error) { + + resp := &Credential{} + + err := c.rancherClient.doAction(REGISTRY_CREDENTIAL_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *RegistryCredentialClient) ActionUpdate(resource *RegistryCredential) (*Credential, error) { + + resp := &Credential{} + + err := c.rancherClient.doAction(REGISTRY_CREDENTIAL_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_remove_label_input.go b/vendor/github.com/rancher/go-rancher/client/generated_remove_label_input.go new file mode 100644 index 000000000000..84e47e7c3887 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_remove_label_input.go @@ -0,0 +1,62 @@ +package client + +const ( + REMOVE_LABEL_INPUT_TYPE = "removeLabelInput" +) + +type RemoveLabelInput struct { + Resource + + Label string `json:"label,omitempty"` +} + +type RemoveLabelInputCollection struct { + Collection + Data []RemoveLabelInput `json:"data,omitempty"` +} + +type RemoveLabelInputClient struct { + rancherClient *RancherClient +} + +type RemoveLabelInputOperations interface { + List(opts *ListOpts) (*RemoveLabelInputCollection, error) + Create(opts *RemoveLabelInput) (*RemoveLabelInput, error) + Update(existing *RemoveLabelInput, updates interface{}) (*RemoveLabelInput, error) + ById(id string) (*RemoveLabelInput, error) + Delete(container *RemoveLabelInput) error +} + +func newRemoveLabelInputClient(rancherClient *RancherClient) *RemoveLabelInputClient { + return &RemoveLabelInputClient{ + rancherClient: rancherClient, + } +} + +func (c *RemoveLabelInputClient) Create(container *RemoveLabelInput) (*RemoveLabelInput, error) { + resp := &RemoveLabelInput{} + err := c.rancherClient.doCreate(REMOVE_LABEL_INPUT_TYPE, container, resp) + return resp, err +} + +func (c *RemoveLabelInputClient) Update(existing *RemoveLabelInput, updates interface{}) (*RemoveLabelInput, error) { + resp := &RemoveLabelInput{} + err := c.rancherClient.doUpdate(REMOVE_LABEL_INPUT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *RemoveLabelInputClient) List(opts *ListOpts) (*RemoveLabelInputCollection, error) { + resp := &RemoveLabelInputCollection{} + err := c.rancherClient.doList(REMOVE_LABEL_INPUT_TYPE, opts, resp) + return resp, err +} + +func (c *RemoveLabelInputClient) ById(id string) (*RemoveLabelInput, error) { + resp := &RemoveLabelInput{} + err := c.rancherClient.doById(REMOVE_LABEL_INPUT_TYPE, id, resp) + return resp, err +} + +func (c *RemoveLabelInputClient) Delete(container *RemoveLabelInput) error { + return c.rancherClient.doResourceDelete(REMOVE_LABEL_INPUT_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_remove_load_balancer_input.go b/vendor/github.com/rancher/go-rancher/client/generated_remove_load_balancer_input.go new file mode 100644 index 000000000000..f6a2c1b9ea15 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_remove_load_balancer_input.go @@ -0,0 +1,67 @@ +package client + +const ( + REMOVE_LOAD_BALANCER_INPUT_TYPE = "removeLoadBalancerInput" +) + +type RemoveLoadBalancerInput struct { + Resource + + LoadBalancerId string `json:"loadBalancerId,omitempty" yaml:"load_balancer_id,omitempty"` +} + +type RemoveLoadBalancerInputCollection struct { + Collection + Data []RemoveLoadBalancerInput `json:"data,omitempty"` +} + +type RemoveLoadBalancerInputClient struct { + rancherClient *RancherClient +} + +type RemoveLoadBalancerInputOperations interface { + List(opts *ListOpts) (*RemoveLoadBalancerInputCollection, error) + Create(opts *RemoveLoadBalancerInput) (*RemoveLoadBalancerInput, error) + Update(existing *RemoveLoadBalancerInput, updates interface{}) (*RemoveLoadBalancerInput, error) + ById(id string) (*RemoveLoadBalancerInput, error) + Delete(container *RemoveLoadBalancerInput) error +} + +func newRemoveLoadBalancerInputClient(rancherClient *RancherClient) *RemoveLoadBalancerInputClient { + return &RemoveLoadBalancerInputClient{ + rancherClient: rancherClient, + } +} + +func (c *RemoveLoadBalancerInputClient) Create(container *RemoveLoadBalancerInput) (*RemoveLoadBalancerInput, error) { + resp := &RemoveLoadBalancerInput{} + err := c.rancherClient.doCreate(REMOVE_LOAD_BALANCER_INPUT_TYPE, container, resp) + return resp, err +} + +func (c *RemoveLoadBalancerInputClient) Update(existing *RemoveLoadBalancerInput, updates interface{}) (*RemoveLoadBalancerInput, error) { + resp := &RemoveLoadBalancerInput{} + err := c.rancherClient.doUpdate(REMOVE_LOAD_BALANCER_INPUT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *RemoveLoadBalancerInputClient) List(opts *ListOpts) (*RemoveLoadBalancerInputCollection, error) { + resp := &RemoveLoadBalancerInputCollection{} + err := c.rancherClient.doList(REMOVE_LOAD_BALANCER_INPUT_TYPE, opts, resp) + return resp, err +} + +func (c *RemoveLoadBalancerInputClient) ById(id string) (*RemoveLoadBalancerInput, error) { + resp := &RemoveLoadBalancerInput{} + err := c.rancherClient.doById(REMOVE_LOAD_BALANCER_INPUT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *RemoveLoadBalancerInputClient) Delete(container *RemoveLoadBalancerInput) error { + return c.rancherClient.doResourceDelete(REMOVE_LOAD_BALANCER_INPUT_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_resource_definition.go b/vendor/github.com/rancher/go-rancher/client/generated_resource_definition.go new file mode 100644 index 000000000000..bb9a4a173741 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_resource_definition.go @@ -0,0 +1,67 @@ +package client + +const ( + RESOURCE_DEFINITION_TYPE = "resourceDefinition" +) + +type ResourceDefinition struct { + Resource + + Name string `json:"name,omitempty" yaml:"name,omitempty"` +} + +type ResourceDefinitionCollection struct { + Collection + Data []ResourceDefinition `json:"data,omitempty"` +} + +type ResourceDefinitionClient struct { + rancherClient *RancherClient +} + +type ResourceDefinitionOperations interface { + List(opts *ListOpts) (*ResourceDefinitionCollection, error) + Create(opts *ResourceDefinition) (*ResourceDefinition, error) + Update(existing *ResourceDefinition, updates interface{}) (*ResourceDefinition, error) + ById(id string) (*ResourceDefinition, error) + Delete(container *ResourceDefinition) error +} + +func newResourceDefinitionClient(rancherClient *RancherClient) *ResourceDefinitionClient { + return &ResourceDefinitionClient{ + rancherClient: rancherClient, + } +} + +func (c *ResourceDefinitionClient) Create(container *ResourceDefinition) (*ResourceDefinition, error) { + resp := &ResourceDefinition{} + err := c.rancherClient.doCreate(RESOURCE_DEFINITION_TYPE, container, resp) + return resp, err +} + +func (c *ResourceDefinitionClient) Update(existing *ResourceDefinition, updates interface{}) (*ResourceDefinition, error) { + resp := &ResourceDefinition{} + err := c.rancherClient.doUpdate(RESOURCE_DEFINITION_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ResourceDefinitionClient) List(opts *ListOpts) (*ResourceDefinitionCollection, error) { + resp := &ResourceDefinitionCollection{} + err := c.rancherClient.doList(RESOURCE_DEFINITION_TYPE, opts, resp) + return resp, err +} + +func (c *ResourceDefinitionClient) ById(id string) (*ResourceDefinition, error) { + resp := &ResourceDefinition{} + err := c.rancherClient.doById(RESOURCE_DEFINITION_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ResourceDefinitionClient) Delete(container *ResourceDefinition) error { + return c.rancherClient.doResourceDelete(RESOURCE_DEFINITION_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_restart_policy.go b/vendor/github.com/rancher/go-rancher/client/generated_restart_policy.go new file mode 100644 index 000000000000..f301adb5a78b --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_restart_policy.go @@ -0,0 +1,69 @@ +package client + +const ( + RESTART_POLICY_TYPE = "restartPolicy" +) + +type RestartPolicy struct { + Resource + + MaximumRetryCount int64 `json:"maximumRetryCount,omitempty" yaml:"maximum_retry_count,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` +} + +type RestartPolicyCollection struct { + Collection + Data []RestartPolicy `json:"data,omitempty"` +} + +type RestartPolicyClient struct { + rancherClient *RancherClient +} + +type RestartPolicyOperations interface { + List(opts *ListOpts) (*RestartPolicyCollection, error) + Create(opts *RestartPolicy) (*RestartPolicy, error) + Update(existing *RestartPolicy, updates interface{}) (*RestartPolicy, error) + ById(id string) (*RestartPolicy, error) + Delete(container *RestartPolicy) error +} + +func newRestartPolicyClient(rancherClient *RancherClient) *RestartPolicyClient { + return &RestartPolicyClient{ + rancherClient: rancherClient, + } +} + +func (c *RestartPolicyClient) Create(container *RestartPolicy) (*RestartPolicy, error) { + resp := &RestartPolicy{} + err := c.rancherClient.doCreate(RESTART_POLICY_TYPE, container, resp) + return resp, err +} + +func (c *RestartPolicyClient) Update(existing *RestartPolicy, updates interface{}) (*RestartPolicy, error) { + resp := &RestartPolicy{} + err := c.rancherClient.doUpdate(RESTART_POLICY_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *RestartPolicyClient) List(opts *ListOpts) (*RestartPolicyCollection, error) { + resp := &RestartPolicyCollection{} + err := c.rancherClient.doList(RESTART_POLICY_TYPE, opts, resp) + return resp, err +} + +func (c *RestartPolicyClient) ById(id string) (*RestartPolicy, error) { + resp := &RestartPolicy{} + err := c.rancherClient.doById(RESTART_POLICY_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *RestartPolicyClient) Delete(container *RestartPolicy) error { + return c.rancherClient.doResourceDelete(RESTART_POLICY_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_restore_from_backup_input.go b/vendor/github.com/rancher/go-rancher/client/generated_restore_from_backup_input.go new file mode 100644 index 000000000000..a4878de4bb13 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_restore_from_backup_input.go @@ -0,0 +1,67 @@ +package client + +const ( + RESTORE_FROM_BACKUP_INPUT_TYPE = "restoreFromBackupInput" +) + +type RestoreFromBackupInput struct { + Resource + + BackupId string `json:"backupId,omitempty" yaml:"backup_id,omitempty"` +} + +type RestoreFromBackupInputCollection struct { + Collection + Data []RestoreFromBackupInput `json:"data,omitempty"` +} + +type RestoreFromBackupInputClient struct { + rancherClient *RancherClient +} + +type RestoreFromBackupInputOperations interface { + List(opts *ListOpts) (*RestoreFromBackupInputCollection, error) + Create(opts *RestoreFromBackupInput) (*RestoreFromBackupInput, error) + Update(existing *RestoreFromBackupInput, updates interface{}) (*RestoreFromBackupInput, error) + ById(id string) (*RestoreFromBackupInput, error) + Delete(container *RestoreFromBackupInput) error +} + +func newRestoreFromBackupInputClient(rancherClient *RancherClient) *RestoreFromBackupInputClient { + return &RestoreFromBackupInputClient{ + rancherClient: rancherClient, + } +} + +func (c *RestoreFromBackupInputClient) Create(container *RestoreFromBackupInput) (*RestoreFromBackupInput, error) { + resp := &RestoreFromBackupInput{} + err := c.rancherClient.doCreate(RESTORE_FROM_BACKUP_INPUT_TYPE, container, resp) + return resp, err +} + +func (c *RestoreFromBackupInputClient) Update(existing *RestoreFromBackupInput, updates interface{}) (*RestoreFromBackupInput, error) { + resp := &RestoreFromBackupInput{} + err := c.rancherClient.doUpdate(RESTORE_FROM_BACKUP_INPUT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *RestoreFromBackupInputClient) List(opts *ListOpts) (*RestoreFromBackupInputCollection, error) { + resp := &RestoreFromBackupInputCollection{} + err := c.rancherClient.doList(RESTORE_FROM_BACKUP_INPUT_TYPE, opts, resp) + return resp, err +} + +func (c *RestoreFromBackupInputClient) ById(id string) (*RestoreFromBackupInput, error) { + resp := &RestoreFromBackupInput{} + err := c.rancherClient.doById(RESTORE_FROM_BACKUP_INPUT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *RestoreFromBackupInputClient) Delete(container *RestoreFromBackupInput) error { + return c.rancherClient.doResourceDelete(RESTORE_FROM_BACKUP_INPUT_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_revert_to_snapshot_input.go b/vendor/github.com/rancher/go-rancher/client/generated_revert_to_snapshot_input.go new file mode 100644 index 000000000000..db702c9c8006 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_revert_to_snapshot_input.go @@ -0,0 +1,67 @@ +package client + +const ( + REVERT_TO_SNAPSHOT_INPUT_TYPE = "revertToSnapshotInput" +) + +type RevertToSnapshotInput struct { + Resource + + SnapshotId string `json:"snapshotId,omitempty" yaml:"snapshot_id,omitempty"` +} + +type RevertToSnapshotInputCollection struct { + Collection + Data []RevertToSnapshotInput `json:"data,omitempty"` +} + +type RevertToSnapshotInputClient struct { + rancherClient *RancherClient +} + +type RevertToSnapshotInputOperations interface { + List(opts *ListOpts) (*RevertToSnapshotInputCollection, error) + Create(opts *RevertToSnapshotInput) (*RevertToSnapshotInput, error) + Update(existing *RevertToSnapshotInput, updates interface{}) (*RevertToSnapshotInput, error) + ById(id string) (*RevertToSnapshotInput, error) + Delete(container *RevertToSnapshotInput) error +} + +func newRevertToSnapshotInputClient(rancherClient *RancherClient) *RevertToSnapshotInputClient { + return &RevertToSnapshotInputClient{ + rancherClient: rancherClient, + } +} + +func (c *RevertToSnapshotInputClient) Create(container *RevertToSnapshotInput) (*RevertToSnapshotInput, error) { + resp := &RevertToSnapshotInput{} + err := c.rancherClient.doCreate(REVERT_TO_SNAPSHOT_INPUT_TYPE, container, resp) + return resp, err +} + +func (c *RevertToSnapshotInputClient) Update(existing *RevertToSnapshotInput, updates interface{}) (*RevertToSnapshotInput, error) { + resp := &RevertToSnapshotInput{} + err := c.rancherClient.doUpdate(REVERT_TO_SNAPSHOT_INPUT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *RevertToSnapshotInputClient) List(opts *ListOpts) (*RevertToSnapshotInputCollection, error) { + resp := &RevertToSnapshotInputCollection{} + err := c.rancherClient.doList(REVERT_TO_SNAPSHOT_INPUT_TYPE, opts, resp) + return resp, err +} + +func (c *RevertToSnapshotInputClient) ById(id string) (*RevertToSnapshotInput, error) { + resp := &RevertToSnapshotInput{} + err := c.rancherClient.doById(REVERT_TO_SNAPSHOT_INPUT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *RevertToSnapshotInputClient) Delete(container *RevertToSnapshotInput) error { + return c.rancherClient.doResourceDelete(REVERT_TO_SNAPSHOT_INPUT_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_rolling_restart_strategy.go b/vendor/github.com/rancher/go-rancher/client/generated_rolling_restart_strategy.go new file mode 100644 index 000000000000..443f9f1ec16e --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_rolling_restart_strategy.go @@ -0,0 +1,69 @@ +package client + +const ( + ROLLING_RESTART_STRATEGY_TYPE = "rollingRestartStrategy" +) + +type RollingRestartStrategy struct { + Resource + + BatchSize int64 `json:"batchSize,omitempty" yaml:"batch_size,omitempty"` + + IntervalMillis int64 `json:"intervalMillis,omitempty" yaml:"interval_millis,omitempty"` +} + +type RollingRestartStrategyCollection struct { + Collection + Data []RollingRestartStrategy `json:"data,omitempty"` +} + +type RollingRestartStrategyClient struct { + rancherClient *RancherClient +} + +type RollingRestartStrategyOperations interface { + List(opts *ListOpts) (*RollingRestartStrategyCollection, error) + Create(opts *RollingRestartStrategy) (*RollingRestartStrategy, error) + Update(existing *RollingRestartStrategy, updates interface{}) (*RollingRestartStrategy, error) + ById(id string) (*RollingRestartStrategy, error) + Delete(container *RollingRestartStrategy) error +} + +func newRollingRestartStrategyClient(rancherClient *RancherClient) *RollingRestartStrategyClient { + return &RollingRestartStrategyClient{ + rancherClient: rancherClient, + } +} + +func (c *RollingRestartStrategyClient) Create(container *RollingRestartStrategy) (*RollingRestartStrategy, error) { + resp := &RollingRestartStrategy{} + err := c.rancherClient.doCreate(ROLLING_RESTART_STRATEGY_TYPE, container, resp) + return resp, err +} + +func (c *RollingRestartStrategyClient) Update(existing *RollingRestartStrategy, updates interface{}) (*RollingRestartStrategy, error) { + resp := &RollingRestartStrategy{} + err := c.rancherClient.doUpdate(ROLLING_RESTART_STRATEGY_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *RollingRestartStrategyClient) List(opts *ListOpts) (*RollingRestartStrategyCollection, error) { + resp := &RollingRestartStrategyCollection{} + err := c.rancherClient.doList(ROLLING_RESTART_STRATEGY_TYPE, opts, resp) + return resp, err +} + +func (c *RollingRestartStrategyClient) ById(id string) (*RollingRestartStrategy, error) { + resp := &RollingRestartStrategy{} + err := c.rancherClient.doById(ROLLING_RESTART_STRATEGY_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *RollingRestartStrategyClient) Delete(container *RollingRestartStrategy) error { + return c.rancherClient.doResourceDelete(ROLLING_RESTART_STRATEGY_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_scale_policy.go b/vendor/github.com/rancher/go-rancher/client/generated_scale_policy.go new file mode 100644 index 000000000000..abcd1bb5b43c --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_scale_policy.go @@ -0,0 +1,71 @@ +package client + +const ( + SCALE_POLICY_TYPE = "scalePolicy" +) + +type ScalePolicy struct { + Resource + + Increment int64 `json:"increment,omitempty" yaml:"increment,omitempty"` + + Max int64 `json:"max,omitempty" yaml:"max,omitempty"` + + Min int64 `json:"min,omitempty" yaml:"min,omitempty"` +} + +type ScalePolicyCollection struct { + Collection + Data []ScalePolicy `json:"data,omitempty"` +} + +type ScalePolicyClient struct { + rancherClient *RancherClient +} + +type ScalePolicyOperations interface { + List(opts *ListOpts) (*ScalePolicyCollection, error) + Create(opts *ScalePolicy) (*ScalePolicy, error) + Update(existing *ScalePolicy, updates interface{}) (*ScalePolicy, error) + ById(id string) (*ScalePolicy, error) + Delete(container *ScalePolicy) error +} + +func newScalePolicyClient(rancherClient *RancherClient) *ScalePolicyClient { + return &ScalePolicyClient{ + rancherClient: rancherClient, + } +} + +func (c *ScalePolicyClient) Create(container *ScalePolicy) (*ScalePolicy, error) { + resp := &ScalePolicy{} + err := c.rancherClient.doCreate(SCALE_POLICY_TYPE, container, resp) + return resp, err +} + +func (c *ScalePolicyClient) Update(existing *ScalePolicy, updates interface{}) (*ScalePolicy, error) { + resp := &ScalePolicy{} + err := c.rancherClient.doUpdate(SCALE_POLICY_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ScalePolicyClient) List(opts *ListOpts) (*ScalePolicyCollection, error) { + resp := &ScalePolicyCollection{} + err := c.rancherClient.doList(SCALE_POLICY_TYPE, opts, resp) + return resp, err +} + +func (c *ScalePolicyClient) ById(id string) (*ScalePolicy, error) { + resp := &ScalePolicy{} + err := c.rancherClient.doById(SCALE_POLICY_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ScalePolicyClient) Delete(container *ScalePolicy) error { + return c.rancherClient.doResourceDelete(SCALE_POLICY_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_secondary_launch_config.go b/vendor/github.com/rancher/go-rancher/client/generated_secondary_launch_config.go new file mode 100644 index 000000000000..ab742558718e --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_secondary_launch_config.go @@ -0,0 +1,432 @@ +package client + +const ( + SECONDARY_LAUNCH_CONFIG_TYPE = "secondaryLaunchConfig" +) + +type SecondaryLaunchConfig struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + AgentId string `json:"agentId,omitempty" yaml:"agent_id,omitempty"` + + AllocationState string `json:"allocationState,omitempty" yaml:"allocation_state,omitempty"` + + BlkioDeviceOptions map[string]interface{} `json:"blkioDeviceOptions,omitempty" yaml:"blkio_device_options,omitempty"` + + Build *DockerBuild `json:"build,omitempty" yaml:"build,omitempty"` + + CapAdd []string `json:"capAdd,omitempty" yaml:"cap_add,omitempty"` + + CapDrop []string `json:"capDrop,omitempty" yaml:"cap_drop,omitempty"` + + Command []string `json:"command,omitempty" yaml:"command,omitempty"` + + Count int64 `json:"count,omitempty" yaml:"count,omitempty"` + + CpuSet string `json:"cpuSet,omitempty" yaml:"cpu_set,omitempty"` + + CpuShares int64 `json:"cpuShares,omitempty" yaml:"cpu_shares,omitempty"` + + CreateIndex int64 `json:"createIndex,omitempty" yaml:"create_index,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + DataVolumeMounts map[string]interface{} `json:"dataVolumeMounts,omitempty" yaml:"data_volume_mounts,omitempty"` + + DataVolumes []string `json:"dataVolumes,omitempty" yaml:"data_volumes,omitempty"` + + DataVolumesFrom []string `json:"dataVolumesFrom,omitempty" yaml:"data_volumes_from,omitempty"` + + DataVolumesFromLaunchConfigs []string `json:"dataVolumesFromLaunchConfigs,omitempty" yaml:"data_volumes_from_launch_configs,omitempty"` + + DeploymentUnitUuid string `json:"deploymentUnitUuid,omitempty" yaml:"deployment_unit_uuid,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + Devices []string `json:"devices,omitempty" yaml:"devices,omitempty"` + + Disks []interface{} `json:"disks,omitempty" yaml:"disks,omitempty"` + + Dns []string `json:"dns,omitempty" yaml:"dns,omitempty"` + + DnsSearch []string `json:"dnsSearch,omitempty" yaml:"dns_search,omitempty"` + + DomainName string `json:"domainName,omitempty" yaml:"domain_name,omitempty"` + + EntryPoint []string `json:"entryPoint,omitempty" yaml:"entry_point,omitempty"` + + Environment map[string]interface{} `json:"environment,omitempty" yaml:"environment,omitempty"` + + Expose []string `json:"expose,omitempty" yaml:"expose,omitempty"` + + ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"` + + ExtraHosts []string `json:"extraHosts,omitempty" yaml:"extra_hosts,omitempty"` + + FirstRunning string `json:"firstRunning,omitempty" yaml:"first_running,omitempty"` + + HealthCheck *InstanceHealthCheck `json:"healthCheck,omitempty" yaml:"health_check,omitempty"` + + HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"` + + HostId string `json:"hostId,omitempty" yaml:"host_id,omitempty"` + + Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"` + + ImageUuid string `json:"imageUuid,omitempty" yaml:"image_uuid,omitempty"` + + InstanceLinks map[string]interface{} `json:"instanceLinks,omitempty" yaml:"instance_links,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Labels map[string]interface{} `json:"labels,omitempty" yaml:"labels,omitempty"` + + LogConfig *LogConfig `json:"logConfig,omitempty" yaml:"log_config,omitempty"` + + LxcConf map[string]interface{} `json:"lxcConf,omitempty" yaml:"lxc_conf,omitempty"` + + Memory int64 `json:"memory,omitempty" yaml:"memory,omitempty"` + + MemoryMb int64 `json:"memoryMb,omitempty" yaml:"memory_mb,omitempty"` + + MemorySwap int64 `json:"memorySwap,omitempty" yaml:"memory_swap,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + NativeContainer bool `json:"nativeContainer,omitempty" yaml:"native_container,omitempty"` + + NetworkContainerId string `json:"networkContainerId,omitempty" yaml:"network_container_id,omitempty"` + + NetworkIds []string `json:"networkIds,omitempty" yaml:"network_ids,omitempty"` + + NetworkLaunchConfig string `json:"networkLaunchConfig,omitempty" yaml:"network_launch_config,omitempty"` + + NetworkMode string `json:"networkMode,omitempty" yaml:"network_mode,omitempty"` + + PidMode string `json:"pidMode,omitempty" yaml:"pid_mode,omitempty"` + + Ports []string `json:"ports,omitempty" yaml:"ports,omitempty"` + + PrimaryIpAddress string `json:"primaryIpAddress,omitempty" yaml:"primary_ip_address,omitempty"` + + Privileged bool `json:"privileged,omitempty" yaml:"privileged,omitempty"` + + PublishAllPorts bool `json:"publishAllPorts,omitempty" yaml:"publish_all_ports,omitempty"` + + ReadOnly bool `json:"readOnly,omitempty" yaml:"read_only,omitempty"` + + RegistryCredentialId string `json:"registryCredentialId,omitempty" yaml:"registry_credential_id,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + RequestedHostId string `json:"requestedHostId,omitempty" yaml:"requested_host_id,omitempty"` + + RequestedIpAddress string `json:"requestedIpAddress,omitempty" yaml:"requested_ip_address,omitempty"` + + SecurityOpt []string `json:"securityOpt,omitempty" yaml:"security_opt,omitempty"` + + StartCount int64 `json:"startCount,omitempty" yaml:"start_count,omitempty"` + + StartOnCreate bool `json:"startOnCreate,omitempty" yaml:"start_on_create,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + StdinOpen bool `json:"stdinOpen,omitempty" yaml:"stdin_open,omitempty"` + + SystemContainer string `json:"systemContainer,omitempty" yaml:"system_container,omitempty"` + + Token string `json:"token,omitempty" yaml:"token,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Tty bool `json:"tty,omitempty" yaml:"tty,omitempty"` + + User string `json:"user,omitempty" yaml:"user,omitempty"` + + Userdata string `json:"userdata,omitempty" yaml:"userdata,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + + Vcpu int64 `json:"vcpu,omitempty" yaml:"vcpu,omitempty"` + + Version string `json:"version,omitempty" yaml:"version,omitempty"` + + VolumeDriver string `json:"volumeDriver,omitempty" yaml:"volume_driver,omitempty"` + + WorkingDir string `json:"workingDir,omitempty" yaml:"working_dir,omitempty"` +} + +type SecondaryLaunchConfigCollection struct { + Collection + Data []SecondaryLaunchConfig `json:"data,omitempty"` +} + +type SecondaryLaunchConfigClient struct { + rancherClient *RancherClient +} + +type SecondaryLaunchConfigOperations interface { + List(opts *ListOpts) (*SecondaryLaunchConfigCollection, error) + Create(opts *SecondaryLaunchConfig) (*SecondaryLaunchConfig, error) + Update(existing *SecondaryLaunchConfig, updates interface{}) (*SecondaryLaunchConfig, error) + ById(id string) (*SecondaryLaunchConfig, error) + Delete(container *SecondaryLaunchConfig) error + + ActionAllocate(*SecondaryLaunchConfig) (*Instance, error) + + ActionConsole(*SecondaryLaunchConfig, *InstanceConsoleInput) (*InstanceConsole, error) + + ActionCreate(*SecondaryLaunchConfig) (*Instance, error) + + ActionDeallocate(*SecondaryLaunchConfig) (*Instance, error) + + ActionError(*SecondaryLaunchConfig) (*Instance, error) + + ActionExecute(*SecondaryLaunchConfig, *ContainerExec) (*HostAccess, error) + + ActionMigrate(*SecondaryLaunchConfig) (*Instance, error) + + ActionProxy(*SecondaryLaunchConfig, *ContainerProxy) (*HostAccess, error) + + ActionPurge(*SecondaryLaunchConfig) (*Instance, error) + + ActionRemove(*SecondaryLaunchConfig) (*Instance, error) + + ActionRestart(*SecondaryLaunchConfig) (*Instance, error) + + ActionRestore(*SecondaryLaunchConfig) (*Instance, error) + + ActionSetlabels(*SecondaryLaunchConfig, *SetLabelsInput) (*Container, error) + + ActionStart(*SecondaryLaunchConfig) (*Instance, error) + + ActionStop(*SecondaryLaunchConfig, *InstanceStop) (*Instance, error) + + ActionUpdate(*SecondaryLaunchConfig) (*Instance, error) + + ActionUpdatehealthy(*SecondaryLaunchConfig) (*Instance, error) + + ActionUpdatereinitializing(*SecondaryLaunchConfig) (*Instance, error) + + ActionUpdateunhealthy(*SecondaryLaunchConfig) (*Instance, error) +} + +func newSecondaryLaunchConfigClient(rancherClient *RancherClient) *SecondaryLaunchConfigClient { + return &SecondaryLaunchConfigClient{ + rancherClient: rancherClient, + } +} + +func (c *SecondaryLaunchConfigClient) Create(container *SecondaryLaunchConfig) (*SecondaryLaunchConfig, error) { + resp := &SecondaryLaunchConfig{} + err := c.rancherClient.doCreate(SECONDARY_LAUNCH_CONFIG_TYPE, container, resp) + return resp, err +} + +func (c *SecondaryLaunchConfigClient) Update(existing *SecondaryLaunchConfig, updates interface{}) (*SecondaryLaunchConfig, error) { + resp := &SecondaryLaunchConfig{} + err := c.rancherClient.doUpdate(SECONDARY_LAUNCH_CONFIG_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *SecondaryLaunchConfigClient) List(opts *ListOpts) (*SecondaryLaunchConfigCollection, error) { + resp := &SecondaryLaunchConfigCollection{} + err := c.rancherClient.doList(SECONDARY_LAUNCH_CONFIG_TYPE, opts, resp) + return resp, err +} + +func (c *SecondaryLaunchConfigClient) ById(id string) (*SecondaryLaunchConfig, error) { + resp := &SecondaryLaunchConfig{} + err := c.rancherClient.doById(SECONDARY_LAUNCH_CONFIG_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *SecondaryLaunchConfigClient) Delete(container *SecondaryLaunchConfig) error { + return c.rancherClient.doResourceDelete(SECONDARY_LAUNCH_CONFIG_TYPE, &container.Resource) +} + +func (c *SecondaryLaunchConfigClient) ActionAllocate(resource *SecondaryLaunchConfig) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "allocate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *SecondaryLaunchConfigClient) ActionConsole(resource *SecondaryLaunchConfig, input *InstanceConsoleInput) (*InstanceConsole, error) { + + resp := &InstanceConsole{} + + err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "console", &resource.Resource, input, resp) + + return resp, err +} + +func (c *SecondaryLaunchConfigClient) ActionCreate(resource *SecondaryLaunchConfig) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *SecondaryLaunchConfigClient) ActionDeallocate(resource *SecondaryLaunchConfig) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "deallocate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *SecondaryLaunchConfigClient) ActionError(resource *SecondaryLaunchConfig) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "error", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *SecondaryLaunchConfigClient) ActionExecute(resource *SecondaryLaunchConfig, input *ContainerExec) (*HostAccess, error) { + + resp := &HostAccess{} + + err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "execute", &resource.Resource, input, resp) + + return resp, err +} + +func (c *SecondaryLaunchConfigClient) ActionMigrate(resource *SecondaryLaunchConfig) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "migrate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *SecondaryLaunchConfigClient) ActionProxy(resource *SecondaryLaunchConfig, input *ContainerProxy) (*HostAccess, error) { + + resp := &HostAccess{} + + err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "proxy", &resource.Resource, input, resp) + + return resp, err +} + +func (c *SecondaryLaunchConfigClient) ActionPurge(resource *SecondaryLaunchConfig) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "purge", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *SecondaryLaunchConfigClient) ActionRemove(resource *SecondaryLaunchConfig) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *SecondaryLaunchConfigClient) ActionRestart(resource *SecondaryLaunchConfig) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "restart", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *SecondaryLaunchConfigClient) ActionRestore(resource *SecondaryLaunchConfig) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "restore", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *SecondaryLaunchConfigClient) ActionSetlabels(resource *SecondaryLaunchConfig, input *SetLabelsInput) (*Container, error) { + + resp := &Container{} + + err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "setlabels", &resource.Resource, input, resp) + + return resp, err +} + +func (c *SecondaryLaunchConfigClient) ActionStart(resource *SecondaryLaunchConfig) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "start", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *SecondaryLaunchConfigClient) ActionStop(resource *SecondaryLaunchConfig, input *InstanceStop) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "stop", &resource.Resource, input, resp) + + return resp, err +} + +func (c *SecondaryLaunchConfigClient) ActionUpdate(resource *SecondaryLaunchConfig) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *SecondaryLaunchConfigClient) ActionUpdatehealthy(resource *SecondaryLaunchConfig) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "updatehealthy", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *SecondaryLaunchConfigClient) ActionUpdatereinitializing(resource *SecondaryLaunchConfig) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "updatereinitializing", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *SecondaryLaunchConfigClient) ActionUpdateunhealthy(resource *SecondaryLaunchConfig) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(SECONDARY_LAUNCH_CONFIG_TYPE, "updateunhealthy", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_service.go b/vendor/github.com/rancher/go-rancher/client/generated_service.go new file mode 100644 index 000000000000..063bcff2382e --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_service.go @@ -0,0 +1,283 @@ +package client + +const ( + SERVICE_TYPE = "service" +) + +type Service struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + AssignServiceIpAddress bool `json:"assignServiceIpAddress,omitempty" yaml:"assign_service_ip_address,omitempty"` + + CreateIndex int64 `json:"createIndex,omitempty" yaml:"create_index,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + CurrentScale int64 `json:"currentScale,omitempty" yaml:"current_scale,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + EnvironmentId string `json:"environmentId,omitempty" yaml:"environment_id,omitempty"` + + ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"` + + Fqdn string `json:"fqdn,omitempty" yaml:"fqdn,omitempty"` + + HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + LaunchConfig *LaunchConfig `json:"launchConfig,omitempty" yaml:"launch_config,omitempty"` + + Metadata map[string]interface{} `json:"metadata,omitempty" yaml:"metadata,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + PublicEndpoints []interface{} `json:"publicEndpoints,omitempty" yaml:"public_endpoints,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + RetainIp bool `json:"retainIp,omitempty" yaml:"retain_ip,omitempty"` + + Scale int64 `json:"scale,omitempty" yaml:"scale,omitempty"` + + ScalePolicy *ScalePolicy `json:"scalePolicy,omitempty" yaml:"scale_policy,omitempty"` + + SecondaryLaunchConfigs []interface{} `json:"secondaryLaunchConfigs,omitempty" yaml:"secondary_launch_configs,omitempty"` + + SelectorContainer string `json:"selectorContainer,omitempty" yaml:"selector_container,omitempty"` + + SelectorLink string `json:"selectorLink,omitempty" yaml:"selector_link,omitempty"` + + StartOnCreate bool `json:"startOnCreate,omitempty" yaml:"start_on_create,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Upgrade *ServiceUpgrade `json:"upgrade,omitempty" yaml:"upgrade,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + + Vip string `json:"vip,omitempty" yaml:"vip,omitempty"` +} + +type ServiceCollection struct { + Collection + Data []Service `json:"data,omitempty"` +} + +type ServiceClient struct { + rancherClient *RancherClient +} + +type ServiceOperations interface { + List(opts *ListOpts) (*ServiceCollection, error) + Create(opts *Service) (*Service, error) + Update(existing *Service, updates interface{}) (*Service, error) + ById(id string) (*Service, error) + Delete(container *Service) error + + ActionActivate(*Service) (*Service, error) + + ActionAddservicelink(*Service, *AddRemoveServiceLinkInput) (*Service, error) + + ActionCancelrollback(*Service) (*Service, error) + + ActionCancelupgrade(*Service) (*Service, error) + + ActionCreate(*Service) (*Service, error) + + ActionDeactivate(*Service) (*Service, error) + + ActionFinishupgrade(*Service) (*Service, error) + + ActionRemove(*Service) (*Service, error) + + ActionRemoveservicelink(*Service, *AddRemoveServiceLinkInput) (*Service, error) + + ActionRestart(*Service, *ServiceRestart) (*Service, error) + + ActionRollback(*Service) (*Service, error) + + ActionSetservicelinks(*Service, *SetServiceLinksInput) (*Service, error) + + ActionUpdate(*Service) (*Service, error) + + ActionUpgrade(*Service, *ServiceUpgrade) (*Service, error) +} + +func newServiceClient(rancherClient *RancherClient) *ServiceClient { + return &ServiceClient{ + rancherClient: rancherClient, + } +} + +func (c *ServiceClient) Create(container *Service) (*Service, error) { + resp := &Service{} + err := c.rancherClient.doCreate(SERVICE_TYPE, container, resp) + return resp, err +} + +func (c *ServiceClient) Update(existing *Service, updates interface{}) (*Service, error) { + resp := &Service{} + err := c.rancherClient.doUpdate(SERVICE_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ServiceClient) List(opts *ListOpts) (*ServiceCollection, error) { + resp := &ServiceCollection{} + err := c.rancherClient.doList(SERVICE_TYPE, opts, resp) + return resp, err +} + +func (c *ServiceClient) ById(id string) (*Service, error) { + resp := &Service{} + err := c.rancherClient.doById(SERVICE_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ServiceClient) Delete(container *Service) error { + return c.rancherClient.doResourceDelete(SERVICE_TYPE, &container.Resource) +} + +func (c *ServiceClient) ActionActivate(resource *Service) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(SERVICE_TYPE, "activate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ServiceClient) ActionAddservicelink(resource *Service, input *AddRemoveServiceLinkInput) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(SERVICE_TYPE, "addservicelink", &resource.Resource, input, resp) + + return resp, err +} + +func (c *ServiceClient) ActionCancelrollback(resource *Service) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(SERVICE_TYPE, "cancelrollback", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ServiceClient) ActionCancelupgrade(resource *Service) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(SERVICE_TYPE, "cancelupgrade", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ServiceClient) ActionCreate(resource *Service) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(SERVICE_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ServiceClient) ActionDeactivate(resource *Service) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(SERVICE_TYPE, "deactivate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ServiceClient) ActionFinishupgrade(resource *Service) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(SERVICE_TYPE, "finishupgrade", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ServiceClient) ActionRemove(resource *Service) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(SERVICE_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ServiceClient) ActionRemoveservicelink(resource *Service, input *AddRemoveServiceLinkInput) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(SERVICE_TYPE, "removeservicelink", &resource.Resource, input, resp) + + return resp, err +} + +func (c *ServiceClient) ActionRestart(resource *Service, input *ServiceRestart) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(SERVICE_TYPE, "restart", &resource.Resource, input, resp) + + return resp, err +} + +func (c *ServiceClient) ActionRollback(resource *Service) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(SERVICE_TYPE, "rollback", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ServiceClient) ActionSetservicelinks(resource *Service, input *SetServiceLinksInput) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(SERVICE_TYPE, "setservicelinks", &resource.Resource, input, resp) + + return resp, err +} + +func (c *ServiceClient) ActionUpdate(resource *Service) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(SERVICE_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ServiceClient) ActionUpgrade(resource *Service, input *ServiceUpgrade) (*Service, error) { + + resp := &Service{} + + err := c.rancherClient.doAction(SERVICE_TYPE, "upgrade", &resource.Resource, input, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_service_consume_map.go b/vendor/github.com/rancher/go-rancher/client/generated_service_consume_map.go new file mode 100644 index 000000000000..822a9aac5fcc --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_service_consume_map.go @@ -0,0 +1,130 @@ +package client + +const ( + SERVICE_CONSUME_MAP_TYPE = "serviceConsumeMap" +) + +type ServiceConsumeMap struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + ConsumedServiceId string `json:"consumedServiceId,omitempty" yaml:"consumed_service_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + Ports []string `json:"ports,omitempty" yaml:"ports,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + ServiceId string `json:"serviceId,omitempty" yaml:"service_id,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type ServiceConsumeMapCollection struct { + Collection + Data []ServiceConsumeMap `json:"data,omitempty"` +} + +type ServiceConsumeMapClient struct { + rancherClient *RancherClient +} + +type ServiceConsumeMapOperations interface { + List(opts *ListOpts) (*ServiceConsumeMapCollection, error) + Create(opts *ServiceConsumeMap) (*ServiceConsumeMap, error) + Update(existing *ServiceConsumeMap, updates interface{}) (*ServiceConsumeMap, error) + ById(id string) (*ServiceConsumeMap, error) + Delete(container *ServiceConsumeMap) error + + ActionCreate(*ServiceConsumeMap) (*ServiceConsumeMap, error) + + ActionRemove(*ServiceConsumeMap) (*ServiceConsumeMap, error) + + ActionUpdate(*ServiceConsumeMap) (*ServiceConsumeMap, error) +} + +func newServiceConsumeMapClient(rancherClient *RancherClient) *ServiceConsumeMapClient { + return &ServiceConsumeMapClient{ + rancherClient: rancherClient, + } +} + +func (c *ServiceConsumeMapClient) Create(container *ServiceConsumeMap) (*ServiceConsumeMap, error) { + resp := &ServiceConsumeMap{} + err := c.rancherClient.doCreate(SERVICE_CONSUME_MAP_TYPE, container, resp) + return resp, err +} + +func (c *ServiceConsumeMapClient) Update(existing *ServiceConsumeMap, updates interface{}) (*ServiceConsumeMap, error) { + resp := &ServiceConsumeMap{} + err := c.rancherClient.doUpdate(SERVICE_CONSUME_MAP_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ServiceConsumeMapClient) List(opts *ListOpts) (*ServiceConsumeMapCollection, error) { + resp := &ServiceConsumeMapCollection{} + err := c.rancherClient.doList(SERVICE_CONSUME_MAP_TYPE, opts, resp) + return resp, err +} + +func (c *ServiceConsumeMapClient) ById(id string) (*ServiceConsumeMap, error) { + resp := &ServiceConsumeMap{} + err := c.rancherClient.doById(SERVICE_CONSUME_MAP_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ServiceConsumeMapClient) Delete(container *ServiceConsumeMap) error { + return c.rancherClient.doResourceDelete(SERVICE_CONSUME_MAP_TYPE, &container.Resource) +} + +func (c *ServiceConsumeMapClient) ActionCreate(resource *ServiceConsumeMap) (*ServiceConsumeMap, error) { + + resp := &ServiceConsumeMap{} + + err := c.rancherClient.doAction(SERVICE_CONSUME_MAP_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ServiceConsumeMapClient) ActionRemove(resource *ServiceConsumeMap) (*ServiceConsumeMap, error) { + + resp := &ServiceConsumeMap{} + + err := c.rancherClient.doAction(SERVICE_CONSUME_MAP_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ServiceConsumeMapClient) ActionUpdate(resource *ServiceConsumeMap) (*ServiceConsumeMap, error) { + + resp := &ServiceConsumeMap{} + + err := c.rancherClient.doAction(SERVICE_CONSUME_MAP_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_service_event.go b/vendor/github.com/rancher/go-rancher/client/generated_service_event.go new file mode 100644 index 000000000000..7d046b38b60c --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_service_event.go @@ -0,0 +1,123 @@ +package client + +const ( + SERVICE_EVENT_TYPE = "serviceEvent" +) + +type ServiceEvent struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + ExternalTimestamp int64 `json:"externalTimestamp,omitempty" yaml:"external_timestamp,omitempty"` + + HealthcheckUuid string `json:"healthcheckUuid,omitempty" yaml:"healthcheck_uuid,omitempty"` + + HostId string `json:"hostId,omitempty" yaml:"host_id,omitempty"` + + InstanceId string `json:"instanceId,omitempty" yaml:"instance_id,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + ReportedHealth string `json:"reportedHealth,omitempty" yaml:"reported_health,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type ServiceEventCollection struct { + Collection + Data []ServiceEvent `json:"data,omitempty"` +} + +type ServiceEventClient struct { + rancherClient *RancherClient +} + +type ServiceEventOperations interface { + List(opts *ListOpts) (*ServiceEventCollection, error) + Create(opts *ServiceEvent) (*ServiceEvent, error) + Update(existing *ServiceEvent, updates interface{}) (*ServiceEvent, error) + ById(id string) (*ServiceEvent, error) + Delete(container *ServiceEvent) error + + ActionCreate(*ServiceEvent) (*ServiceEvent, error) + + ActionRemove(*ServiceEvent) (*ServiceEvent, error) +} + +func newServiceEventClient(rancherClient *RancherClient) *ServiceEventClient { + return &ServiceEventClient{ + rancherClient: rancherClient, + } +} + +func (c *ServiceEventClient) Create(container *ServiceEvent) (*ServiceEvent, error) { + resp := &ServiceEvent{} + err := c.rancherClient.doCreate(SERVICE_EVENT_TYPE, container, resp) + return resp, err +} + +func (c *ServiceEventClient) Update(existing *ServiceEvent, updates interface{}) (*ServiceEvent, error) { + resp := &ServiceEvent{} + err := c.rancherClient.doUpdate(SERVICE_EVENT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ServiceEventClient) List(opts *ListOpts) (*ServiceEventCollection, error) { + resp := &ServiceEventCollection{} + err := c.rancherClient.doList(SERVICE_EVENT_TYPE, opts, resp) + return resp, err +} + +func (c *ServiceEventClient) ById(id string) (*ServiceEvent, error) { + resp := &ServiceEvent{} + err := c.rancherClient.doById(SERVICE_EVENT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ServiceEventClient) Delete(container *ServiceEvent) error { + return c.rancherClient.doResourceDelete(SERVICE_EVENT_TYPE, &container.Resource) +} + +func (c *ServiceEventClient) ActionCreate(resource *ServiceEvent) (*ServiceEvent, error) { + + resp := &ServiceEvent{} + + err := c.rancherClient.doAction(SERVICE_EVENT_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ServiceEventClient) ActionRemove(resource *ServiceEvent) (*ServiceEvent, error) { + + resp := &ServiceEvent{} + + err := c.rancherClient.doAction(SERVICE_EVENT_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_service_expose_map.go b/vendor/github.com/rancher/go-rancher/client/generated_service_expose_map.go new file mode 100644 index 000000000000..60fe5f2f88c6 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_service_expose_map.go @@ -0,0 +1,121 @@ +package client + +const ( + SERVICE_EXPOSE_MAP_TYPE = "serviceExposeMap" +) + +type ServiceExposeMap struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + InstanceId string `json:"instanceId,omitempty" yaml:"instance_id,omitempty"` + + IpAddress string `json:"ipAddress,omitempty" yaml:"ip_address,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Managed bool `json:"managed,omitempty" yaml:"managed,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + ServiceId string `json:"serviceId,omitempty" yaml:"service_id,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type ServiceExposeMapCollection struct { + Collection + Data []ServiceExposeMap `json:"data,omitempty"` +} + +type ServiceExposeMapClient struct { + rancherClient *RancherClient +} + +type ServiceExposeMapOperations interface { + List(opts *ListOpts) (*ServiceExposeMapCollection, error) + Create(opts *ServiceExposeMap) (*ServiceExposeMap, error) + Update(existing *ServiceExposeMap, updates interface{}) (*ServiceExposeMap, error) + ById(id string) (*ServiceExposeMap, error) + Delete(container *ServiceExposeMap) error + + ActionCreate(*ServiceExposeMap) (*ServiceExposeMap, error) + + ActionRemove(*ServiceExposeMap) (*ServiceExposeMap, error) +} + +func newServiceExposeMapClient(rancherClient *RancherClient) *ServiceExposeMapClient { + return &ServiceExposeMapClient{ + rancherClient: rancherClient, + } +} + +func (c *ServiceExposeMapClient) Create(container *ServiceExposeMap) (*ServiceExposeMap, error) { + resp := &ServiceExposeMap{} + err := c.rancherClient.doCreate(SERVICE_EXPOSE_MAP_TYPE, container, resp) + return resp, err +} + +func (c *ServiceExposeMapClient) Update(existing *ServiceExposeMap, updates interface{}) (*ServiceExposeMap, error) { + resp := &ServiceExposeMap{} + err := c.rancherClient.doUpdate(SERVICE_EXPOSE_MAP_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ServiceExposeMapClient) List(opts *ListOpts) (*ServiceExposeMapCollection, error) { + resp := &ServiceExposeMapCollection{} + err := c.rancherClient.doList(SERVICE_EXPOSE_MAP_TYPE, opts, resp) + return resp, err +} + +func (c *ServiceExposeMapClient) ById(id string) (*ServiceExposeMap, error) { + resp := &ServiceExposeMap{} + err := c.rancherClient.doById(SERVICE_EXPOSE_MAP_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ServiceExposeMapClient) Delete(container *ServiceExposeMap) error { + return c.rancherClient.doResourceDelete(SERVICE_EXPOSE_MAP_TYPE, &container.Resource) +} + +func (c *ServiceExposeMapClient) ActionCreate(resource *ServiceExposeMap) (*ServiceExposeMap, error) { + + resp := &ServiceExposeMap{} + + err := c.rancherClient.doAction(SERVICE_EXPOSE_MAP_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *ServiceExposeMapClient) ActionRemove(resource *ServiceExposeMap) (*ServiceExposeMap, error) { + + resp := &ServiceExposeMap{} + + err := c.rancherClient.doAction(SERVICE_EXPOSE_MAP_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_service_link.go b/vendor/github.com/rancher/go-rancher/client/generated_service_link.go new file mode 100644 index 000000000000..52c75ac53314 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_service_link.go @@ -0,0 +1,71 @@ +package client + +const ( + SERVICE_LINK_TYPE = "serviceLink" +) + +type ServiceLink struct { + Resource + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + ServiceId string `json:"serviceId,omitempty" yaml:"service_id,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type ServiceLinkCollection struct { + Collection + Data []ServiceLink `json:"data,omitempty"` +} + +type ServiceLinkClient struct { + rancherClient *RancherClient +} + +type ServiceLinkOperations interface { + List(opts *ListOpts) (*ServiceLinkCollection, error) + Create(opts *ServiceLink) (*ServiceLink, error) + Update(existing *ServiceLink, updates interface{}) (*ServiceLink, error) + ById(id string) (*ServiceLink, error) + Delete(container *ServiceLink) error +} + +func newServiceLinkClient(rancherClient *RancherClient) *ServiceLinkClient { + return &ServiceLinkClient{ + rancherClient: rancherClient, + } +} + +func (c *ServiceLinkClient) Create(container *ServiceLink) (*ServiceLink, error) { + resp := &ServiceLink{} + err := c.rancherClient.doCreate(SERVICE_LINK_TYPE, container, resp) + return resp, err +} + +func (c *ServiceLinkClient) Update(existing *ServiceLink, updates interface{}) (*ServiceLink, error) { + resp := &ServiceLink{} + err := c.rancherClient.doUpdate(SERVICE_LINK_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ServiceLinkClient) List(opts *ListOpts) (*ServiceLinkCollection, error) { + resp := &ServiceLinkCollection{} + err := c.rancherClient.doList(SERVICE_LINK_TYPE, opts, resp) + return resp, err +} + +func (c *ServiceLinkClient) ById(id string) (*ServiceLink, error) { + resp := &ServiceLink{} + err := c.rancherClient.doById(SERVICE_LINK_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ServiceLinkClient) Delete(container *ServiceLink) error { + return c.rancherClient.doResourceDelete(SERVICE_LINK_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_service_proxy.go b/vendor/github.com/rancher/go-rancher/client/generated_service_proxy.go new file mode 100644 index 000000000000..fd6c32868cc3 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_service_proxy.go @@ -0,0 +1,75 @@ +package client + +const ( + SERVICE_PROXY_TYPE = "serviceProxy" +) + +type ServiceProxy struct { + Resource + + Port int64 `json:"port,omitempty" yaml:"port,omitempty"` + + Scheme string `json:"scheme,omitempty" yaml:"scheme,omitempty"` + + Service string `json:"service,omitempty" yaml:"service,omitempty"` + + Token string `json:"token,omitempty" yaml:"token,omitempty"` + + Url string `json:"url,omitempty" yaml:"url,omitempty"` +} + +type ServiceProxyCollection struct { + Collection + Data []ServiceProxy `json:"data,omitempty"` +} + +type ServiceProxyClient struct { + rancherClient *RancherClient +} + +type ServiceProxyOperations interface { + List(opts *ListOpts) (*ServiceProxyCollection, error) + Create(opts *ServiceProxy) (*ServiceProxy, error) + Update(existing *ServiceProxy, updates interface{}) (*ServiceProxy, error) + ById(id string) (*ServiceProxy, error) + Delete(container *ServiceProxy) error +} + +func newServiceProxyClient(rancherClient *RancherClient) *ServiceProxyClient { + return &ServiceProxyClient{ + rancherClient: rancherClient, + } +} + +func (c *ServiceProxyClient) Create(container *ServiceProxy) (*ServiceProxy, error) { + resp := &ServiceProxy{} + err := c.rancherClient.doCreate(SERVICE_PROXY_TYPE, container, resp) + return resp, err +} + +func (c *ServiceProxyClient) Update(existing *ServiceProxy, updates interface{}) (*ServiceProxy, error) { + resp := &ServiceProxy{} + err := c.rancherClient.doUpdate(SERVICE_PROXY_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ServiceProxyClient) List(opts *ListOpts) (*ServiceProxyCollection, error) { + resp := &ServiceProxyCollection{} + err := c.rancherClient.doList(SERVICE_PROXY_TYPE, opts, resp) + return resp, err +} + +func (c *ServiceProxyClient) ById(id string) (*ServiceProxy, error) { + resp := &ServiceProxy{} + err := c.rancherClient.doById(SERVICE_PROXY_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ServiceProxyClient) Delete(container *ServiceProxy) error { + return c.rancherClient.doResourceDelete(SERVICE_PROXY_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_service_restart.go b/vendor/github.com/rancher/go-rancher/client/generated_service_restart.go new file mode 100644 index 000000000000..5b95e8c6884a --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_service_restart.go @@ -0,0 +1,67 @@ +package client + +const ( + SERVICE_RESTART_TYPE = "serviceRestart" +) + +type ServiceRestart struct { + Resource + + RollingRestartStrategy RollingRestartStrategy `json:"rollingRestartStrategy,omitempty" yaml:"rolling_restart_strategy,omitempty"` +} + +type ServiceRestartCollection struct { + Collection + Data []ServiceRestart `json:"data,omitempty"` +} + +type ServiceRestartClient struct { + rancherClient *RancherClient +} + +type ServiceRestartOperations interface { + List(opts *ListOpts) (*ServiceRestartCollection, error) + Create(opts *ServiceRestart) (*ServiceRestart, error) + Update(existing *ServiceRestart, updates interface{}) (*ServiceRestart, error) + ById(id string) (*ServiceRestart, error) + Delete(container *ServiceRestart) error +} + +func newServiceRestartClient(rancherClient *RancherClient) *ServiceRestartClient { + return &ServiceRestartClient{ + rancherClient: rancherClient, + } +} + +func (c *ServiceRestartClient) Create(container *ServiceRestart) (*ServiceRestart, error) { + resp := &ServiceRestart{} + err := c.rancherClient.doCreate(SERVICE_RESTART_TYPE, container, resp) + return resp, err +} + +func (c *ServiceRestartClient) Update(existing *ServiceRestart, updates interface{}) (*ServiceRestart, error) { + resp := &ServiceRestart{} + err := c.rancherClient.doUpdate(SERVICE_RESTART_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ServiceRestartClient) List(opts *ListOpts) (*ServiceRestartCollection, error) { + resp := &ServiceRestartCollection{} + err := c.rancherClient.doList(SERVICE_RESTART_TYPE, opts, resp) + return resp, err +} + +func (c *ServiceRestartClient) ById(id string) (*ServiceRestart, error) { + resp := &ServiceRestart{} + err := c.rancherClient.doById(SERVICE_RESTART_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ServiceRestartClient) Delete(container *ServiceRestart) error { + return c.rancherClient.doResourceDelete(SERVICE_RESTART_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_service_upgrade.go b/vendor/github.com/rancher/go-rancher/client/generated_service_upgrade.go new file mode 100644 index 000000000000..25b453f2b658 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_service_upgrade.go @@ -0,0 +1,69 @@ +package client + +const ( + SERVICE_UPGRADE_TYPE = "serviceUpgrade" +) + +type ServiceUpgrade struct { + Resource + + InServiceStrategy *InServiceUpgradeStrategy `json:"inServiceStrategy,omitempty" yaml:"in_service_strategy,omitempty"` + + ToServiceStrategy *ToServiceUpgradeStrategy `json:"toServiceStrategy,omitempty" yaml:"to_service_strategy,omitempty"` +} + +type ServiceUpgradeCollection struct { + Collection + Data []ServiceUpgrade `json:"data,omitempty"` +} + +type ServiceUpgradeClient struct { + rancherClient *RancherClient +} + +type ServiceUpgradeOperations interface { + List(opts *ListOpts) (*ServiceUpgradeCollection, error) + Create(opts *ServiceUpgrade) (*ServiceUpgrade, error) + Update(existing *ServiceUpgrade, updates interface{}) (*ServiceUpgrade, error) + ById(id string) (*ServiceUpgrade, error) + Delete(container *ServiceUpgrade) error +} + +func newServiceUpgradeClient(rancherClient *RancherClient) *ServiceUpgradeClient { + return &ServiceUpgradeClient{ + rancherClient: rancherClient, + } +} + +func (c *ServiceUpgradeClient) Create(container *ServiceUpgrade) (*ServiceUpgrade, error) { + resp := &ServiceUpgrade{} + err := c.rancherClient.doCreate(SERVICE_UPGRADE_TYPE, container, resp) + return resp, err +} + +func (c *ServiceUpgradeClient) Update(existing *ServiceUpgrade, updates interface{}) (*ServiceUpgrade, error) { + resp := &ServiceUpgrade{} + err := c.rancherClient.doUpdate(SERVICE_UPGRADE_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ServiceUpgradeClient) List(opts *ListOpts) (*ServiceUpgradeCollection, error) { + resp := &ServiceUpgradeCollection{} + err := c.rancherClient.doList(SERVICE_UPGRADE_TYPE, opts, resp) + return resp, err +} + +func (c *ServiceUpgradeClient) ById(id string) (*ServiceUpgrade, error) { + resp := &ServiceUpgrade{} + err := c.rancherClient.doById(SERVICE_UPGRADE_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ServiceUpgradeClient) Delete(container *ServiceUpgrade) error { + return c.rancherClient.doResourceDelete(SERVICE_UPGRADE_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_service_upgrade_strategy.go b/vendor/github.com/rancher/go-rancher/client/generated_service_upgrade_strategy.go new file mode 100644 index 000000000000..834606b610bd --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_service_upgrade_strategy.go @@ -0,0 +1,69 @@ +package client + +const ( + SERVICE_UPGRADE_STRATEGY_TYPE = "serviceUpgradeStrategy" +) + +type ServiceUpgradeStrategy struct { + Resource + + BatchSize int64 `json:"batchSize,omitempty" yaml:"batch_size,omitempty"` + + IntervalMillis int64 `json:"intervalMillis,omitempty" yaml:"interval_millis,omitempty"` +} + +type ServiceUpgradeStrategyCollection struct { + Collection + Data []ServiceUpgradeStrategy `json:"data,omitempty"` +} + +type ServiceUpgradeStrategyClient struct { + rancherClient *RancherClient +} + +type ServiceUpgradeStrategyOperations interface { + List(opts *ListOpts) (*ServiceUpgradeStrategyCollection, error) + Create(opts *ServiceUpgradeStrategy) (*ServiceUpgradeStrategy, error) + Update(existing *ServiceUpgradeStrategy, updates interface{}) (*ServiceUpgradeStrategy, error) + ById(id string) (*ServiceUpgradeStrategy, error) + Delete(container *ServiceUpgradeStrategy) error +} + +func newServiceUpgradeStrategyClient(rancherClient *RancherClient) *ServiceUpgradeStrategyClient { + return &ServiceUpgradeStrategyClient{ + rancherClient: rancherClient, + } +} + +func (c *ServiceUpgradeStrategyClient) Create(container *ServiceUpgradeStrategy) (*ServiceUpgradeStrategy, error) { + resp := &ServiceUpgradeStrategy{} + err := c.rancherClient.doCreate(SERVICE_UPGRADE_STRATEGY_TYPE, container, resp) + return resp, err +} + +func (c *ServiceUpgradeStrategyClient) Update(existing *ServiceUpgradeStrategy, updates interface{}) (*ServiceUpgradeStrategy, error) { + resp := &ServiceUpgradeStrategy{} + err := c.rancherClient.doUpdate(SERVICE_UPGRADE_STRATEGY_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ServiceUpgradeStrategyClient) List(opts *ListOpts) (*ServiceUpgradeStrategyCollection, error) { + resp := &ServiceUpgradeStrategyCollection{} + err := c.rancherClient.doList(SERVICE_UPGRADE_STRATEGY_TYPE, opts, resp) + return resp, err +} + +func (c *ServiceUpgradeStrategyClient) ById(id string) (*ServiceUpgradeStrategy, error) { + resp := &ServiceUpgradeStrategy{} + err := c.rancherClient.doById(SERVICE_UPGRADE_STRATEGY_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ServiceUpgradeStrategyClient) Delete(container *ServiceUpgradeStrategy) error { + return c.rancherClient.doResourceDelete(SERVICE_UPGRADE_STRATEGY_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_services_port_range.go b/vendor/github.com/rancher/go-rancher/client/generated_services_port_range.go new file mode 100644 index 000000000000..d3c0eb91decb --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_services_port_range.go @@ -0,0 +1,69 @@ +package client + +const ( + SERVICES_PORT_RANGE_TYPE = "servicesPortRange" +) + +type ServicesPortRange struct { + Resource + + EndPort int64 `json:"endPort,omitempty" yaml:"end_port,omitempty"` + + StartPort int64 `json:"startPort,omitempty" yaml:"start_port,omitempty"` +} + +type ServicesPortRangeCollection struct { + Collection + Data []ServicesPortRange `json:"data,omitempty"` +} + +type ServicesPortRangeClient struct { + rancherClient *RancherClient +} + +type ServicesPortRangeOperations interface { + List(opts *ListOpts) (*ServicesPortRangeCollection, error) + Create(opts *ServicesPortRange) (*ServicesPortRange, error) + Update(existing *ServicesPortRange, updates interface{}) (*ServicesPortRange, error) + ById(id string) (*ServicesPortRange, error) + Delete(container *ServicesPortRange) error +} + +func newServicesPortRangeClient(rancherClient *RancherClient) *ServicesPortRangeClient { + return &ServicesPortRangeClient{ + rancherClient: rancherClient, + } +} + +func (c *ServicesPortRangeClient) Create(container *ServicesPortRange) (*ServicesPortRange, error) { + resp := &ServicesPortRange{} + err := c.rancherClient.doCreate(SERVICES_PORT_RANGE_TYPE, container, resp) + return resp, err +} + +func (c *ServicesPortRangeClient) Update(existing *ServicesPortRange, updates interface{}) (*ServicesPortRange, error) { + resp := &ServicesPortRange{} + err := c.rancherClient.doUpdate(SERVICES_PORT_RANGE_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ServicesPortRangeClient) List(opts *ListOpts) (*ServicesPortRangeCollection, error) { + resp := &ServicesPortRangeCollection{} + err := c.rancherClient.doList(SERVICES_PORT_RANGE_TYPE, opts, resp) + return resp, err +} + +func (c *ServicesPortRangeClient) ById(id string) (*ServicesPortRange, error) { + resp := &ServicesPortRange{} + err := c.rancherClient.doById(SERVICES_PORT_RANGE_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ServicesPortRangeClient) Delete(container *ServicesPortRange) error { + return c.rancherClient.doResourceDelete(SERVICES_PORT_RANGE_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_set_labels_input.go b/vendor/github.com/rancher/go-rancher/client/generated_set_labels_input.go new file mode 100644 index 000000000000..96d894512eb6 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_set_labels_input.go @@ -0,0 +1,67 @@ +package client + +const ( + SET_LABELS_INPUT_TYPE = "setLabelsInput" +) + +type SetLabelsInput struct { + Resource + + Labels interface{} `json:"labels,omitempty" yaml:"labels,omitempty"` +} + +type SetLabelsInputCollection struct { + Collection + Data []SetLabelsInput `json:"data,omitempty"` +} + +type SetLabelsInputClient struct { + rancherClient *RancherClient +} + +type SetLabelsInputOperations interface { + List(opts *ListOpts) (*SetLabelsInputCollection, error) + Create(opts *SetLabelsInput) (*SetLabelsInput, error) + Update(existing *SetLabelsInput, updates interface{}) (*SetLabelsInput, error) + ById(id string) (*SetLabelsInput, error) + Delete(container *SetLabelsInput) error +} + +func newSetLabelsInputClient(rancherClient *RancherClient) *SetLabelsInputClient { + return &SetLabelsInputClient{ + rancherClient: rancherClient, + } +} + +func (c *SetLabelsInputClient) Create(container *SetLabelsInput) (*SetLabelsInput, error) { + resp := &SetLabelsInput{} + err := c.rancherClient.doCreate(SET_LABELS_INPUT_TYPE, container, resp) + return resp, err +} + +func (c *SetLabelsInputClient) Update(existing *SetLabelsInput, updates interface{}) (*SetLabelsInput, error) { + resp := &SetLabelsInput{} + err := c.rancherClient.doUpdate(SET_LABELS_INPUT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *SetLabelsInputClient) List(opts *ListOpts) (*SetLabelsInputCollection, error) { + resp := &SetLabelsInputCollection{} + err := c.rancherClient.doList(SET_LABELS_INPUT_TYPE, opts, resp) + return resp, err +} + +func (c *SetLabelsInputClient) ById(id string) (*SetLabelsInput, error) { + resp := &SetLabelsInput{} + err := c.rancherClient.doById(SET_LABELS_INPUT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *SetLabelsInputClient) Delete(container *SetLabelsInput) error { + return c.rancherClient.doResourceDelete(SET_LABELS_INPUT_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_set_load_balancer_hosts_input.go b/vendor/github.com/rancher/go-rancher/client/generated_set_load_balancer_hosts_input.go new file mode 100644 index 000000000000..753abc62fa5a --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_set_load_balancer_hosts_input.go @@ -0,0 +1,67 @@ +package client + +const ( + SET_LOAD_BALANCER_HOSTS_INPUT_TYPE = "setLoadBalancerHostsInput" +) + +type SetLoadBalancerHostsInput struct { + Resource + + HostIds []string `json:"hostIds,omitempty" yaml:"host_ids,omitempty"` +} + +type SetLoadBalancerHostsInputCollection struct { + Collection + Data []SetLoadBalancerHostsInput `json:"data,omitempty"` +} + +type SetLoadBalancerHostsInputClient struct { + rancherClient *RancherClient +} + +type SetLoadBalancerHostsInputOperations interface { + List(opts *ListOpts) (*SetLoadBalancerHostsInputCollection, error) + Create(opts *SetLoadBalancerHostsInput) (*SetLoadBalancerHostsInput, error) + Update(existing *SetLoadBalancerHostsInput, updates interface{}) (*SetLoadBalancerHostsInput, error) + ById(id string) (*SetLoadBalancerHostsInput, error) + Delete(container *SetLoadBalancerHostsInput) error +} + +func newSetLoadBalancerHostsInputClient(rancherClient *RancherClient) *SetLoadBalancerHostsInputClient { + return &SetLoadBalancerHostsInputClient{ + rancherClient: rancherClient, + } +} + +func (c *SetLoadBalancerHostsInputClient) Create(container *SetLoadBalancerHostsInput) (*SetLoadBalancerHostsInput, error) { + resp := &SetLoadBalancerHostsInput{} + err := c.rancherClient.doCreate(SET_LOAD_BALANCER_HOSTS_INPUT_TYPE, container, resp) + return resp, err +} + +func (c *SetLoadBalancerHostsInputClient) Update(existing *SetLoadBalancerHostsInput, updates interface{}) (*SetLoadBalancerHostsInput, error) { + resp := &SetLoadBalancerHostsInput{} + err := c.rancherClient.doUpdate(SET_LOAD_BALANCER_HOSTS_INPUT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *SetLoadBalancerHostsInputClient) List(opts *ListOpts) (*SetLoadBalancerHostsInputCollection, error) { + resp := &SetLoadBalancerHostsInputCollection{} + err := c.rancherClient.doList(SET_LOAD_BALANCER_HOSTS_INPUT_TYPE, opts, resp) + return resp, err +} + +func (c *SetLoadBalancerHostsInputClient) ById(id string) (*SetLoadBalancerHostsInput, error) { + resp := &SetLoadBalancerHostsInput{} + err := c.rancherClient.doById(SET_LOAD_BALANCER_HOSTS_INPUT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *SetLoadBalancerHostsInputClient) Delete(container *SetLoadBalancerHostsInput) error { + return c.rancherClient.doResourceDelete(SET_LOAD_BALANCER_HOSTS_INPUT_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_set_load_balancer_listeners_input.go b/vendor/github.com/rancher/go-rancher/client/generated_set_load_balancer_listeners_input.go new file mode 100644 index 000000000000..31aaa9c562e5 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_set_load_balancer_listeners_input.go @@ -0,0 +1,67 @@ +package client + +const ( + SET_LOAD_BALANCER_LISTENERS_INPUT_TYPE = "setLoadBalancerListenersInput" +) + +type SetLoadBalancerListenersInput struct { + Resource + + LoadBalancerListenerIds []string `json:"loadBalancerListenerIds,omitempty" yaml:"load_balancer_listener_ids,omitempty"` +} + +type SetLoadBalancerListenersInputCollection struct { + Collection + Data []SetLoadBalancerListenersInput `json:"data,omitempty"` +} + +type SetLoadBalancerListenersInputClient struct { + rancherClient *RancherClient +} + +type SetLoadBalancerListenersInputOperations interface { + List(opts *ListOpts) (*SetLoadBalancerListenersInputCollection, error) + Create(opts *SetLoadBalancerListenersInput) (*SetLoadBalancerListenersInput, error) + Update(existing *SetLoadBalancerListenersInput, updates interface{}) (*SetLoadBalancerListenersInput, error) + ById(id string) (*SetLoadBalancerListenersInput, error) + Delete(container *SetLoadBalancerListenersInput) error +} + +func newSetLoadBalancerListenersInputClient(rancherClient *RancherClient) *SetLoadBalancerListenersInputClient { + return &SetLoadBalancerListenersInputClient{ + rancherClient: rancherClient, + } +} + +func (c *SetLoadBalancerListenersInputClient) Create(container *SetLoadBalancerListenersInput) (*SetLoadBalancerListenersInput, error) { + resp := &SetLoadBalancerListenersInput{} + err := c.rancherClient.doCreate(SET_LOAD_BALANCER_LISTENERS_INPUT_TYPE, container, resp) + return resp, err +} + +func (c *SetLoadBalancerListenersInputClient) Update(existing *SetLoadBalancerListenersInput, updates interface{}) (*SetLoadBalancerListenersInput, error) { + resp := &SetLoadBalancerListenersInput{} + err := c.rancherClient.doUpdate(SET_LOAD_BALANCER_LISTENERS_INPUT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *SetLoadBalancerListenersInputClient) List(opts *ListOpts) (*SetLoadBalancerListenersInputCollection, error) { + resp := &SetLoadBalancerListenersInputCollection{} + err := c.rancherClient.doList(SET_LOAD_BALANCER_LISTENERS_INPUT_TYPE, opts, resp) + return resp, err +} + +func (c *SetLoadBalancerListenersInputClient) ById(id string) (*SetLoadBalancerListenersInput, error) { + resp := &SetLoadBalancerListenersInput{} + err := c.rancherClient.doById(SET_LOAD_BALANCER_LISTENERS_INPUT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *SetLoadBalancerListenersInputClient) Delete(container *SetLoadBalancerListenersInput) error { + return c.rancherClient.doResourceDelete(SET_LOAD_BALANCER_LISTENERS_INPUT_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_set_load_balancer_service_links_input.go b/vendor/github.com/rancher/go-rancher/client/generated_set_load_balancer_service_links_input.go new file mode 100644 index 000000000000..76d8684cfc37 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_set_load_balancer_service_links_input.go @@ -0,0 +1,67 @@ +package client + +const ( + SET_LOAD_BALANCER_SERVICE_LINKS_INPUT_TYPE = "setLoadBalancerServiceLinksInput" +) + +type SetLoadBalancerServiceLinksInput struct { + Resource + + ServiceLinks []interface{} `json:"serviceLinks,omitempty" yaml:"service_links,omitempty"` +} + +type SetLoadBalancerServiceLinksInputCollection struct { + Collection + Data []SetLoadBalancerServiceLinksInput `json:"data,omitempty"` +} + +type SetLoadBalancerServiceLinksInputClient struct { + rancherClient *RancherClient +} + +type SetLoadBalancerServiceLinksInputOperations interface { + List(opts *ListOpts) (*SetLoadBalancerServiceLinksInputCollection, error) + Create(opts *SetLoadBalancerServiceLinksInput) (*SetLoadBalancerServiceLinksInput, error) + Update(existing *SetLoadBalancerServiceLinksInput, updates interface{}) (*SetLoadBalancerServiceLinksInput, error) + ById(id string) (*SetLoadBalancerServiceLinksInput, error) + Delete(container *SetLoadBalancerServiceLinksInput) error +} + +func newSetLoadBalancerServiceLinksInputClient(rancherClient *RancherClient) *SetLoadBalancerServiceLinksInputClient { + return &SetLoadBalancerServiceLinksInputClient{ + rancherClient: rancherClient, + } +} + +func (c *SetLoadBalancerServiceLinksInputClient) Create(container *SetLoadBalancerServiceLinksInput) (*SetLoadBalancerServiceLinksInput, error) { + resp := &SetLoadBalancerServiceLinksInput{} + err := c.rancherClient.doCreate(SET_LOAD_BALANCER_SERVICE_LINKS_INPUT_TYPE, container, resp) + return resp, err +} + +func (c *SetLoadBalancerServiceLinksInputClient) Update(existing *SetLoadBalancerServiceLinksInput, updates interface{}) (*SetLoadBalancerServiceLinksInput, error) { + resp := &SetLoadBalancerServiceLinksInput{} + err := c.rancherClient.doUpdate(SET_LOAD_BALANCER_SERVICE_LINKS_INPUT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *SetLoadBalancerServiceLinksInputClient) List(opts *ListOpts) (*SetLoadBalancerServiceLinksInputCollection, error) { + resp := &SetLoadBalancerServiceLinksInputCollection{} + err := c.rancherClient.doList(SET_LOAD_BALANCER_SERVICE_LINKS_INPUT_TYPE, opts, resp) + return resp, err +} + +func (c *SetLoadBalancerServiceLinksInputClient) ById(id string) (*SetLoadBalancerServiceLinksInput, error) { + resp := &SetLoadBalancerServiceLinksInput{} + err := c.rancherClient.doById(SET_LOAD_BALANCER_SERVICE_LINKS_INPUT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *SetLoadBalancerServiceLinksInputClient) Delete(container *SetLoadBalancerServiceLinksInput) error { + return c.rancherClient.doResourceDelete(SET_LOAD_BALANCER_SERVICE_LINKS_INPUT_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_set_load_balancer_targets_input.go b/vendor/github.com/rancher/go-rancher/client/generated_set_load_balancer_targets_input.go new file mode 100644 index 000000000000..cef13a355756 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_set_load_balancer_targets_input.go @@ -0,0 +1,67 @@ +package client + +const ( + SET_LOAD_BALANCER_TARGETS_INPUT_TYPE = "setLoadBalancerTargetsInput" +) + +type SetLoadBalancerTargetsInput struct { + Resource + + LoadBalancerTargets []interface{} `json:"loadBalancerTargets,omitempty" yaml:"load_balancer_targets,omitempty"` +} + +type SetLoadBalancerTargetsInputCollection struct { + Collection + Data []SetLoadBalancerTargetsInput `json:"data,omitempty"` +} + +type SetLoadBalancerTargetsInputClient struct { + rancherClient *RancherClient +} + +type SetLoadBalancerTargetsInputOperations interface { + List(opts *ListOpts) (*SetLoadBalancerTargetsInputCollection, error) + Create(opts *SetLoadBalancerTargetsInput) (*SetLoadBalancerTargetsInput, error) + Update(existing *SetLoadBalancerTargetsInput, updates interface{}) (*SetLoadBalancerTargetsInput, error) + ById(id string) (*SetLoadBalancerTargetsInput, error) + Delete(container *SetLoadBalancerTargetsInput) error +} + +func newSetLoadBalancerTargetsInputClient(rancherClient *RancherClient) *SetLoadBalancerTargetsInputClient { + return &SetLoadBalancerTargetsInputClient{ + rancherClient: rancherClient, + } +} + +func (c *SetLoadBalancerTargetsInputClient) Create(container *SetLoadBalancerTargetsInput) (*SetLoadBalancerTargetsInput, error) { + resp := &SetLoadBalancerTargetsInput{} + err := c.rancherClient.doCreate(SET_LOAD_BALANCER_TARGETS_INPUT_TYPE, container, resp) + return resp, err +} + +func (c *SetLoadBalancerTargetsInputClient) Update(existing *SetLoadBalancerTargetsInput, updates interface{}) (*SetLoadBalancerTargetsInput, error) { + resp := &SetLoadBalancerTargetsInput{} + err := c.rancherClient.doUpdate(SET_LOAD_BALANCER_TARGETS_INPUT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *SetLoadBalancerTargetsInputClient) List(opts *ListOpts) (*SetLoadBalancerTargetsInputCollection, error) { + resp := &SetLoadBalancerTargetsInputCollection{} + err := c.rancherClient.doList(SET_LOAD_BALANCER_TARGETS_INPUT_TYPE, opts, resp) + return resp, err +} + +func (c *SetLoadBalancerTargetsInputClient) ById(id string) (*SetLoadBalancerTargetsInput, error) { + resp := &SetLoadBalancerTargetsInput{} + err := c.rancherClient.doById(SET_LOAD_BALANCER_TARGETS_INPUT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *SetLoadBalancerTargetsInputClient) Delete(container *SetLoadBalancerTargetsInput) error { + return c.rancherClient.doResourceDelete(SET_LOAD_BALANCER_TARGETS_INPUT_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_set_project_members_input.go b/vendor/github.com/rancher/go-rancher/client/generated_set_project_members_input.go new file mode 100644 index 000000000000..bc8c2f20103a --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_set_project_members_input.go @@ -0,0 +1,67 @@ +package client + +const ( + SET_PROJECT_MEMBERS_INPUT_TYPE = "setProjectMembersInput" +) + +type SetProjectMembersInput struct { + Resource + + Members []interface{} `json:"members,omitempty" yaml:"members,omitempty"` +} + +type SetProjectMembersInputCollection struct { + Collection + Data []SetProjectMembersInput `json:"data,omitempty"` +} + +type SetProjectMembersInputClient struct { + rancherClient *RancherClient +} + +type SetProjectMembersInputOperations interface { + List(opts *ListOpts) (*SetProjectMembersInputCollection, error) + Create(opts *SetProjectMembersInput) (*SetProjectMembersInput, error) + Update(existing *SetProjectMembersInput, updates interface{}) (*SetProjectMembersInput, error) + ById(id string) (*SetProjectMembersInput, error) + Delete(container *SetProjectMembersInput) error +} + +func newSetProjectMembersInputClient(rancherClient *RancherClient) *SetProjectMembersInputClient { + return &SetProjectMembersInputClient{ + rancherClient: rancherClient, + } +} + +func (c *SetProjectMembersInputClient) Create(container *SetProjectMembersInput) (*SetProjectMembersInput, error) { + resp := &SetProjectMembersInput{} + err := c.rancherClient.doCreate(SET_PROJECT_MEMBERS_INPUT_TYPE, container, resp) + return resp, err +} + +func (c *SetProjectMembersInputClient) Update(existing *SetProjectMembersInput, updates interface{}) (*SetProjectMembersInput, error) { + resp := &SetProjectMembersInput{} + err := c.rancherClient.doUpdate(SET_PROJECT_MEMBERS_INPUT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *SetProjectMembersInputClient) List(opts *ListOpts) (*SetProjectMembersInputCollection, error) { + resp := &SetProjectMembersInputCollection{} + err := c.rancherClient.doList(SET_PROJECT_MEMBERS_INPUT_TYPE, opts, resp) + return resp, err +} + +func (c *SetProjectMembersInputClient) ById(id string) (*SetProjectMembersInput, error) { + resp := &SetProjectMembersInput{} + err := c.rancherClient.doById(SET_PROJECT_MEMBERS_INPUT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *SetProjectMembersInputClient) Delete(container *SetProjectMembersInput) error { + return c.rancherClient.doResourceDelete(SET_PROJECT_MEMBERS_INPUT_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_set_service_links_input.go b/vendor/github.com/rancher/go-rancher/client/generated_set_service_links_input.go new file mode 100644 index 000000000000..b471e96c2b3b --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_set_service_links_input.go @@ -0,0 +1,67 @@ +package client + +const ( + SET_SERVICE_LINKS_INPUT_TYPE = "setServiceLinksInput" +) + +type SetServiceLinksInput struct { + Resource + + ServiceLinks []interface{} `json:"serviceLinks,omitempty" yaml:"service_links,omitempty"` +} + +type SetServiceLinksInputCollection struct { + Collection + Data []SetServiceLinksInput `json:"data,omitempty"` +} + +type SetServiceLinksInputClient struct { + rancherClient *RancherClient +} + +type SetServiceLinksInputOperations interface { + List(opts *ListOpts) (*SetServiceLinksInputCollection, error) + Create(opts *SetServiceLinksInput) (*SetServiceLinksInput, error) + Update(existing *SetServiceLinksInput, updates interface{}) (*SetServiceLinksInput, error) + ById(id string) (*SetServiceLinksInput, error) + Delete(container *SetServiceLinksInput) error +} + +func newSetServiceLinksInputClient(rancherClient *RancherClient) *SetServiceLinksInputClient { + return &SetServiceLinksInputClient{ + rancherClient: rancherClient, + } +} + +func (c *SetServiceLinksInputClient) Create(container *SetServiceLinksInput) (*SetServiceLinksInput, error) { + resp := &SetServiceLinksInput{} + err := c.rancherClient.doCreate(SET_SERVICE_LINKS_INPUT_TYPE, container, resp) + return resp, err +} + +func (c *SetServiceLinksInputClient) Update(existing *SetServiceLinksInput, updates interface{}) (*SetServiceLinksInput, error) { + resp := &SetServiceLinksInput{} + err := c.rancherClient.doUpdate(SET_SERVICE_LINKS_INPUT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *SetServiceLinksInputClient) List(opts *ListOpts) (*SetServiceLinksInputCollection, error) { + resp := &SetServiceLinksInputCollection{} + err := c.rancherClient.doList(SET_SERVICE_LINKS_INPUT_TYPE, opts, resp) + return resp, err +} + +func (c *SetServiceLinksInputClient) ById(id string) (*SetServiceLinksInput, error) { + resp := &SetServiceLinksInput{} + err := c.rancherClient.doById(SET_SERVICE_LINKS_INPUT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *SetServiceLinksInputClient) Delete(container *SetServiceLinksInput) error { + return c.rancherClient.doResourceDelete(SET_SERVICE_LINKS_INPUT_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_setting.go b/vendor/github.com/rancher/go-rancher/client/generated_setting.go new file mode 100644 index 000000000000..1aa7655b3a34 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_setting.go @@ -0,0 +1,75 @@ +package client + +const ( + SETTING_TYPE = "setting" +) + +type Setting struct { + Resource + + ActiveValue string `json:"activeValue,omitempty" yaml:"active_value,omitempty"` + + InDb bool `json:"inDb,omitempty" yaml:"in_db,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + Source string `json:"source,omitempty" yaml:"source,omitempty"` + + Value string `json:"value,omitempty" yaml:"value,omitempty"` +} + +type SettingCollection struct { + Collection + Data []Setting `json:"data,omitempty"` +} + +type SettingClient struct { + rancherClient *RancherClient +} + +type SettingOperations interface { + List(opts *ListOpts) (*SettingCollection, error) + Create(opts *Setting) (*Setting, error) + Update(existing *Setting, updates interface{}) (*Setting, error) + ById(id string) (*Setting, error) + Delete(container *Setting) error +} + +func newSettingClient(rancherClient *RancherClient) *SettingClient { + return &SettingClient{ + rancherClient: rancherClient, + } +} + +func (c *SettingClient) Create(container *Setting) (*Setting, error) { + resp := &Setting{} + err := c.rancherClient.doCreate(SETTING_TYPE, container, resp) + return resp, err +} + +func (c *SettingClient) Update(existing *Setting, updates interface{}) (*Setting, error) { + resp := &Setting{} + err := c.rancherClient.doUpdate(SETTING_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *SettingClient) List(opts *ListOpts) (*SettingCollection, error) { + resp := &SettingCollection{} + err := c.rancherClient.doList(SETTING_TYPE, opts, resp) + return resp, err +} + +func (c *SettingClient) ById(id string) (*Setting, error) { + resp := &Setting{} + err := c.rancherClient.doById(SETTING_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *SettingClient) Delete(container *Setting) error { + return c.rancherClient.doResourceDelete(SETTING_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_snapshot.go b/vendor/github.com/rancher/go-rancher/client/generated_snapshot.go new file mode 100644 index 000000000000..5540356738f3 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_snapshot.go @@ -0,0 +1,126 @@ +package client + +const ( + SNAPSHOT_TYPE = "snapshot" +) + +type Snapshot struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + + VolumeId string `json:"volumeId,omitempty" yaml:"volume_id,omitempty"` +} + +type SnapshotCollection struct { + Collection + Data []Snapshot `json:"data,omitempty"` +} + +type SnapshotClient struct { + rancherClient *RancherClient +} + +type SnapshotOperations interface { + List(opts *ListOpts) (*SnapshotCollection, error) + Create(opts *Snapshot) (*Snapshot, error) + Update(existing *Snapshot, updates interface{}) (*Snapshot, error) + ById(id string) (*Snapshot, error) + Delete(container *Snapshot) error + + ActionBackup(*Snapshot, *SnapshotBackupInput) (*Backup, error) + + ActionCreate(*Snapshot) (*Snapshot, error) + + ActionRemove(*Snapshot) (*Snapshot, error) +} + +func newSnapshotClient(rancherClient *RancherClient) *SnapshotClient { + return &SnapshotClient{ + rancherClient: rancherClient, + } +} + +func (c *SnapshotClient) Create(container *Snapshot) (*Snapshot, error) { + resp := &Snapshot{} + err := c.rancherClient.doCreate(SNAPSHOT_TYPE, container, resp) + return resp, err +} + +func (c *SnapshotClient) Update(existing *Snapshot, updates interface{}) (*Snapshot, error) { + resp := &Snapshot{} + err := c.rancherClient.doUpdate(SNAPSHOT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *SnapshotClient) List(opts *ListOpts) (*SnapshotCollection, error) { + resp := &SnapshotCollection{} + err := c.rancherClient.doList(SNAPSHOT_TYPE, opts, resp) + return resp, err +} + +func (c *SnapshotClient) ById(id string) (*Snapshot, error) { + resp := &Snapshot{} + err := c.rancherClient.doById(SNAPSHOT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *SnapshotClient) Delete(container *Snapshot) error { + return c.rancherClient.doResourceDelete(SNAPSHOT_TYPE, &container.Resource) +} + +func (c *SnapshotClient) ActionBackup(resource *Snapshot, input *SnapshotBackupInput) (*Backup, error) { + + resp := &Backup{} + + err := c.rancherClient.doAction(SNAPSHOT_TYPE, "backup", &resource.Resource, input, resp) + + return resp, err +} + +func (c *SnapshotClient) ActionCreate(resource *Snapshot) (*Snapshot, error) { + + resp := &Snapshot{} + + err := c.rancherClient.doAction(SNAPSHOT_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *SnapshotClient) ActionRemove(resource *Snapshot) (*Snapshot, error) { + + resp := &Snapshot{} + + err := c.rancherClient.doAction(SNAPSHOT_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_snapshot_backup_input.go b/vendor/github.com/rancher/go-rancher/client/generated_snapshot_backup_input.go new file mode 100644 index 000000000000..deb2fcc1bb82 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_snapshot_backup_input.go @@ -0,0 +1,95 @@ +package client + +const ( + SNAPSHOT_BACKUP_INPUT_TYPE = "snapshotBackupInput" +) + +type SnapshotBackupInput struct { + Resource + + BackupTargetId string `json:"backupTargetId,omitempty" yaml:"backup_target_id,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` +} + +type SnapshotBackupInputCollection struct { + Collection + Data []SnapshotBackupInput `json:"data,omitempty"` +} + +type SnapshotBackupInputClient struct { + rancherClient *RancherClient +} + +type SnapshotBackupInputOperations interface { + List(opts *ListOpts) (*SnapshotBackupInputCollection, error) + Create(opts *SnapshotBackupInput) (*SnapshotBackupInput, error) + Update(existing *SnapshotBackupInput, updates interface{}) (*SnapshotBackupInput, error) + ById(id string) (*SnapshotBackupInput, error) + Delete(container *SnapshotBackupInput) error + + ActionCreate(*SnapshotBackupInput) (*Backup, error) + + ActionRemove(*SnapshotBackupInput) (*Backup, error) +} + +func newSnapshotBackupInputClient(rancherClient *RancherClient) *SnapshotBackupInputClient { + return &SnapshotBackupInputClient{ + rancherClient: rancherClient, + } +} + +func (c *SnapshotBackupInputClient) Create(container *SnapshotBackupInput) (*SnapshotBackupInput, error) { + resp := &SnapshotBackupInput{} + err := c.rancherClient.doCreate(SNAPSHOT_BACKUP_INPUT_TYPE, container, resp) + return resp, err +} + +func (c *SnapshotBackupInputClient) Update(existing *SnapshotBackupInput, updates interface{}) (*SnapshotBackupInput, error) { + resp := &SnapshotBackupInput{} + err := c.rancherClient.doUpdate(SNAPSHOT_BACKUP_INPUT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *SnapshotBackupInputClient) List(opts *ListOpts) (*SnapshotBackupInputCollection, error) { + resp := &SnapshotBackupInputCollection{} + err := c.rancherClient.doList(SNAPSHOT_BACKUP_INPUT_TYPE, opts, resp) + return resp, err +} + +func (c *SnapshotBackupInputClient) ById(id string) (*SnapshotBackupInput, error) { + resp := &SnapshotBackupInput{} + err := c.rancherClient.doById(SNAPSHOT_BACKUP_INPUT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *SnapshotBackupInputClient) Delete(container *SnapshotBackupInput) error { + return c.rancherClient.doResourceDelete(SNAPSHOT_BACKUP_INPUT_TYPE, &container.Resource) +} + +func (c *SnapshotBackupInputClient) ActionCreate(resource *SnapshotBackupInput) (*Backup, error) { + + resp := &Backup{} + + err := c.rancherClient.doAction(SNAPSHOT_BACKUP_INPUT_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *SnapshotBackupInputClient) ActionRemove(resource *SnapshotBackupInput) (*Backup, error) { + + resp := &Backup{} + + err := c.rancherClient.doAction(SNAPSHOT_BACKUP_INPUT_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_softlayer_config.go b/vendor/github.com/rancher/go-rancher/client/generated_softlayer_config.go new file mode 100644 index 000000000000..500d5a90fc03 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_softlayer_config.go @@ -0,0 +1,95 @@ +package client + +const ( + SOFTLAYER_CONFIG_TYPE = "softlayerConfig" +) + +type SoftlayerConfig struct { + Resource + + ApiEndpoint string `json:"apiEndpoint,omitempty" yaml:"api_endpoint,omitempty"` + + ApiKey string `json:"apiKey,omitempty" yaml:"api_key,omitempty"` + + Cpu string `json:"cpu,omitempty" yaml:"cpu,omitempty"` + + DiskSize string `json:"diskSize,omitempty" yaml:"disk_size,omitempty"` + + Domain string `json:"domain,omitempty" yaml:"domain,omitempty"` + + Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"` + + HourlyBilling bool `json:"hourlyBilling,omitempty" yaml:"hourly_billing,omitempty"` + + Image string `json:"image,omitempty" yaml:"image,omitempty"` + + LocalDisk bool `json:"localDisk,omitempty" yaml:"local_disk,omitempty"` + + Memory string `json:"memory,omitempty" yaml:"memory,omitempty"` + + PrivateNetOnly bool `json:"privateNetOnly,omitempty" yaml:"private_net_only,omitempty"` + + PrivateVlanId string `json:"privateVlanId,omitempty" yaml:"private_vlan_id,omitempty"` + + PublicVlanId string `json:"publicVlanId,omitempty" yaml:"public_vlan_id,omitempty"` + + Region string `json:"region,omitempty" yaml:"region,omitempty"` + + User string `json:"user,omitempty" yaml:"user,omitempty"` +} + +type SoftlayerConfigCollection struct { + Collection + Data []SoftlayerConfig `json:"data,omitempty"` +} + +type SoftlayerConfigClient struct { + rancherClient *RancherClient +} + +type SoftlayerConfigOperations interface { + List(opts *ListOpts) (*SoftlayerConfigCollection, error) + Create(opts *SoftlayerConfig) (*SoftlayerConfig, error) + Update(existing *SoftlayerConfig, updates interface{}) (*SoftlayerConfig, error) + ById(id string) (*SoftlayerConfig, error) + Delete(container *SoftlayerConfig) error +} + +func newSoftlayerConfigClient(rancherClient *RancherClient) *SoftlayerConfigClient { + return &SoftlayerConfigClient{ + rancherClient: rancherClient, + } +} + +func (c *SoftlayerConfigClient) Create(container *SoftlayerConfig) (*SoftlayerConfig, error) { + resp := &SoftlayerConfig{} + err := c.rancherClient.doCreate(SOFTLAYER_CONFIG_TYPE, container, resp) + return resp, err +} + +func (c *SoftlayerConfigClient) Update(existing *SoftlayerConfig, updates interface{}) (*SoftlayerConfig, error) { + resp := &SoftlayerConfig{} + err := c.rancherClient.doUpdate(SOFTLAYER_CONFIG_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *SoftlayerConfigClient) List(opts *ListOpts) (*SoftlayerConfigCollection, error) { + resp := &SoftlayerConfigCollection{} + err := c.rancherClient.doList(SOFTLAYER_CONFIG_TYPE, opts, resp) + return resp, err +} + +func (c *SoftlayerConfigClient) ById(id string) (*SoftlayerConfig, error) { + resp := &SoftlayerConfig{} + err := c.rancherClient.doById(SOFTLAYER_CONFIG_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *SoftlayerConfigClient) Delete(container *SoftlayerConfig) error { + return c.rancherClient.doResourceDelete(SOFTLAYER_CONFIG_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_state_transition.go b/vendor/github.com/rancher/go-rancher/client/generated_state_transition.go new file mode 100644 index 000000000000..d763903f451f --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_state_transition.go @@ -0,0 +1,65 @@ +package client + +const ( + STATE_TRANSITION_TYPE = "stateTransition" +) + +type StateTransition struct { + Resource +} + +type StateTransitionCollection struct { + Collection + Data []StateTransition `json:"data,omitempty"` +} + +type StateTransitionClient struct { + rancherClient *RancherClient +} + +type StateTransitionOperations interface { + List(opts *ListOpts) (*StateTransitionCollection, error) + Create(opts *StateTransition) (*StateTransition, error) + Update(existing *StateTransition, updates interface{}) (*StateTransition, error) + ById(id string) (*StateTransition, error) + Delete(container *StateTransition) error +} + +func newStateTransitionClient(rancherClient *RancherClient) *StateTransitionClient { + return &StateTransitionClient{ + rancherClient: rancherClient, + } +} + +func (c *StateTransitionClient) Create(container *StateTransition) (*StateTransition, error) { + resp := &StateTransition{} + err := c.rancherClient.doCreate(STATE_TRANSITION_TYPE, container, resp) + return resp, err +} + +func (c *StateTransitionClient) Update(existing *StateTransition, updates interface{}) (*StateTransition, error) { + resp := &StateTransition{} + err := c.rancherClient.doUpdate(STATE_TRANSITION_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *StateTransitionClient) List(opts *ListOpts) (*StateTransitionCollection, error) { + resp := &StateTransitionCollection{} + err := c.rancherClient.doList(STATE_TRANSITION_TYPE, opts, resp) + return resp, err +} + +func (c *StateTransitionClient) ById(id string) (*StateTransition, error) { + resp := &StateTransition{} + err := c.rancherClient.doById(STATE_TRANSITION_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *StateTransitionClient) Delete(container *StateTransition) error { + return c.rancherClient.doResourceDelete(STATE_TRANSITION_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_stats_access.go b/vendor/github.com/rancher/go-rancher/client/generated_stats_access.go new file mode 100644 index 000000000000..1ec4d45be343 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_stats_access.go @@ -0,0 +1,69 @@ +package client + +const ( + STATS_ACCESS_TYPE = "statsAccess" +) + +type StatsAccess struct { + Resource + + Token string `json:"token,omitempty" yaml:"token,omitempty"` + + Url string `json:"url,omitempty" yaml:"url,omitempty"` +} + +type StatsAccessCollection struct { + Collection + Data []StatsAccess `json:"data,omitempty"` +} + +type StatsAccessClient struct { + rancherClient *RancherClient +} + +type StatsAccessOperations interface { + List(opts *ListOpts) (*StatsAccessCollection, error) + Create(opts *StatsAccess) (*StatsAccess, error) + Update(existing *StatsAccess, updates interface{}) (*StatsAccess, error) + ById(id string) (*StatsAccess, error) + Delete(container *StatsAccess) error +} + +func newStatsAccessClient(rancherClient *RancherClient) *StatsAccessClient { + return &StatsAccessClient{ + rancherClient: rancherClient, + } +} + +func (c *StatsAccessClient) Create(container *StatsAccess) (*StatsAccess, error) { + resp := &StatsAccess{} + err := c.rancherClient.doCreate(STATS_ACCESS_TYPE, container, resp) + return resp, err +} + +func (c *StatsAccessClient) Update(existing *StatsAccess, updates interface{}) (*StatsAccess, error) { + resp := &StatsAccess{} + err := c.rancherClient.doUpdate(STATS_ACCESS_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *StatsAccessClient) List(opts *ListOpts) (*StatsAccessCollection, error) { + resp := &StatsAccessCollection{} + err := c.rancherClient.doList(STATS_ACCESS_TYPE, opts, resp) + return resp, err +} + +func (c *StatsAccessClient) ById(id string) (*StatsAccess, error) { + resp := &StatsAccess{} + err := c.rancherClient.doById(STATS_ACCESS_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *StatsAccessClient) Delete(container *StatsAccess) error { + return c.rancherClient.doResourceDelete(STATS_ACCESS_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_storage_pool.go b/vendor/github.com/rancher/go-rancher/client/generated_storage_pool.go new file mode 100644 index 000000000000..1175cfd8a882 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_storage_pool.go @@ -0,0 +1,178 @@ +package client + +const ( + STORAGE_POOL_TYPE = "storagePool" +) + +type StoragePool struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + BlockDevicePath string `json:"blockDevicePath,omitempty" yaml:"block_device_path,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + DriverName string `json:"driverName,omitempty" yaml:"driver_name,omitempty"` + + ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + + VolumeAccessMode string `json:"volumeAccessMode,omitempty" yaml:"volume_access_mode,omitempty"` + + VolumeCapabilities []string `json:"volumeCapabilities,omitempty" yaml:"volume_capabilities,omitempty"` +} + +type StoragePoolCollection struct { + Collection + Data []StoragePool `json:"data,omitempty"` +} + +type StoragePoolClient struct { + rancherClient *RancherClient +} + +type StoragePoolOperations interface { + List(opts *ListOpts) (*StoragePoolCollection, error) + Create(opts *StoragePool) (*StoragePool, error) + Update(existing *StoragePool, updates interface{}) (*StoragePool, error) + ById(id string) (*StoragePool, error) + Delete(container *StoragePool) error + + ActionActivate(*StoragePool) (*StoragePool, error) + + ActionCreate(*StoragePool) (*StoragePool, error) + + ActionDeactivate(*StoragePool) (*StoragePool, error) + + ActionPurge(*StoragePool) (*StoragePool, error) + + ActionRemove(*StoragePool) (*StoragePool, error) + + ActionRestore(*StoragePool) (*StoragePool, error) + + ActionUpdate(*StoragePool) (*StoragePool, error) +} + +func newStoragePoolClient(rancherClient *RancherClient) *StoragePoolClient { + return &StoragePoolClient{ + rancherClient: rancherClient, + } +} + +func (c *StoragePoolClient) Create(container *StoragePool) (*StoragePool, error) { + resp := &StoragePool{} + err := c.rancherClient.doCreate(STORAGE_POOL_TYPE, container, resp) + return resp, err +} + +func (c *StoragePoolClient) Update(existing *StoragePool, updates interface{}) (*StoragePool, error) { + resp := &StoragePool{} + err := c.rancherClient.doUpdate(STORAGE_POOL_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *StoragePoolClient) List(opts *ListOpts) (*StoragePoolCollection, error) { + resp := &StoragePoolCollection{} + err := c.rancherClient.doList(STORAGE_POOL_TYPE, opts, resp) + return resp, err +} + +func (c *StoragePoolClient) ById(id string) (*StoragePool, error) { + resp := &StoragePool{} + err := c.rancherClient.doById(STORAGE_POOL_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *StoragePoolClient) Delete(container *StoragePool) error { + return c.rancherClient.doResourceDelete(STORAGE_POOL_TYPE, &container.Resource) +} + +func (c *StoragePoolClient) ActionActivate(resource *StoragePool) (*StoragePool, error) { + + resp := &StoragePool{} + + err := c.rancherClient.doAction(STORAGE_POOL_TYPE, "activate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *StoragePoolClient) ActionCreate(resource *StoragePool) (*StoragePool, error) { + + resp := &StoragePool{} + + err := c.rancherClient.doAction(STORAGE_POOL_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *StoragePoolClient) ActionDeactivate(resource *StoragePool) (*StoragePool, error) { + + resp := &StoragePool{} + + err := c.rancherClient.doAction(STORAGE_POOL_TYPE, "deactivate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *StoragePoolClient) ActionPurge(resource *StoragePool) (*StoragePool, error) { + + resp := &StoragePool{} + + err := c.rancherClient.doAction(STORAGE_POOL_TYPE, "purge", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *StoragePoolClient) ActionRemove(resource *StoragePool) (*StoragePool, error) { + + resp := &StoragePool{} + + err := c.rancherClient.doAction(STORAGE_POOL_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *StoragePoolClient) ActionRestore(resource *StoragePool) (*StoragePool, error) { + + resp := &StoragePool{} + + err := c.rancherClient.doAction(STORAGE_POOL_TYPE, "restore", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *StoragePoolClient) ActionUpdate(resource *StoragePool) (*StoragePool, error) { + + resp := &StoragePool{} + + err := c.rancherClient.doAction(STORAGE_POOL_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_subscribe.go b/vendor/github.com/rancher/go-rancher/client/generated_subscribe.go new file mode 100644 index 000000000000..b8c6aa0721f3 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_subscribe.go @@ -0,0 +1,69 @@ +package client + +const ( + SUBSCRIBE_TYPE = "subscribe" +) + +type Subscribe struct { + Resource + + AgentId string `json:"agentId,omitempty" yaml:"agent_id,omitempty"` + + EventNames []string `json:"eventNames,omitempty" yaml:"event_names,omitempty"` +} + +type SubscribeCollection struct { + Collection + Data []Subscribe `json:"data,omitempty"` +} + +type SubscribeClient struct { + rancherClient *RancherClient +} + +type SubscribeOperations interface { + List(opts *ListOpts) (*SubscribeCollection, error) + Create(opts *Subscribe) (*Subscribe, error) + Update(existing *Subscribe, updates interface{}) (*Subscribe, error) + ById(id string) (*Subscribe, error) + Delete(container *Subscribe) error +} + +func newSubscribeClient(rancherClient *RancherClient) *SubscribeClient { + return &SubscribeClient{ + rancherClient: rancherClient, + } +} + +func (c *SubscribeClient) Create(container *Subscribe) (*Subscribe, error) { + resp := &Subscribe{} + err := c.rancherClient.doCreate(SUBSCRIBE_TYPE, container, resp) + return resp, err +} + +func (c *SubscribeClient) Update(existing *Subscribe, updates interface{}) (*Subscribe, error) { + resp := &Subscribe{} + err := c.rancherClient.doUpdate(SUBSCRIBE_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *SubscribeClient) List(opts *ListOpts) (*SubscribeCollection, error) { + resp := &SubscribeCollection{} + err := c.rancherClient.doList(SUBSCRIBE_TYPE, opts, resp) + return resp, err +} + +func (c *SubscribeClient) ById(id string) (*Subscribe, error) { + resp := &Subscribe{} + err := c.rancherClient.doById(SUBSCRIBE_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *SubscribeClient) Delete(container *Subscribe) error { + return c.rancherClient.doResourceDelete(SUBSCRIBE_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_task.go b/vendor/github.com/rancher/go-rancher/client/generated_task.go new file mode 100644 index 000000000000..13730c4ee063 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_task.go @@ -0,0 +1,78 @@ +package client + +const ( + TASK_TYPE = "task" +) + +type Task struct { + Resource + + Name string `json:"name,omitempty" yaml:"name,omitempty"` +} + +type TaskCollection struct { + Collection + Data []Task `json:"data,omitempty"` +} + +type TaskClient struct { + rancherClient *RancherClient +} + +type TaskOperations interface { + List(opts *ListOpts) (*TaskCollection, error) + Create(opts *Task) (*Task, error) + Update(existing *Task, updates interface{}) (*Task, error) + ById(id string) (*Task, error) + Delete(container *Task) error + + ActionExecute(*Task) (*Task, error) +} + +func newTaskClient(rancherClient *RancherClient) *TaskClient { + return &TaskClient{ + rancherClient: rancherClient, + } +} + +func (c *TaskClient) Create(container *Task) (*Task, error) { + resp := &Task{} + err := c.rancherClient.doCreate(TASK_TYPE, container, resp) + return resp, err +} + +func (c *TaskClient) Update(existing *Task, updates interface{}) (*Task, error) { + resp := &Task{} + err := c.rancherClient.doUpdate(TASK_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *TaskClient) List(opts *ListOpts) (*TaskCollection, error) { + resp := &TaskCollection{} + err := c.rancherClient.doList(TASK_TYPE, opts, resp) + return resp, err +} + +func (c *TaskClient) ById(id string) (*Task, error) { + resp := &Task{} + err := c.rancherClient.doById(TASK_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *TaskClient) Delete(container *Task) error { + return c.rancherClient.doResourceDelete(TASK_TYPE, &container.Resource) +} + +func (c *TaskClient) ActionExecute(resource *Task) (*Task, error) { + + resp := &Task{} + + err := c.rancherClient.doAction(TASK_TYPE, "execute", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_task_instance.go b/vendor/github.com/rancher/go-rancher/client/generated_task_instance.go new file mode 100644 index 000000000000..52739b11812d --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_task_instance.go @@ -0,0 +1,77 @@ +package client + +const ( + TASK_INSTANCE_TYPE = "taskInstance" +) + +type TaskInstance struct { + Resource + + EndTime string `json:"endTime,omitempty" yaml:"end_time,omitempty"` + + Exception string `json:"exception,omitempty" yaml:"exception,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + ServerId string `json:"serverId,omitempty" yaml:"server_id,omitempty"` + + StartTime string `json:"startTime,omitempty" yaml:"start_time,omitempty"` + + TaskId string `json:"taskId,omitempty" yaml:"task_id,omitempty"` +} + +type TaskInstanceCollection struct { + Collection + Data []TaskInstance `json:"data,omitempty"` +} + +type TaskInstanceClient struct { + rancherClient *RancherClient +} + +type TaskInstanceOperations interface { + List(opts *ListOpts) (*TaskInstanceCollection, error) + Create(opts *TaskInstance) (*TaskInstance, error) + Update(existing *TaskInstance, updates interface{}) (*TaskInstance, error) + ById(id string) (*TaskInstance, error) + Delete(container *TaskInstance) error +} + +func newTaskInstanceClient(rancherClient *RancherClient) *TaskInstanceClient { + return &TaskInstanceClient{ + rancherClient: rancherClient, + } +} + +func (c *TaskInstanceClient) Create(container *TaskInstance) (*TaskInstance, error) { + resp := &TaskInstance{} + err := c.rancherClient.doCreate(TASK_INSTANCE_TYPE, container, resp) + return resp, err +} + +func (c *TaskInstanceClient) Update(existing *TaskInstance, updates interface{}) (*TaskInstance, error) { + resp := &TaskInstance{} + err := c.rancherClient.doUpdate(TASK_INSTANCE_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *TaskInstanceClient) List(opts *ListOpts) (*TaskInstanceCollection, error) { + resp := &TaskInstanceCollection{} + err := c.rancherClient.doList(TASK_INSTANCE_TYPE, opts, resp) + return resp, err +} + +func (c *TaskInstanceClient) ById(id string) (*TaskInstance, error) { + resp := &TaskInstance{} + err := c.rancherClient.doById(TASK_INSTANCE_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *TaskInstanceClient) Delete(container *TaskInstance) error { + return c.rancherClient.doResourceDelete(TASK_INSTANCE_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_to_service_upgrade_strategy.go b/vendor/github.com/rancher/go-rancher/client/generated_to_service_upgrade_strategy.go new file mode 100644 index 000000000000..3abdc456f9be --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_to_service_upgrade_strategy.go @@ -0,0 +1,75 @@ +package client + +const ( + TO_SERVICE_UPGRADE_STRATEGY_TYPE = "toServiceUpgradeStrategy" +) + +type ToServiceUpgradeStrategy struct { + Resource + + BatchSize int64 `json:"batchSize,omitempty" yaml:"batch_size,omitempty"` + + FinalScale int64 `json:"finalScale,omitempty" yaml:"final_scale,omitempty"` + + IntervalMillis int64 `json:"intervalMillis,omitempty" yaml:"interval_millis,omitempty"` + + ToServiceId string `json:"toServiceId,omitempty" yaml:"to_service_id,omitempty"` + + UpdateLinks bool `json:"updateLinks,omitempty" yaml:"update_links,omitempty"` +} + +type ToServiceUpgradeStrategyCollection struct { + Collection + Data []ToServiceUpgradeStrategy `json:"data,omitempty"` +} + +type ToServiceUpgradeStrategyClient struct { + rancherClient *RancherClient +} + +type ToServiceUpgradeStrategyOperations interface { + List(opts *ListOpts) (*ToServiceUpgradeStrategyCollection, error) + Create(opts *ToServiceUpgradeStrategy) (*ToServiceUpgradeStrategy, error) + Update(existing *ToServiceUpgradeStrategy, updates interface{}) (*ToServiceUpgradeStrategy, error) + ById(id string) (*ToServiceUpgradeStrategy, error) + Delete(container *ToServiceUpgradeStrategy) error +} + +func newToServiceUpgradeStrategyClient(rancherClient *RancherClient) *ToServiceUpgradeStrategyClient { + return &ToServiceUpgradeStrategyClient{ + rancherClient: rancherClient, + } +} + +func (c *ToServiceUpgradeStrategyClient) Create(container *ToServiceUpgradeStrategy) (*ToServiceUpgradeStrategy, error) { + resp := &ToServiceUpgradeStrategy{} + err := c.rancherClient.doCreate(TO_SERVICE_UPGRADE_STRATEGY_TYPE, container, resp) + return resp, err +} + +func (c *ToServiceUpgradeStrategyClient) Update(existing *ToServiceUpgradeStrategy, updates interface{}) (*ToServiceUpgradeStrategy, error) { + resp := &ToServiceUpgradeStrategy{} + err := c.rancherClient.doUpdate(TO_SERVICE_UPGRADE_STRATEGY_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ToServiceUpgradeStrategyClient) List(opts *ListOpts) (*ToServiceUpgradeStrategyCollection, error) { + resp := &ToServiceUpgradeStrategyCollection{} + err := c.rancherClient.doList(TO_SERVICE_UPGRADE_STRATEGY_TYPE, opts, resp) + return resp, err +} + +func (c *ToServiceUpgradeStrategyClient) ById(id string) (*ToServiceUpgradeStrategy, error) { + resp := &ToServiceUpgradeStrategy{} + err := c.rancherClient.doById(TO_SERVICE_UPGRADE_STRATEGY_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ToServiceUpgradeStrategyClient) Delete(container *ToServiceUpgradeStrategy) error { + return c.rancherClient.doResourceDelete(TO_SERVICE_UPGRADE_STRATEGY_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_type_documentation.go b/vendor/github.com/rancher/go-rancher/client/generated_type_documentation.go new file mode 100644 index 000000000000..dc1d5ef8217b --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_type_documentation.go @@ -0,0 +1,69 @@ +package client + +const ( + TYPE_DOCUMENTATION_TYPE = "typeDocumentation" +) + +type TypeDocumentation struct { + Resource + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + ResourceFields map[string]interface{} `json:"resourceFields,omitempty" yaml:"resource_fields,omitempty"` +} + +type TypeDocumentationCollection struct { + Collection + Data []TypeDocumentation `json:"data,omitempty"` +} + +type TypeDocumentationClient struct { + rancherClient *RancherClient +} + +type TypeDocumentationOperations interface { + List(opts *ListOpts) (*TypeDocumentationCollection, error) + Create(opts *TypeDocumentation) (*TypeDocumentation, error) + Update(existing *TypeDocumentation, updates interface{}) (*TypeDocumentation, error) + ById(id string) (*TypeDocumentation, error) + Delete(container *TypeDocumentation) error +} + +func newTypeDocumentationClient(rancherClient *RancherClient) *TypeDocumentationClient { + return &TypeDocumentationClient{ + rancherClient: rancherClient, + } +} + +func (c *TypeDocumentationClient) Create(container *TypeDocumentation) (*TypeDocumentation, error) { + resp := &TypeDocumentation{} + err := c.rancherClient.doCreate(TYPE_DOCUMENTATION_TYPE, container, resp) + return resp, err +} + +func (c *TypeDocumentationClient) Update(existing *TypeDocumentation, updates interface{}) (*TypeDocumentation, error) { + resp := &TypeDocumentation{} + err := c.rancherClient.doUpdate(TYPE_DOCUMENTATION_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *TypeDocumentationClient) List(opts *ListOpts) (*TypeDocumentationCollection, error) { + resp := &TypeDocumentationCollection{} + err := c.rancherClient.doList(TYPE_DOCUMENTATION_TYPE, opts, resp) + return resp, err +} + +func (c *TypeDocumentationClient) ById(id string) (*TypeDocumentation, error) { + resp := &TypeDocumentation{} + err := c.rancherClient.doById(TYPE_DOCUMENTATION_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *TypeDocumentationClient) Delete(container *TypeDocumentation) error { + return c.rancherClient.doResourceDelete(TYPE_DOCUMENTATION_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_ubiquity_config.go b/vendor/github.com/rancher/go-rancher/client/generated_ubiquity_config.go new file mode 100644 index 000000000000..63f91d688ac7 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_ubiquity_config.go @@ -0,0 +1,77 @@ +package client + +const ( + UBIQUITY_CONFIG_TYPE = "ubiquityConfig" +) + +type UbiquityConfig struct { + Resource + + ApiToken string `json:"apiToken,omitempty" yaml:"api_token,omitempty"` + + ApiUsername string `json:"apiUsername,omitempty" yaml:"api_username,omitempty"` + + ClientId string `json:"clientId,omitempty" yaml:"client_id,omitempty"` + + FlavorId string `json:"flavorId,omitempty" yaml:"flavor_id,omitempty"` + + ImageId string `json:"imageId,omitempty" yaml:"image_id,omitempty"` + + ZoneId string `json:"zoneId,omitempty" yaml:"zone_id,omitempty"` +} + +type UbiquityConfigCollection struct { + Collection + Data []UbiquityConfig `json:"data,omitempty"` +} + +type UbiquityConfigClient struct { + rancherClient *RancherClient +} + +type UbiquityConfigOperations interface { + List(opts *ListOpts) (*UbiquityConfigCollection, error) + Create(opts *UbiquityConfig) (*UbiquityConfig, error) + Update(existing *UbiquityConfig, updates interface{}) (*UbiquityConfig, error) + ById(id string) (*UbiquityConfig, error) + Delete(container *UbiquityConfig) error +} + +func newUbiquityConfigClient(rancherClient *RancherClient) *UbiquityConfigClient { + return &UbiquityConfigClient{ + rancherClient: rancherClient, + } +} + +func (c *UbiquityConfigClient) Create(container *UbiquityConfig) (*UbiquityConfig, error) { + resp := &UbiquityConfig{} + err := c.rancherClient.doCreate(UBIQUITY_CONFIG_TYPE, container, resp) + return resp, err +} + +func (c *UbiquityConfigClient) Update(existing *UbiquityConfig, updates interface{}) (*UbiquityConfig, error) { + resp := &UbiquityConfig{} + err := c.rancherClient.doUpdate(UBIQUITY_CONFIG_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *UbiquityConfigClient) List(opts *ListOpts) (*UbiquityConfigCollection, error) { + resp := &UbiquityConfigCollection{} + err := c.rancherClient.doList(UBIQUITY_CONFIG_TYPE, opts, resp) + return resp, err +} + +func (c *UbiquityConfigClient) ById(id string) (*UbiquityConfig, error) { + resp := &UbiquityConfig{} + err := c.rancherClient.doById(UBIQUITY_CONFIG_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *UbiquityConfigClient) Delete(container *UbiquityConfig) error { + return c.rancherClient.doResourceDelete(UBIQUITY_CONFIG_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_user_preference.go b/vendor/github.com/rancher/go-rancher/client/generated_user_preference.go new file mode 100644 index 000000000000..5d2203b6d58d --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_user_preference.go @@ -0,0 +1,165 @@ +package client + +const ( + USER_PREFERENCE_TYPE = "userPreference" +) + +type UserPreference struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + + Value string `json:"value,omitempty" yaml:"value,omitempty"` +} + +type UserPreferenceCollection struct { + Collection + Data []UserPreference `json:"data,omitempty"` +} + +type UserPreferenceClient struct { + rancherClient *RancherClient +} + +type UserPreferenceOperations interface { + List(opts *ListOpts) (*UserPreferenceCollection, error) + Create(opts *UserPreference) (*UserPreference, error) + Update(existing *UserPreference, updates interface{}) (*UserPreference, error) + ById(id string) (*UserPreference, error) + Delete(container *UserPreference) error + + ActionActivate(*UserPreference) (*UserPreference, error) + + ActionCreate(*UserPreference) (*UserPreference, error) + + ActionDeactivate(*UserPreference) (*UserPreference, error) + + ActionPurge(*UserPreference) (*UserPreference, error) + + ActionRemove(*UserPreference) (*UserPreference, error) + + ActionRestore(*UserPreference) (*UserPreference, error) + + ActionUpdate(*UserPreference) (*UserPreference, error) +} + +func newUserPreferenceClient(rancherClient *RancherClient) *UserPreferenceClient { + return &UserPreferenceClient{ + rancherClient: rancherClient, + } +} + +func (c *UserPreferenceClient) Create(container *UserPreference) (*UserPreference, error) { + resp := &UserPreference{} + err := c.rancherClient.doCreate(USER_PREFERENCE_TYPE, container, resp) + return resp, err +} + +func (c *UserPreferenceClient) Update(existing *UserPreference, updates interface{}) (*UserPreference, error) { + resp := &UserPreference{} + err := c.rancherClient.doUpdate(USER_PREFERENCE_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *UserPreferenceClient) List(opts *ListOpts) (*UserPreferenceCollection, error) { + resp := &UserPreferenceCollection{} + err := c.rancherClient.doList(USER_PREFERENCE_TYPE, opts, resp) + return resp, err +} + +func (c *UserPreferenceClient) ById(id string) (*UserPreference, error) { + resp := &UserPreference{} + err := c.rancherClient.doById(USER_PREFERENCE_TYPE, id, resp) + return resp, err +} + +func (c *UserPreferenceClient) Delete(container *UserPreference) error { + return c.rancherClient.doResourceDelete(USER_PREFERENCE_TYPE, &container.Resource) +} + +func (c *UserPreferenceClient) ActionActivate(resource *UserPreference) (*UserPreference, error) { + + resp := &UserPreference{} + + err := c.rancherClient.doAction(USER_PREFERENCE_TYPE, "activate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *UserPreferenceClient) ActionCreate(resource *UserPreference) (*UserPreference, error) { + + resp := &UserPreference{} + + err := c.rancherClient.doAction(USER_PREFERENCE_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *UserPreferenceClient) ActionDeactivate(resource *UserPreference) (*UserPreference, error) { + + resp := &UserPreference{} + + err := c.rancherClient.doAction(USER_PREFERENCE_TYPE, "deactivate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *UserPreferenceClient) ActionPurge(resource *UserPreference) (*UserPreference, error) { + + resp := &UserPreference{} + + err := c.rancherClient.doAction(USER_PREFERENCE_TYPE, "purge", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *UserPreferenceClient) ActionRemove(resource *UserPreference) (*UserPreference, error) { + + resp := &UserPreference{} + + err := c.rancherClient.doAction(USER_PREFERENCE_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *UserPreferenceClient) ActionRestore(resource *UserPreference) (*UserPreference, error) { + + resp := &UserPreference{} + + err := c.rancherClient.doAction(USER_PREFERENCE_TYPE, "restore", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *UserPreferenceClient) ActionUpdate(resource *UserPreference) (*UserPreference, error) { + + resp := &UserPreference{} + + err := c.rancherClient.doAction(USER_PREFERENCE_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_virtual_machine.go b/vendor/github.com/rancher/go-rancher/client/generated_virtual_machine.go new file mode 100644 index 000000000000..cf8abedfbb93 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_virtual_machine.go @@ -0,0 +1,401 @@ +package client + +const ( + VIRTUAL_MACHINE_TYPE = "virtualMachine" +) + +type VirtualMachine struct { + Resource + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + AgentId string `json:"agentId,omitempty" yaml:"agent_id,omitempty"` + + AllocationState string `json:"allocationState,omitempty" yaml:"allocation_state,omitempty"` + + BlkioDeviceOptions map[string]interface{} `json:"blkioDeviceOptions,omitempty" yaml:"blkio_device_options,omitempty"` + + Command []string `json:"command,omitempty" yaml:"command,omitempty"` + + Count int64 `json:"count,omitempty" yaml:"count,omitempty"` + + CpuSet string `json:"cpuSet,omitempty" yaml:"cpu_set,omitempty"` + + CpuShares int64 `json:"cpuShares,omitempty" yaml:"cpu_shares,omitempty"` + + CreateIndex int64 `json:"createIndex,omitempty" yaml:"create_index,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + DeploymentUnitUuid string `json:"deploymentUnitUuid,omitempty" yaml:"deployment_unit_uuid,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + Disks []interface{} `json:"disks,omitempty" yaml:"disks,omitempty"` + + Dns []string `json:"dns,omitempty" yaml:"dns,omitempty"` + + DnsSearch []string `json:"dnsSearch,omitempty" yaml:"dns_search,omitempty"` + + DomainName string `json:"domainName,omitempty" yaml:"domain_name,omitempty"` + + Expose []string `json:"expose,omitempty" yaml:"expose,omitempty"` + + ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"` + + ExtraHosts []string `json:"extraHosts,omitempty" yaml:"extra_hosts,omitempty"` + + FirstRunning string `json:"firstRunning,omitempty" yaml:"first_running,omitempty"` + + HealthCheck *InstanceHealthCheck `json:"healthCheck,omitempty" yaml:"health_check,omitempty"` + + HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"` + + HostId string `json:"hostId,omitempty" yaml:"host_id,omitempty"` + + Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"` + + ImageUuid string `json:"imageUuid,omitempty" yaml:"image_uuid,omitempty"` + + InstanceLinks map[string]interface{} `json:"instanceLinks,omitempty" yaml:"instance_links,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Labels map[string]interface{} `json:"labels,omitempty" yaml:"labels,omitempty"` + + LogConfig *LogConfig `json:"logConfig,omitempty" yaml:"log_config,omitempty"` + + Memory int64 `json:"memory,omitempty" yaml:"memory,omitempty"` + + MemoryMb int64 `json:"memoryMb,omitempty" yaml:"memory_mb,omitempty"` + + MemorySwap int64 `json:"memorySwap,omitempty" yaml:"memory_swap,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + NativeContainer bool `json:"nativeContainer,omitempty" yaml:"native_container,omitempty"` + + NetworkIds []string `json:"networkIds,omitempty" yaml:"network_ids,omitempty"` + + NetworkMode string `json:"networkMode,omitempty" yaml:"network_mode,omitempty"` + + Ports []string `json:"ports,omitempty" yaml:"ports,omitempty"` + + PrimaryIpAddress string `json:"primaryIpAddress,omitempty" yaml:"primary_ip_address,omitempty"` + + RegistryCredentialId string `json:"registryCredentialId,omitempty" yaml:"registry_credential_id,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + RequestedHostId string `json:"requestedHostId,omitempty" yaml:"requested_host_id,omitempty"` + + RestartPolicy *RestartPolicy `json:"restartPolicy,omitempty" yaml:"restart_policy,omitempty"` + + SecurityOpt []string `json:"securityOpt,omitempty" yaml:"security_opt,omitempty"` + + StartCount int64 `json:"startCount,omitempty" yaml:"start_count,omitempty"` + + StartOnCreate bool `json:"startOnCreate,omitempty" yaml:"start_on_create,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + SystemContainer string `json:"systemContainer,omitempty" yaml:"system_container,omitempty"` + + Token string `json:"token,omitempty" yaml:"token,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Userdata string `json:"userdata,omitempty" yaml:"userdata,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + + Vcpu int64 `json:"vcpu,omitempty" yaml:"vcpu,omitempty"` + + Version string `json:"version,omitempty" yaml:"version,omitempty"` + + VolumeDriver string `json:"volumeDriver,omitempty" yaml:"volume_driver,omitempty"` +} + +type VirtualMachineCollection struct { + Collection + Data []VirtualMachine `json:"data,omitempty"` +} + +type VirtualMachineClient struct { + rancherClient *RancherClient +} + +type VirtualMachineOperations interface { + List(opts *ListOpts) (*VirtualMachineCollection, error) + Create(opts *VirtualMachine) (*VirtualMachine, error) + Update(existing *VirtualMachine, updates interface{}) (*VirtualMachine, error) + ById(id string) (*VirtualMachine, error) + Delete(container *VirtualMachine) error + + ActionAllocate(*VirtualMachine) (*Instance, error) + + ActionConsole(*VirtualMachine, *InstanceConsoleInput) (*InstanceConsole, error) + + ActionCreate(*VirtualMachine) (*Instance, error) + + ActionDeallocate(*VirtualMachine) (*Instance, error) + + ActionError(*VirtualMachine) (*Instance, error) + + ActionExecute(*VirtualMachine, *ContainerExec) (*HostAccess, error) + + ActionLogs(*VirtualMachine, *ContainerLogs) (*HostAccess, error) + + ActionMigrate(*VirtualMachine) (*Instance, error) + + ActionProxy(*VirtualMachine, *ContainerProxy) (*HostAccess, error) + + ActionPurge(*VirtualMachine) (*Instance, error) + + ActionRemove(*VirtualMachine) (*Instance, error) + + ActionRestart(*VirtualMachine) (*Instance, error) + + ActionRestore(*VirtualMachine) (*Instance, error) + + ActionSetlabels(*VirtualMachine, *SetLabelsInput) (*Container, error) + + ActionStart(*VirtualMachine) (*Instance, error) + + ActionStop(*VirtualMachine, *InstanceStop) (*Instance, error) + + ActionUpdate(*VirtualMachine) (*Instance, error) + + ActionUpdatehealthy(*VirtualMachine) (*Instance, error) + + ActionUpdatereinitializing(*VirtualMachine) (*Instance, error) + + ActionUpdateunhealthy(*VirtualMachine) (*Instance, error) +} + +func newVirtualMachineClient(rancherClient *RancherClient) *VirtualMachineClient { + return &VirtualMachineClient{ + rancherClient: rancherClient, + } +} + +func (c *VirtualMachineClient) Create(container *VirtualMachine) (*VirtualMachine, error) { + resp := &VirtualMachine{} + err := c.rancherClient.doCreate(VIRTUAL_MACHINE_TYPE, container, resp) + return resp, err +} + +func (c *VirtualMachineClient) Update(existing *VirtualMachine, updates interface{}) (*VirtualMachine, error) { + resp := &VirtualMachine{} + err := c.rancherClient.doUpdate(VIRTUAL_MACHINE_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *VirtualMachineClient) List(opts *ListOpts) (*VirtualMachineCollection, error) { + resp := &VirtualMachineCollection{} + err := c.rancherClient.doList(VIRTUAL_MACHINE_TYPE, opts, resp) + return resp, err +} + +func (c *VirtualMachineClient) ById(id string) (*VirtualMachine, error) { + resp := &VirtualMachine{} + err := c.rancherClient.doById(VIRTUAL_MACHINE_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *VirtualMachineClient) Delete(container *VirtualMachine) error { + return c.rancherClient.doResourceDelete(VIRTUAL_MACHINE_TYPE, &container.Resource) +} + +func (c *VirtualMachineClient) ActionAllocate(resource *VirtualMachine) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "allocate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *VirtualMachineClient) ActionConsole(resource *VirtualMachine, input *InstanceConsoleInput) (*InstanceConsole, error) { + + resp := &InstanceConsole{} + + err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "console", &resource.Resource, input, resp) + + return resp, err +} + +func (c *VirtualMachineClient) ActionCreate(resource *VirtualMachine) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *VirtualMachineClient) ActionDeallocate(resource *VirtualMachine) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "deallocate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *VirtualMachineClient) ActionError(resource *VirtualMachine) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "error", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *VirtualMachineClient) ActionExecute(resource *VirtualMachine, input *ContainerExec) (*HostAccess, error) { + + resp := &HostAccess{} + + err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "execute", &resource.Resource, input, resp) + + return resp, err +} + +func (c *VirtualMachineClient) ActionLogs(resource *VirtualMachine, input *ContainerLogs) (*HostAccess, error) { + + resp := &HostAccess{} + + err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "logs", &resource.Resource, input, resp) + + return resp, err +} + +func (c *VirtualMachineClient) ActionMigrate(resource *VirtualMachine) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "migrate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *VirtualMachineClient) ActionProxy(resource *VirtualMachine, input *ContainerProxy) (*HostAccess, error) { + + resp := &HostAccess{} + + err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "proxy", &resource.Resource, input, resp) + + return resp, err +} + +func (c *VirtualMachineClient) ActionPurge(resource *VirtualMachine) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "purge", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *VirtualMachineClient) ActionRemove(resource *VirtualMachine) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *VirtualMachineClient) ActionRestart(resource *VirtualMachine) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "restart", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *VirtualMachineClient) ActionRestore(resource *VirtualMachine) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "restore", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *VirtualMachineClient) ActionSetlabels(resource *VirtualMachine, input *SetLabelsInput) (*Container, error) { + + resp := &Container{} + + err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "setlabels", &resource.Resource, input, resp) + + return resp, err +} + +func (c *VirtualMachineClient) ActionStart(resource *VirtualMachine) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "start", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *VirtualMachineClient) ActionStop(resource *VirtualMachine, input *InstanceStop) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "stop", &resource.Resource, input, resp) + + return resp, err +} + +func (c *VirtualMachineClient) ActionUpdate(resource *VirtualMachine) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *VirtualMachineClient) ActionUpdatehealthy(resource *VirtualMachine) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "updatehealthy", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *VirtualMachineClient) ActionUpdatereinitializing(resource *VirtualMachine) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "updatereinitializing", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *VirtualMachineClient) ActionUpdateunhealthy(resource *VirtualMachine) (*Instance, error) { + + resp := &Instance{} + + err := c.rancherClient.doAction(VIRTUAL_MACHINE_TYPE, "updateunhealthy", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_virtual_machine_disk.go b/vendor/github.com/rancher/go-rancher/client/generated_virtual_machine_disk.go new file mode 100644 index 000000000000..7e1e8a526ec5 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_virtual_machine_disk.go @@ -0,0 +1,79 @@ +package client + +const ( + VIRTUAL_MACHINE_DISK_TYPE = "virtualMachineDisk" +) + +type VirtualMachineDisk struct { + Resource + + Driver string `json:"driver,omitempty" yaml:"driver,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + Opts map[string]interface{} `json:"opts,omitempty" yaml:"opts,omitempty"` + + ReadIops int64 `json:"readIops,omitempty" yaml:"read_iops,omitempty"` + + Root bool `json:"root,omitempty" yaml:"root,omitempty"` + + Size string `json:"size,omitempty" yaml:"size,omitempty"` + + WriteIops int64 `json:"writeIops,omitempty" yaml:"write_iops,omitempty"` +} + +type VirtualMachineDiskCollection struct { + Collection + Data []VirtualMachineDisk `json:"data,omitempty"` +} + +type VirtualMachineDiskClient struct { + rancherClient *RancherClient +} + +type VirtualMachineDiskOperations interface { + List(opts *ListOpts) (*VirtualMachineDiskCollection, error) + Create(opts *VirtualMachineDisk) (*VirtualMachineDisk, error) + Update(existing *VirtualMachineDisk, updates interface{}) (*VirtualMachineDisk, error) + ById(id string) (*VirtualMachineDisk, error) + Delete(container *VirtualMachineDisk) error +} + +func newVirtualMachineDiskClient(rancherClient *RancherClient) *VirtualMachineDiskClient { + return &VirtualMachineDiskClient{ + rancherClient: rancherClient, + } +} + +func (c *VirtualMachineDiskClient) Create(container *VirtualMachineDisk) (*VirtualMachineDisk, error) { + resp := &VirtualMachineDisk{} + err := c.rancherClient.doCreate(VIRTUAL_MACHINE_DISK_TYPE, container, resp) + return resp, err +} + +func (c *VirtualMachineDiskClient) Update(existing *VirtualMachineDisk, updates interface{}) (*VirtualMachineDisk, error) { + resp := &VirtualMachineDisk{} + err := c.rancherClient.doUpdate(VIRTUAL_MACHINE_DISK_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *VirtualMachineDiskClient) List(opts *ListOpts) (*VirtualMachineDiskCollection, error) { + resp := &VirtualMachineDiskCollection{} + err := c.rancherClient.doList(VIRTUAL_MACHINE_DISK_TYPE, opts, resp) + return resp, err +} + +func (c *VirtualMachineDiskClient) ById(id string) (*VirtualMachineDisk, error) { + resp := &VirtualMachineDisk{} + err := c.rancherClient.doById(VIRTUAL_MACHINE_DISK_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *VirtualMachineDiskClient) Delete(container *VirtualMachineDisk) error { + return c.rancherClient.doResourceDelete(VIRTUAL_MACHINE_DISK_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_virtualbox_config.go b/vendor/github.com/rancher/go-rancher/client/generated_virtualbox_config.go new file mode 100644 index 000000000000..0a9e383589d3 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_virtualbox_config.go @@ -0,0 +1,79 @@ +package client + +const ( + VIRTUALBOX_CONFIG_TYPE = "virtualboxConfig" +) + +type VirtualboxConfig struct { + Resource + + Boot2dockerUrl string `json:"boot2dockerUrl,omitempty" yaml:"boot2docker_url,omitempty"` + + CpuCount string `json:"cpuCount,omitempty" yaml:"cpu_count,omitempty"` + + DiskSize string `json:"diskSize,omitempty" yaml:"disk_size,omitempty"` + + HostonlyCidr string `json:"hostonlyCidr,omitempty" yaml:"hostonly_cidr,omitempty"` + + ImportBoot2dockerVm string `json:"importBoot2dockerVm,omitempty" yaml:"import_boot2docker_vm,omitempty"` + + Memory string `json:"memory,omitempty" yaml:"memory,omitempty"` + + NoShare bool `json:"noShare,omitempty" yaml:"no_share,omitempty"` +} + +type VirtualboxConfigCollection struct { + Collection + Data []VirtualboxConfig `json:"data,omitempty"` +} + +type VirtualboxConfigClient struct { + rancherClient *RancherClient +} + +type VirtualboxConfigOperations interface { + List(opts *ListOpts) (*VirtualboxConfigCollection, error) + Create(opts *VirtualboxConfig) (*VirtualboxConfig, error) + Update(existing *VirtualboxConfig, updates interface{}) (*VirtualboxConfig, error) + ById(id string) (*VirtualboxConfig, error) + Delete(container *VirtualboxConfig) error +} + +func newVirtualboxConfigClient(rancherClient *RancherClient) *VirtualboxConfigClient { + return &VirtualboxConfigClient{ + rancherClient: rancherClient, + } +} + +func (c *VirtualboxConfigClient) Create(container *VirtualboxConfig) (*VirtualboxConfig, error) { + resp := &VirtualboxConfig{} + err := c.rancherClient.doCreate(VIRTUALBOX_CONFIG_TYPE, container, resp) + return resp, err +} + +func (c *VirtualboxConfigClient) Update(existing *VirtualboxConfig, updates interface{}) (*VirtualboxConfig, error) { + resp := &VirtualboxConfig{} + err := c.rancherClient.doUpdate(VIRTUALBOX_CONFIG_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *VirtualboxConfigClient) List(opts *ListOpts) (*VirtualboxConfigCollection, error) { + resp := &VirtualboxConfigCollection{} + err := c.rancherClient.doList(VIRTUALBOX_CONFIG_TYPE, opts, resp) + return resp, err +} + +func (c *VirtualboxConfigClient) ById(id string) (*VirtualboxConfig, error) { + resp := &VirtualboxConfig{} + err := c.rancherClient.doById(VIRTUALBOX_CONFIG_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *VirtualboxConfigClient) Delete(container *VirtualboxConfig) error { + return c.rancherClient.doResourceDelete(VIRTUALBOX_CONFIG_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_vmwarevcloudair_config.go b/vendor/github.com/rancher/go-rancher/client/generated_vmwarevcloudair_config.go new file mode 100644 index 000000000000..12f962f4d01b --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_vmwarevcloudair_config.go @@ -0,0 +1,93 @@ +package client + +const ( + VMWAREVCLOUDAIR_CONFIG_TYPE = "vmwarevcloudairConfig" +) + +type VmwarevcloudairConfig struct { + Resource + + Catalog string `json:"catalog,omitempty" yaml:"catalog,omitempty"` + + Catalogitem string `json:"catalogitem,omitempty" yaml:"catalogitem,omitempty"` + + Computeid string `json:"computeid,omitempty" yaml:"computeid,omitempty"` + + CpuCount string `json:"cpuCount,omitempty" yaml:"cpu_count,omitempty"` + + DockerPort string `json:"dockerPort,omitempty" yaml:"docker_port,omitempty"` + + Edgegateway string `json:"edgegateway,omitempty" yaml:"edgegateway,omitempty"` + + MemorySize string `json:"memorySize,omitempty" yaml:"memory_size,omitempty"` + + Orgvdcnetwork string `json:"orgvdcnetwork,omitempty" yaml:"orgvdcnetwork,omitempty"` + + Password string `json:"password,omitempty" yaml:"password,omitempty"` + + Provision bool `json:"provision,omitempty" yaml:"provision,omitempty"` + + Publicip string `json:"publicip,omitempty" yaml:"publicip,omitempty"` + + SshPort string `json:"sshPort,omitempty" yaml:"ssh_port,omitempty"` + + Username string `json:"username,omitempty" yaml:"username,omitempty"` + + Vdcid string `json:"vdcid,omitempty" yaml:"vdcid,omitempty"` +} + +type VmwarevcloudairConfigCollection struct { + Collection + Data []VmwarevcloudairConfig `json:"data,omitempty"` +} + +type VmwarevcloudairConfigClient struct { + rancherClient *RancherClient +} + +type VmwarevcloudairConfigOperations interface { + List(opts *ListOpts) (*VmwarevcloudairConfigCollection, error) + Create(opts *VmwarevcloudairConfig) (*VmwarevcloudairConfig, error) + Update(existing *VmwarevcloudairConfig, updates interface{}) (*VmwarevcloudairConfig, error) + ById(id string) (*VmwarevcloudairConfig, error) + Delete(container *VmwarevcloudairConfig) error +} + +func newVmwarevcloudairConfigClient(rancherClient *RancherClient) *VmwarevcloudairConfigClient { + return &VmwarevcloudairConfigClient{ + rancherClient: rancherClient, + } +} + +func (c *VmwarevcloudairConfigClient) Create(container *VmwarevcloudairConfig) (*VmwarevcloudairConfig, error) { + resp := &VmwarevcloudairConfig{} + err := c.rancherClient.doCreate(VMWAREVCLOUDAIR_CONFIG_TYPE, container, resp) + return resp, err +} + +func (c *VmwarevcloudairConfigClient) Update(existing *VmwarevcloudairConfig, updates interface{}) (*VmwarevcloudairConfig, error) { + resp := &VmwarevcloudairConfig{} + err := c.rancherClient.doUpdate(VMWAREVCLOUDAIR_CONFIG_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *VmwarevcloudairConfigClient) List(opts *ListOpts) (*VmwarevcloudairConfigCollection, error) { + resp := &VmwarevcloudairConfigCollection{} + err := c.rancherClient.doList(VMWAREVCLOUDAIR_CONFIG_TYPE, opts, resp) + return resp, err +} + +func (c *VmwarevcloudairConfigClient) ById(id string) (*VmwarevcloudairConfig, error) { + resp := &VmwarevcloudairConfig{} + err := c.rancherClient.doById(VMWAREVCLOUDAIR_CONFIG_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *VmwarevcloudairConfigClient) Delete(container *VmwarevcloudairConfig) error { + return c.rancherClient.doResourceDelete(VMWAREVCLOUDAIR_CONFIG_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_vmwarevsphere_config.go b/vendor/github.com/rancher/go-rancher/client/generated_vmwarevsphere_config.go new file mode 100644 index 000000000000..f6cb9d2112a3 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_vmwarevsphere_config.go @@ -0,0 +1,89 @@ +package client + +const ( + VMWAREVSPHERE_CONFIG_TYPE = "vmwarevsphereConfig" +) + +type VmwarevsphereConfig struct { + Resource + + Boot2dockerUrl string `json:"boot2dockerUrl,omitempty" yaml:"boot2docker_url,omitempty"` + + ComputeIp string `json:"computeIp,omitempty" yaml:"compute_ip,omitempty"` + + CpuCount string `json:"cpuCount,omitempty" yaml:"cpu_count,omitempty"` + + Datacenter string `json:"datacenter,omitempty" yaml:"datacenter,omitempty"` + + Datastore string `json:"datastore,omitempty" yaml:"datastore,omitempty"` + + DiskSize string `json:"diskSize,omitempty" yaml:"disk_size,omitempty"` + + MemorySize string `json:"memorySize,omitempty" yaml:"memory_size,omitempty"` + + Network string `json:"network,omitempty" yaml:"network,omitempty"` + + Password string `json:"password,omitempty" yaml:"password,omitempty"` + + Pool string `json:"pool,omitempty" yaml:"pool,omitempty"` + + Username string `json:"username,omitempty" yaml:"username,omitempty"` + + Vcenter string `json:"vcenter,omitempty" yaml:"vcenter,omitempty"` +} + +type VmwarevsphereConfigCollection struct { + Collection + Data []VmwarevsphereConfig `json:"data,omitempty"` +} + +type VmwarevsphereConfigClient struct { + rancherClient *RancherClient +} + +type VmwarevsphereConfigOperations interface { + List(opts *ListOpts) (*VmwarevsphereConfigCollection, error) + Create(opts *VmwarevsphereConfig) (*VmwarevsphereConfig, error) + Update(existing *VmwarevsphereConfig, updates interface{}) (*VmwarevsphereConfig, error) + ById(id string) (*VmwarevsphereConfig, error) + Delete(container *VmwarevsphereConfig) error +} + +func newVmwarevsphereConfigClient(rancherClient *RancherClient) *VmwarevsphereConfigClient { + return &VmwarevsphereConfigClient{ + rancherClient: rancherClient, + } +} + +func (c *VmwarevsphereConfigClient) Create(container *VmwarevsphereConfig) (*VmwarevsphereConfig, error) { + resp := &VmwarevsphereConfig{} + err := c.rancherClient.doCreate(VMWAREVSPHERE_CONFIG_TYPE, container, resp) + return resp, err +} + +func (c *VmwarevsphereConfigClient) Update(existing *VmwarevsphereConfig, updates interface{}) (*VmwarevsphereConfig, error) { + resp := &VmwarevsphereConfig{} + err := c.rancherClient.doUpdate(VMWAREVSPHERE_CONFIG_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *VmwarevsphereConfigClient) List(opts *ListOpts) (*VmwarevsphereConfigCollection, error) { + resp := &VmwarevsphereConfigCollection{} + err := c.rancherClient.doList(VMWAREVSPHERE_CONFIG_TYPE, opts, resp) + return resp, err +} + +func (c *VmwarevsphereConfigClient) ById(id string) (*VmwarevsphereConfig, error) { + resp := &VmwarevsphereConfig{} + err := c.rancherClient.doById(VMWAREVSPHERE_CONFIG_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *VmwarevsphereConfigClient) Delete(container *VmwarevsphereConfig) error { + return c.rancherClient.doResourceDelete(VMWAREVSPHERE_CONFIG_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_volume.go b/vendor/github.com/rancher/go-rancher/client/generated_volume.go new file mode 100644 index 000000000000..395deb6dee3e --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_volume.go @@ -0,0 +1,228 @@ +package client + +const ( + VOLUME_TYPE = "volume" +) + +type Volume struct { + Resource + + AccessMode string `json:"accessMode,omitempty" yaml:"access_mode,omitempty"` + + AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + + Created string `json:"created,omitempty" yaml:"created,omitempty"` + + Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + Driver string `json:"driver,omitempty" yaml:"driver,omitempty"` + + DriverOpts map[string]interface{} `json:"driverOpts,omitempty" yaml:"driver_opts,omitempty"` + + ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"` + + ImageId string `json:"imageId,omitempty" yaml:"image_id,omitempty"` + + InstanceId string `json:"instanceId,omitempty" yaml:"instance_id,omitempty"` + + IsHostPath bool `json:"isHostPath,omitempty" yaml:"is_host_path,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` + + TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` + + TransitioningProgress int64 `json:"transitioningProgress,omitempty" yaml:"transitioning_progress,omitempty"` + + Uri string `json:"uri,omitempty" yaml:"uri,omitempty"` + + Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` +} + +type VolumeCollection struct { + Collection + Data []Volume `json:"data,omitempty"` +} + +type VolumeClient struct { + rancherClient *RancherClient +} + +type VolumeOperations interface { + List(opts *ListOpts) (*VolumeCollection, error) + Create(opts *Volume) (*Volume, error) + Update(existing *Volume, updates interface{}) (*Volume, error) + ById(id string) (*Volume, error) + Delete(container *Volume) error + + ActionActivate(*Volume) (*Volume, error) + + ActionAllocate(*Volume) (*Volume, error) + + ActionCreate(*Volume) (*Volume, error) + + ActionDeallocate(*Volume) (*Volume, error) + + ActionPurge(*Volume) (*Volume, error) + + ActionRemove(*Volume) (*Volume, error) + + ActionRestore(*Volume) (*Volume, error) + + ActionRestorefrombackup(*Volume, *RestoreFromBackupInput) (*Volume, error) + + ActionReverttosnapshot(*Volume, *RevertToSnapshotInput) (*Volume, error) + + ActionSnapshot(*Volume, *VolumeSnapshotInput) (*Snapshot, error) + + ActionUpdate(*Volume) (*Volume, error) +} + +func newVolumeClient(rancherClient *RancherClient) *VolumeClient { + return &VolumeClient{ + rancherClient: rancherClient, + } +} + +func (c *VolumeClient) Create(container *Volume) (*Volume, error) { + resp := &Volume{} + err := c.rancherClient.doCreate(VOLUME_TYPE, container, resp) + return resp, err +} + +func (c *VolumeClient) Update(existing *Volume, updates interface{}) (*Volume, error) { + resp := &Volume{} + err := c.rancherClient.doUpdate(VOLUME_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *VolumeClient) List(opts *ListOpts) (*VolumeCollection, error) { + resp := &VolumeCollection{} + err := c.rancherClient.doList(VOLUME_TYPE, opts, resp) + return resp, err +} + +func (c *VolumeClient) ById(id string) (*Volume, error) { + resp := &Volume{} + err := c.rancherClient.doById(VOLUME_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *VolumeClient) Delete(container *Volume) error { + return c.rancherClient.doResourceDelete(VOLUME_TYPE, &container.Resource) +} + +func (c *VolumeClient) ActionActivate(resource *Volume) (*Volume, error) { + + resp := &Volume{} + + err := c.rancherClient.doAction(VOLUME_TYPE, "activate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *VolumeClient) ActionAllocate(resource *Volume) (*Volume, error) { + + resp := &Volume{} + + err := c.rancherClient.doAction(VOLUME_TYPE, "allocate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *VolumeClient) ActionCreate(resource *Volume) (*Volume, error) { + + resp := &Volume{} + + err := c.rancherClient.doAction(VOLUME_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *VolumeClient) ActionDeallocate(resource *Volume) (*Volume, error) { + + resp := &Volume{} + + err := c.rancherClient.doAction(VOLUME_TYPE, "deallocate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *VolumeClient) ActionPurge(resource *Volume) (*Volume, error) { + + resp := &Volume{} + + err := c.rancherClient.doAction(VOLUME_TYPE, "purge", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *VolumeClient) ActionRemove(resource *Volume) (*Volume, error) { + + resp := &Volume{} + + err := c.rancherClient.doAction(VOLUME_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *VolumeClient) ActionRestore(resource *Volume) (*Volume, error) { + + resp := &Volume{} + + err := c.rancherClient.doAction(VOLUME_TYPE, "restore", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *VolumeClient) ActionRestorefrombackup(resource *Volume, input *RestoreFromBackupInput) (*Volume, error) { + + resp := &Volume{} + + err := c.rancherClient.doAction(VOLUME_TYPE, "restorefrombackup", &resource.Resource, input, resp) + + return resp, err +} + +func (c *VolumeClient) ActionReverttosnapshot(resource *Volume, input *RevertToSnapshotInput) (*Volume, error) { + + resp := &Volume{} + + err := c.rancherClient.doAction(VOLUME_TYPE, "reverttosnapshot", &resource.Resource, input, resp) + + return resp, err +} + +func (c *VolumeClient) ActionSnapshot(resource *Volume, input *VolumeSnapshotInput) (*Snapshot, error) { + + resp := &Snapshot{} + + err := c.rancherClient.doAction(VOLUME_TYPE, "snapshot", &resource.Resource, input, resp) + + return resp, err +} + +func (c *VolumeClient) ActionUpdate(resource *Volume) (*Volume, error) { + + resp := &Volume{} + + err := c.rancherClient.doAction(VOLUME_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/client/generated_volume_snapshot_input.go b/vendor/github.com/rancher/go-rancher/client/generated_volume_snapshot_input.go new file mode 100644 index 000000000000..10df7edeae2d --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/generated_volume_snapshot_input.go @@ -0,0 +1,67 @@ +package client + +const ( + VOLUME_SNAPSHOT_INPUT_TYPE = "volumeSnapshotInput" +) + +type VolumeSnapshotInput struct { + Resource + + Name string `json:"name,omitempty" yaml:"name,omitempty"` +} + +type VolumeSnapshotInputCollection struct { + Collection + Data []VolumeSnapshotInput `json:"data,omitempty"` +} + +type VolumeSnapshotInputClient struct { + rancherClient *RancherClient +} + +type VolumeSnapshotInputOperations interface { + List(opts *ListOpts) (*VolumeSnapshotInputCollection, error) + Create(opts *VolumeSnapshotInput) (*VolumeSnapshotInput, error) + Update(existing *VolumeSnapshotInput, updates interface{}) (*VolumeSnapshotInput, error) + ById(id string) (*VolumeSnapshotInput, error) + Delete(container *VolumeSnapshotInput) error +} + +func newVolumeSnapshotInputClient(rancherClient *RancherClient) *VolumeSnapshotInputClient { + return &VolumeSnapshotInputClient{ + rancherClient: rancherClient, + } +} + +func (c *VolumeSnapshotInputClient) Create(container *VolumeSnapshotInput) (*VolumeSnapshotInput, error) { + resp := &VolumeSnapshotInput{} + err := c.rancherClient.doCreate(VOLUME_SNAPSHOT_INPUT_TYPE, container, resp) + return resp, err +} + +func (c *VolumeSnapshotInputClient) Update(existing *VolumeSnapshotInput, updates interface{}) (*VolumeSnapshotInput, error) { + resp := &VolumeSnapshotInput{} + err := c.rancherClient.doUpdate(VOLUME_SNAPSHOT_INPUT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *VolumeSnapshotInputClient) List(opts *ListOpts) (*VolumeSnapshotInputCollection, error) { + resp := &VolumeSnapshotInputCollection{} + err := c.rancherClient.doList(VOLUME_SNAPSHOT_INPUT_TYPE, opts, resp) + return resp, err +} + +func (c *VolumeSnapshotInputClient) ById(id string) (*VolumeSnapshotInput, error) { + resp := &VolumeSnapshotInput{} + err := c.rancherClient.doById(VOLUME_SNAPSHOT_INPUT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *VolumeSnapshotInputClient) Delete(container *VolumeSnapshotInput) error { + return c.rancherClient.doResourceDelete(VOLUME_SNAPSHOT_INPUT_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/client/schemas.go b/vendor/github.com/rancher/go-rancher/client/schemas.go new file mode 100644 index 000000000000..e5fd2f54f7fe --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/schemas.go @@ -0,0 +1,129 @@ +package client + +import ( + "reflect" + "strings" +) + +type Schemas struct { + Collection + Data []Schema `json:"data,omitempty"` + schemasByName map[string]*Schema +} + +func (s *Schema) CheckField(name string) (Field, bool) { + for fieldName := range s.ResourceFields { + if fieldName == name { + v, ok := s.ResourceFields[fieldName] + return v, ok + } + } + return Field{}, false +} + +func (s *Schema) Field(name string) Field { + f, _ := s.CheckField(name) + return f +} + +func (s *Schemas) CheckSchema(name string) (Schema, bool) { + for i := range s.Data { + if s.Data[i].Id == name { + return s.Data[i], true + } + } + return Schema{}, false +} + +func (s *Schemas) Schema(name string) Schema { + r, _ := s.CheckSchema(name) + return r +} + +func typeToFields(t reflect.Type) map[string]Field { + result := map[string]Field{} + + for i := 0; i < t.NumField(); i++ { + schemaField := Field{} + + typeField := t.Field(i) + if typeField.Anonymous && typeField.Type.Kind() == reflect.Struct { + parentFields := typeToFields(typeField.Type) + for k, v := range result { + parentFields[k] = v + } + result = parentFields + continue + } else if typeField.Anonymous { + continue + } + + fieldString := strings.ToLower(typeField.Type.Kind().String()) + + switch { + case strings.HasPrefix(fieldString, "int") || strings.HasPrefix(fieldString, "uint"): + schemaField.Type = "int" + case fieldString == "bool": + schemaField.Type = fieldString + case fieldString == "float32" || fieldString == "float64": + schemaField.Type = "float" + case fieldString == "string": + schemaField.Type = "string" + case fieldString == "map": + // HACK + schemaField.Type = "map[string]" + case fieldString == "slice": + // HACK + schemaField.Type = "array[string]" + } + + name := strings.Split(typeField.Tag.Get("json"), ",")[0] + if name == "" && len(typeField.Name) > 1 { + name = strings.ToLower(typeField.Name[0:1]) + typeField.Name[1:] + } else if name == "" { + name = typeField.Name + } + + if schemaField.Type != "" { + result[name] = schemaField + } + } + + return result +} + +func (s *Schemas) AddType(schemaName string, obj interface{}) *Schema { + t := reflect.TypeOf(obj) + schema := Schema{ + Resource: Resource{ + Id: schemaName, + Type: "schema", + Links: map[string]string{}, + }, + PluralName: guessPluralName(schemaName), + ResourceFields: typeToFields(t), + CollectionMethods: []string{"GET"}, + ResourceMethods: []string{"GET"}, + } + + if s.Data == nil { + s.Data = []Schema{} + } + + s.Data = append(s.Data, schema) + + return &s.Data[len(s.Data)-1] +} + +func guessPluralName(name string) string { + if name == "" { + return "" + } + + if strings.HasSuffix(name, "s") || + strings.HasSuffix(name, "ch") || + strings.HasSuffix(name, "x") { + return name + "es" + } + return name + "s" +} diff --git a/vendor/github.com/rancher/go-rancher/client/types.go b/vendor/github.com/rancher/go-rancher/client/types.go new file mode 100644 index 000000000000..905df87ffaa3 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/client/types.go @@ -0,0 +1,95 @@ +package client + +type Collection struct { + Type string `json:"type,omitempty"` + ResourceType string `json:"resourceType,omitempty"` + Links map[string]string `json:"links,omitempty"` + CreateTypes map[string]string `json:"createTypes,omitempty"` + Actions map[string]string `json:"actions,omitempty"` + SortLinks map[string]string `json:"sortLinks,omitempty"` + Pagination *Pagination `json:"pagination,omitempty"` + Sort *Sort `json:"sort,omitempty"` + Filters map[string][]Condition `json:"filters,omitempty"` +} + +type GenericCollection struct { + Collection + Data []interface{} `json:"data,omitempty"` +} + +type ResourceCollection struct { + Collection + Data []Resource `json:"data,omitempty"` +} + +type Sort struct { + Name string `json:"name,omitempty"` + Order string `json:"order,omitempty"` + Reverse string `json:"reverse,omitempty"` +} + +type Condition struct { + Modifier string `json:"modifier,omitempty"` + Value interface{} `json:"value,omitempty"` +} + +type Pagination struct { + Marker string `json:"marker,omitempty"` + First string `json:"first,omitempty"` + Previous string `json:"previous,omitempty"` + Next string `json:"next,omitempty"` + Limit *int64 `json:"limit,omitempty"` + Total *int64 `json:"total,omitempty"` + Partial bool `json:"partial,omitempty"` +} + +type Resource struct { + Id string `json:"id,omitempty"` + Type string `json:"type,omitempty"` + Links map[string]string `json:"links"` + Actions map[string]string `json:"actions"` +} + +type Schema struct { + Resource + PluralName string `json:"pluralName,omitempty"` + ResourceMethods []string `json:"resourceMethods,omitempty"` + ResourceFields map[string]Field `json:"resourceFields,omitempty"` + ResourceActions map[string]Action `json:"resourceActions,omitempty"` + CollectionMethods []string `json:"collectionMethods,omitempty"` + CollectionFields map[string]Field `json:"collectionFields,omitempty"` + CollectionActions map[string]Action `json:"collectionActions,omitempty"` + CollectionFilters map[string]Filter `json:"collectionFilters,omitempty"` + IncludeableLinks []string `json:"includeableLinks,omitempty"` +} + +type Field struct { + Type string `json:"type,omitempty"` + Default interface{} `json:"default,omitempty"` + Unique bool `json:"unique,omitempty"` + Nullable bool `json:"nullable,omitempty"` + Create bool `json:"create,omitempty"` + Required bool `json:"required,omitempty"` + Update bool `json:"update,omitempty"` + MinLength *int64 `json:"minLength,omitempty"` + MaxLength *int64 `json:"maxLength,omitempty"` + Min *int64 `json:"min,omitempty"` + Max *int64 `json:"max,omitempty"` + Options []string `json:"options,omitempty"` + ValidChars string `json:"validChars,omitempty"` + InvalidChars string `json:"invalidChars,omitempty"` + Description string `json:"description,omitempty"` +} + +type Action struct { + Input string `json:"input,omitempty"` + Output string `json:"output,omitempty"` +} + +type Filter struct { + Modifiers []string `json:"modifiers,omitempty"` +} + +type ListOpts struct { + Filters map[string]interface{} +} diff --git a/vendor/github.com/rancher/go-rancher/main.go b/vendor/github.com/rancher/go-rancher/main.go new file mode 100644 index 000000000000..e8274c8a1b10 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/main.go @@ -0,0 +1,10 @@ +package main + +import ( + "fmt" + _ "github.com/rancher/go-rancher/client" +) + +func main() { + fmt.Println("I have nothing to do...") +} diff --git a/vendor/github.com/rancher/go-rancher/schemas.json b/vendor/github.com/rancher/go-rancher/schemas.json new file mode 100644 index 000000000000..40e810e46ee0 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/schemas.json @@ -0,0 +1,25862 @@ +{ + "type": "collection", + "resourceType": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas" + }, + "createTypes": {}, + "actions": {}, + "data": [ + { + "id": "schema", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/schema", + "collection": "http://localhost:8080/v1/schemas" + }, + "actions": {}, + "pluralName": "schemas", + "resourceFields": { + "collectionActions": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "collectionFields": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "collectionFilters": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "collectionMethods": { + "type": "array[string]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "includeableLinks": { + "type": "array[string]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "pluralName": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "resourceActions": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "resourceFields": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "resourceMethods": { + "type": "array[string]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "GET" + ] + }, + { + "id": "subscribe", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/subscribe", + "collection": "http://localhost:8080/v1/subscribe" + }, + "actions": {}, + "pluralName": "subscribe", + "resourceFields": { + "agentId": { + "type": "reference[agent]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "eventNames": { + "type": "array[string]", + "validChars": "*._0-9a-zA-Z;=", + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": 1, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "eventNames": { + "modifiers": [ + "eq" + ] + } + }, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "GET", + "POST" + ] + }, + { + "id": "publish", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/publish" + }, + "actions": {}, + "pluralName": "publish", + "resourceFields": { + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "id": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": true, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "previousIds": { + "type": "array[string]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "publisher": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "resourceId": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "resourceType": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "time": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioning": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningInternalMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "POST" + ] + }, + { + "id": "restartPolicy", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/restartpolicy" + }, + "actions": {}, + "pluralName": "restartPolicys", + "resourceFields": { + "maximumRetryCount": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "POST" + ] + }, + { + "id": "loadBalancerHealthCheck", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/loadbalancerhealthcheck" + }, + "actions": {}, + "pluralName": "loadBalancerHealthChecks", + "resourceFields": { + "healthyThreshold": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "interval": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "requestLine": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "responseTimeout": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "unhealthyThreshold": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET", + "PUT" + ], + "collectionMethods": [ + "POST" + ] + }, + { + "id": "loadBalancerCookieStickinessPolicy", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/loadbalancercookiestickinesspolicy" + }, + "actions": {}, + "pluralName": "loadBalancerCookieStickinessPolicys", + "resourceFields": { + "cookie": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "domain": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "indirect": { + "type": "boolean", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "mode": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "rewrite", + "insert", + "prefix" + ], + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "nocache": { + "type": "boolean", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "postonly": { + "type": "boolean", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET", + "PUT" + ], + "collectionMethods": [ + "POST" + ] + }, + { + "id": "loadBalancerAppCookieStickinessPolicy", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/loadbalancerappcookiestickinesspolicy" + }, + "actions": {}, + "pluralName": "loadBalancerAppCookieStickinessPolicys", + "resourceFields": { + "cookie": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": false, + "unique": false, + "required": true, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "maxLength": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": true, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "mode": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "path_parameters", + "query_string" + ], + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "prefix": { + "type": "boolean", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "requestLearn": { + "type": "boolean", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "timeout": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": true, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET", + "PUT" + ], + "collectionMethods": [ + "POST" + ] + }, + { + "id": "globalLoadBalancerPolicy", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/globalloadbalancerpolicy" + }, + "actions": {}, + "pluralName": "globalLoadBalancerPolicys", + "resourceFields": { + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "POST" + ] + }, + { + "id": "globalLoadBalancerHealthCheck", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/globalloadbalancerhealthcheck" + }, + "actions": {}, + "pluralName": "globalLoadBalancerHealthChecks", + "resourceFields": { + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "POST" + ] + }, + { + "id": "externalHandlerProcessConfig", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/externalhandlerprocessconfig" + }, + "actions": {}, + "pluralName": "externalHandlerProcessConfigs", + "resourceFields": { + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "onError": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "POST" + ] + }, + { + "id": "composeConfig", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/composeconfig" + }, + "actions": {}, + "pluralName": "composeConfigs", + "resourceFields": { + "dockerComposeConfig": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "rancherComposeConfig": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [] + }, + { + "id": "addLoadBalancerInput", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/addloadbalancerinput" + }, + "actions": {}, + "pluralName": "addLoadBalancerInputs", + "resourceFields": { + "loadBalancerId": { + "type": "reference[loadBalancer]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": true, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "weight": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": true, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "POST" + ] + }, + { + "id": "addRemoveClusterHostInput", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/addremoveclusterhostinput" + }, + "actions": {}, + "pluralName": "addRemoveClusterHostInputs", + "resourceFields": { + "hostId": { + "type": "reference[host]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "POST" + ] + }, + { + "id": "addRemoveLoadBalancerHostInput", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/addremoveloadbalancerhostinput" + }, + "actions": {}, + "pluralName": "addRemoveLoadBalancerHostInputs", + "resourceFields": { + "hostId": { + "type": "reference[host]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": true, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "POST" + ] + }, + { + "id": "addRemoveLoadBalancerListenerInput", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/addremoveloadbalancerlistenerinput" + }, + "actions": {}, + "pluralName": "addRemoveLoadBalancerListenerInputs", + "resourceFields": { + "loadBalancerListenerId": { + "type": "reference[loadBalancerListener]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": true, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "POST" + ] + }, + { + "id": "addRemoveLoadBalancerTargetInput", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/addremoveloadbalancertargetinput" + }, + "actions": {}, + "pluralName": "addRemoveLoadBalancerTargetInputs", + "resourceFields": { + "instanceId": { + "type": "reference[instance]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "ipAddress": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "POST" + ] + }, + { + "id": "addRemoveServiceLinkInput", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/addremoveservicelinkinput" + }, + "actions": {}, + "pluralName": "addRemoveServiceLinkInputs", + "resourceFields": { + "serviceId": { + "type": "reference[service]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": true, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "POST" + ] + }, + { + "id": "addLabelInput", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/addlabelinput" + }, + "actions": {}, + "pluralName": "addLabelInputs", + "resourceFields": { + "key": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "value": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "POST" + ] + }, + { + "id": "removeLabelInput", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/removelabelinput" + }, + "actions": {}, + "pluralName": "removeLabelInputs", + "resourceFields": { + "label": { + "type": "reference[label]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "POST" + ] + }, + { + "id": "apiKey", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/apikey", + "collection": "http://localhost:8080/v1/apikeys" + }, + "actions": {}, + "pluralName": "apiKeys", + "resourceFields": { + "accountId": { + "type": "reference[account]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "publicValue": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 4096, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "secretValue": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 4096, + "options": null, + "default": null + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "activating", + "active", + "deactivating", + "inactive", + "purged", + "purging", + "registering", + "removed", + "removing", + "requested", + "restoring", + "updating-active", + "updating-inactive" + ], + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + } + }, + "collectionFilters": { + "accountId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "publicValue": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "registryId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "secretValue": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "images", + "account", + "instances" + ], + "resourceActions": { + "update": { + "input": null, + "output": "credential" + }, + "activate": { + "input": null, + "output": "credential" + }, + "remove": { + "input": null, + "output": "credential" + }, + "restore": { + "input": null, + "output": "credential" + }, + "deactivate": { + "input": null, + "output": "credential" + }, + "create": { + "input": null, + "output": "credential" + }, + "purge": { + "input": null, + "output": "credential" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET", + "PUT", + "DELETE" + ], + "collectionMethods": [ + "GET", + "POST" + ] + }, + { + "id": "cluster", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/cluster", + "collection": "http://localhost:8080/v1/clusters" + }, + "actions": {}, + "pluralName": "clusters", + "resourceFields": { + "accountId": { + "type": "reference[account]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "agentId": { + "type": "reference[agent]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "apiProxy": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "computeTotal": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "info": { + "type": "json", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "physicalHostId": { + "type": "reference[physicalHost]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "activating", + "active", + "deactivating", + "inactive", + "purged", + "purging", + "registering", + "removed", + "removing", + "requested", + "restoring", + "updating-active", + "updating-inactive" + ], + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "discoverySpec": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "port": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "accountId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "agentId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "computeFree": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "computeTotal": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "isPublic": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "physicalHostId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "uri": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "ipaddresses", + "storagepools", + "clusters", + "physicalhost", + "labels", + "hosts", + "containerevents", + "account", + "loadbalancerhostmaps", + "instances", + "agent", + "loadbalancers" + ], + "resourceActions": { + "update": { + "input": null, + "output": "host" + }, + "activate": { + "input": null, + "output": "host" + }, + "remove": { + "input": null, + "output": "host" + }, + "restore": { + "input": null, + "output": "host" + }, + "removelabel": { + "input": "removeLabelInput", + "output": "host" + }, + "addlabel": { + "input": "addLabelInput", + "output": "host" + }, + "deactivate": { + "input": null, + "output": "host" + }, + "create": { + "input": null, + "output": "host" + }, + "purge": { + "input": null, + "output": "host" + }, + "addhost": { + "input": "addRemoveClusterHostInput", + "output": "cluster" + }, + "removehost": { + "input": "addRemoveClusterHostInput", + "output": "cluster" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET", + "PUT", + "DELETE" + ], + "collectionMethods": [ + "GET", + "POST" + ] + }, + { + "id": "composeConfigInput", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/composeconfiginput" + }, + "actions": {}, + "pluralName": "composeConfigInputs", + "resourceFields": { + "serviceIds": { + "type": "array[reference[service]]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "POST" + ] + }, + { + "id": "container", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/container", + "collection": "http://localhost:8080/v1/containers" + }, + "actions": {}, + "pluralName": "containers", + "resourceFields": { + "accountId": { + "type": "reference[account]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "agentId": { + "type": "reference[agent]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "allocationState": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "count": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "externalId": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "firstRunning": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "hostname": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": 1, + "maxLength": 255, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "imageUuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "nativeContainer": { + "type": "boolean", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "networkIds": { + "type": "array[reference[network]]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "ports": { + "type": "array[string]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "primaryIpAddress": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "registryCredentialId": { + "type": "reference[registryCredential]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "requestedHostId": { + "type": "reference[host]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "startOnCreate": { + "type": "boolean", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": true + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "creating", + "migrating", + "purged", + "purging", + "removed", + "removing", + "requested", + "restarting", + "restoring", + "running", + "starting", + "stopped", + "stopping", + "updating-running", + "updating-stopped" + ], + "default": null + }, + "systemContainer": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "NetworkAgent", + "LoadBalancerAgent" + ], + "default": null + }, + "token": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "environment": { + "type": "map[string]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "command": { + "type": "array[string]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "directory": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": 1, + "maxLength": null, + "options": null, + "default": null + }, + "user": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": 1, + "maxLength": null, + "options": null, + "default": null + }, + "publishAllPorts": { + "type": "boolean", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": false + }, + "privileged": { + "type": "boolean", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": false + }, + "capAdd": { + "type": "array[enum]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "ALL", + "AUDIT_CONTROL", + "AUDIT_WRITE", + "BLOCK_SUSPEND", + "CHOWN", + "DAC_OVERRIDE", + "DAC_READ_SEARCH", + "FOWNER", + "FSETID", + "IPC_LOCK", + "IPC_OWNER", + "KILL", + "LEASE", + "LINUX_IMMUTABLE", + "MAC_ADMIN", + "MAC_OVERRIDE", + "MKNOD", + "NET_ADMIN", + "NET_BIND_SERVICE", + "NET_BROADCAST", + "NET_RAW", + "SETFCAP", + "SETGID", + "SETPCAP", + "SETUID", + "SYSLOG", + "SYS_ADMIN", + "SYS_BOOT", + "SYS_CHROOT", + "SYS_MODULE", + "SYS_NICE", + "SYS_PACCT", + "SYS_PTRACE", + "SYS_RAWIO", + "SYS_RESOURCE", + "SYS_TIME", + "SYS_TTY_CONFIG", + "WAKE_ALARM" + ], + "default": null + }, + "capDrop": { + "type": "array[enum]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "ALL", + "AUDIT_CONTROL", + "AUDIT_WRITE", + "BLOCK_SUSPEND", + "CHOWN", + "DAC_OVERRIDE", + "DAC_READ_SEARCH", + "FOWNER", + "FSETID", + "IPC_LOCK", + "IPC_OWNER", + "KILL", + "LEASE", + "LINUX_IMMUTABLE", + "MAC_ADMIN", + "MAC_OVERRIDE", + "MKNOD", + "NET_ADMIN", + "NET_BIND_SERVICE", + "NET_BROADCAST", + "NET_RAW", + "SETFCAP", + "SETGID", + "SETPCAP", + "SETUID", + "SYSLOG", + "SYS_ADMIN", + "SYS_BOOT", + "SYS_CHROOT", + "SYS_MODULE", + "SYS_NICE", + "SYS_PACCT", + "SYS_PTRACE", + "SYS_RAWIO", + "SYS_RESOURCE", + "SYS_TIME", + "SYS_TTY_CONFIG", + "WAKE_ALARM" + ], + "default": null + }, + "dns": { + "type": "array[string]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "dnsSearch": { + "type": "array[string]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "instanceLinks": { + "type": "map[reference[instance]]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "domainName": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "memorySwap": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "memory": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "cpuSet": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "cpuShares": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "stdinOpen": { + "type": "boolean", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": false + }, + "tty": { + "type": "boolean", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": false + }, + "entryPoint": { + "type": "array[string]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "lxcConf": { + "type": "map[string]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "restartPolicy": { + "type": "restartPolicy", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "devices": { + "type": "array[string]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "labels": { + "type": "map[string]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "dataVolumes": { + "type": "array[string]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "dataVolumesFrom": { + "type": "array[reference[container]]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "accountId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "agentId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "allocationState": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "compute": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "domain": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "externalId": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "firstRunning": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "hostname": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "imageId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "instanceTriggeredStop": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "memoryMb": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "nativeContainer": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "offeringId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "registryCredentialId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "systemContainer": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "token": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "userdata": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "zoneId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "services", + "instancelinks", + "loadbalancertargets", + "volumes", + "targetinstancelinks", + "agent", + "registrycredential", + "instancelabels", + "ports", + "mounts", + "hosts", + "account", + "credentials" + ], + "resourceActions": { + "update": { + "input": null, + "output": "instance" + }, + "stop": { + "input": "instanceStop", + "output": "instance" + }, + "console": { + "input": "instanceConsoleInput", + "output": "instanceConsole" + }, + "restart": { + "input": null, + "output": "instance" + }, + "remove": { + "input": null, + "output": "instance" + }, + "start": { + "input": null, + "output": "instance" + }, + "restore": { + "input": null, + "output": "instance" + }, + "migrate": { + "input": null, + "output": "instance" + }, + "deallocate": { + "input": null, + "output": "instance" + }, + "allocate": { + "input": null, + "output": "instance" + }, + "create": { + "input": null, + "output": "instance" + }, + "purge": { + "input": null, + "output": "instance" + }, + "logs": { + "input": "containerLogs", + "output": "hostAccess" + }, + "addlabel": { + "input": "addLabelInput", + "output": "container" + }, + "removelabel": { + "input": "removeLabelInput", + "output": "container" + }, + "execute": { + "input": "containerExec", + "output": "hostAccess" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET", + "PUT", + "DELETE" + ], + "collectionMethods": [ + "GET", + "POST" + ] + }, + { + "id": "instanceConsole", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/instanceconsole" + }, + "actions": {}, + "pluralName": "instanceConsoles", + "resourceFields": { + "url": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "password": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [] + }, + { + "id": "instanceConsoleInput", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/instanceconsoleinput" + }, + "actions": {}, + "pluralName": "instanceConsoleInputs", + "resourceFields": {}, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [] + }, + { + "id": "instanceStop", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/instancestop" + }, + "actions": {}, + "pluralName": "instanceStops", + "resourceFields": { + "remove": { + "type": "boolean", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "timeout": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "deallocateFromHost": { + "type": "boolean", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "POST" + ] + }, + { + "id": "ipAddressAssociateInput", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/ipaddressassociateinput" + }, + "actions": {}, + "pluralName": "ipAddressAssociateInputs", + "resourceFields": { + "ipAddressId": { + "type": "reference[ipAddress]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "POST" + ] + }, + { + "id": "project", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/project", + "collection": "http://localhost:8080/v1/projects" + }, + "actions": {}, + "pluralName": "projects", + "resourceFields": { + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "activating", + "active", + "deactivating", + "inactive", + "purged", + "purging", + "registering", + "removed", + "removing", + "requested", + "restoring", + "updating-active", + "updating-inactive" + ], + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "members": { + "type": "array[projectMember]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "externalId": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "externalIdType": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "networks", + "services", + "storagepools", + "agents", + "globalloadbalancers", + "labels", + "loadbalancertargets", + "environments", + "instancelinks", + "containerevents", + "loadbalancerhostmaps", + "volumes", + "instances", + "loadbalancers", + "loadbalancerconfiglistenermaps", + "ports", + "ipaddresses", + "mounts", + "loadbalancerlisteners", + "loadbalancerconfigs", + "projectmembers", + "physicalhosts", + "hosts", + "images", + "credentials", + "snapshots", + "certificates" + ], + "resourceActions": { + "update": { + "input": null, + "output": "account" + }, + "activate": { + "input": null, + "output": "account" + }, + "remove": { + "input": null, + "output": "account" + }, + "restore": { + "input": null, + "output": "account" + }, + "deactivate": { + "input": null, + "output": "account" + }, + "create": { + "input": null, + "output": "account" + }, + "purge": { + "input": null, + "output": "account" + }, + "setmembers": { + "input": "setProjectMembersInput", + "output": "setProjectMembersInput" + }, + "delete": { + "input": null, + "output": null + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "GET" + ] + }, + { + "id": "registry", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/registry", + "collection": "http://localhost:8080/v1/registries" + }, + "actions": {}, + "pluralName": "registries", + "resourceFields": { + "accountId": { + "type": "reference[account]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "activating", + "active", + "deactivating", + "inactive", + "purged", + "purging", + "registering", + "removed", + "removing", + "requested", + "restoring", + "updating-active", + "updating-inactive" + ], + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "serverAddress": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": true, + "min": null, + "max": null, + "minLength": 1, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "accountId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "agentId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "external": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "physicalTotalSizeMb": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "virtualTotalSizeMb": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "zoneId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "hosts", + "images", + "account", + "credentials", + "volumes", + "snapshots" + ], + "resourceActions": { + "update": { + "input": null, + "output": "storagePool" + }, + "activate": { + "input": null, + "output": "storagePool" + }, + "remove": { + "input": null, + "output": "storagePool" + }, + "restore": { + "input": null, + "output": "storagePool" + }, + "deactivate": { + "input": null, + "output": "storagePool" + }, + "create": { + "input": null, + "output": "storagePool" + }, + "purge": { + "input": null, + "output": "storagePool" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET", + "PUT", + "DELETE" + ], + "collectionMethods": [ + "GET", + "POST" + ] + }, + { + "id": "registryCredential", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/registrycredential", + "collection": "http://localhost:8080/v1/registrycredentials" + }, + "actions": {}, + "pluralName": "registryCredentials", + "resourceFields": { + "accountId": { + "type": "reference[account]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "publicValue": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 4096, + "options": null, + "default": null + }, + "registryId": { + "type": "reference[registry]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": true, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "secretValue": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 4096, + "options": null, + "default": null + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "activating", + "active", + "deactivating", + "inactive", + "purged", + "purging", + "registering", + "removed", + "removing", + "requested", + "restoring", + "updating-active", + "updating-inactive" + ], + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "email": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": false, + "unique": false, + "required": true, + "min": null, + "max": null, + "minLength": 1, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "accountId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "publicValue": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "registryId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "secretValue": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "images", + "account", + "registry", + "instances" + ], + "resourceActions": { + "update": { + "input": null, + "output": "credential" + }, + "activate": { + "input": null, + "output": "credential" + }, + "remove": { + "input": null, + "output": "credential" + }, + "restore": { + "input": null, + "output": "credential" + }, + "deactivate": { + "input": null, + "output": "credential" + }, + "create": { + "input": null, + "output": "credential" + }, + "purge": { + "input": null, + "output": "credential" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET", + "PUT", + "DELETE" + ], + "collectionMethods": [ + "GET", + "POST" + ] + }, + { + "id": "removeLoadBalancerInput", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/removeloadbalancerinput" + }, + "actions": {}, + "pluralName": "removeLoadBalancerInputs", + "resourceFields": { + "loadBalancerId": { + "type": "reference[loadBalancer]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": true, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "POST" + ] + }, + { + "id": "setLoadBalancerHostsInput", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/setloadbalancerhostsinput" + }, + "actions": {}, + "pluralName": "setLoadBalancerHostsInputs", + "resourceFields": { + "hostIds": { + "type": "array[reference[host]]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "POST" + ] + }, + { + "id": "setLoadBalancerListenersInput", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/setloadbalancerlistenersinput" + }, + "actions": {}, + "pluralName": "setLoadBalancerListenersInputs", + "resourceFields": { + "loadBalancerListenerIds": { + "type": "array[reference[loadBalancerListener]]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "POST" + ] + }, + { + "id": "setLoadBalancerTargetsInput", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/setloadbalancertargetsinput" + }, + "actions": {}, + "pluralName": "setLoadBalancerTargetsInputs", + "resourceFields": { + "instanceIds": { + "type": "array[reference[instance]]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "ipAddresses": { + "type": "array[string]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "POST" + ] + }, + { + "id": "setProjectMembersInput", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/setprojectmembersinput" + }, + "actions": {}, + "pluralName": "setProjectMembersInputs", + "resourceFields": { + "members": { + "type": "array[projectMember]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": true, + "min": null, + "max": null, + "minLength": 1, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "POST" + ] + }, + { + "id": "setServiceLinksInput", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/setservicelinksinput" + }, + "actions": {}, + "pluralName": "setServiceLinksInputs", + "resourceFields": { + "serviceIds": { + "type": "array[reference[service]]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "POST" + ] + }, + { + "id": "loadBalancerService", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/loadbalancerservice", + "collection": "http://localhost:8080/v1/loadbalancerservices" + }, + "actions": {}, + "pluralName": "loadBalancerServices", + "resourceFields": { + "accountId": { + "type": "reference[account]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "dataVolumesFromService": { + "type": "array[reference[service]]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "environmentId": { + "type": "reference[environment]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": true, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "launchConfig": { + "type": "container", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": true, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": "[a-zA-Z0-9]-", + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": true, + "min": null, + "max": null, + "minLength": 1, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "scale": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": 1 + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "activating", + "active", + "deactivating", + "inactive", + "registering", + "removed", + "removing", + "requested", + "updating-active", + "updating-inactive" + ], + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "loadBalancerConfig": { + "type": "loadBalancerConfig", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "accountId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "environmentId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "loadbalancerlisteners", + "environment", + "loadbalancerconfigs", + "consumedservices", + "account", + "instances", + "consumedbyservices", + "loadbalancers" + ], + "resourceActions": { + "update": { + "input": null, + "output": "service" + }, + "activate": { + "input": null, + "output": "service" + }, + "remove": { + "input": null, + "output": "service" + }, + "setservicelinks": { + "input": "setServiceLinksInput", + "output": "service" + }, + "removeservicelink": { + "input": "addRemoveServiceLinkInput", + "output": "service" + }, + "addservicelink": { + "input": "addRemoveServiceLinkInput", + "output": "service" + }, + "deactivate": { + "input": null, + "output": "service" + }, + "create": { + "input": null, + "output": "service" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET", + "PUT", + "DELETE" + ], + "collectionMethods": [ + "GET", + "POST" + ] + }, + { + "id": "account", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/account", + "collection": "http://localhost:8080/v1/accounts" + }, + "actions": {}, + "pluralName": "accounts", + "resourceFields": { + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "externalId": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "externalIdType": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "activating", + "active", + "deactivating", + "inactive", + "purged", + "purging", + "registering", + "removed", + "removing", + "requested", + "restoring", + "updating-active", + "updating-inactive" + ], + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "externalId": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "externalIdType": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "networks", + "services", + "storagepools", + "agents", + "globalloadbalancers", + "labels", + "loadbalancertargets", + "environments", + "instancelinks", + "containerevents", + "loadbalancerhostmaps", + "volumes", + "instances", + "loadbalancers", + "loadbalancerconfiglistenermaps", + "ports", + "ipaddresses", + "mounts", + "loadbalancerlisteners", + "loadbalancerconfigs", + "projectmembers", + "physicalhosts", + "hosts", + "images", + "credentials", + "snapshots", + "certificates" + ], + "resourceActions": { + "update": { + "input": null, + "output": "account" + }, + "activate": { + "input": null, + "output": "account" + }, + "remove": { + "input": null, + "output": "account" + }, + "restore": { + "input": null, + "output": "account" + }, + "deactivate": { + "input": null, + "output": "account" + }, + "create": { + "input": null, + "output": "account" + }, + "purge": { + "input": null, + "output": "account" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET", + "PUT", + "DELETE" + ], + "collectionMethods": [ + "GET", + "POST" + ] + }, + { + "id": "agent", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/agent", + "collection": "http://localhost:8080/v1/agents" + }, + "actions": {}, + "pluralName": "agents", + "resourceFields": { + "accountId": { + "type": "reference[account]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "managedConfig": { + "type": "boolean", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": true + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "activating", + "active", + "deactivating", + "inactive", + "purged", + "purging", + "reconnecting", + "registering", + "removed", + "removing", + "requested", + "restoring", + "updating-active", + "updating-inactive" + ], + "default": null + }, + "uri": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": true, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "accountId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "agentGroupId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "managedConfig": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "uri": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "zoneId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "storagepools", + "configitemstatuses", + "physicalhosts", + "hosts", + "account", + "instances" + ], + "resourceActions": { + "update": { + "input": null, + "output": "agent" + }, + "activate": { + "input": null, + "output": "agent" + }, + "remove": { + "input": null, + "output": "agent" + }, + "reconnect": { + "input": null, + "output": "agent" + }, + "restore": { + "input": null, + "output": "agent" + }, + "deactivate": { + "input": null, + "output": "agent" + }, + "create": { + "input": null, + "output": "agent" + }, + "purge": { + "input": null, + "output": "agent" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "GET" + ] + }, + { + "id": "certificate", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/certificate", + "collection": "http://localhost:8080/v1/certificates" + }, + "actions": {}, + "pluralName": "certificates", + "resourceFields": { + "accountId": { + "type": "reference[account]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "cert": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "certChain": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "key": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "state": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + } + }, + "collectionFilters": { + "accountId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "cert": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "certChain": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "key": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "account" + ], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET", + "PUT", + "DELETE" + ], + "collectionMethods": [ + "GET", + "POST" + ] + }, + { + "id": "configItem", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/configitem", + "collection": "http://localhost:8080/v1/configitems" + }, + "actions": {}, + "pluralName": "configItems", + "resourceFields": { + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "sourceVersion": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + } + }, + "collectionFilters": { + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "sourceVersion": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + } + }, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "GET" + ] + }, + { + "id": "configItemStatus", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/configitemstatus", + "collection": "http://localhost:8080/v1/configitemstatuses" + }, + "actions": {}, + "pluralName": "configItemStatuses", + "resourceFields": { + "agentId": { + "type": "reference[agent]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "appliedUpdated": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "appliedVersion": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": true, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "requestedUpdated": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "requestedVersion": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "sourceVersion": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + } + }, + "collectionFilters": { + "agentId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "appliedUpdated": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "appliedVersion": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "requestedUpdated": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "requestedVersion": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "sourceVersion": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "agent" + ], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET", + "PUT" + ], + "collectionMethods": [ + "GET" + ] + }, + { + "id": "containerEvent", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/containerevent", + "collection": "http://localhost:8080/v1/containerevents" + }, + "actions": {}, + "pluralName": "containerEvents", + "resourceFields": { + "accountId": { + "type": "reference[account]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "externalFrom": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "externalId": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "externalStatus": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "externalTimestamp": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "hostId": { + "type": "reference[host]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "reportedHostUuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "created", + "creating", + "removed", + "removing", + "requested" + ], + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "dockerInspect": { + "type": "json", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "accountId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "externalFrom": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "externalId": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "externalStatus": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "externalTimestamp": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "hostId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "reportedHostUuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "host", + "account" + ], + "resourceActions": { + "remove": { + "input": null, + "output": "containerEvent" + }, + "create": { + "input": null, + "output": "containerEvent" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "GET" + ] + }, + { + "id": "credential", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/credential", + "collection": "http://localhost:8080/v1/credentials" + }, + "actions": {}, + "pluralName": "credentials", + "resourceFields": { + "accountId": { + "type": "reference[account]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "publicValue": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 4096, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "secretValue": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 4096, + "options": null, + "default": null + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "activating", + "active", + "deactivating", + "inactive", + "purged", + "purging", + "registering", + "removed", + "removing", + "requested", + "restoring", + "updating-active", + "updating-inactive" + ], + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "accountId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "publicValue": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "registryId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "secretValue": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "images", + "account", + "instances" + ], + "resourceActions": { + "update": { + "input": null, + "output": "credential" + }, + "activate": { + "input": null, + "output": "credential" + }, + "remove": { + "input": null, + "output": "credential" + }, + "restore": { + "input": null, + "output": "credential" + }, + "deactivate": { + "input": null, + "output": "credential" + }, + "create": { + "input": null, + "output": "credential" + }, + "purge": { + "input": null, + "output": "credential" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "GET", + "POST" + ] + }, + { + "id": "databasechangelog", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/databasechangelog", + "collection": "http://localhost:8080/v1/databasechangelogs" + }, + "actions": {}, + "pluralName": "databasechangelogs", + "resourceFields": { + "author": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "comments": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "dateexecuted": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "exectype": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 10, + "options": null, + "default": null + }, + "filename": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "id": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "liquibase": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 20, + "options": null, + "default": null + }, + "md5sum": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 35, + "options": null, + "default": null + }, + "orderexecuted": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "tag": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + } + }, + "collectionFilters": { + "author": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "comments": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "dateexecuted": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "exectype": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "filename": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "liquibase": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "md5sum": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "orderexecuted": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "tag": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + } + }, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET", + "DELETE" + ], + "collectionMethods": [ + "GET" + ] + }, + { + "id": "databasechangeloglock", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/databasechangeloglock", + "collection": "http://localhost:8080/v1/databasechangeloglocks" + }, + "actions": {}, + "pluralName": "databasechangeloglocks", + "resourceFields": { + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "locked": { + "type": "boolean", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "lockedby": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "lockgranted": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + } + }, + "collectionFilters": { + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "locked": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "lockedby": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "lockgranted": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + } + }, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET", + "DELETE" + ], + "collectionMethods": [ + "GET" + ] + }, + { + "id": "environment", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/environment", + "collection": "http://localhost:8080/v1/environments" + }, + "actions": {}, + "pluralName": "environments", + "resourceFields": { + "accountId": { + "type": "reference[account]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": "[a-zA-Z0-9-]", + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": true, + "min": null, + "max": null, + "minLength": 1, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "activating", + "active", + "removed", + "removing", + "requested", + "updating-active" + ], + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "accountId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "services", + "account" + ], + "resourceActions": { + "update": { + "input": null, + "output": "environment" + }, + "remove": { + "input": null, + "output": "environment" + }, + "activateservices": { + "input": null, + "output": null + }, + "deactivateservices": { + "input": null, + "output": null + }, + "create": { + "input": null, + "output": "environment" + }, + "exportconfig": { + "input": "composeConfigInput", + "output": "composeConfig" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET", + "PUT", + "DELETE" + ], + "collectionMethods": [ + "GET", + "POST" + ] + }, + { + "id": "externalHandler", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/externalhandler", + "collection": "http://localhost:8080/v1/externalhandlers" + }, + "actions": {}, + "pluralName": "externalHandlers", + "resourceFields": { + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "priority": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "activating", + "active", + "deactivating", + "inactive", + "purged", + "purging", + "registering", + "removed", + "removing", + "requested", + "restoring", + "updating-active", + "updating-inactive" + ], + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "processConfigs": { + "type": "array[externalHandlerProcessConfig]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": true, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "retries": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": 1, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "timeoutMillis": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": 1000, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "priority": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "externalhandlerexternalhandlerprocessmaps", + "externalhandlerprocesses" + ], + "resourceActions": { + "update": { + "input": null, + "output": "externalHandler" + }, + "activate": { + "input": null, + "output": "externalHandler" + }, + "remove": { + "input": null, + "output": "externalHandler" + }, + "restore": { + "input": null, + "output": "externalHandler" + }, + "deactivate": { + "input": null, + "output": "externalHandler" + }, + "create": { + "input": null, + "output": "externalHandler" + }, + "purge": { + "input": null, + "output": "externalHandler" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET", + "PUT" + ], + "collectionMethods": [ + "GET", + "POST" + ] + }, + { + "id": "externalHandlerExternalHandlerProcessMap", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/externalhandlerexternalhandlerprocessmap", + "collection": "http://localhost:8080/v1/externalhandlerexternalhandlerprocessmaps" + }, + "actions": {}, + "pluralName": "externalHandlerExternalHandlerProcessMaps", + "resourceFields": { + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "externalHandlerId": { + "type": "reference[externalHandler]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "externalHandlerProcessId": { + "type": "reference[externalHandlerProcess]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "onError": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "activating", + "active", + "deactivating", + "inactive", + "purged", + "purging", + "registering", + "removed", + "removing", + "requested", + "restoring", + "updating-active", + "updating-inactive" + ], + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "externalHandlerId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "externalHandlerProcessId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "onError": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "externalhandler", + "externalhandlerprocess" + ], + "resourceActions": { + "update": { + "input": null, + "output": "externalHandlerExternalHandlerProcessMap" + }, + "activate": { + "input": null, + "output": "externalHandlerExternalHandlerProcessMap" + }, + "remove": { + "input": null, + "output": "externalHandlerExternalHandlerProcessMap" + }, + "restore": { + "input": null, + "output": "externalHandlerExternalHandlerProcessMap" + }, + "deactivate": { + "input": null, + "output": "externalHandlerExternalHandlerProcessMap" + }, + "create": { + "input": null, + "output": "externalHandlerExternalHandlerProcessMap" + }, + "purge": { + "input": null, + "output": "externalHandlerExternalHandlerProcessMap" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "GET" + ] + }, + { + "id": "externalHandlerProcess", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/externalhandlerprocess", + "collection": "http://localhost:8080/v1/externalhandlerprocesses" + }, + "actions": {}, + "pluralName": "externalHandlerProcesses", + "resourceFields": { + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "activating", + "active", + "deactivating", + "inactive", + "purged", + "purging", + "registering", + "removed", + "removing", + "requested", + "restoring", + "updating-active", + "updating-inactive" + ], + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "externalhandlerexternalhandlerprocessmaps", + "externalhandlers" + ], + "resourceActions": { + "update": { + "input": null, + "output": "externalHandlerProcess" + }, + "activate": { + "input": null, + "output": "externalHandlerProcess" + }, + "remove": { + "input": null, + "output": "externalHandlerProcess" + }, + "restore": { + "input": null, + "output": "externalHandlerProcess" + }, + "deactivate": { + "input": null, + "output": "externalHandlerProcess" + }, + "create": { + "input": null, + "output": "externalHandlerProcess" + }, + "purge": { + "input": null, + "output": "externalHandlerProcess" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "GET" + ] + }, + { + "id": "globalLoadBalancer", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/globalloadbalancer", + "collection": "http://localhost:8080/v1/globalloadbalancers" + }, + "actions": {}, + "pluralName": "globalLoadBalancers", + "resourceFields": { + "accountId": { + "type": "reference[account]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "activating", + "active", + "removed", + "removing", + "requested", + "updating-active" + ], + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "globalLoadBalancerHealthCheck": { + "type": "array[globalLoadBalancerHealthCheck]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "globalLoadBalancerPolicy": { + "type": "array[globalLoadBalancerPolicy]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "accountId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "account", + "loadbalancers" + ], + "resourceActions": { + "remove": { + "input": null, + "output": "globalLoadBalancer" + }, + "addloadbalancer": { + "input": "addLoadBalancerInput", + "output": "globalLoadBalancer" + }, + "removeloadbalancer": { + "input": "removeLoadBalancerInput", + "output": "globalLoadBalancer" + }, + "create": { + "input": null, + "output": "globalLoadBalancer" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET", + "PUT", + "DELETE" + ], + "collectionMethods": [ + "GET", + "POST" + ] + }, + { + "id": "host", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/host", + "collection": "http://localhost:8080/v1/hosts" + }, + "actions": {}, + "pluralName": "hosts", + "resourceFields": { + "accountId": { + "type": "reference[account]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "agentId": { + "type": "reference[agent]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "computeTotal": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "physicalHostId": { + "type": "reference[physicalHost]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "activating", + "active", + "deactivating", + "inactive", + "purged", + "purging", + "registering", + "removed", + "removing", + "requested", + "restoring", + "updating-active", + "updating-inactive" + ], + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "info": { + "type": "json", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "apiProxy": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "accountId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "agentId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "computeFree": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "computeTotal": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "isPublic": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "physicalHostId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "uri": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "ipaddresses", + "storagepools", + "clusters", + "physicalhost", + "labels", + "hosts", + "containerevents", + "account", + "loadbalancerhostmaps", + "instances", + "agent", + "loadbalancers" + ], + "resourceActions": { + "update": { + "input": null, + "output": "host" + }, + "activate": { + "input": null, + "output": "host" + }, + "remove": { + "input": null, + "output": "host" + }, + "restore": { + "input": null, + "output": "host" + }, + "removelabel": { + "input": "removeLabelInput", + "output": "host" + }, + "addlabel": { + "input": "addLabelInput", + "output": "host" + }, + "deactivate": { + "input": null, + "output": "host" + }, + "create": { + "input": null, + "output": "host" + }, + "purge": { + "input": null, + "output": "host" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET", + "PUT", + "DELETE" + ], + "collectionMethods": [ + "GET" + ] + }, + { + "id": "image", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/image", + "collection": "http://localhost:8080/v1/images" + }, + "actions": {}, + "pluralName": "images", + "resourceFields": { + "accountId": { + "type": "reference[account]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "activating", + "active", + "deactivating", + "inactive", + "purged", + "purging", + "registering", + "removed", + "removing", + "requested", + "restoring", + "updating-active", + "updating-inactive" + ], + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "accountId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "checksum": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "format": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "instanceKind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "isPublic": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "physicalSizeMb": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "registryCredentialId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "url": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "virtualSizeMb": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "storagepools", + "account", + "volumes", + "instances" + ], + "resourceActions": { + "update": { + "input": null, + "output": "image" + }, + "activate": { + "input": null, + "output": "image" + }, + "remove": { + "input": null, + "output": "image" + }, + "restore": { + "input": null, + "output": "image" + }, + "deactivate": { + "input": null, + "output": "image" + }, + "create": { + "input": null, + "output": "image" + }, + "purge": { + "input": null, + "output": "image" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "GET" + ] + }, + { + "id": "instance", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/instance", + "collection": "http://localhost:8080/v1/instances" + }, + "actions": {}, + "pluralName": "instances", + "resourceFields": { + "accountId": { + "type": "reference[account]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "externalId": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "creating", + "migrating", + "purged", + "purging", + "removed", + "removing", + "requested", + "restarting", + "restoring", + "running", + "starting", + "stopped", + "stopping", + "updating-running", + "updating-stopped" + ], + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "accountId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "agentId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "allocationState": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "compute": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "domain": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "externalId": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "firstRunning": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "hostname": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "imageId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "instanceTriggeredStop": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "memoryMb": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "nativeContainer": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "offeringId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "registryCredentialId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "systemContainer": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "token": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "userdata": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "zoneId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "instancelabels", + "services", + "ports", + "mounts", + "loadbalancertargets", + "instancelinks", + "hosts", + "account", + "credentials", + "volumes", + "targetinstancelinks" + ], + "resourceActions": { + "update": { + "input": null, + "output": "instance" + }, + "stop": { + "input": "instanceStop", + "output": "instance" + }, + "console": { + "input": "instanceConsoleInput", + "output": "instanceConsole" + }, + "restart": { + "input": null, + "output": "instance" + }, + "remove": { + "input": null, + "output": "instance" + }, + "start": { + "input": null, + "output": "instance" + }, + "restore": { + "input": null, + "output": "instance" + }, + "migrate": { + "input": null, + "output": "instance" + }, + "deallocate": { + "input": null, + "output": "instance" + }, + "allocate": { + "input": null, + "output": "instance" + }, + "create": { + "input": null, + "output": "instance" + }, + "purge": { + "input": null, + "output": "instance" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "GET" + ] + }, + { + "id": "instanceLink", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/instancelink", + "collection": "http://localhost:8080/v1/instancelinks" + }, + "actions": {}, + "pluralName": "instanceLinks", + "resourceFields": { + "accountId": { + "type": "reference[account]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "instanceId": { + "type": "reference[instance]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "linkName": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "activating", + "active", + "deactivating", + "inactive", + "purged", + "purging", + "registering", + "removed", + "removing", + "requested", + "restoring", + "updating-active", + "updating-inactive" + ], + "default": null + }, + "targetInstanceId": { + "type": "reference[instance]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "ports": { + "type": "array[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "accountId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "instanceId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "linkName": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "targetInstanceId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "targetinstance", + "account", + "instance" + ], + "resourceActions": { + "update": { + "input": null, + "output": "instanceLink" + }, + "activate": { + "input": null, + "output": "instanceLink" + }, + "remove": { + "input": null, + "output": "instanceLink" + }, + "restore": { + "input": null, + "output": "instanceLink" + }, + "deactivate": { + "input": null, + "output": "instanceLink" + }, + "create": { + "input": null, + "output": "instanceLink" + }, + "purge": { + "input": null, + "output": "instanceLink" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET", + "PUT" + ], + "collectionMethods": [ + "GET" + ] + }, + { + "id": "ipAddress", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/ipaddress", + "collection": "http://localhost:8080/v1/ipaddresses" + }, + "actions": {}, + "pluralName": "ipAddresses", + "resourceFields": { + "accountId": { + "type": "reference[account]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "address": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "networkId": { + "type": "reference[network]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "activating", + "active", + "associated", + "associating", + "deactivating", + "disassociating", + "inactive", + "purged", + "purging", + "registering", + "removed", + "removing", + "requested", + "restoring", + "updating-active", + "updating-inactive" + ], + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "accountId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "address": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "hostname": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "ipPoolId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "isPublic": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "networkId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "role": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "subnetId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "privateports", + "publicports", + "hosts", + "account", + "network" + ], + "resourceActions": { + "update": { + "input": null, + "output": "ipAddress" + }, + "activate": { + "input": null, + "output": "ipAddress" + }, + "remove": { + "input": null, + "output": "ipAddress" + }, + "disassociate": { + "input": null, + "output": "ipAddress" + }, + "restore": { + "input": null, + "output": "ipAddress" + }, + "deactivate": { + "input": null, + "output": "ipAddress" + }, + "create": { + "input": null, + "output": "ipAddress" + }, + "purge": { + "input": null, + "output": "ipAddress" + }, + "associate": { + "input": "ipAddressAssociateInput", + "output": "ipPool" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "GET" + ] + }, + { + "id": "label", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/label", + "collection": "http://localhost:8080/v1/labels" + }, + "actions": {}, + "pluralName": "labels", + "resourceFields": { + "accountId": { + "type": "reference[account]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "key": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "created", + "creating", + "removed", + "removing", + "requested" + ], + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "value": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "accountId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "key": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "type": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "value": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "hosts", + "account", + "instances" + ], + "resourceActions": { + "remove": { + "input": null, + "output": "label" + }, + "create": { + "input": null, + "output": "label" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET", + "PUT", + "DELETE" + ], + "collectionMethods": [ + "GET", + "POST" + ] + }, + { + "id": "loadBalancer", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/loadbalancer", + "collection": "http://localhost:8080/v1/loadbalancers" + }, + "actions": {}, + "pluralName": "loadBalancers", + "resourceFields": { + "accountId": { + "type": "reference[account]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "globalLoadBalancerId": { + "type": "reference[globalLoadBalancer]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "loadBalancerConfigId": { + "type": "reference[loadBalancerConfig]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": true, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "serviceId": { + "type": "reference[service]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "activating", + "active", + "removed", + "removing", + "requested", + "updating-active" + ], + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "weight": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "accountId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "globalLoadBalancerId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "loadBalancerConfigId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "serviceId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "weight": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "loadbalancerconfig", + "service", + "loadbalancertargets", + "hosts", + "globalloadbalancer", + "account", + "loadbalancerhostmaps" + ], + "resourceActions": { + "update": { + "input": null, + "output": "loadBalancer" + }, + "sethosts": { + "input": "setLoadBalancerHostsInput", + "output": "loadBalancer" + }, + "addtarget": { + "input": "addRemoveLoadBalancerTargetInput", + "output": "loadBalancer" + }, + "removehost": { + "input": "addRemoveLoadBalancerHostInput", + "output": "loadBalancer" + }, + "remove": { + "input": null, + "output": "loadBalancer" + }, + "addhost": { + "input": "addRemoveLoadBalancerHostInput", + "output": "loadBalancer" + }, + "create": { + "input": null, + "output": "loadBalancer" + }, + "removetarget": { + "input": "addRemoveLoadBalancerTargetInput", + "output": "loadBalancer" + }, + "settargets": { + "input": "setLoadBalancerTargetsInput", + "output": "loadBalancer" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET", + "PUT", + "DELETE" + ], + "collectionMethods": [ + "GET", + "POST" + ] + }, + { + "id": "loadBalancerConfig", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/loadbalancerconfig", + "collection": "http://localhost:8080/v1/loadbalancerconfigs" + }, + "actions": {}, + "pluralName": "loadBalancerConfigs", + "resourceFields": { + "accountId": { + "type": "reference[account]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "serviceId": { + "type": "reference[service]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "activating", + "active", + "removed", + "removing", + "requested", + "updating-active" + ], + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "healthCheck": { + "type": "loadBalancerHealthCheck", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "appCookieStickinessPolicy": { + "type": "loadBalancerAppCookieStickinessPolicy", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "lbCookieStickinessPolicy": { + "type": "loadBalancerCookieStickinessPolicy", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "accountId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "serviceId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "loadbalancerconfiglistenermaps", + "loadbalancerlisteners", + "service", + "account", + "loadbalancers" + ], + "resourceActions": { + "removelistener": { + "input": "addRemoveLoadBalancerListenerInput", + "output": "loadBalancerConfig" + }, + "update": { + "input": null, + "output": "loadBalancerConfig" + }, + "remove": { + "input": null, + "output": "loadBalancerConfig" + }, + "setlisteners": { + "input": "setLoadBalancerListenersInput", + "output": "loadBalancerConfig" + }, + "addlistener": { + "input": "addRemoveLoadBalancerListenerInput", + "output": "loadBalancerConfig" + }, + "create": { + "input": null, + "output": "loadBalancerConfig" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET", + "PUT", + "DELETE" + ], + "collectionMethods": [ + "GET", + "POST" + ] + }, + { + "id": "loadBalancerConfigListenerMap", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/loadbalancerconfiglistenermap", + "collection": "http://localhost:8080/v1/loadbalancerconfiglistenermaps" + }, + "actions": {}, + "pluralName": "loadBalancerConfigListenerMaps", + "resourceFields": { + "accountId": { + "type": "reference[account]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "loadBalancerConfigId": { + "type": "reference[loadBalancerConfig]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "loadBalancerListenerId": { + "type": "reference[loadBalancerListener]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "activating", + "active", + "removed", + "removing", + "requested" + ], + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "accountId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "loadBalancerConfigId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "loadBalancerListenerId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "loadbalancerlistener", + "loadbalancerconfig", + "account" + ], + "resourceActions": { + "remove": { + "input": null, + "output": "loadBalancerConfigListenerMap" + }, + "create": { + "input": null, + "output": "loadBalancerConfigListenerMap" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "GET" + ] + }, + { + "id": "loadBalancerHostMap", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/loadbalancerhostmap", + "collection": "http://localhost:8080/v1/loadbalancerhostmaps" + }, + "actions": {}, + "pluralName": "loadBalancerHostMaps", + "resourceFields": { + "accountId": { + "type": "reference[account]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "hostId": { + "type": "reference[host]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "loadBalancerId": { + "type": "reference[loadBalancer]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "state": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + } + }, + "collectionFilters": { + "accountId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "hostId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "loadBalancerId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "host", + "loadbalancer", + "account" + ], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "GET" + ] + }, + { + "id": "loadBalancerListener", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/loadbalancerlistener", + "collection": "http://localhost:8080/v1/loadbalancerlisteners" + }, + "actions": {}, + "pluralName": "loadBalancerListeners", + "resourceFields": { + "accountId": { + "type": "reference[account]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "serviceId": { + "type": "reference[service]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "sourcePort": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": true, + "min": 1, + "max": 65535, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "sourceProtocol": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": true, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": [ + "tcp", + "http" + ], + "default": null + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "activating", + "active", + "removed", + "removing", + "requested" + ], + "default": null + }, + "targetPort": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": 1, + "max": 65535, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "targetProtocol": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": [ + "tcp", + "http" + ], + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "algorithm": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "roundrobin", + "leastconn", + "source" + ], + "default": "roundrobin" + } + }, + "collectionFilters": { + "accountId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "serviceId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "sourcePort": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "sourceProtocol": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "targetPort": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "targetProtocol": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "loadbalancerconfiglistenermaps", + "loadbalancerconfigs", + "service", + "account" + ], + "resourceActions": { + "remove": { + "input": null, + "output": "loadBalancerListener" + }, + "create": { + "input": null, + "output": "loadBalancerListener" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET", + "PUT", + "DELETE" + ], + "collectionMethods": [ + "GET", + "POST" + ] + }, + { + "id": "loadBalancerTarget", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/loadbalancertarget", + "collection": "http://localhost:8080/v1/loadbalancertargets" + }, + "actions": {}, + "pluralName": "loadBalancerTargets", + "resourceFields": { + "accountId": { + "type": "reference[account]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "instanceId": { + "type": "reference[instance]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "ipAddress": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "loadBalancerId": { + "type": "reference[loadBalancer]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "activating", + "active", + "removed", + "removing", + "requested" + ], + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "accountId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "instanceId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "ipAddress": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "loadBalancerId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "loadbalancer", + "account", + "instance" + ], + "resourceActions": { + "remove": { + "input": null, + "output": "loadBalancerTarget" + }, + "create": { + "input": null, + "output": "loadBalancerTarget" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "GET" + ] + }, + { + "id": "mount", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/mount", + "collection": "http://localhost:8080/v1/mounts" + }, + "actions": {}, + "pluralName": "mounts", + "resourceFields": { + "accountId": { + "type": "reference[account]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "instanceId": { + "type": "reference[instance]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "path": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 512, + "options": null, + "default": null + }, + "permissions": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "activating", + "active", + "deactivating", + "inactive", + "purged", + "purging", + "registering", + "removed", + "removing", + "requested", + "restoring", + "updating-active", + "updating-inactive" + ], + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "volumeId": { + "type": "reference[volume]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "accountId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "instanceId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "path": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "permissions": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "volumeId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "volume", + "account", + "instance" + ], + "resourceActions": { + "update": { + "input": null, + "output": "mount" + }, + "activate": { + "input": null, + "output": "mount" + }, + "remove": { + "input": null, + "output": "mount" + }, + "restore": { + "input": null, + "output": "mount" + }, + "deactivate": { + "input": null, + "output": "mount" + }, + "create": { + "input": null, + "output": "mount" + }, + "purge": { + "input": null, + "output": "mount" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "GET" + ] + }, + { + "id": "network", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/network", + "collection": "http://localhost:8080/v1/networks" + }, + "actions": {}, + "pluralName": "networks", + "resourceFields": { + "accountId": { + "type": "reference[account]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "activating", + "active", + "deactivating", + "inactive", + "purged", + "purging", + "registering", + "removed", + "removing", + "requested", + "restoring", + "updating-active", + "updating-inactive" + ], + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "accountId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "domain": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "isPublic": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "ipaddresses", + "account" + ], + "resourceActions": { + "update": { + "input": null, + "output": "network" + }, + "activate": { + "input": null, + "output": "network" + }, + "remove": { + "input": null, + "output": "network" + }, + "restore": { + "input": null, + "output": "network" + }, + "deactivate": { + "input": null, + "output": "network" + }, + "create": { + "input": null, + "output": "network" + }, + "purge": { + "input": null, + "output": "network" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "GET" + ] + }, + { + "id": "physicalHost", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/physicalhost", + "collection": "http://localhost:8080/v1/physicalhosts" + }, + "actions": {}, + "pluralName": "physicalHosts", + "resourceFields": { + "accountId": { + "type": "reference[account]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "active", + "bootstrapping", + "created", + "creating", + "error", + "erroring", + "removed", + "removing", + "requested", + "updating" + ], + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "accountId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "agentId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "externalId": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "hosts", + "account" + ], + "resourceActions": { + "update": { + "input": null, + "output": "physicalHost" + }, + "bootstrap": { + "input": null, + "output": "physicalHost" + }, + "remove": { + "input": null, + "output": "physicalHost" + }, + "error": { + "input": null, + "output": "physicalHost" + }, + "create": { + "input": null, + "output": "physicalHost" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "GET" + ] + }, + { + "id": "port", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/port", + "collection": "http://localhost:8080/v1/ports" + }, + "actions": {}, + "pluralName": "ports", + "resourceFields": { + "accountId": { + "type": "reference[account]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "instanceId": { + "type": "reference[instance]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "privateIpAddressId": { + "type": "reference[ipAddress]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "privatePort": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "protocol": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "publicIpAddressId": { + "type": "reference[ipAddress]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "publicPort": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "activating", + "active", + "deactivating", + "inactive", + "purged", + "purging", + "registering", + "removed", + "removing", + "requested", + "restoring", + "updating-active", + "updating-inactive" + ], + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "accountId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "instanceId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "privateIpAddressId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "privatePort": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "protocol": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "publicIpAddressId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "publicPort": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "privateipaddress", + "publicipaddress", + "account", + "instance" + ], + "resourceActions": { + "update": { + "input": null, + "output": "port" + }, + "activate": { + "input": null, + "output": "port" + }, + "remove": { + "input": null, + "output": "port" + }, + "restore": { + "input": null, + "output": "port" + }, + "deactivate": { + "input": null, + "output": "port" + }, + "create": { + "input": null, + "output": "port" + }, + "purge": { + "input": null, + "output": "port" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET", + "PUT" + ], + "collectionMethods": [ + "GET" + ] + }, + { + "id": "processExecution", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/processexecution", + "collection": "http://localhost:8080/v1/processexecutions" + }, + "actions": {}, + "pluralName": "processExecutions", + "resourceFields": { + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "log": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 16777215, + "options": null, + "default": null + }, + "processInstanceId": { + "type": "reference[processInstance]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + } + }, + "collectionFilters": { + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "processInstanceId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "processinstance" + ], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "GET" + ] + }, + { + "id": "processInstance", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/processinstance", + "collection": "http://localhost:8080/v1/processinstances" + }, + "actions": {}, + "pluralName": "processInstances", + "resourceFields": { + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "endTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "exitReason": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "phase": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "priority": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "processName": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "resourceId": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "resourceType": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "result": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "runningProcessServerId": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "startProcessServerId": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "startTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + } + }, + "collectionFilters": { + "endTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "exitReason": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "phase": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "priority": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "processName": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "resourceId": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "resourceType": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "result": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "runningProcessServerId": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "startProcessServerId": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "startTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "processexecutions" + ], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "GET" + ] + }, + { + "id": "projectMember", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/projectmember", + "collection": "http://localhost:8080/v1/projectmembers" + }, + "actions": {}, + "pluralName": "projectMembers", + "resourceFields": { + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "externalId": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "externalIdType": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": [ + "github_user", + "github_org", + "github_team", + "rancher_id" + ], + "default": "rancher_id" + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "projectId": { + "type": "reference[project]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "role": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": [ + "member", + "owner" + ], + "default": "member" + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "activating", + "active", + "deactivating", + "inactive", + "purged", + "purging", + "registering", + "removed", + "removing", + "requested", + "restoring", + "updating-active", + "updating-inactive" + ], + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "accountId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "externalId": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "externalIdType": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "projectId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "role": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "project" + ], + "resourceActions": { + "update": { + "input": null, + "output": "projectMember" + }, + "activate": { + "input": null, + "output": "projectMember" + }, + "remove": { + "input": null, + "output": "projectMember" + }, + "restore": { + "input": null, + "output": "projectMember" + }, + "deactivate": { + "input": null, + "output": "projectMember" + }, + "create": { + "input": null, + "output": "projectMember" + }, + "purge": { + "input": null, + "output": "projectMember" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "GET" + ] + }, + { + "id": "service", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/service", + "collection": "http://localhost:8080/v1/services" + }, + "actions": {}, + "pluralName": "services", + "resourceFields": { + "accountId": { + "type": "reference[account]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "environmentId": { + "type": "reference[environment]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": true, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": "[a-zA-Z0-9]-", + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": true, + "min": null, + "max": null, + "minLength": 1, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "activating", + "active", + "deactivating", + "inactive", + "registering", + "removed", + "removing", + "requested", + "updating-active", + "updating-inactive" + ], + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "scale": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": 1 + }, + "dataVolumesFromService": { + "type": "array[reference[service]]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "launchConfig": { + "type": "container", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": true, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "accountId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "environmentId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "loadbalancerlisteners", + "environment", + "loadbalancerconfigs", + "consumedservices", + "account", + "instances", + "consumedbyservices", + "loadbalancers" + ], + "resourceActions": { + "update": { + "input": null, + "output": "service" + }, + "activate": { + "input": null, + "output": "service" + }, + "remove": { + "input": null, + "output": "service" + }, + "setservicelinks": { + "input": "setServiceLinksInput", + "output": "service" + }, + "removeservicelink": { + "input": "addRemoveServiceLinkInput", + "output": "service" + }, + "addservicelink": { + "input": "addRemoveServiceLinkInput", + "output": "service" + }, + "deactivate": { + "input": null, + "output": "service" + }, + "create": { + "input": null, + "output": "service" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET", + "PUT", + "DELETE" + ], + "collectionMethods": [ + "GET", + "POST" + ] + }, + { + "id": "setting", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/setting", + "collection": "http://localhost:8080/v1/settings" + }, + "actions": {}, + "pluralName": "settings", + "resourceFields": { + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "value": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + } + }, + "collectionFilters": { + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "value": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + } + }, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET", + "PUT", + "DELETE" + ], + "collectionMethods": [ + "GET", + "POST" + ] + }, + { + "id": "snapshot", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/snapshot", + "collection": "http://localhost:8080/v1/snapshots" + }, + "actions": {}, + "pluralName": "snapshots", + "resourceFields": { + "accountId": { + "type": "reference[account]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "backed-up", + "backing-up", + "created", + "creating", + "removed", + "removing", + "requested" + ], + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "volumeId": { + "type": "reference[volume]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": true, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "managedVolumeUUID": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "accountId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "volumeId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "storagepools", + "volume", + "account" + ], + "resourceActions": { + "remove": { + "input": null, + "output": "snapshot" + }, + "create": { + "input": null, + "output": "snapshot" + }, + "backup": { + "input": null, + "output": "snapshot" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "GET", + "POST" + ] + }, + { + "id": "storagePool", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/storagepool", + "collection": "http://localhost:8080/v1/storagepools" + }, + "actions": {}, + "pluralName": "storagePools", + "resourceFields": { + "accountId": { + "type": "reference[account]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "activating", + "active", + "deactivating", + "inactive", + "purged", + "purging", + "registering", + "removed", + "removing", + "requested", + "restoring", + "updating-active", + "updating-inactive" + ], + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "accountId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "agentId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "external": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "physicalTotalSizeMb": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "virtualTotalSizeMb": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "zoneId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "hosts", + "images", + "account", + "credentials", + "volumes", + "snapshots" + ], + "resourceActions": { + "update": { + "input": null, + "output": "storagePool" + }, + "activate": { + "input": null, + "output": "storagePool" + }, + "remove": { + "input": null, + "output": "storagePool" + }, + "restore": { + "input": null, + "output": "storagePool" + }, + "deactivate": { + "input": null, + "output": "storagePool" + }, + "create": { + "input": null, + "output": "storagePool" + }, + "purge": { + "input": null, + "output": "storagePool" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "GET" + ] + }, + { + "id": "task", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/task", + "collection": "http://localhost:8080/v1/tasks" + }, + "actions": {}, + "pluralName": "tasks", + "resourceFields": { + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + } + }, + "collectionFilters": { + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "taskinstances" + ], + "resourceActions": { + "execute": { + "input": null, + "output": "task" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "GET" + ] + }, + { + "id": "taskInstance", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/taskinstance", + "collection": "http://localhost:8080/v1/taskinstances" + }, + "actions": {}, + "pluralName": "taskInstances", + "resourceFields": { + "endTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "exception": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "serverId": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "startTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "taskId": { + "type": "reference[task]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + } + }, + "collectionFilters": { + "endTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "exception": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "serverId": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "startTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "taskId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "task" + ], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "GET" + ] + }, + { + "id": "volume", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/volume", + "collection": "http://localhost:8080/v1/volumes" + }, + "actions": {}, + "pluralName": "volumes", + "resourceFields": { + "accountId": { + "type": "reference[account]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "imageId": { + "type": "reference[image]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "instanceId": { + "type": "reference[instance]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "activating", + "active", + "deactivating", + "inactive", + "purged", + "purging", + "registering", + "removed", + "removing", + "requested", + "restoring", + "updating-active", + "updating-inactive" + ], + "default": null + }, + "uri": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 512, + "options": null, + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "isHostPath": { + "type": "boolean", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": false + } + }, + "collectionFilters": { + "accountId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "allocationState": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "attachedState": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "deviceNumber": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "format": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "imageId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "instanceId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "offeringId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "physicalSizeMb": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "uri": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "virtualSizeMb": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "zoneId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "mounts", + "storagepools", + "image", + "account", + "snapshots", + "instance" + ], + "resourceActions": { + "update": { + "input": null, + "output": "volume" + }, + "activate": { + "input": null, + "output": "volume" + }, + "remove": { + "input": null, + "output": "volume" + }, + "restore": { + "input": null, + "output": "volume" + }, + "deallocate": { + "input": null, + "output": "volume" + }, + "allocate": { + "input": null, + "output": "volume" + }, + "deactivate": { + "input": null, + "output": "volume" + }, + "create": { + "input": null, + "output": "volume" + }, + "purge": { + "input": null, + "output": "volume" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET", + "DELETE" + ], + "collectionMethods": [ + "GET" + ] + }, + { + "id": "typeDocumentation", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/typedocumentation", + "collection": "http://localhost:8080/v1/typedocumentations" + }, + "actions": {}, + "pluralName": "typeDocumentations", + "resourceFields": { + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "id": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "GET" + ] + }, + { + "id": "containerExec", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/containerexec", + "collection": "http://localhost:8080/v1/containerexecs" + }, + "actions": {}, + "pluralName": "containerExecs", + "resourceFields": { + "attachStdin": { + "type": "boolean", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": true + }, + "attachStdout": { + "type": "boolean", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": true + }, + "command": { + "type": "array[string]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": true, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "tty": { + "type": "boolean", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": true + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "GET", + "POST" + ] + }, + { + "id": "containerLogs", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/containerlogs" + }, + "actions": {}, + "pluralName": "containerLogses", + "resourceFields": { + "follow": { + "type": "boolean", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": true + }, + "lines": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": 0, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": 100 + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "POST" + ] + }, + { + "id": "hostAccess", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/hostaccess", + "collection": "http://localhost:8080/v1/hostaccesses" + }, + "actions": {}, + "pluralName": "hostAccesses", + "resourceFields": { + "token": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "url": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "GET" + ] + }, + { + "id": "activeSetting", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/activesetting" + }, + "actions": {}, + "pluralName": "activeSettings", + "resourceFields": { + "activeValue": { + "type": "json", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "id": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "inDb": { + "type": "boolean", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "source": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "value": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": true, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET", + "PUT", + "DELETE" + ], + "collectionMethods": [] + }, + { + "id": "extensionImplementation", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/extensionimplementation" + }, + "actions": {}, + "pluralName": "extensionImplementations", + "resourceFields": { + "className": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "properties": { + "type": "map[string]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [] + }, + { + "id": "extensionPoint", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/extensionpoint", + "collection": "http://localhost:8080/v1/extensionpoints" + }, + "actions": {}, + "pluralName": "extensionPoints", + "resourceFields": { + "excludeSetting": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "implementations": { + "type": "array[extensionImplementation]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "includeSetting": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "listSetting": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "GET" + ] + }, + { + "id": "processDefinition", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/processdefinition", + "collection": "http://localhost:8080/v1/processdefinitions" + }, + "actions": {}, + "pluralName": "processDefinitions", + "resourceFields": { + "extensionBased": { + "type": "boolean", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "id": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "postProcessListeners": { + "type": "extensionPoint", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "preProcessListeners": { + "type": "extensionPoint", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "processHandlers": { + "type": "extensionPoint", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "resourceType": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "stateTransitions": { + "type": "array[stateTransition]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "GET" + ] + }, + { + "id": "resourceDefinition", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/resourcedefinition", + "collection": "http://localhost:8080/v1/resourcedefinitions" + }, + "actions": {}, + "pluralName": "resourceDefinitions", + "resourceFields": { + "id": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "GET" + ] + }, + { + "id": "stateTransition", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/statetransition" + }, + "actions": {}, + "pluralName": "stateTransitions", + "resourceFields": {}, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [] + }, + { + "id": "githubconfig", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/githubconfig", + "collection": "http://localhost:8080/v1/githubconfigs" + }, + "actions": {}, + "pluralName": "githubconfigs", + "resourceFields": { + "accessMode": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": true, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "restricted", + "unrestricted" + ], + "default": "unrestricted" + }, + "allowedOrganizations": { + "type": "array[string]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "allowedUsers": { + "type": "array[string]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "clientId": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "clientSecret": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "enabled": { + "type": "boolean", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET", + "PUT" + ], + "collectionMethods": [ + "GET", + "POST" + ] + }, + { + "id": "statsAccess", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/statsaccess", + "collection": "http://localhost:8080/v1/statsaccesses" + }, + "actions": {}, + "pluralName": "statsAccesses", + "resourceFields": { + "token": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "url": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "GET" + ] + }, + { + "id": "virtualboxConfig", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/virtualboxconfig" + }, + "actions": {}, + "pluralName": "virtualboxConfigs", + "resourceFields": { + "memory": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "diskSize": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "boot2dockerUrl": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "POST" + ] + }, + { + "id": "digitaloceanConfig", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/digitaloceanconfig" + }, + "actions": {}, + "pluralName": "digitaloceanConfigs", + "resourceFields": { + "image": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "region": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "size": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "accessToken": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": true, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "ipv6": { + "type": "boolean", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "privateNetworking": { + "type": "boolean", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "backups": { + "type": "boolean", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "POST" + ] + }, + { + "id": "amazonec2Config", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/amazonec2config" + }, + "actions": {}, + "pluralName": "amazonec2Configs", + "resourceFields": { + "accessKey": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": true, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "secretKey": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": true, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "vpcId": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "sessionToken": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "ami": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "region": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "zone": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "subnetId": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "securityGroup": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "instanceType": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "rootSize": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "iamInstanceProfile": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "POST" + ] + }, + { + "id": "rackspaceConfig", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/rackspaceconfig" + }, + "actions": {}, + "pluralName": "rackspaceConfigs", + "resourceFields": { + "username": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": true, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "apiKey": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": true, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "region": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "endpointType": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "imageId": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "flavorId": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "sshUser": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "sshPort": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "dockerInstall": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "POST" + ] + }, + { + "id": "packetConfig", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/packetconfig" + }, + "actions": {}, + "pluralName": "packetConfigs", + "resourceFields": { + "apiKey": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": true, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "projectId": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": false, + "unique": false, + "required": true, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "os": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "facilityCode": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "plan": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "billingCycle": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": {}, + "includeableLinks": [], + "resourceActions": {}, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "POST" + ] + }, + { + "id": "machine", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/machine", + "collection": "http://localhost:8080/v1/machines" + }, + "actions": {}, + "pluralName": "machines", + "resourceFields": { + "accountId": { + "type": "reference[account]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "externalId": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": false, + "unique": false, + "required": true, + "min": null, + "max": null, + "minLength": 1, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "active", + "bootstrapping", + "created", + "creating", + "error", + "erroring", + "removed", + "removing", + "requested", + "updating" + ], + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "authCertificateAuthority": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "authKey": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "driver": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "extractedConfig": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "virtualboxConfig": { + "type": "virtualboxConfig", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "digitaloceanConfig": { + "type": "digitaloceanConfig", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "amazonec2Config": { + "type": "amazonec2Config", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "rackspaceConfig": { + "type": "rackspaceConfig", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "packetConfig": { + "type": "packetConfig", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "accountId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "agentId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "externalId": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "hosts", + "account" + ], + "resourceActions": { + "update": { + "input": null, + "output": "physicalHost" + }, + "bootstrap": { + "input": null, + "output": "physicalHost" + }, + "remove": { + "input": null, + "output": "physicalHost" + }, + "error": { + "input": null, + "output": "physicalHost" + }, + "create": { + "input": null, + "output": "physicalHost" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET", + "PUT", + "DELETE" + ], + "collectionMethods": [ + "GET", + "POST" + ] + }, + { + "id": "register", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/register", + "collection": "http://localhost:8080/v1/register" + }, + "actions": {}, + "pluralName": "register", + "resourceFields": { + "accountId": { + "type": "reference[account]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "key": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": true, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "activating", + "active", + "deactivating", + "inactive", + "purged", + "purging", + "registering", + "removed", + "removing", + "requested", + "restoring", + "updating-active", + "updating-inactive" + ], + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "accessKey": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "secretKey": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "accountId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "key": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "token": { + "modifiers": [ + "eq" + ] + } + }, + "includeableLinks": [ + "account" + ], + "resourceActions": { + "update": { + "input": null, + "output": "genericObject" + }, + "activate": { + "input": null, + "output": "genericObject" + }, + "remove": { + "input": null, + "output": "genericObject" + }, + "restore": { + "input": null, + "output": "genericObject" + }, + "deactivate": { + "input": null, + "output": "genericObject" + }, + "create": { + "input": null, + "output": "genericObject" + }, + "purge": { + "input": null, + "output": "genericObject" + }, + "stop": { + "input": "instanceStop", + "output": "instance" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "GET", + "POST" + ] + }, + { + "id": "registrationToken", + "type": "schema", + "links": { + "self": "http://localhost:8080/v1/schemas/registrationtoken", + "collection": "http://localhost:8080/v1/registrationtokens" + }, + "actions": {}, + "pluralName": "registrationTokens", + "resourceFields": { + "accountId": { + "type": "reference[account]", + "validChars": null, + "invalidChars": null, + "create": true, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "created": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "data": { + "type": "map[json]", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 65535, + "options": null, + "default": null + }, + "description": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 1024, + "options": null, + "default": null + }, + "id": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "kind": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "name": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": true, + "update": true, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removeTime": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "removed": { + "type": "date", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 255, + "options": null, + "default": null + }, + "state": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": [ + "activating", + "active", + "deactivating", + "inactive", + "purged", + "purging", + "registering", + "removed", + "removing", + "requested", + "restoring", + "updating-active", + "updating-inactive" + ], + "default": null + }, + "transitioning": { + "type": "enum", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": [ + "yes", + "no", + "error" + ], + "default": null + }, + "transitioningMessage": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "transitioningProgress": { + "type": "int", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "uuid": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": true, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": 128, + "options": null, + "default": null + }, + "command": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "image": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "token": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + }, + "registrationUrl": { + "type": "string", + "validChars": null, + "invalidChars": null, + "create": false, + "update": false, + "nullable": false, + "unique": false, + "required": false, + "min": null, + "max": null, + "minLength": null, + "maxLength": null, + "options": null, + "default": null + } + }, + "collectionFilters": { + "accountId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "created": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "description": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "id": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "kind": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "name": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "publicValue": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "registryId": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "removeTime": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "removed": { + "modifiers": [ + "eq", + "ne", + "lt", + "lte", + "gt", + "gte", + "null", + "notnull" + ] + }, + "secretValue": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + }, + "state": { + "modifiers": [ + "eq", + "ne", + "null", + "notnull" + ] + }, + "uuid": { + "modifiers": [ + "eq", + "ne", + "prefix", + "like", + "notlike", + "null", + "notnull" + ] + } + }, + "includeableLinks": [ + "images", + "account", + "instances" + ], + "resourceActions": { + "update": { + "input": null, + "output": "credential" + }, + "activate": { + "input": null, + "output": "credential" + }, + "remove": { + "input": null, + "output": "credential" + }, + "restore": { + "input": null, + "output": "credential" + }, + "deactivate": { + "input": null, + "output": "credential" + }, + "create": { + "input": null, + "output": "credential" + }, + "purge": { + "input": null, + "output": "credential" + } + }, + "collectionActions": {}, + "collectionFields": {}, + "resourceMethods": [ + "GET" + ], + "collectionMethods": [ + "GET", + "POST" + ] + } + ], + "sortLinks": {}, + "pagination": null, + "sort": null, + "filters": {}, + "createDefaults": {} +} diff --git a/vendor/github.com/rancher/go-rancher/trash.conf b/vendor/github.com/rancher/go-rancher/trash.conf new file mode 100644 index 000000000000..30cb3a959733 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/trash.conf @@ -0,0 +1,6 @@ +github.com/pkg/errors 1d2e60385a13aaa66134984235061c2f9302520e +github.com/gorilla/context 215affda49addc4c8ef7e2534915df2c8c35c6cd +github.com/gorilla/mux f15e0c49460fd49eebe2bcc8486b05d1bef68d3a +github.com/gorilla/websocket 1551221275a7bd42978745a376b2531f791d88f3 +github.com/Sirupsen/logrus 26709e2714106fb8ad40b773b711ebce25b78914 +gopkg.in/yaml.v2 a83829b6f1293c91addabc89d0571c246397bbf4 diff --git a/vendor/github.com/raphink/go-rancher/LICENSE b/vendor/github.com/raphink/go-rancher/LICENSE new file mode 100644 index 000000000000..f433b1a53f5b --- /dev/null +++ b/vendor/github.com/raphink/go-rancher/LICENSE @@ -0,0 +1,177 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS diff --git a/vendor/github.com/raphink/go-rancher/catalog/client.go b/vendor/github.com/raphink/go-rancher/catalog/client.go new file mode 100644 index 000000000000..a1435a2d16c0 --- /dev/null +++ b/vendor/github.com/raphink/go-rancher/catalog/client.go @@ -0,0 +1,35 @@ +package catalog + +import ( + "net/http" + + "github.com/gorilla/websocket" +) + +type RancherBaseClientImpl struct { + Opts *ClientOpts + Schemas *Schemas + Types map[string]Schema +} + +type RancherBaseClient interface { + Websocket(string, map[string][]string) (*websocket.Conn, *http.Response, error) + List(string, *ListOpts, interface{}) error + Post(string, interface{}, interface{}) error + GetLink(Resource, string, interface{}) error + Create(string, interface{}, interface{}) error + Update(string, *Resource, interface{}, interface{}) error + ById(string, string, interface{}) error + Delete(*Resource) error + Reload(*Resource, interface{}) error + Action(string, string, *Resource, interface{}, interface{}) error + + doGet(string, *ListOpts, interface{}) error + doList(string, *ListOpts, interface{}) error + doModify(string, string, interface{}, interface{}) error + doCreate(string, interface{}, interface{}) error + doUpdate(string, *Resource, interface{}, interface{}) error + doById(string, string, interface{}) error + doResourceDelete(string, *Resource) error + doAction(string, string, *Resource, interface{}, interface{}) error +} diff --git a/vendor/github.com/raphink/go-rancher/catalog/common.go b/vendor/github.com/raphink/go-rancher/catalog/common.go new file mode 100644 index 000000000000..f3ceb91db540 --- /dev/null +++ b/vendor/github.com/raphink/go-rancher/catalog/common.go @@ -0,0 +1,577 @@ +package catalog + +import ( + "bytes" + "encoding/json" + "fmt" + "io" + "io/ioutil" + "net/http" + "net/url" + "os" + "regexp" + "strings" + "time" + + "github.com/gorilla/websocket" + "github.com/pkg/errors" +) + +const ( + SELF = "self" + COLLECTION = "collection" +) + +var ( + debug = false + dialer = &websocket.Dialer{} +) + +type ClientOpts struct { + Url string + AccessKey string + SecretKey string + Timeout time.Duration +} + +type ApiError struct { + StatusCode int + Url string + Msg string + Status string + Body string +} + +func (e *ApiError) Error() string { + return e.Msg +} + +func IsNotFound(err error) bool { + apiError, ok := err.(*ApiError) + if !ok { + return false + } + + return apiError.StatusCode == http.StatusNotFound +} + +func newApiError(resp *http.Response, url string) *ApiError { + contents, err := ioutil.ReadAll(resp.Body) + var body string + if err != nil { + body = "Unreadable body." + } else { + body = string(contents) + } + + data := map[string]interface{}{} + if json.Unmarshal(contents, &data) == nil { + delete(data, "id") + delete(data, "links") + delete(data, "actions") + delete(data, "type") + delete(data, "status") + buf := &bytes.Buffer{} + for k, v := range data { + if v == nil { + continue + } + if buf.Len() > 0 { + buf.WriteString(", ") + } + fmt.Fprintf(buf, "%s=%v", k, v) + } + body = buf.String() + } + formattedMsg := fmt.Sprintf("Bad response statusCode [%d]. Status [%s]. Body: [%s] from [%s]", + resp.StatusCode, resp.Status, body, url) + return &ApiError{ + Url: url, + Msg: formattedMsg, + StatusCode: resp.StatusCode, + Status: resp.Status, + Body: body, + } +} + +func contains(array []string, item string) bool { + for _, check := range array { + if check == item { + return true + } + } + + return false +} + +func appendFilters(urlString string, filters map[string]interface{}) (string, error) { + if len(filters) == 0 { + return urlString, nil + } + + u, err := url.Parse(urlString) + if err != nil { + return "", err + } + + q := u.Query() + for k, v := range filters { + if l, ok := v.([]string); ok { + for _, v := range l { + q.Add(k, v) + } + } else { + q.Add(k, fmt.Sprintf("%v", v)) + } + } + + u.RawQuery = q.Encode() + return u.String(), nil +} + +func setupRancherBaseClient(rancherClient *RancherBaseClientImpl, opts *ClientOpts) error { + if opts.Timeout == 0 { + opts.Timeout = time.Second * 10 + } + client := &http.Client{Timeout: opts.Timeout} + req, err := http.NewRequest("GET", opts.Url, nil) + if err != nil { + return err + } + + req.SetBasicAuth(opts.AccessKey, opts.SecretKey) + + resp, err := client.Do(req) + if err != nil { + return err + } + + defer resp.Body.Close() + + if resp.StatusCode != 200 { + return newApiError(resp, opts.Url) + } + + var schemasUrls string + if strings.HasSuffix(opts.Url, "/schemas") { + schemasUrls = opts.Url + } else { + schemasUrls = resp.Header.Get("X-API-Schemas") + if len(schemasUrls) == 0 { + return errors.New("Failed to find schema at [" + opts.Url + "]") + } + } + + if schemasUrls != opts.Url { + req, err = http.NewRequest("GET", schemasUrls, nil) + req.SetBasicAuth(opts.AccessKey, opts.SecretKey) + if err != nil { + return err + } + + resp, err = client.Do(req) + if err != nil { + return err + } + + defer resp.Body.Close() + + if resp.StatusCode != 200 { + return newApiError(resp, opts.Url) + } + } + + var schemas Schemas + bytes, err := ioutil.ReadAll(resp.Body) + if err != nil { + return err + } + + err = json.Unmarshal(bytes, &schemas) + if err != nil { + return err + } + + rancherClient.Opts = opts + rancherClient.Schemas = &schemas + + for _, schema := range schemas.Data { + rancherClient.Types[schema.Id] = schema + } + + return nil +} + +func NewListOpts() *ListOpts { + return &ListOpts{ + Filters: map[string]interface{}{}, + } +} + +func (rancherClient *RancherBaseClientImpl) setupRequest(req *http.Request) { + req.SetBasicAuth(rancherClient.Opts.AccessKey, rancherClient.Opts.SecretKey) +} + +func (rancherClient *RancherBaseClientImpl) newHttpClient() *http.Client { + if rancherClient.Opts.Timeout == 0 { + rancherClient.Opts.Timeout = time.Second * 10 + } + return &http.Client{Timeout: rancherClient.Opts.Timeout} +} + +func (rancherClient *RancherBaseClientImpl) doDelete(url string) error { + client := rancherClient.newHttpClient() + req, err := http.NewRequest("DELETE", url, nil) + if err != nil { + return err + } + + rancherClient.setupRequest(req) + + resp, err := client.Do(req) + if err != nil { + return err + } + defer resp.Body.Close() + + io.Copy(ioutil.Discard, resp.Body) + + if resp.StatusCode >= 300 { + return newApiError(resp, url) + } + + return nil +} + +func (rancherClient *RancherBaseClientImpl) Websocket(url string, headers map[string][]string) (*websocket.Conn, *http.Response, error) { + return dialer.Dial(url, http.Header(headers)) +} + +func (rancherClient *RancherBaseClientImpl) doGet(url string, opts *ListOpts, respObject interface{}) error { + if opts == nil { + opts = NewListOpts() + } + url, err := appendFilters(url, opts.Filters) + if err != nil { + return err + } + + if debug { + fmt.Println("GET " + url) + } + + client := rancherClient.newHttpClient() + req, err := http.NewRequest("GET", url, nil) + if err != nil { + return err + } + + rancherClient.setupRequest(req) + + resp, err := client.Do(req) + if err != nil { + return err + } + + defer resp.Body.Close() + + if resp.StatusCode != 200 { + return newApiError(resp, url) + } + + byteContent, err := ioutil.ReadAll(resp.Body) + if err != nil { + return err + } + + if debug { + fmt.Println("Response <= " + string(byteContent)) + } + + if err := json.Unmarshal(byteContent, respObject); err != nil { + return errors.Wrap(err, fmt.Sprintf("Failed to parse: %s", byteContent)) + } + + return nil +} + +func (rancherClient *RancherBaseClientImpl) List(schemaType string, opts *ListOpts, respObject interface{}) error { + return rancherClient.doList(schemaType, opts, respObject) +} + +func (rancherClient *RancherBaseClientImpl) doList(schemaType string, opts *ListOpts, respObject interface{}) error { + schema, ok := rancherClient.Types[schemaType] + if !ok { + return errors.New("Unknown schema type [" + schemaType + "]") + } + + if !contains(schema.CollectionMethods, "GET") { + return errors.New("Resource type [" + schemaType + "] is not listable") + } + + collectionUrl, ok := schema.Links[COLLECTION] + if !ok { + return errors.New("Failed to find collection URL for [" + schemaType + "]") + } + + return rancherClient.doGet(collectionUrl, opts, respObject) +} + +func (rancherClient *RancherBaseClientImpl) Post(url string, createObj interface{}, respObject interface{}) error { + return rancherClient.doModify("POST", url, createObj, respObject) +} + +func (rancherClient *RancherBaseClientImpl) GetLink(resource Resource, link string, respObject interface{}) error { + url := resource.Links[link] + if url == "" { + return fmt.Errorf("Failed to find link: %s", link) + } + + return rancherClient.doGet(url, &ListOpts{}, respObject) +} + +func (rancherClient *RancherBaseClientImpl) doModify(method string, url string, createObj interface{}, respObject interface{}) error { + bodyContent, err := json.Marshal(createObj) + if err != nil { + return err + } + + if debug { + fmt.Println(method + " " + url) + fmt.Println("Request => " + string(bodyContent)) + } + + client := rancherClient.newHttpClient() + req, err := http.NewRequest(method, url, bytes.NewBuffer(bodyContent)) + if err != nil { + return err + } + + rancherClient.setupRequest(req) + req.Header.Set("Content-Type", "application/json") + req.Header.Set("Content-Length", string(len(bodyContent))) + + resp, err := client.Do(req) + if err != nil { + return err + } + + defer resp.Body.Close() + + if resp.StatusCode >= 300 { + return newApiError(resp, url) + } + + byteContent, err := ioutil.ReadAll(resp.Body) + if err != nil { + return err + } + + if len(byteContent) > 0 { + if debug { + fmt.Println("Response <= " + string(byteContent)) + } + return json.Unmarshal(byteContent, respObject) + } + + return nil +} + +func (rancherClient *RancherBaseClientImpl) Create(schemaType string, createObj interface{}, respObject interface{}) error { + return rancherClient.doCreate(schemaType, createObj, respObject) +} + +func (rancherClient *RancherBaseClientImpl) doCreate(schemaType string, createObj interface{}, respObject interface{}) error { + if createObj == nil { + createObj = map[string]string{} + } + if respObject == nil { + respObject = &map[string]interface{}{} + } + schema, ok := rancherClient.Types[schemaType] + if !ok { + return errors.New("Unknown schema type [" + schemaType + "]") + } + + if !contains(schema.CollectionMethods, "POST") { + return errors.New("Resource type [" + schemaType + "] is not creatable") + } + + var collectionUrl string + collectionUrl, ok = schema.Links[COLLECTION] + if !ok { + // return errors.New("Failed to find collection URL for [" + schemaType + "]") + // This is a hack to address https://github.com/rancher/cattle/issues/254 + re := regexp.MustCompile("schemas.*") + collectionUrl = re.ReplaceAllString(schema.Links[SELF], schema.PluralName) + } + + return rancherClient.doModify("POST", collectionUrl, createObj, respObject) +} + +func (rancherClient *RancherBaseClientImpl) Update(schemaType string, existing *Resource, updates interface{}, respObject interface{}) error { + return rancherClient.doUpdate(schemaType, existing, updates, respObject) +} + +func (rancherClient *RancherBaseClientImpl) doUpdate(schemaType string, existing *Resource, updates interface{}, respObject interface{}) error { + if existing == nil { + return errors.New("Existing object is nil") + } + + selfUrl, ok := existing.Links[SELF] + if !ok { + return errors.New(fmt.Sprintf("Failed to find self URL of [%v]", existing)) + } + + if updates == nil { + updates = map[string]string{} + } + + if respObject == nil { + respObject = &map[string]interface{}{} + } + + schema, ok := rancherClient.Types[schemaType] + if !ok { + return errors.New("Unknown schema type [" + schemaType + "]") + } + + if !contains(schema.ResourceMethods, "PUT") { + return errors.New("Resource type [" + schemaType + "] is not updatable") + } + + return rancherClient.doModify("PUT", selfUrl, updates, respObject) +} + +func (rancherClient *RancherBaseClientImpl) ById(schemaType string, id string, respObject interface{}) error { + return rancherClient.doById(schemaType, id, respObject) +} + +func (rancherClient *RancherBaseClientImpl) doById(schemaType string, id string, respObject interface{}) error { + schema, ok := rancherClient.Types[schemaType] + if !ok { + return errors.New("Unknown schema type [" + schemaType + "]") + } + + if !contains(schema.ResourceMethods, "GET") { + return errors.New("Resource type [" + schemaType + "] can not be looked up by ID") + } + + collectionUrl, ok := schema.Links[COLLECTION] + if !ok { + return errors.New("Failed to find collection URL for [" + schemaType + "]") + } + + err := rancherClient.doGet(collectionUrl+"/"+id, nil, respObject) + //TODO check for 404 and return nil, nil + return err +} + +func (rancherClient *RancherBaseClientImpl) Delete(existing *Resource) error { + if existing == nil { + return nil + } + return rancherClient.doResourceDelete(existing.Type, existing) +} + +func (rancherClient *RancherBaseClientImpl) doResourceDelete(schemaType string, existing *Resource) error { + schema, ok := rancherClient.Types[schemaType] + if !ok { + return errors.New("Unknown schema type [" + schemaType + "]") + } + + if !contains(schema.ResourceMethods, "DELETE") { + return errors.New("Resource type [" + schemaType + "] can not be deleted") + } + + selfUrl, ok := existing.Links[SELF] + if !ok { + return errors.New(fmt.Sprintf("Failed to find self URL of [%v]", existing)) + } + + return rancherClient.doDelete(selfUrl) +} + +func (rancherClient *RancherBaseClientImpl) Reload(existing *Resource, output interface{}) error { + selfUrl, ok := existing.Links[SELF] + if !ok { + return errors.New(fmt.Sprintf("Failed to find self URL of [%v]", existing)) + } + + return rancherClient.doGet(selfUrl, NewListOpts(), output) +} + +func (rancherClient *RancherBaseClientImpl) Action(schemaType string, action string, + existing *Resource, inputObject, respObject interface{}) error { + return rancherClient.doAction(schemaType, action, existing, inputObject, respObject) +} + +func (rancherClient *RancherBaseClientImpl) doAction(schemaType string, action string, + existing *Resource, inputObject, respObject interface{}) error { + + if existing == nil { + return errors.New("Existing object is nil") + } + + actionUrl, ok := existing.Actions[action] + if !ok { + return errors.New(fmt.Sprintf("Action [%v] not available on [%v]", action, existing)) + } + + _, ok = rancherClient.Types[schemaType] + if !ok { + return errors.New("Unknown schema type [" + schemaType + "]") + } + + var input io.Reader + + if inputObject != nil { + bodyContent, err := json.Marshal(inputObject) + if err != nil { + return err + } + if debug { + fmt.Println("Request => " + string(bodyContent)) + } + input = bytes.NewBuffer(bodyContent) + } + + client := rancherClient.newHttpClient() + req, err := http.NewRequest("POST", actionUrl, input) + if err != nil { + return err + } + + rancherClient.setupRequest(req) + req.Header.Set("Content-Type", "application/json") + req.Header.Set("Content-Length", "0") + + resp, err := client.Do(req) + if err != nil { + return err + } + + defer resp.Body.Close() + + if resp.StatusCode >= 300 { + return newApiError(resp, actionUrl) + } + + byteContent, err := ioutil.ReadAll(resp.Body) + if err != nil { + return err + } + + if debug { + fmt.Println("Response <= " + string(byteContent)) + } + + return json.Unmarshal(byteContent, respObject) +} + +func init() { + debug = os.Getenv("RANCHER_CLIENT_DEBUG") == "true" + if debug { + fmt.Println("Rancher client debug on") + } +} diff --git a/vendor/github.com/raphink/go-rancher/catalog/generated_api_version.go b/vendor/github.com/raphink/go-rancher/catalog/generated_api_version.go new file mode 100644 index 000000000000..436eafd91077 --- /dev/null +++ b/vendor/github.com/raphink/go-rancher/catalog/generated_api_version.go @@ -0,0 +1,71 @@ +package catalog + +const ( + API_VERSION_TYPE = "apiVersion" +) + +type ApiVersion struct { + Resource + + Actions map[string]interface{} `json:"actions,omitempty" yaml:"actions,omitempty"` + + Links map[string]interface{} `json:"links,omitempty" yaml:"links,omitempty"` + + Type string `json:"type,omitempty" yaml:"type,omitempty"` +} + +type ApiVersionCollection struct { + Collection + Data []ApiVersion `json:"data,omitempty"` +} + +type ApiVersionClient struct { + rancherClient *RancherClient +} + +type ApiVersionOperations interface { + List(opts *ListOpts) (*ApiVersionCollection, error) + Create(opts *ApiVersion) (*ApiVersion, error) + Update(existing *ApiVersion, updates interface{}) (*ApiVersion, error) + ById(id string) (*ApiVersion, error) + Delete(container *ApiVersion) error +} + +func newApiVersionClient(rancherClient *RancherClient) *ApiVersionClient { + return &ApiVersionClient{ + rancherClient: rancherClient, + } +} + +func (c *ApiVersionClient) Create(container *ApiVersion) (*ApiVersion, error) { + resp := &ApiVersion{} + err := c.rancherClient.doCreate(API_VERSION_TYPE, container, resp) + return resp, err +} + +func (c *ApiVersionClient) Update(existing *ApiVersion, updates interface{}) (*ApiVersion, error) { + resp := &ApiVersion{} + err := c.rancherClient.doUpdate(API_VERSION_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ApiVersionClient) List(opts *ListOpts) (*ApiVersionCollection, error) { + resp := &ApiVersionCollection{} + err := c.rancherClient.doList(API_VERSION_TYPE, opts, resp) + return resp, err +} + +func (c *ApiVersionClient) ById(id string) (*ApiVersion, error) { + resp := &ApiVersion{} + err := c.rancherClient.doById(API_VERSION_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ApiVersionClient) Delete(container *ApiVersion) error { + return c.rancherClient.doResourceDelete(API_VERSION_TYPE, &container.Resource) +} diff --git a/vendor/github.com/raphink/go-rancher/catalog/generated_catalog.go b/vendor/github.com/raphink/go-rancher/catalog/generated_catalog.go new file mode 100644 index 000000000000..97fa356ab2b7 --- /dev/null +++ b/vendor/github.com/raphink/go-rancher/catalog/generated_catalog.go @@ -0,0 +1,87 @@ +package catalog + +const ( + CATALOG_TYPE = "catalog" +) + +type Catalog struct { + Resource + + Actions map[string]interface{} `json:"actions,omitempty" yaml:"actions,omitempty"` + + Branch string `json:"branch,omitempty" yaml:"branch,omitempty"` + + CatalogRoot string `json:"catalogRoot,omitempty" yaml:"catalog_root,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + LastUpdated string `json:"lastUpdated,omitempty" yaml:"last_updated,omitempty"` + + Links map[string]interface{} `json:"links,omitempty" yaml:"links,omitempty"` + + Message string `json:"message,omitempty" yaml:"message,omitempty"` + + Metadata map[string]interface{} `json:"metadata,omitempty" yaml:"metadata,omitempty"` + + State string `json:"state,omitempty" yaml:"state,omitempty"` + + Type string `json:"type,omitempty" yaml:"type,omitempty"` + + Uri string `json:"uri,omitempty" yaml:"uri,omitempty"` +} + +type CatalogCollection struct { + Collection + Data []Catalog `json:"data,omitempty"` +} + +type CatalogClient struct { + rancherClient *RancherClient +} + +type CatalogOperations interface { + List(opts *ListOpts) (*CatalogCollection, error) + Create(opts *Catalog) (*Catalog, error) + Update(existing *Catalog, updates interface{}) (*Catalog, error) + ById(id string) (*Catalog, error) + Delete(container *Catalog) error +} + +func newCatalogClient(rancherClient *RancherClient) *CatalogClient { + return &CatalogClient{ + rancherClient: rancherClient, + } +} + +func (c *CatalogClient) Create(container *Catalog) (*Catalog, error) { + resp := &Catalog{} + err := c.rancherClient.doCreate(CATALOG_TYPE, container, resp) + return resp, err +} + +func (c *CatalogClient) Update(existing *Catalog, updates interface{}) (*Catalog, error) { + resp := &Catalog{} + err := c.rancherClient.doUpdate(CATALOG_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *CatalogClient) List(opts *ListOpts) (*CatalogCollection, error) { + resp := &CatalogCollection{} + err := c.rancherClient.doList(CATALOG_TYPE, opts, resp) + return resp, err +} + +func (c *CatalogClient) ById(id string) (*Catalog, error) { + resp := &Catalog{} + err := c.rancherClient.doById(CATALOG_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *CatalogClient) Delete(container *Catalog) error { + return c.rancherClient.doResourceDelete(CATALOG_TYPE, &container.Resource) +} diff --git a/vendor/github.com/raphink/go-rancher/catalog/generated_client.go b/vendor/github.com/raphink/go-rancher/catalog/generated_client.go new file mode 100644 index 000000000000..cb815476ef1f --- /dev/null +++ b/vendor/github.com/raphink/go-rancher/catalog/generated_client.go @@ -0,0 +1,41 @@ +package catalog + +type RancherClient struct { + RancherBaseClient + + ApiVersion ApiVersionOperations + Question QuestionOperations + Template TemplateOperations + TemplateVersion TemplateVersionOperations + Catalog CatalogOperations + Error ErrorOperations +} + +func constructClient(rancherBaseClient *RancherBaseClientImpl) *RancherClient { + client := &RancherClient{ + RancherBaseClient: rancherBaseClient, + } + + client.ApiVersion = newApiVersionClient(client) + client.Question = newQuestionClient(client) + client.Template = newTemplateClient(client) + client.TemplateVersion = newTemplateVersionClient(client) + client.Catalog = newCatalogClient(client) + client.Error = newErrorClient(client) + + return client +} + +func NewRancherClient(opts *ClientOpts) (*RancherClient, error) { + rancherBaseClient := &RancherBaseClientImpl{ + Types: map[string]Schema{}, + } + client := constructClient(rancherBaseClient) + + err := setupRancherBaseClient(rancherBaseClient, opts) + if err != nil { + return nil, err + } + + return client, nil +} diff --git a/vendor/github.com/raphink/go-rancher/catalog/generated_error.go b/vendor/github.com/raphink/go-rancher/catalog/generated_error.go new file mode 100644 index 000000000000..b478c733846c --- /dev/null +++ b/vendor/github.com/raphink/go-rancher/catalog/generated_error.go @@ -0,0 +1,75 @@ +package catalog + +const ( + ERROR_TYPE = "error" +) + +type Error struct { + Resource + + Actions map[string]interface{} `json:"actions,omitempty" yaml:"actions,omitempty"` + + Links map[string]interface{} `json:"links,omitempty" yaml:"links,omitempty"` + + Message string `json:"message,omitempty" yaml:"message,omitempty"` + + Status string `json:"status,omitempty" yaml:"status,omitempty"` + + Type string `json:"type,omitempty" yaml:"type,omitempty"` +} + +type ErrorCollection struct { + Collection + Data []Error `json:"data,omitempty"` +} + +type ErrorClient struct { + rancherClient *RancherClient +} + +type ErrorOperations interface { + List(opts *ListOpts) (*ErrorCollection, error) + Create(opts *Error) (*Error, error) + Update(existing *Error, updates interface{}) (*Error, error) + ById(id string) (*Error, error) + Delete(container *Error) error +} + +func newErrorClient(rancherClient *RancherClient) *ErrorClient { + return &ErrorClient{ + rancherClient: rancherClient, + } +} + +func (c *ErrorClient) Create(container *Error) (*Error, error) { + resp := &Error{} + err := c.rancherClient.doCreate(ERROR_TYPE, container, resp) + return resp, err +} + +func (c *ErrorClient) Update(existing *Error, updates interface{}) (*Error, error) { + resp := &Error{} + err := c.rancherClient.doUpdate(ERROR_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *ErrorClient) List(opts *ListOpts) (*ErrorCollection, error) { + resp := &ErrorCollection{} + err := c.rancherClient.doList(ERROR_TYPE, opts, resp) + return resp, err +} + +func (c *ErrorClient) ById(id string) (*Error, error) { + resp := &Error{} + err := c.rancherClient.doById(ERROR_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *ErrorClient) Delete(container *Error) error { + return c.rancherClient.doResourceDelete(ERROR_TYPE, &container.Resource) +} diff --git a/vendor/github.com/raphink/go-rancher/catalog/generated_question.go b/vendor/github.com/raphink/go-rancher/catalog/generated_question.go new file mode 100644 index 000000000000..06bcf97650ef --- /dev/null +++ b/vendor/github.com/raphink/go-rancher/catalog/generated_question.go @@ -0,0 +1,93 @@ +package catalog + +const ( + QUESTION_TYPE = "question" +) + +type Question struct { + Resource + + Default string `json:"default,omitempty" yaml:"default,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + Group string `json:"group,omitempty" yaml:"group,omitempty"` + + InvalidChars string `json:"invalidChars,omitempty" yaml:"invalid_chars,omitempty"` + + Label string `json:"label,omitempty" yaml:"label,omitempty"` + + Max int64 `json:"max,omitempty" yaml:"max,omitempty"` + + MaxLength int64 `json:"maxLength,omitempty" yaml:"max_length,omitempty"` + + Min int64 `json:"min,omitempty" yaml:"min,omitempty"` + + MinLength int64 `json:"minLength,omitempty" yaml:"min_length,omitempty"` + + Options []string `json:"options,omitempty" yaml:"options,omitempty"` + + Required bool `json:"required,omitempty" yaml:"required,omitempty"` + + Type string `json:"type,omitempty" yaml:"type,omitempty"` + + ValidChars string `json:"validChars,omitempty" yaml:"valid_chars,omitempty"` + + Variable string `json:"variable,omitempty" yaml:"variable,omitempty"` +} + +type QuestionCollection struct { + Collection + Data []Question `json:"data,omitempty"` +} + +type QuestionClient struct { + rancherClient *RancherClient +} + +type QuestionOperations interface { + List(opts *ListOpts) (*QuestionCollection, error) + Create(opts *Question) (*Question, error) + Update(existing *Question, updates interface{}) (*Question, error) + ById(id string) (*Question, error) + Delete(container *Question) error +} + +func newQuestionClient(rancherClient *RancherClient) *QuestionClient { + return &QuestionClient{ + rancherClient: rancherClient, + } +} + +func (c *QuestionClient) Create(container *Question) (*Question, error) { + resp := &Question{} + err := c.rancherClient.doCreate(QUESTION_TYPE, container, resp) + return resp, err +} + +func (c *QuestionClient) Update(existing *Question, updates interface{}) (*Question, error) { + resp := &Question{} + err := c.rancherClient.doUpdate(QUESTION_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *QuestionClient) List(opts *ListOpts) (*QuestionCollection, error) { + resp := &QuestionCollection{} + err := c.rancherClient.doList(QUESTION_TYPE, opts, resp) + return resp, err +} + +func (c *QuestionClient) ById(id string) (*Question, error) { + resp := &Question{} + err := c.rancherClient.doById(QUESTION_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *QuestionClient) Delete(container *Question) error { + return c.rancherClient.doResourceDelete(QUESTION_TYPE, &container.Resource) +} diff --git a/vendor/github.com/raphink/go-rancher/catalog/generated_template.go b/vendor/github.com/raphink/go-rancher/catalog/generated_template.go new file mode 100644 index 000000000000..d9b11a946325 --- /dev/null +++ b/vendor/github.com/raphink/go-rancher/catalog/generated_template.go @@ -0,0 +1,107 @@ +package catalog + +const ( + TEMPLATE_TYPE = "template" +) + +type Template struct { + Resource + + Actions map[string]interface{} `json:"actions,omitempty" yaml:"actions,omitempty"` + + Bindings map[string]interface{} `json:"bindings,omitempty" yaml:"bindings,omitempty"` + + CatalogId string `json:"catalogId,omitempty" yaml:"catalog_id,omitempty"` + + Category string `json:"category,omitempty" yaml:"category,omitempty"` + + DefaultVersion string `json:"defaultVersion,omitempty" yaml:"default_version,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + Files map[string]interface{} `json:"files,omitempty" yaml:"files,omitempty"` + + IsSystem string `json:"isSystem,omitempty" yaml:"is_system,omitempty"` + + Labels map[string]interface{} `json:"labels,omitempty" yaml:"labels,omitempty"` + + License string `json:"license,omitempty" yaml:"license,omitempty"` + + Links map[string]interface{} `json:"links,omitempty" yaml:"links,omitempty"` + + Maintainer string `json:"maintainer,omitempty" yaml:"maintainer,omitempty"` + + MinimumRancherVersion string `json:"minimumRancherVersion,omitempty" yaml:"minimum_rancher_version,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + Path string `json:"path,omitempty" yaml:"path,omitempty"` + + TemplateBase string `json:"templateBase,omitempty" yaml:"template_base,omitempty"` + + TemplateVersionRancherVersion map[string]interface{} `json:"templateVersionRancherVersion,omitempty" yaml:"template_version_rancher_version,omitempty"` + + Type string `json:"type,omitempty" yaml:"type,omitempty"` + + UpgradeFrom string `json:"upgradeFrom,omitempty" yaml:"upgrade_from,omitempty"` + + UpgradeVersionLinks map[string]interface{} `json:"upgradeVersionLinks,omitempty" yaml:"upgrade_version_links,omitempty"` + + VersionLinks map[string]interface{} `json:"versionLinks,omitempty" yaml:"version_links,omitempty"` +} + +type TemplateCollection struct { + Collection + Data []Template `json:"data,omitempty"` +} + +type TemplateClient struct { + rancherClient *RancherClient +} + +type TemplateOperations interface { + List(opts *ListOpts) (*TemplateCollection, error) + Create(opts *Template) (*Template, error) + Update(existing *Template, updates interface{}) (*Template, error) + ById(id string) (*Template, error) + Delete(container *Template) error +} + +func newTemplateClient(rancherClient *RancherClient) *TemplateClient { + return &TemplateClient{ + rancherClient: rancherClient, + } +} + +func (c *TemplateClient) Create(container *Template) (*Template, error) { + resp := &Template{} + err := c.rancherClient.doCreate(TEMPLATE_TYPE, container, resp) + return resp, err +} + +func (c *TemplateClient) Update(existing *Template, updates interface{}) (*Template, error) { + resp := &Template{} + err := c.rancherClient.doUpdate(TEMPLATE_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *TemplateClient) List(opts *ListOpts) (*TemplateCollection, error) { + resp := &TemplateCollection{} + err := c.rancherClient.doList(TEMPLATE_TYPE, opts, resp) + return resp, err +} + +func (c *TemplateClient) ById(id string) (*Template, error) { + resp := &Template{} + err := c.rancherClient.doById(TEMPLATE_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *TemplateClient) Delete(container *Template) error { + return c.rancherClient.doResourceDelete(TEMPLATE_TYPE, &container.Resource) +} diff --git a/vendor/github.com/raphink/go-rancher/catalog/generated_template_version.go b/vendor/github.com/raphink/go-rancher/catalog/generated_template_version.go new file mode 100644 index 000000000000..e6f462a34147 --- /dev/null +++ b/vendor/github.com/raphink/go-rancher/catalog/generated_template_version.go @@ -0,0 +1,117 @@ +package catalog + +const ( + TEMPLATE_VERSION_TYPE = "templateVersion" +) + +type TemplateVersion struct { + Resource + + Actions map[string]interface{} `json:"actions,omitempty" yaml:"actions,omitempty"` + + Bindings map[string]interface{} `json:"bindings,omitempty" yaml:"bindings,omitempty"` + + CatalogId string `json:"catalogId,omitempty" yaml:"catalog_id,omitempty"` + + Category string `json:"category,omitempty" yaml:"category,omitempty"` + + DefaultVersion string `json:"defaultVersion,omitempty" yaml:"default_version,omitempty"` + + Description string `json:"description,omitempty" yaml:"description,omitempty"` + + Files map[string]interface{} `json:"files,omitempty" yaml:"files,omitempty"` + + IconLink string `json:"iconLink,omitempty" yaml:"icon_link,omitempty"` + + IsSystem string `json:"isSystem,omitempty" yaml:"is_system,omitempty"` + + Labels map[string]interface{} `json:"labels,omitempty" yaml:"labels,omitempty"` + + License string `json:"license,omitempty" yaml:"license,omitempty"` + + Links map[string]interface{} `json:"links,omitempty" yaml:"links,omitempty"` + + Maintainer string `json:"maintainer,omitempty" yaml:"maintainer,omitempty"` + + MinimumRancherVersion string `json:"minimumRancherVersion,omitempty" yaml:"minimum_rancher_version,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + Path string `json:"path,omitempty" yaml:"path,omitempty"` + + ProjectURL string `json:"projectURL,omitempty" yaml:"project_url,omitempty"` + + Questions []string `json:"questions,omitempty" yaml:"questions,omitempty"` + + ReadmeLink string `json:"readmeLink,omitempty" yaml:"readme_link,omitempty"` + + TemplateBase string `json:"templateBase,omitempty" yaml:"template_base,omitempty"` + + TemplateVersionRancherVersion map[string]interface{} `json:"templateVersionRancherVersion,omitempty" yaml:"template_version_rancher_version,omitempty"` + + Type string `json:"type,omitempty" yaml:"type,omitempty"` + + UpgradeFrom string `json:"upgradeFrom,omitempty" yaml:"upgrade_from,omitempty"` + + UpgradeVersionLinks map[string]interface{} `json:"upgradeVersionLinks,omitempty" yaml:"upgrade_version_links,omitempty"` + + Version string `json:"version,omitempty" yaml:"version,omitempty"` + + VersionLinks map[string]interface{} `json:"versionLinks,omitempty" yaml:"version_links,omitempty"` +} + +type TemplateVersionCollection struct { + Collection + Data []TemplateVersion `json:"data,omitempty"` +} + +type TemplateVersionClient struct { + rancherClient *RancherClient +} + +type TemplateVersionOperations interface { + List(opts *ListOpts) (*TemplateVersionCollection, error) + Create(opts *TemplateVersion) (*TemplateVersion, error) + Update(existing *TemplateVersion, updates interface{}) (*TemplateVersion, error) + ById(id string) (*TemplateVersion, error) + Delete(container *TemplateVersion) error +} + +func newTemplateVersionClient(rancherClient *RancherClient) *TemplateVersionClient { + return &TemplateVersionClient{ + rancherClient: rancherClient, + } +} + +func (c *TemplateVersionClient) Create(container *TemplateVersion) (*TemplateVersion, error) { + resp := &TemplateVersion{} + err := c.rancherClient.doCreate(TEMPLATE_VERSION_TYPE, container, resp) + return resp, err +} + +func (c *TemplateVersionClient) Update(existing *TemplateVersion, updates interface{}) (*TemplateVersion, error) { + resp := &TemplateVersion{} + err := c.rancherClient.doUpdate(TEMPLATE_VERSION_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *TemplateVersionClient) List(opts *ListOpts) (*TemplateVersionCollection, error) { + resp := &TemplateVersionCollection{} + err := c.rancherClient.doList(TEMPLATE_VERSION_TYPE, opts, resp) + return resp, err +} + +func (c *TemplateVersionClient) ById(id string) (*TemplateVersion, error) { + resp := &TemplateVersion{} + err := c.rancherClient.doById(TEMPLATE_VERSION_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *TemplateVersionClient) Delete(container *TemplateVersion) error { + return c.rancherClient.doResourceDelete(TEMPLATE_VERSION_TYPE, &container.Resource) +} diff --git a/vendor/github.com/raphink/go-rancher/catalog/schemas.go b/vendor/github.com/raphink/go-rancher/catalog/schemas.go new file mode 100644 index 000000000000..7c8c578f0e46 --- /dev/null +++ b/vendor/github.com/raphink/go-rancher/catalog/schemas.go @@ -0,0 +1,129 @@ +package catalog + +import ( + "reflect" + "strings" +) + +type Schemas struct { + Collection + Data []Schema `json:"data,omitempty"` + schemasByName map[string]*Schema +} + +func (s *Schema) CheckField(name string) (Field, bool) { + for fieldName := range s.ResourceFields { + if fieldName == name { + v, ok := s.ResourceFields[fieldName] + return v, ok + } + } + return Field{}, false +} + +func (s *Schema) Field(name string) Field { + f, _ := s.CheckField(name) + return f +} + +func (s *Schemas) CheckSchema(name string) (Schema, bool) { + for i := range s.Data { + if s.Data[i].Id == name { + return s.Data[i], true + } + } + return Schema{}, false +} + +func (s *Schemas) Schema(name string) Schema { + r, _ := s.CheckSchema(name) + return r +} + +func typeToFields(t reflect.Type) map[string]Field { + result := map[string]Field{} + + for i := 0; i < t.NumField(); i++ { + schemaField := Field{} + + typeField := t.Field(i) + if typeField.Anonymous && typeField.Type.Kind() == reflect.Struct { + parentFields := typeToFields(typeField.Type) + for k, v := range result { + parentFields[k] = v + } + result = parentFields + continue + } else if typeField.Anonymous { + continue + } + + fieldString := strings.ToLower(typeField.Type.Kind().String()) + + switch { + case strings.HasPrefix(fieldString, "int") || strings.HasPrefix(fieldString, "uint"): + schemaField.Type = "int" + case fieldString == "bool": + schemaField.Type = fieldString + case fieldString == "float32" || fieldString == "float64": + schemaField.Type = "float" + case fieldString == "string": + schemaField.Type = "string" + case fieldString == "map": + // HACK + schemaField.Type = "map[string]" + case fieldString == "slice": + // HACK + schemaField.Type = "array[string]" + } + + name := strings.Split(typeField.Tag.Get("json"), ",")[0] + if name == "" && len(typeField.Name) > 1 { + name = strings.ToLower(typeField.Name[0:1]) + typeField.Name[1:] + } else if name == "" { + name = typeField.Name + } + + if schemaField.Type != "" { + result[name] = schemaField + } + } + + return result +} + +func (s *Schemas) AddType(schemaName string, obj interface{}) *Schema { + t := reflect.TypeOf(obj) + schema := Schema{ + Resource: Resource{ + Id: schemaName, + Type: "schema", + Links: map[string]string{}, + }, + PluralName: guessPluralName(schemaName), + ResourceFields: typeToFields(t), + CollectionMethods: []string{"GET"}, + ResourceMethods: []string{"GET"}, + } + + if s.Data == nil { + s.Data = []Schema{} + } + + s.Data = append(s.Data, schema) + + return &s.Data[len(s.Data)-1] +} + +func guessPluralName(name string) string { + if name == "" { + return "" + } + + if strings.HasSuffix(name, "s") || + strings.HasSuffix(name, "ch") || + strings.HasSuffix(name, "x") { + return name + "es" + } + return name + "s" +} diff --git a/vendor/github.com/raphink/go-rancher/catalog/types.go b/vendor/github.com/raphink/go-rancher/catalog/types.go new file mode 100644 index 000000000000..dce7bdaa352a --- /dev/null +++ b/vendor/github.com/raphink/go-rancher/catalog/types.go @@ -0,0 +1,95 @@ +package catalog + +type Collection struct { + Type string `json:"type,omitempty"` + ResourceType string `json:"resourceType,omitempty"` + Links map[string]string `json:"links,omitempty"` + CreateTypes map[string]string `json:"createTypes,omitempty"` + Actions map[string]string `json:"actions,omitempty"` + SortLinks map[string]string `json:"sortLinks,omitempty"` + Pagination *Pagination `json:"pagination,omitempty"` + Sort *Sort `json:"sort,omitempty"` + Filters map[string][]Condition `json:"filters,omitempty"` +} + +type GenericCollection struct { + Collection + Data []interface{} `json:"data,omitempty"` +} + +type ResourceCollection struct { + Collection + Data []Resource `json:"data,omitempty"` +} + +type Sort struct { + Name string `json:"name,omitempty"` + Order string `json:"order,omitempty"` + Reverse string `json:"reverse,omitempty"` +} + +type Condition struct { + Modifier string `json:"modifier,omitempty"` + Value interface{} `json:"value,omitempty"` +} + +type Pagination struct { + Marker string `json:"marker,omitempty"` + First string `json:"first,omitempty"` + Previous string `json:"previous,omitempty"` + Next string `json:"next,omitempty"` + Limit *int64 `json:"limit,omitempty"` + Total *int64 `json:"total,omitempty"` + Partial bool `json:"partial,omitempty"` +} + +type Resource struct { + Id string `json:"id,omitempty"` + Type string `json:"type,omitempty"` + Links map[string]string `json:"links"` + Actions map[string]string `json:"actions"` +} + +type Schema struct { + Resource + PluralName string `json:"pluralName,omitempty"` + ResourceMethods []string `json:"resourceMethods,omitempty"` + ResourceFields map[string]Field `json:"resourceFields,omitempty"` + ResourceActions map[string]Action `json:"resourceActions,omitempty"` + CollectionMethods []string `json:"collectionMethods,omitempty"` + CollectionFields map[string]Field `json:"collectionFields,omitempty"` + CollectionActions map[string]Action `json:"collectionActions,omitempty"` + CollectionFilters map[string]Filter `json:"collectionFilters,omitempty"` + IncludeableLinks []string `json:"includeableLinks,omitempty"` +} + +type Field struct { + Type string `json:"type,omitempty"` + Default interface{} `json:"default,omitempty"` + Unique bool `json:"unique,omitempty"` + Nullable bool `json:"nullable,omitempty"` + Create bool `json:"create,omitempty"` + Required bool `json:"required,omitempty"` + Update bool `json:"update,omitempty"` + MinLength *int64 `json:"minLength,omitempty"` + MaxLength *int64 `json:"maxLength,omitempty"` + Min *int64 `json:"min,omitempty"` + Max *int64 `json:"max,omitempty"` + Options []string `json:"options,omitempty"` + ValidChars string `json:"validChars,omitempty"` + InvalidChars string `json:"invalidChars,omitempty"` + Description string `json:"description,omitempty"` +} + +type Action struct { + Input string `json:"input,omitempty"` + Output string `json:"output,omitempty"` +} + +type Filter struct { + Modifiers []string `json:"modifiers,omitempty"` +} + +type ListOpts struct { + Filters map[string]interface{} +} diff --git a/vendor/vendor.json b/vendor/vendor.json index 1ee3768596ef..e80144352e16 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -1931,6 +1931,18 @@ "path": "github.com/rainycape/unidecode", "revision": "cb7f23ec59bec0d61b19c56cd88cee3d0cc1870c" }, + { + "checksumSHA1": "qn7N2kqSpKKi3YglZNyoQxp4aKs=", + "path": "github.com/rancher/go-rancher/client", + "revision": "bdb84801f2cf82be73e210ff586c531b07c83c42", + "revisionTime": "2016-07-27T23:27:26Z" + }, + { + "checksumSHA1": "3GxN1UayE1AG4mG+Cg+MlzqoWT8=", + "path": "github.com/raphink/go-rancher/catalog", + "revision": "49b8414f0a18a3a8054adda704eddddbbfd6fbe2", + "revisionTime": "2016-09-28T08:39:49Z", + }, { "comment": "v2.0.1-8-g983d3a5", "path": "github.com/ryanuber/columnize", From 14d3eacc297dfcb9836c18eead3879ee702713c7 Mon Sep 17 00:00:00 2001 From: John Engelman Date: Tue, 25 Oct 2016 08:20:51 -0500 Subject: [PATCH 2/2] Implement Rancher Provider. Starting implementation taken from https://github.com/platanus/terraform-provider-rancher Commits from jidonoso@gmail.com and raphael.pinson@camptocamp.com --- builtin/bins/provider-rancher/main.go | 15 + builtin/providers/rancher/config.go | 76 ++++ .../import_rancher_environment_test.go | 28 ++ .../import_rancher_registration_token_test.go | 28 ++ ...import_rancher_registry_credential_test.go | 30 ++ .../rancher/import_rancher_registry_test.go | 28 ++ .../rancher/import_rancher_stack_test.go | 28 ++ builtin/providers/rancher/provider.go | 66 +++ builtin/providers/rancher/provider_test.go | 35 ++ .../rancher/resource_rancher_environment.go | 194 +++++++++ .../resource_rancher_environment_test.go | 107 +++++ .../resource_rancher_registration_token.go | 198 +++++++++ ...esource_rancher_registration_token_test.go | 123 ++++++ .../rancher/resource_rancher_registry.go | 210 ++++++++++ .../resource_rancher_registry_credential.go | 232 +++++++++++ ...source_rancher_registry_credential_test.go | 135 ++++++ .../rancher/resource_rancher_registry_test.go | 147 +++++++ .../rancher/resource_rancher_stack.go | 384 ++++++++++++++++++ .../rancher/resource_rancher_stack_test.go | 311 ++++++++++++++ builtin/providers/rancher/util.go | 19 + command/internal_plugin_list.go | 2 + website/source/assets/stylesheets/_docs.scss | 1 + .../providers/rancher/index.html.markdown | 33 ++ .../providers/rancher/r/environment.html.md | 42 ++ .../r/registration_token.html.markdown | 46 +++ .../rancher/r/registry.html.markdown | 44 ++ .../r/registry_credential.html.markdown | 48 +++ .../providers/rancher/r/stack.html.markdown | 64 +++ website/source/layouts/docs.erb | 4 + website/source/layouts/rancher.erb | 38 ++ 30 files changed, 2716 insertions(+) create mode 100644 builtin/bins/provider-rancher/main.go create mode 100644 builtin/providers/rancher/config.go create mode 100644 builtin/providers/rancher/import_rancher_environment_test.go create mode 100644 builtin/providers/rancher/import_rancher_registration_token_test.go create mode 100644 builtin/providers/rancher/import_rancher_registry_credential_test.go create mode 100644 builtin/providers/rancher/import_rancher_registry_test.go create mode 100644 builtin/providers/rancher/import_rancher_stack_test.go create mode 100644 builtin/providers/rancher/provider.go create mode 100644 builtin/providers/rancher/provider_test.go create mode 100644 builtin/providers/rancher/resource_rancher_environment.go create mode 100644 builtin/providers/rancher/resource_rancher_environment_test.go create mode 100644 builtin/providers/rancher/resource_rancher_registration_token.go create mode 100644 builtin/providers/rancher/resource_rancher_registration_token_test.go create mode 100644 builtin/providers/rancher/resource_rancher_registry.go create mode 100644 builtin/providers/rancher/resource_rancher_registry_credential.go create mode 100644 builtin/providers/rancher/resource_rancher_registry_credential_test.go create mode 100644 builtin/providers/rancher/resource_rancher_registry_test.go create mode 100644 builtin/providers/rancher/resource_rancher_stack.go create mode 100644 builtin/providers/rancher/resource_rancher_stack_test.go create mode 100644 builtin/providers/rancher/util.go create mode 100644 website/source/docs/providers/rancher/index.html.markdown create mode 100644 website/source/docs/providers/rancher/r/environment.html.md create mode 100644 website/source/docs/providers/rancher/r/registration_token.html.markdown create mode 100644 website/source/docs/providers/rancher/r/registry.html.markdown create mode 100644 website/source/docs/providers/rancher/r/registry_credential.html.markdown create mode 100644 website/source/docs/providers/rancher/r/stack.html.markdown create mode 100644 website/source/layouts/rancher.erb diff --git a/builtin/bins/provider-rancher/main.go b/builtin/bins/provider-rancher/main.go new file mode 100644 index 000000000000..adad816361b3 --- /dev/null +++ b/builtin/bins/provider-rancher/main.go @@ -0,0 +1,15 @@ +package main + +import ( + "github.com/hashicorp/terraform/builtin/providers/rancher" + "github.com/hashicorp/terraform/plugin" + "github.com/hashicorp/terraform/terraform" +) + +func main() { + plugin.Serve(&plugin.ServeOpts{ + ProviderFunc: func() terraform.ResourceProvider { + return rancher.Provider() + }, + }) +} diff --git a/builtin/providers/rancher/config.go b/builtin/providers/rancher/config.go new file mode 100644 index 000000000000..a17a91ab6854 --- /dev/null +++ b/builtin/providers/rancher/config.go @@ -0,0 +1,76 @@ +package rancher + +import ( + "log" + + rancherClient "github.com/rancher/go-rancher/client" + "github.com/raphink/go-rancher/catalog" +) + +type Config struct { + *rancherClient.RancherClient + APIURL string + AccessKey string + SecretKey string +} + +// Create creates a generic Rancher client +func (c *Config) CreateClient() error { + client, err := rancherClient.NewRancherClient(&rancherClient.ClientOpts{ + Url: c.APIURL, + AccessKey: c.AccessKey, + SecretKey: c.SecretKey, + }) + if err != nil { + return err + } + + log.Printf("[INFO] Rancher Client configured for url: %s", c.APIURL) + + c.RancherClient = client + + return nil +} + +func (c *Config) EnvironmentClient(env string) (*rancherClient.RancherClient, error) { + + url := c.APIURL + "/projects/" + env + "/schemas" + client, err := rancherClient.NewRancherClient(&rancherClient.ClientOpts{ + Url: url, + AccessKey: c.AccessKey, + SecretKey: c.SecretKey, + }) + if err != nil { + return nil, err + } + + log.Printf("[INFO] Rancher Client configured for url: %s", url) + + return client, nil +} + +func (c *Config) RegistryClient(id string) (*rancherClient.RancherClient, error) { + reg, err := c.Registry.ById(id) + if err != nil { + return nil, err + } + + return c.EnvironmentClient(reg.AccountId) +} + +func (c *Config) CatalogClient() (*catalog.RancherClient, error) { + + url := c.APIURL + "-catalog/schemas" + client, err := catalog.NewRancherClient(&catalog.ClientOpts{ + Url: url, + AccessKey: c.AccessKey, + SecretKey: c.SecretKey, + }) + if err != nil { + return nil, err + } + + log.Printf("[INFO] Rancher Catalog Client configured for url: %s", url) + + return client, nil +} diff --git a/builtin/providers/rancher/import_rancher_environment_test.go b/builtin/providers/rancher/import_rancher_environment_test.go new file mode 100644 index 000000000000..0b2a52173946 --- /dev/null +++ b/builtin/providers/rancher/import_rancher_environment_test.go @@ -0,0 +1,28 @@ +package rancher + +import ( + "testing" + + "github.com/hashicorp/terraform/helper/resource" +) + +func TestAccRancherEnvironment_importBasic(t *testing.T) { + resourceName := "rancher_environment.foo" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckRancherEnvironmentDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccRancherEnvironmentConfig, + }, + + resource.TestStep{ + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} diff --git a/builtin/providers/rancher/import_rancher_registration_token_test.go b/builtin/providers/rancher/import_rancher_registration_token_test.go new file mode 100644 index 000000000000..24a0b9b8a8e9 --- /dev/null +++ b/builtin/providers/rancher/import_rancher_registration_token_test.go @@ -0,0 +1,28 @@ +package rancher + +import ( + "testing" + + "github.com/hashicorp/terraform/helper/resource" +) + +func TestAccRancherRegistrationToken_importBasic(t *testing.T) { + resourceName := "rancher_registration_token.foo" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckRancherRegistrationTokenDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccRancherRegistrationTokenConfig, + }, + + resource.TestStep{ + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} diff --git a/builtin/providers/rancher/import_rancher_registry_credential_test.go b/builtin/providers/rancher/import_rancher_registry_credential_test.go new file mode 100644 index 000000000000..9e292880398c --- /dev/null +++ b/builtin/providers/rancher/import_rancher_registry_credential_test.go @@ -0,0 +1,30 @@ +package rancher + +import ( + "testing" + + "github.com/hashicorp/terraform/helper/resource" +) + +func TestAccRancherRegistryCredential_importBasic(t *testing.T) { + resourceName := "rancher_registry_credential.foo" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckRancherRegistryCredentialDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccRancherRegistryCredentialConfig, + }, + + resource.TestStep{ + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + ImportStateVerifyIgnore: []string{ + "secret_value"}, + }, + }, + }) +} diff --git a/builtin/providers/rancher/import_rancher_registry_test.go b/builtin/providers/rancher/import_rancher_registry_test.go new file mode 100644 index 000000000000..f1c9db86c3e0 --- /dev/null +++ b/builtin/providers/rancher/import_rancher_registry_test.go @@ -0,0 +1,28 @@ +package rancher + +import ( + "testing" + + "github.com/hashicorp/terraform/helper/resource" +) + +func TestAccRancherRegistry_importBasic(t *testing.T) { + resourceName := "rancher_registry.foo" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckRancherRegistryDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccRancherRegistryConfig, + }, + + resource.TestStep{ + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} diff --git a/builtin/providers/rancher/import_rancher_stack_test.go b/builtin/providers/rancher/import_rancher_stack_test.go new file mode 100644 index 000000000000..029b8c4dd086 --- /dev/null +++ b/builtin/providers/rancher/import_rancher_stack_test.go @@ -0,0 +1,28 @@ +package rancher + +import ( + "testing" + + "github.com/hashicorp/terraform/helper/resource" +) + +func TestAccRancherStack_importBasic(t *testing.T) { + resourceName := "rancher_stack.foo" + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckRancherStackDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccRancherStackConfig, + }, + + resource.TestStep{ + ResourceName: resourceName, + ImportState: true, + ImportStateVerify: true, + }, + }, + }) +} diff --git a/builtin/providers/rancher/provider.go b/builtin/providers/rancher/provider.go new file mode 100644 index 000000000000..e553b649ef03 --- /dev/null +++ b/builtin/providers/rancher/provider.go @@ -0,0 +1,66 @@ +package rancher + +import ( + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/terraform" +) + +// Provider returns a terraform.ResourceProvider. +func Provider() terraform.ResourceProvider { + return &schema.Provider{ + Schema: map[string]*schema.Schema{ + "api_url": &schema.Schema{ + Type: schema.TypeString, + Required: true, + DefaultFunc: schema.EnvDefaultFunc("RANCHER_URL", nil), + Description: descriptions["api_url"], + }, + "access_key": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + DefaultFunc: schema.EnvDefaultFunc("RANCHER_ACCESS_KEY", ""), + Description: descriptions["access_key"], + }, + "secret_key": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + DefaultFunc: schema.EnvDefaultFunc("RANCHER_SECRET_KEY", ""), + Description: descriptions["secret_key"], + }, + }, + + ResourcesMap: map[string]*schema.Resource{ + "rancher_environment": resourceRancherEnvironment(), + "rancher_registration_token": resourceRancherRegistrationToken(), + "rancher_registry": resourceRancherRegistry(), + "rancher_registry_credential": resourceRancherRegistryCredential(), + "rancher_stack": resourceRancherStack(), + }, + + ConfigureFunc: providerConfigure, + } +} + +var descriptions map[string]string + +func init() { + descriptions = map[string]string{ + "access_key": "API Key used to authenticate with the rancher server", + + "secret_key": "API secret used to authenticate with the rancher server", + + "api_url": "The URL to the rancher API", + } +} + +func providerConfigure(d *schema.ResourceData) (interface{}, error) { + config := &Config{ + APIURL: d.Get("api_url").(string) + "/v1", + AccessKey: d.Get("access_key").(string), + SecretKey: d.Get("secret_key").(string), + } + + err := config.CreateClient() + + return config, err +} diff --git a/builtin/providers/rancher/provider_test.go b/builtin/providers/rancher/provider_test.go new file mode 100644 index 000000000000..b79e340c272f --- /dev/null +++ b/builtin/providers/rancher/provider_test.go @@ -0,0 +1,35 @@ +package rancher + +import ( + "os" + "testing" + + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/terraform" +) + +var testAccProviders map[string]terraform.ResourceProvider +var testAccProvider *schema.Provider + +func init() { + testAccProvider = Provider().(*schema.Provider) + testAccProviders = map[string]terraform.ResourceProvider{ + "rancher": testAccProvider, + } +} + +func TestProvider(t *testing.T) { + if err := Provider().(*schema.Provider).InternalValidate(); err != nil { + t.Fatalf("err: %s", err) + } +} + +func TestProvider_impl(t *testing.T) { + var _ terraform.ResourceProvider = Provider() +} + +func testAccPreCheck(t *testing.T) { + if v := os.Getenv("RANCHER_URL"); v == "" { + t.Fatal("RANCHER_URL must be set for acceptance tests") + } +} diff --git a/builtin/providers/rancher/resource_rancher_environment.go b/builtin/providers/rancher/resource_rancher_environment.go new file mode 100644 index 000000000000..4d599b97af1a --- /dev/null +++ b/builtin/providers/rancher/resource_rancher_environment.go @@ -0,0 +1,194 @@ +package rancher + +import ( + "fmt" + "log" + "strings" + "time" + + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" + rancherClient "github.com/rancher/go-rancher/client" +) + +func resourceRancherEnvironment() *schema.Resource { + return &schema.Resource{ + Create: resourceRancherEnvironmentCreate, + Read: resourceRancherEnvironmentRead, + Update: resourceRancherEnvironmentUpdate, + Delete: resourceRancherEnvironmentDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "id": &schema.Schema{ + Type: schema.TypeString, + Computed: true, + }, + "name": &schema.Schema{ + Type: schema.TypeString, + Required: true, + }, + "orchestration": &schema.Schema{ + Type: schema.TypeString, + Default: "cattle", + Optional: true, + ValidateFunc: validation.StringInSlice([]string{"cattle", "kubernetes", "mesos", "swarm"}, true), + }, + "description": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + }, + }, + } +} + +func resourceRancherEnvironmentCreate(d *schema.ResourceData, meta interface{}) error { + log.Printf("[INFO] Creating Environment: %s", d.Id()) + client := meta.(*Config) + + name := d.Get("name").(string) + description := d.Get("description").(string) + orchestration := d.Get("orchestration").(string) + + data := map[string]interface{}{ + "name": &name, + "description": &description, + } + + setOrchestrationFields(orchestration, data) + + var newEnv rancherClient.Project + if err := client.Create("project", data, &newEnv); err != nil { + return err + } + + stateConf := &resource.StateChangeConf{ + Pending: []string{"active", "removed", "removing"}, + Target: []string{"active"}, + Refresh: EnvironmentStateRefreshFunc(client, newEnv.Id), + Timeout: 10 * time.Minute, + Delay: 1 * time.Second, + MinTimeout: 3 * time.Second, + } + _, waitErr := stateConf.WaitForState() + if waitErr != nil { + return fmt.Errorf( + "Error waiting for environment (%s) to be created: %s", newEnv.Id, waitErr) + } + + d.SetId(newEnv.Id) + log.Printf("[INFO] Environment ID: %s", d.Id()) + + return resourceRancherEnvironmentRead(d, meta) +} + +func resourceRancherEnvironmentRead(d *schema.ResourceData, meta interface{}) error { + log.Printf("[INFO] Refreshing Environment: %s", d.Id()) + client := meta.(*Config) + + env, err := client.Project.ById(d.Id()) + if err != nil { + return err + } + + log.Printf("[INFO] Environment Name: %s", env.Name) + + d.Set("description", env.Description) + d.Set("name", env.Name) + d.Set("orchestration", GetActiveOrchestration(env)) + + return nil +} + +func resourceRancherEnvironmentUpdate(d *schema.ResourceData, meta interface{}) error { + client := meta.(*Config) + + name := d.Get("name").(string) + description := d.Get("description").(string) + orchestration := d.Get("orchestration").(string) + + data := map[string]interface{}{ + "name": &name, + "description": &description, + } + + setOrchestrationFields(orchestration, data) + + var newEnv rancherClient.Project + env, err := client.Project.ById(d.Id()) + if err != nil { + return err + } + + if err := client.Update("project", &env.Resource, data, &newEnv); err != nil { + return err + } + + return resourceRancherEnvironmentRead(d, meta) +} + +func resourceRancherEnvironmentDelete(d *schema.ResourceData, meta interface{}) error { + log.Printf("[INFO] Deleting Environment: %s", d.Id()) + id := d.Id() + client := meta.(*Config) + + env, err := client.Project.ById(id) + if err != nil { + return err + } + + if err := client.Project.Delete(env); err != nil { + return fmt.Errorf("Error deleting Environment: %s", err) + } + + log.Printf("[DEBUG] Waiting for environment (%s) to be removed", id) + + stateConf := &resource.StateChangeConf{ + Pending: []string{"active", "removed", "removing"}, + Target: []string{"removed"}, + Refresh: EnvironmentStateRefreshFunc(client, id), + Timeout: 10 * time.Minute, + Delay: 1 * time.Second, + MinTimeout: 3 * time.Second, + } + + _, waitErr := stateConf.WaitForState() + if waitErr != nil { + return fmt.Errorf( + "Error waiting for environment (%s) to be removed: %s", id, waitErr) + } + + d.SetId("") + return nil +} + +func setOrchestrationFields(orchestration string, data map[string]interface{}) { + orch := strings.ToLower(orchestration) + + data["swarm"] = false + data["kubernetes"] = false + data["mesos"] = false + + if orch == "k8s" { + orch = "kubernetes" + } + + data[orch] = true +} + +// EnvironmentStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch +// a Rancher Environment. +func EnvironmentStateRefreshFunc(client *Config, environmentID string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + env, err := client.Project.ById(environmentID) + + if err != nil { + return nil, "", err + } + + return env, env.State, nil + } +} diff --git a/builtin/providers/rancher/resource_rancher_environment_test.go b/builtin/providers/rancher/resource_rancher_environment_test.go new file mode 100644 index 000000000000..d71fd35d5782 --- /dev/null +++ b/builtin/providers/rancher/resource_rancher_environment_test.go @@ -0,0 +1,107 @@ +package rancher + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" + rancherClient "github.com/rancher/go-rancher/client" +) + +func TestAccRancherEnvironment(t *testing.T) { + var environment rancherClient.Project + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckRancherEnvironmentDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccRancherEnvironmentConfig, + Check: resource.ComposeTestCheckFunc( + testAccCheckRancherEnvironmentExists("rancher_environment.foo", &environment), + resource.TestCheckResourceAttr("rancher_environment.foo", "name", "foo"), + resource.TestCheckResourceAttr("rancher_environment.foo", "description", "Terraform acc test group"), + resource.TestCheckResourceAttr("rancher_environment.foo", "orchestration", "cattle"), + ), + }, + resource.TestStep{ + Config: testAccRancherEnvironmentUpdateConfig, + Check: resource.ComposeTestCheckFunc( + testAccCheckRancherEnvironmentExists("rancher_environment.foo", &environment), + resource.TestCheckResourceAttr("rancher_environment.foo", "name", "foo2"), + resource.TestCheckResourceAttr("rancher_environment.foo", "description", "Terraform acc test group - updated"), + resource.TestCheckResourceAttr("rancher_environment.foo", "orchestration", "swarm"), + ), + }, + }, + }) +} + +func testAccCheckRancherEnvironmentExists(n string, env *rancherClient.Project) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No App Name is set") + } + + client := testAccProvider.Meta().(*Config) + + foundEnv, err := client.Project.ById(rs.Primary.ID) + if err != nil { + return err + } + + if foundEnv.Resource.Id != rs.Primary.ID { + return fmt.Errorf("Environment not found") + } + + *env = *foundEnv + + return nil + } +} + +func testAccCheckRancherEnvironmentDestroy(s *terraform.State) error { + client := testAccProvider.Meta().(*Config) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "rancher_environment" { + continue + } + env, err := client.Project.ById(rs.Primary.ID) + + if err == nil { + if env != nil && + env.Resource.Id == rs.Primary.ID && + env.State != "removed" { + return fmt.Errorf("Environment still exists") + } + } + + return nil + } + return nil +} + +const testAccRancherEnvironmentConfig = ` +resource "rancher_environment" "foo" { + name = "foo" + description = "Terraform acc test group" + orchestration = "cattle" +} +` + +const testAccRancherEnvironmentUpdateConfig = ` +resource "rancher_environment" "foo" { + name = "foo2" + description = "Terraform acc test group - updated" + orchestration = "swarm" +} +` diff --git a/builtin/providers/rancher/resource_rancher_registration_token.go b/builtin/providers/rancher/resource_rancher_registration_token.go new file mode 100644 index 000000000000..85bb33d6515e --- /dev/null +++ b/builtin/providers/rancher/resource_rancher_registration_token.go @@ -0,0 +1,198 @@ +package rancher + +import ( + "fmt" + "log" + "time" + + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + rancherClient "github.com/rancher/go-rancher/client" +) + +func resourceRancherRegistrationToken() *schema.Resource { + return &schema.Resource{ + Create: resourceRancherRegistrationTokenCreate, + Read: resourceRancherRegistrationTokenRead, + Delete: resourceRancherRegistrationTokenDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "id": &schema.Schema{ + Type: schema.TypeString, + Computed: true, + }, + "name": &schema.Schema{ + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "description": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + ForceNew: true, + }, + "environment_id": &schema.Schema{ + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "token": &schema.Schema{ + Type: schema.TypeString, + Computed: true, + }, + "registration_url": &schema.Schema{ + Type: schema.TypeString, + Computed: true, + }, + "command": &schema.Schema{ + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceRancherRegistrationTokenCreate(d *schema.ResourceData, meta interface{}) error { + log.Printf("[INFO] Creating RegistrationToken: %s", d.Id()) + client, err := meta.(*Config).EnvironmentClient(d.Get("environment_id").(string)) + if err != nil { + return err + } + + name := d.Get("name").(string) + description := d.Get("description").(string) + + data := map[string]interface{}{ + "name": &name, + "description": &description, + } + + var newRegT rancherClient.RegistrationToken + if err := client.Create("registrationToken", data, &newRegT); err != nil { + return err + } + + stateConf := &resource.StateChangeConf{ + Pending: []string{"active", "removed", "removing"}, + Target: []string{"active"}, + Refresh: RegistrationTokenStateRefreshFunc(client, newRegT.Id), + Timeout: 10 * time.Minute, + Delay: 1 * time.Second, + MinTimeout: 3 * time.Second, + } + _, waitErr := stateConf.WaitForState() + if waitErr != nil { + return fmt.Errorf( + "Error waiting for registration token (%s) to be created: %s", newRegT.Id, waitErr) + } + + d.SetId(newRegT.Id) + log.Printf("[INFO] RegistrationToken ID: %s", d.Id()) + + return resourceRancherRegistrationTokenRead(d, meta) +} + +func resourceRancherRegistrationTokenRead(d *schema.ResourceData, meta interface{}) error { + log.Printf("[INFO] Refreshing RegistrationToken: %s", d.Id()) + client := meta.(*Config) + + regT, err := client.RegistrationToken.ById(d.Id()) + if err != nil { + return err + } + + log.Printf("[INFO] RegistrationToken Name: %s", regT.Name) + + d.Set("description", regT.Description) + d.Set("name", regT.Name) + d.Set("token", regT.Token) + d.Set("registration_url", regT.RegistrationUrl) + d.Set("environment_id", regT.AccountId) + d.Set("command", regT.Command) + + return nil +} + +func resourceRancherRegistrationTokenDelete(d *schema.ResourceData, meta interface{}) error { + log.Printf("[INFO] Deleting RegistrationToken: %s", d.Id()) + id := d.Id() + client, err := meta.(*Config).EnvironmentClient(d.Get("environment_id").(string)) + if err != nil { + return err + } + + regT, err := client.RegistrationToken.ById(id) + if err != nil { + return err + } + + // Step 1: Deactivate + if _, e := client.RegistrationToken.ActionDeactivate(regT); e != nil { + return fmt.Errorf("Error deactivating RegistrationToken: %s", err) + } + + log.Printf("[DEBUG] Waiting for registration token (%s) to be deactivated", id) + + stateConf := &resource.StateChangeConf{ + Pending: []string{"active", "inactive", "deactivating"}, + Target: []string{"inactive"}, + Refresh: RegistrationTokenStateRefreshFunc(client, id), + Timeout: 10 * time.Minute, + Delay: 1 * time.Second, + MinTimeout: 3 * time.Second, + } + + _, waitErr := stateConf.WaitForState() + if waitErr != nil { + return fmt.Errorf( + "Error waiting for registration token (%s) to be deactivated: %s", id, waitErr) + } + + // Update resource to reflect its state + regT, err = client.RegistrationToken.ById(id) + if err != nil { + return fmt.Errorf("Failed to refresh state of deactivated registration token (%s): %s", id, err) + } + + // Step 2: Remove + if _, err := client.RegistrationToken.ActionRemove(regT); err != nil { + return fmt.Errorf("Error removing RegistrationToken: %s", err) + } + + log.Printf("[DEBUG] Waiting for registration token (%s) to be removed", id) + + stateConf = &resource.StateChangeConf{ + Pending: []string{"inactive", "removed", "removing"}, + Target: []string{"removed"}, + Refresh: RegistrationTokenStateRefreshFunc(client, id), + Timeout: 10 * time.Minute, + Delay: 1 * time.Second, + MinTimeout: 3 * time.Second, + } + + _, waitErr = stateConf.WaitForState() + if waitErr != nil { + return fmt.Errorf( + "Error waiting for registration token (%s) to be removed: %s", id, waitErr) + } + + d.SetId("") + return nil +} + +// RegistrationTokenStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch +// a Rancher RegistrationToken. +func RegistrationTokenStateRefreshFunc(client *rancherClient.RancherClient, regTID string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + regT, err := client.RegistrationToken.ById(regTID) + + if err != nil { + return nil, "", err + } + + return regT, regT.State, nil + } +} diff --git a/builtin/providers/rancher/resource_rancher_registration_token_test.go b/builtin/providers/rancher/resource_rancher_registration_token_test.go new file mode 100644 index 000000000000..d150158e367a --- /dev/null +++ b/builtin/providers/rancher/resource_rancher_registration_token_test.go @@ -0,0 +1,123 @@ +package rancher + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" + rancherClient "github.com/rancher/go-rancher/client" +) + +func TestAccRancherRegistrationToken(t *testing.T) { + var registrationToken rancherClient.RegistrationToken + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckRancherRegistrationTokenDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccRancherRegistrationTokenConfig, + Check: resource.ComposeTestCheckFunc( + testAccCheckRancherRegistrationTokenExists("rancher_registration_token.foo", ®istrationToken), + resource.TestCheckResourceAttr( + "rancher_registration_token.foo", "name", "foo"), + resource.TestCheckResourceAttr( + "rancher_registration_token.foo", "description", "Terraform acc test group"), + resource.TestCheckResourceAttrSet("rancher_registration_token.foo", "command"), + resource.TestCheckResourceAttrSet("rancher_registration_token.foo", "registration_url"), + resource.TestCheckResourceAttrSet("rancher_registration_token.foo", "token"), + ), + }, + resource.TestStep{ + Config: testAccRancherRegistrationTokenUpdateConfig, + Check: resource.ComposeTestCheckFunc( + testAccCheckRancherRegistrationTokenExists("rancher_registration_token.foo", ®istrationToken), + resource.TestCheckResourceAttr( + "rancher_registration_token.foo", "name", "foo-u"), + resource.TestCheckResourceAttr( + "rancher_registration_token.foo", "description", "Terraform acc test group-u"), + resource.TestCheckResourceAttrSet("rancher_registration_token.foo", "command"), + resource.TestCheckResourceAttrSet("rancher_registration_token.foo", "registration_url"), + resource.TestCheckResourceAttrSet("rancher_registration_token.foo", "token"), + ), + }, + }, + }) +} + +func testAccCheckRancherRegistrationTokenExists(n string, regT *rancherClient.RegistrationToken) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No App Name is set") + } + + client := testAccProvider.Meta().(*Config) + + foundRegT, err := client.RegistrationToken.ById(rs.Primary.ID) + if err != nil { + return err + } + + if foundRegT.Resource.Id != rs.Primary.ID { + return fmt.Errorf("RegistrationToken not found") + } + + *regT = *foundRegT + + return nil + } +} + +func testAccCheckRancherRegistrationTokenDestroy(s *terraform.State) error { + client := testAccProvider.Meta().(*Config) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "rancher_registration_token" { + continue + } + regT, err := client.RegistrationToken.ById(rs.Primary.ID) + + if err == nil { + if regT != nil && + regT.Resource.Id == rs.Primary.ID && + regT.State != "removed" { + return fmt.Errorf("RegistrationToken still exists") + } + } + + return nil + } + return nil +} + +const testAccRancherRegistrationTokenConfig = ` +resource "rancher_environment" "foo" { + name = "foo" +} + +resource "rancher_registration_token" "foo" { + name = "foo" + description = "Terraform acc test group" + environment_id = "${rancher_environment.foo.id}" +} +` + +const testAccRancherRegistrationTokenUpdateConfig = ` +resource "rancher_environment" "foo" { + name = "foo" +} + +resource "rancher_registration_token" "foo" { + name = "foo-u" + description = "Terraform acc test group-u" + environment_id = "${rancher_environment.foo.id}" +} +` diff --git a/builtin/providers/rancher/resource_rancher_registry.go b/builtin/providers/rancher/resource_rancher_registry.go new file mode 100644 index 000000000000..99fef3b01adb --- /dev/null +++ b/builtin/providers/rancher/resource_rancher_registry.go @@ -0,0 +1,210 @@ +package rancher + +import ( + "fmt" + "log" + "time" + + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + rancherClient "github.com/rancher/go-rancher/client" +) + +func resourceRancherRegistry() *schema.Resource { + return &schema.Resource{ + Create: resourceRancherRegistryCreate, + Read: resourceRancherRegistryRead, + Update: resourceRancherRegistryUpdate, + Delete: resourceRancherRegistryDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "id": &schema.Schema{ + Type: schema.TypeString, + Computed: true, + }, + "server_address": &schema.Schema{ + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "name": &schema.Schema{ + Type: schema.TypeString, + Required: true, + }, + "description": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + }, + "environment_id": &schema.Schema{ + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + }, + } +} + +func resourceRancherRegistryCreate(d *schema.ResourceData, meta interface{}) error { + log.Printf("[INFO] Creating Registry: %s", d.Id()) + client, err := meta.(*Config).EnvironmentClient(d.Get("environment_id").(string)) + if err != nil { + return err + } + + name := d.Get("name").(string) + description := d.Get("description").(string) + serverAddress := d.Get("server_address").(string) + + registry := rancherClient.Registry{ + Name: name, + Description: description, + ServerAddress: serverAddress, + } + newRegistry, err := client.Registry.Create(®istry) + if err != nil { + return err + } + + stateConf := &resource.StateChangeConf{ + Pending: []string{"active", "removed", "removing"}, + Target: []string{"active"}, + Refresh: RegistryStateRefreshFunc(client, newRegistry.Id), + Timeout: 10 * time.Minute, + Delay: 1 * time.Second, + MinTimeout: 3 * time.Second, + } + _, waitErr := stateConf.WaitForState() + if waitErr != nil { + return fmt.Errorf( + "Error waiting for registry (%s) to be created: %s", newRegistry.Id, waitErr) + } + + d.SetId(newRegistry.Id) + log.Printf("[INFO] Registry ID: %s", d.Id()) + + return resourceRancherRegistryRead(d, meta) +} + +func resourceRancherRegistryRead(d *schema.ResourceData, meta interface{}) error { + log.Printf("[INFO] Refreshing Registry: %s", d.Id()) + client := meta.(*Config) + + registry, err := client.Registry.ById(d.Id()) + if err != nil { + return err + } + + log.Printf("[INFO] Registry Name: %s", registry.Name) + + d.Set("description", registry.Description) + d.Set("name", registry.Name) + d.Set("server_address", registry.ServerAddress) + d.Set("environment_id", registry.AccountId) + + return nil +} + +func resourceRancherRegistryUpdate(d *schema.ResourceData, meta interface{}) error { + client, err := meta.(*Config).EnvironmentClient(d.Get("environment_id").(string)) + if err != nil { + return err + } + + registry, err := client.Registry.ById(d.Id()) + if err != nil { + return err + } + + name := d.Get("name").(string) + description := d.Get("description").(string) + + registry.Name = name + registry.Description = description + client.Registry.Update(registry, ®istry) + + return resourceRancherRegistryRead(d, meta) +} + +func resourceRancherRegistryDelete(d *schema.ResourceData, meta interface{}) error { + log.Printf("[INFO] Deleting Registry: %s", d.Id()) + id := d.Id() + client, err := meta.(*Config).EnvironmentClient(d.Get("environment_id").(string)) + if err != nil { + return err + } + + reg, err := client.Registry.ById(id) + if err != nil { + return err + } + + // Step 1: Deactivate + if _, e := client.Registry.ActionDeactivate(reg); e != nil { + return fmt.Errorf("Error deactivating Registry: %s", err) + } + + log.Printf("[DEBUG] Waiting for registry (%s) to be deactivated", id) + + stateConf := &resource.StateChangeConf{ + Pending: []string{"active", "inactive", "deactivating"}, + Target: []string{"inactive"}, + Refresh: RegistryStateRefreshFunc(client, id), + Timeout: 10 * time.Minute, + Delay: 1 * time.Second, + MinTimeout: 3 * time.Second, + } + + _, waitErr := stateConf.WaitForState() + if waitErr != nil { + return fmt.Errorf( + "Error waiting for registry (%s) to be deactivated: %s", id, waitErr) + } + + // Update resource to reflect its state + reg, err = client.Registry.ById(id) + if err != nil { + return fmt.Errorf("Failed to refresh state of deactivated registry (%s): %s", id, err) + } + + // Step 2: Remove + if _, err := client.Registry.ActionRemove(reg); err != nil { + return fmt.Errorf("Error removing Registry: %s", err) + } + + log.Printf("[DEBUG] Waiting for registry (%s) to be removed", id) + + stateConf = &resource.StateChangeConf{ + Pending: []string{"inactive", "removed", "removing"}, + Target: []string{"removed"}, + Refresh: RegistryStateRefreshFunc(client, id), + Timeout: 10 * time.Minute, + Delay: 1 * time.Second, + MinTimeout: 3 * time.Second, + } + + _, waitErr = stateConf.WaitForState() + if waitErr != nil { + return fmt.Errorf( + "Error waiting for registry (%s) to be removed: %s", id, waitErr) + } + + d.SetId("") + return nil +} + +// RegistryStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch +// a Rancher Environment. +func RegistryStateRefreshFunc(client *rancherClient.RancherClient, registryID string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + env, err := client.Registry.ById(registryID) + + if err != nil { + return nil, "", err + } + + return env, env.State, nil + } +} diff --git a/builtin/providers/rancher/resource_rancher_registry_credential.go b/builtin/providers/rancher/resource_rancher_registry_credential.go new file mode 100644 index 000000000000..48ae4bfaa8c6 --- /dev/null +++ b/builtin/providers/rancher/resource_rancher_registry_credential.go @@ -0,0 +1,232 @@ +package rancher + +import ( + "fmt" + "log" + "time" + + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + rancherClient "github.com/rancher/go-rancher/client" +) + +func resourceRancherRegistryCredential() *schema.Resource { + return &schema.Resource{ + Create: resourceRancherRegistryCredentialCreate, + Read: resourceRancherRegistryCredentialRead, + Update: resourceRancherRegistryCredentialUpdate, + Delete: resourceRancherRegistryCredentialDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "id": &schema.Schema{ + Type: schema.TypeString, + Computed: true, + }, + "name": &schema.Schema{ + Type: schema.TypeString, + Required: true, + }, + "description": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + }, + "registry_id": &schema.Schema{ + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "email": &schema.Schema{ + Type: schema.TypeString, + Required: true, + }, + "public_value": &schema.Schema{ + Type: schema.TypeString, + Required: true, + }, + "secret_value": &schema.Schema{ + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + }, + } +} + +func resourceRancherRegistryCredentialCreate(d *schema.ResourceData, meta interface{}) error { + log.Printf("[INFO] Creating RegistryCredential: %s", d.Id()) + client, err := meta.(*Config).RegistryClient(d.Get("registry_id").(string)) + if err != nil { + return err + } + + name := d.Get("name").(string) + description := d.Get("description").(string) + email := d.Get("email").(string) + publicValue := d.Get("public_value").(string) + secretValue := d.Get("secret_value").(string) + registryID := d.Get("registry_id").(string) + + registryCred := rancherClient.RegistryCredential{ + Name: name, + Description: description, + Email: email, + PublicValue: publicValue, + SecretValue: secretValue, + RegistryId: registryID, + } + newRegistryCredential, err := client.RegistryCredential.Create(®istryCred) + if err != nil { + return err + } + + stateConf := &resource.StateChangeConf{ + Pending: []string{"active", "removed", "removing"}, + Target: []string{"active"}, + Refresh: RegistryCredentialStateRefreshFunc(client, newRegistryCredential.Id), + Timeout: 10 * time.Minute, + Delay: 1 * time.Second, + MinTimeout: 3 * time.Second, + } + _, waitErr := stateConf.WaitForState() + if waitErr != nil { + return fmt.Errorf( + "Error waiting for registry credential (%s) to be created: %s", newRegistryCredential.Id, waitErr) + } + + d.SetId(newRegistryCredential.Id) + log.Printf("[INFO] RegistryCredential ID: %s", d.Id()) + + return resourceRancherRegistryCredentialRead(d, meta) +} + +func resourceRancherRegistryCredentialRead(d *schema.ResourceData, meta interface{}) error { + log.Printf("[INFO] Refreshing RegistryCredential: %s", d.Id()) + client := meta.(*Config) + + registryCred, err := client.RegistryCredential.ById(d.Id()) + if err != nil { + return err + } + + log.Printf("[INFO] RegistryCredential Name: %s", registryCred.Name) + + d.Set("description", registryCred.Description) + d.Set("name", registryCred.Name) + d.Set("email", registryCred.Email) + d.Set("public_value", registryCred.PublicValue) + d.Set("registry_id", registryCred.RegistryId) + + return nil +} + +func resourceRancherRegistryCredentialUpdate(d *schema.ResourceData, meta interface{}) error { + log.Printf("[INFO] Updating RegistryCredential: %s", d.Id()) + client, err := meta.(*Config).RegistryClient(d.Get("registry_id").(string)) + if err != nil { + return err + } + + registryCred, err := client.RegistryCredential.ById(d.Id()) + if err != nil { + return err + } + + name := d.Get("name").(string) + description := d.Get("description").(string) + email := d.Get("email").(string) + publicValue := d.Get("public_value").(string) + secretValue := d.Get("secret_value").(string) + + registryCred.Name = name + registryCred.Description = description + registryCred.Email = email + registryCred.PublicValue = publicValue + registryCred.SecretValue = secretValue + client.RegistryCredential.Update(registryCred, ®istryCred) + + return resourceRancherRegistryCredentialRead(d, meta) +} + +func resourceRancherRegistryCredentialDelete(d *schema.ResourceData, meta interface{}) error { + log.Printf("[INFO] Deleting RegistryCredential: %s", d.Id()) + id := d.Id() + client, err := meta.(*Config).RegistryClient(d.Get("registry_id").(string)) + if err != nil { + return err + } + + reg, err := client.RegistryCredential.ById(id) + if err != nil { + return err + } + + // Step 1: Deactivate + if _, e := client.RegistryCredential.ActionDeactivate(reg); e != nil { + return fmt.Errorf("Error deactivating RegistryCredential: %s", err) + } + + log.Printf("[DEBUG] Waiting for registry credential (%s) to be deactivated", id) + + stateConf := &resource.StateChangeConf{ + Pending: []string{"active", "inactive", "deactivating"}, + Target: []string{"inactive"}, + Refresh: RegistryCredentialStateRefreshFunc(client, id), + Timeout: 10 * time.Minute, + Delay: 1 * time.Second, + MinTimeout: 3 * time.Second, + } + + _, waitErr := stateConf.WaitForState() + if waitErr != nil { + return fmt.Errorf( + "Error waiting for registry credential (%s) to be deactivated: %s", id, waitErr) + } + + // Update resource to reflect its state + reg, err = client.RegistryCredential.ById(id) + if err != nil { + return fmt.Errorf("Failed to refresh state of deactivated registry credential (%s): %s", id, err) + } + + // Step 2: Remove + if _, err := client.RegistryCredential.ActionRemove(reg); err != nil { + return fmt.Errorf("Error removing RegistryCredential: %s", err) + } + + log.Printf("[DEBUG] Waiting for registry (%s) to be removed", id) + + stateConf = &resource.StateChangeConf{ + Pending: []string{"inactive", "removed", "removing"}, + Target: []string{"removed"}, + Refresh: RegistryCredentialStateRefreshFunc(client, id), + Timeout: 10 * time.Minute, + Delay: 1 * time.Second, + MinTimeout: 3 * time.Second, + } + + _, waitErr = stateConf.WaitForState() + if waitErr != nil { + return fmt.Errorf( + "Error waiting for registry (%s) to be removed: %s", id, waitErr) + } + + d.SetId("") + return nil +} + +// RegistryCredentialStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch +// a Rancher Environment. +func RegistryCredentialStateRefreshFunc(client *rancherClient.RancherClient, registryCredID string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + regC, err := client.RegistryCredential.ById(registryCredID) + + if err != nil { + return nil, "", err + } + + return regC, regC.State, nil + } +} diff --git a/builtin/providers/rancher/resource_rancher_registry_credential_test.go b/builtin/providers/rancher/resource_rancher_registry_credential_test.go new file mode 100644 index 000000000000..b5f859f4f047 --- /dev/null +++ b/builtin/providers/rancher/resource_rancher_registry_credential_test.go @@ -0,0 +1,135 @@ +package rancher + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" + rancherClient "github.com/rancher/go-rancher/client" +) + +func TestAccRancherRegistryCredential(t *testing.T) { + var registry rancherClient.RegistryCredential + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckRancherRegistryCredentialDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccRancherRegistryCredentialConfig, + Check: resource.ComposeTestCheckFunc( + testAccCheckRancherRegistryCredentialExists("rancher_registry_credential.foo", ®istry), + resource.TestCheckResourceAttr("rancher_registry_credential.foo", "name", "foo"), + resource.TestCheckResourceAttr("rancher_registry_credential.foo", "description", "registry credential test"), + resource.TestCheckResourceAttr("rancher_registry_credential.foo", "public_value", "user"), + ), + }, + resource.TestStep{ + Config: testAccRancherRegistryCredentialUpdateConfig, + Check: resource.ComposeTestCheckFunc( + testAccCheckRancherRegistryCredentialExists("rancher_registry_credential.foo", ®istry), + resource.TestCheckResourceAttr("rancher_registry_credential.foo", "name", "foo2"), + resource.TestCheckResourceAttr("rancher_registry_credential.foo", "description", "registry credential test - updated"), + resource.TestCheckResourceAttr("rancher_registry_credential.foo", "public_value", "user2"), + ), + }, + }, + }) +} + +func testAccCheckRancherRegistryCredentialExists(n string, reg *rancherClient.RegistryCredential) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No App Name is set") + } + + client := testAccProvider.Meta().(*Config) + + foundReg, err := client.RegistryCredential.ById(rs.Primary.ID) + if err != nil { + return err + } + + if foundReg.Resource.Id != rs.Primary.ID { + return fmt.Errorf("Environment not found") + } + + *reg = *foundReg + + return nil + } +} + +func testAccCheckRancherRegistryCredentialDestroy(s *terraform.State) error { + client := testAccProvider.Meta().(*Config) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "rancher_registry_credential" { + continue + } + reg, err := client.RegistryCredential.ById(rs.Primary.ID) + + if err == nil { + if reg != nil && + reg.Resource.Id == rs.Primary.ID && + reg.State != "removed" { + return fmt.Errorf("RegistryCredential still exists") + } + } + + return nil + } + return nil +} + +const testAccRancherRegistryCredentialConfig = ` +resource "rancher_environment" "foo" { + name = "foo" +} + +resource "rancher_registry" "foo" { + name = "foo" + description = "registry test" + server_address = "http://bar.com:8080" + environment_id = "${rancher_environment.foo.id}" +} + +resource "rancher_registry_credential" "foo" { + name = "foo" + description = "registry credential test" + registry_id = "${rancher_registry.foo.id}" + email = "registry@credential.com" + public_value = "user" + secret_value = "pass" +} +` + +const testAccRancherRegistryCredentialUpdateConfig = ` +resource "rancher_environment" "foo" { + name = "foo" +} + +resource "rancher_registry" "foo" { + name = "foo" + description = "registry test" + server_address = "http://bar.com:8080" + environment_id = "${rancher_environment.foo.id}" +} + +resource "rancher_registry_credential" "foo" { + name = "foo2" + description = "registry credential test - updated" + registry_id = "${rancher_registry.foo.id}" + email = "registry@credential.com" + public_value = "user2" + secret_value = "pass" +} + ` diff --git a/builtin/providers/rancher/resource_rancher_registry_test.go b/builtin/providers/rancher/resource_rancher_registry_test.go new file mode 100644 index 000000000000..308dc20f9192 --- /dev/null +++ b/builtin/providers/rancher/resource_rancher_registry_test.go @@ -0,0 +1,147 @@ +package rancher + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" + rancherClient "github.com/rancher/go-rancher/client" +) + +func TestAccRancherRegistry(t *testing.T) { + var registry rancherClient.Registry + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckRancherRegistryDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccRancherRegistryConfig, + Check: resource.ComposeTestCheckFunc( + testAccCheckRancherRegistryExists("rancher_registry.foo", ®istry), + resource.TestCheckResourceAttr("rancher_registry.foo", "name", "foo"), + resource.TestCheckResourceAttr("rancher_registry.foo", "description", "registry test"), + resource.TestCheckResourceAttr("rancher_registry.foo", "server_address", "http://foo.com:8080"), + ), + }, + resource.TestStep{ + Config: testAccRancherRegistryUpdateConfig, + Check: resource.ComposeTestCheckFunc( + testAccCheckRancherRegistryExists("rancher_registry.foo", ®istry), + resource.TestCheckResourceAttr("rancher_registry.foo", "name", "foo2"), + resource.TestCheckResourceAttr("rancher_registry.foo", "description", "registry test - updated"), + resource.TestCheckResourceAttr("rancher_registry.foo", "server_address", "http://foo.updated.com:8080"), + ), + }, + resource.TestStep{ + Config: testAccRancherRegistryRecreateConfig, + Check: resource.ComposeTestCheckFunc( + testAccCheckRancherRegistryExists("rancher_registry.foo", ®istry), + resource.TestCheckResourceAttr("rancher_registry.foo", "name", "foo"), + resource.TestCheckResourceAttr("rancher_registry.foo", "description", "registry test"), + resource.TestCheckResourceAttr("rancher_registry.foo", "server_address", "http://foo.com:8080"), + ), + }, + }, + }) +} + +func testAccCheckRancherRegistryExists(n string, reg *rancherClient.Registry) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No App Name is set") + } + + client := testAccProvider.Meta().(*Config) + + foundReg, err := client.Registry.ById(rs.Primary.ID) + if err != nil { + return err + } + + if foundReg.Resource.Id != rs.Primary.ID { + return fmt.Errorf("Environment not found") + } + + *reg = *foundReg + + return nil + } +} + +func testAccCheckRancherRegistryDestroy(s *terraform.State) error { + client := testAccProvider.Meta().(*Config) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "rancher_registry" { + continue + } + reg, err := client.Registry.ById(rs.Primary.ID) + + if err == nil { + if reg != nil && + reg.Resource.Id == rs.Primary.ID && + reg.State != "removed" { + return fmt.Errorf("Registry still exists") + } + } + + return nil + } + return nil +} + +const testAccRancherRegistryConfig = ` +resource "rancher_environment" "foo_registry" { + name = "registry test" + description = "environment to test registries" +} + +resource "rancher_registry" "foo" { + name = "foo" + description = "registry test" + server_address = "http://foo.com:8080" + environment_id = "${rancher_environment.foo_registry.id}" +} +` + +const testAccRancherRegistryUpdateConfig = ` + resource "rancher_environment" "foo_registry" { + name = "registry test" + description = "environment to test registries" + } + + resource "rancher_registry" "foo" { + name = "foo2" + description = "registry test - updated" + server_address = "http://foo.updated.com:8080" + environment_id = "${rancher_environment.foo_registry.id}" + } + ` + +const testAccRancherRegistryRecreateConfig = ` + resource "rancher_environment" "foo_registry" { + name = "registry test" + description = "environment to test registries" + } + + resource "rancher_environment" "foo_registry2" { + name = "alternative registry test" + description = "other environment to test registries" + } + + resource "rancher_registry" "foo" { + name = "foo" + description = "registry test" + server_address = "http://foo.com:8080" + environment_id = "${rancher_environment.foo_registry2.id}" + } + ` diff --git a/builtin/providers/rancher/resource_rancher_stack.go b/builtin/providers/rancher/resource_rancher_stack.go new file mode 100644 index 000000000000..3bd12090954a --- /dev/null +++ b/builtin/providers/rancher/resource_rancher_stack.go @@ -0,0 +1,384 @@ +package rancher + +import ( + "fmt" + "log" + "strings" + "time" + + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/helper/schema" + "github.com/hashicorp/terraform/helper/validation" + rancherClient "github.com/rancher/go-rancher/client" +) + +func resourceRancherStack() *schema.Resource { + return &schema.Resource{ + Create: resourceRancherStackCreate, + Read: resourceRancherStackRead, + Update: resourceRancherStackUpdate, + Delete: resourceRancherStackDelete, + Importer: &schema.ResourceImporter{ + State: schema.ImportStatePassthrough, + }, + + Schema: map[string]*schema.Schema{ + "id": &schema.Schema{ + Type: schema.TypeString, + Computed: true, + }, + "name": &schema.Schema{ + Type: schema.TypeString, + Required: true, + }, + "description": &schema.Schema{ + Type: schema.TypeString, + Optional: true, + }, + "environment_id": { + Type: schema.TypeString, + Required: true, + ForceNew: true, + }, + "docker_compose": { + Type: schema.TypeString, + Optional: true, + }, + "rancher_compose": { + Type: schema.TypeString, + Optional: true, + }, + "environment": { + Type: schema.TypeMap, + Optional: true, + }, + "catalog_id": { + Type: schema.TypeString, + Optional: true, + }, + "scope": { + Type: schema.TypeString, + Default: "user", + Optional: true, + ValidateFunc: validation.StringInSlice([]string{"user", "system"}, true), + }, + "start_on_create": { + Type: schema.TypeBool, + Optional: true, + Computed: true, + }, + "finish_upgrade": { + Type: schema.TypeBool, + Optional: true, + }, + "rendered_docker_compose": { + Type: schema.TypeString, + Computed: true, + }, + "rendered_rancher_compose": { + Type: schema.TypeString, + Computed: true, + }, + }, + } +} + +func resourceRancherStackCreate(d *schema.ResourceData, meta interface{}) error { + log.Printf("[INFO] Creating Stack: %s", d.Id()) + client, err := meta.(*Config).EnvironmentClient(d.Get("environment_id").(string)) + if err != nil { + return err + } + + data, err := makeStackData(d, meta) + if err != nil { + return err + } + + var newStack rancherClient.Environment + if err := client.Create("environment", data, &newStack); err != nil { + return err + } + + stateConf := &resource.StateChangeConf{ + Pending: []string{"activating", "active", "removed", "removing"}, + Target: []string{"active"}, + Refresh: StackStateRefreshFunc(client, newStack.Id), + Timeout: 10 * time.Minute, + Delay: 1 * time.Second, + MinTimeout: 3 * time.Second, + } + _, waitErr := stateConf.WaitForState() + if waitErr != nil { + return fmt.Errorf( + "Error waiting for stack (%s) to be created: %s", newStack.Id, waitErr) + } + + d.SetId(newStack.Id) + log.Printf("[INFO] Stack ID: %s", d.Id()) + + return resourceRancherStackRead(d, meta) +} + +func resourceRancherStackRead(d *schema.ResourceData, meta interface{}) error { + log.Printf("[INFO] Refreshing Stack: %s", d.Id()) + client := meta.(*Config) + + stack, err := client.Environment.ById(d.Id()) + if err != nil { + return err + } + + config, err := client.Environment.ActionExportconfig(stack, &rancherClient.ComposeConfigInput{}) + if err != nil { + return err + } + + log.Printf("[INFO] Stack Name: %s", stack.Name) + + d.Set("description", stack.Description) + d.Set("name", stack.Name) + d.Set("rendered_docker_compose", strings.Replace(config.DockerComposeConfig, "\r", "", -1)) + d.Set("rendered_rancher_compose", strings.Replace(config.RancherComposeConfig, "\r", "", -1)) + d.Set("environment_id", stack.AccountId) + d.Set("environment", stack.Environment) + + if stack.ExternalId == "" { + d.Set("scope", "user") + d.Set("catalog_id", "") + } else { + trimmedID := strings.TrimPrefix(stack.ExternalId, "system-") + if trimmedID == stack.ExternalId { + d.Set("scope", "user") + } else { + d.Set("scope", "system") + } + d.Set("catalog_id", strings.TrimPrefix(trimmedID, "catalog://")) + } + + d.Set("start_on_create", stack.StartOnCreate) + + return nil +} + +func resourceRancherStackUpdate(d *schema.ResourceData, meta interface{}) error { + log.Printf("[INFO] Updating Stack: %s", d.Id()) + client, err := meta.(*Config).EnvironmentClient(d.Get("environment_id").(string)) + if err != nil { + return err + } + d.Partial(true) + + data, err := makeStackData(d, meta) + if err != nil { + return err + } + + stack, err := client.Environment.ById(d.Id()) + if err != nil { + return err + } + + var newStack rancherClient.Environment + if err := client.Update("environment", &stack.Resource, data, &newStack); err != nil { + return err + } + + stateConf := &resource.StateChangeConf{ + Pending: []string{"active", "active-updating"}, + Target: []string{"active"}, + Refresh: StackStateRefreshFunc(client, newStack.Id), + Timeout: 10 * time.Minute, + Delay: 1 * time.Second, + MinTimeout: 3 * time.Second, + } + s, waitErr := stateConf.WaitForState() + stack = s.(*rancherClient.Environment) + if waitErr != nil { + return fmt.Errorf( + "Error waiting for stack (%s) to be updated: %s", stack.Id, waitErr) + } + + d.SetPartial("name") + d.SetPartial("description") + d.SetPartial("scope") + + if d.HasChange("docker_compose") || + d.HasChange("rancher_compose") || + d.HasChange("environment") || + d.HasChange("catalog_id") { + + envMap := make(map[string]interface{}) + for key, value := range *data["environment"].(*map[string]string) { + envValue := value + envMap[key] = &envValue + } + stack, err = client.Environment.ActionUpgrade(stack, &rancherClient.EnvironmentUpgrade{ + DockerCompose: *data["dockerCompose"].(*string), + RancherCompose: *data["rancherCompose"].(*string), + Environment: envMap, + ExternalId: *data["externalId"].(*string), + }) + if err != nil { + return err + } + + stateConf := &resource.StateChangeConf{ + Pending: []string{"active", "upgrading", "upgraded"}, + Target: []string{"upgraded"}, + Refresh: StackStateRefreshFunc(client, stack.Id), + Timeout: 10 * time.Minute, + Delay: 1 * time.Second, + MinTimeout: 3 * time.Second, + } + s, waitErr := stateConf.WaitForState() + if waitErr != nil { + return fmt.Errorf( + "Error waiting for stack (%s) to be upgraded: %s", stack.Id, waitErr) + } + stack = s.(*rancherClient.Environment) + + if d.Get("finish_upgrade").(bool) { + stack, err = client.Environment.ActionFinishupgrade(stack) + if err != nil { + return err + } + + stateConf = &resource.StateChangeConf{ + Pending: []string{"active", "upgraded"}, + Target: []string{"active"}, + Refresh: StackStateRefreshFunc(client, stack.Id), + Timeout: 10 * time.Minute, + Delay: 1 * time.Second, + MinTimeout: 3 * time.Second, + } + _, waitErr = stateConf.WaitForState() + if waitErr != nil { + return fmt.Errorf( + "Error waiting for stack (%s) to be upgraded: %s", stack.Id, waitErr) + } + } + + d.SetPartial("rendered_docker_compose") + d.SetPartial("rendered_rancher_compose") + d.SetPartial("docker_compose") + d.SetPartial("rancher_compose") + d.SetPartial("environment") + d.SetPartial("catalog_id") + } + + d.Partial(false) + + return resourceRancherStackRead(d, meta) +} + +func resourceRancherStackDelete(d *schema.ResourceData, meta interface{}) error { + log.Printf("[INFO] Deleting Stack: %s", d.Id()) + id := d.Id() + client, err := meta.(*Config).EnvironmentClient(d.Get("environment_id").(string)) + if err != nil { + return err + } + + stack, err := client.Environment.ById(id) + if err != nil { + return err + } + + if err := client.Environment.Delete(stack); err != nil { + return fmt.Errorf("Error deleting Stack: %s", err) + } + + log.Printf("[DEBUG] Waiting for stack (%s) to be removed", id) + + stateConf := &resource.StateChangeConf{ + Pending: []string{"active", "removed", "removing"}, + Target: []string{"removed"}, + Refresh: StackStateRefreshFunc(client, id), + Timeout: 10 * time.Minute, + Delay: 1 * time.Second, + MinTimeout: 3 * time.Second, + } + + _, waitErr := stateConf.WaitForState() + if waitErr != nil { + return fmt.Errorf( + "Error waiting for stack (%s) to be removed: %s", id, waitErr) + } + + d.SetId("") + return nil +} + +// StackStateRefreshFunc returns a resource.StateRefreshFunc that is used to watch +// a Rancher Stack. +func StackStateRefreshFunc(client *rancherClient.RancherClient, stackID string) resource.StateRefreshFunc { + return func() (interface{}, string, error) { + stack, err := client.Environment.ById(stackID) + + if err != nil { + return nil, "", err + } + + return stack, stack.State, nil + } +} + +func environmentFromMap(m map[string]interface{}) map[string]string { + result := make(map[string]string) + for k, v := range m { + result[k] = v.(string) + } + return result +} + +func makeStackData(d *schema.ResourceData, meta interface{}) (data map[string]interface{}, err error) { + name := d.Get("name").(string) + description := d.Get("description").(string) + + var externalID string + var dockerCompose string + var rancherCompose string + var environment map[string]string + if c, ok := d.GetOk("catalog_id"); ok { + if scope, ok := d.GetOk("scope"); ok && scope.(string) == "system" { + externalID = "system-" + } + catalogID := c.(string) + externalID += "catalog://" + catalogID + + catalogClient, err := meta.(*Config).CatalogClient() + if err != nil { + return data, err + } + template, err := catalogClient.Template.ById(catalogID) + if err != nil { + return data, fmt.Errorf("Failed to get catalog template: %s", err) + } + + dockerCompose = template.Files["docker-compose.yml"].(string) + rancherCompose = template.Files["rancher-compose.yml"].(string) + } + + if c, ok := d.GetOk("docker_compose"); ok { + dockerCompose = c.(string) + } + if c, ok := d.GetOk("rancher_compose"); ok { + rancherCompose = c.(string) + } + environment = environmentFromMap(d.Get("environment").(map[string]interface{})) + + startOnCreate := d.Get("start_on_create") + + data = map[string]interface{}{ + "name": &name, + "description": &description, + "dockerCompose": &dockerCompose, + "rancherCompose": &rancherCompose, + "environment": &environment, + "externalId": &externalID, + "startOnCreate": &startOnCreate, + } + + return data, nil +} diff --git a/builtin/providers/rancher/resource_rancher_stack_test.go b/builtin/providers/rancher/resource_rancher_stack_test.go new file mode 100644 index 000000000000..d949ebe2597f --- /dev/null +++ b/builtin/providers/rancher/resource_rancher_stack_test.go @@ -0,0 +1,311 @@ +package rancher + +import ( + "fmt" + "testing" + + "github.com/hashicorp/terraform/helper/resource" + "github.com/hashicorp/terraform/terraform" + rancherClient "github.com/rancher/go-rancher/client" +) + +func TestAccRancherStack_basic(t *testing.T) { + var stack rancherClient.Environment + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckRancherStackDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccRancherStackConfig, + Check: resource.ComposeTestCheckFunc( + testAccCheckRancherStackExists("rancher_stack.foo", &stack), + resource.TestCheckResourceAttr("rancher_stack.foo", "name", "foo"), + resource.TestCheckResourceAttr("rancher_stack.foo", "description", "Terraform acc test group"), + resource.TestCheckResourceAttr("rancher_stack.foo", "catalog_id", ""), + resource.TestCheckResourceAttr("rancher_stack.foo", "docker_compose", ""), + resource.TestCheckResourceAttr("rancher_stack.foo", "rancher_compose", ""), + testAccCheckRancherStackAttributes(&stack, emptyEnvironment, false), + ), + }, + resource.TestStep{ + Config: testAccRancherStackUpdateConfig, + Check: resource.ComposeTestCheckFunc( + testAccCheckRancherStackExists("rancher_stack.foo", &stack), + resource.TestCheckResourceAttr("rancher_stack.foo", "name", "foo2"), + resource.TestCheckResourceAttr("rancher_stack.foo", "description", "Terraform acc test group - updated"), + resource.TestCheckResourceAttr("rancher_stack.foo", "catalog_id", ""), + resource.TestCheckResourceAttr("rancher_stack.foo", "docker_compose", ""), + resource.TestCheckResourceAttr("rancher_stack.foo", "rancher_compose", ""), + testAccCheckRancherStackAttributes(&stack, emptyEnvironment, false), + ), + }, + }, + }) +} + +func TestAccRancherStack_compose(t *testing.T) { + var stack rancherClient.Environment + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckRancherStackDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccRancherStackComposeConfig, + Check: resource.ComposeTestCheckFunc( + testAccCheckRancherStackExists("rancher_stack.compose", &stack), + resource.TestCheckResourceAttr("rancher_stack.compose", "name", "compose"), + resource.TestCheckResourceAttr("rancher_stack.compose", "description", "Terraform acc test group - compose"), + resource.TestCheckResourceAttr("rancher_stack.compose", "catalog_id", ""), + resource.TestCheckResourceAttr("rancher_stack.compose", "docker_compose", "web: { image: nginx }"), + resource.TestCheckResourceAttr("rancher_stack.compose", "rancher_compose", "web: { scale: 1 }"), + testAccCheckRancherStackAttributes(&stack, emptyEnvironment, false), + ), + }, + }, + }) +} + +//The following tests are run against the Default environment because +//upgrading a stack automatically starts the services which never +//completes if there is no host available +func TestAccRancherStack_catalog(t *testing.T) { + var stack rancherClient.Environment + + resource.Test(t, resource.TestCase{ + PreCheck: func() { testAccPreCheck(t) }, + Providers: testAccProviders, + CheckDestroy: testAccCheckRancherStackDestroy, + Steps: []resource.TestStep{ + resource.TestStep{ + Config: testAccRancherStackSystemCatalogConfigInitial, + Check: resource.ComposeTestCheckFunc( + testAccCheckRancherStackExists("rancher_stack.catalog", &stack), + resource.TestCheckResourceAttr("rancher_stack.catalog", "name", "catalogInitial"), + resource.TestCheckResourceAttr("rancher_stack.catalog", "description", "Terraform acc test group - catalogInitial"), + resource.TestCheckResourceAttr("rancher_stack.catalog", "catalog_id", "community:janitor:0"), + resource.TestCheckResourceAttr("rancher_stack.catalog", "scope", "system"), + resource.TestCheckResourceAttr("rancher_stack.catalog", "docker_compose", ""), + resource.TestCheckResourceAttr("rancher_stack.catalog", "rancher_compose", ""), + resource.TestCheckResourceAttr("rancher_stack.catalog", "rendered_docker_compose", catalogDockerComposeInitial), + resource.TestCheckResourceAttr("rancher_stack.catalog", "rendered_rancher_compose", catalogRancherComposeInitial), + testAccCheckRancherStackAttributes(&stack, catalogEnvironment, true), + ), + }, + resource.TestStep{ + Config: testAccRancherStackSystemCatalogConfigUpdate, + Check: resource.ComposeTestCheckFunc( + testAccCheckRancherStackExists("rancher_stack.catalog", &stack), + resource.TestCheckResourceAttr("rancher_stack.catalog", "name", "catalogUpdate"), + resource.TestCheckResourceAttr("rancher_stack.catalog", "description", "Terraform acc test group - catalogUpdate"), + resource.TestCheckResourceAttr("rancher_stack.catalog", "catalog_id", "community:janitor:1"), + resource.TestCheckResourceAttr("rancher_stack.catalog", "scope", "user"), + resource.TestCheckResourceAttr("rancher_stack.catalog", "docker_compose", ""), + resource.TestCheckResourceAttr("rancher_stack.catalog", "rancher_compose", ""), + resource.TestCheckResourceAttr("rancher_stack.catalog", "rendered_docker_compose", catalogDockerComposeUpdate), + resource.TestCheckResourceAttr("rancher_stack.catalog", "rendered_rancher_compose", catalogRancherComposeUpdate), + testAccCheckRancherStackAttributes(&stack, catalogEnvironmentUpgrade, true), + ), + }, + }, + }) +} + +func testAccCheckRancherStackExists(n string, stack *rancherClient.Environment) resource.TestCheckFunc { + return func(s *terraform.State) error { + rs, ok := s.RootModule().Resources[n] + + if !ok { + return fmt.Errorf("Not found: %s", n) + } + + if rs.Primary.ID == "" { + return fmt.Errorf("No App Name is set") + } + + client := testAccProvider.Meta().(*Config) + + foundStack, err := client.Environment.ById(rs.Primary.ID) + if err != nil { + return err + } + + if foundStack.Resource.Id != rs.Primary.ID { + return fmt.Errorf("Stack not found") + } + + *stack = *foundStack + + return nil + } +} + +func testAccCheckRancherStackAttributes(stack *rancherClient.Environment, environment map[string]string, startOnCreate bool) resource.TestCheckFunc { + return func(s *terraform.State) error { + + if len(stack.Environment) != len(environment) { + return fmt.Errorf("Bad environment size: %v should be: %v", len(stack.Environment), environment) + } + + for k, v := range stack.Environment { + if environment[k] != v { + return fmt.Errorf("Bad environment value for %s: %s should be: %s", k, environment[k], v) + } + } + + if stack.StartOnCreate != startOnCreate { + return fmt.Errorf("Bad startOnCreate: %t should be: %t", stack.StartOnCreate, startOnCreate) + } + + return nil + } +} + +func testAccCheckRancherStackDestroy(s *terraform.State) error { + client := testAccProvider.Meta().(*Config) + + for _, rs := range s.RootModule().Resources { + if rs.Type != "rancher_stack" { + continue + } + stack, err := client.Environment.ById(rs.Primary.ID) + + if err == nil { + if stack != nil && + stack.Resource.Id == rs.Primary.ID && + stack.State != "removed" { + return fmt.Errorf("Stack still exists") + } + } + + return nil + } + return nil +} + +const testAccRancherStackConfig = ` +resource "rancher_environment" "foo" { + name = "foo" +} + +resource "rancher_stack" "foo" { + name = "foo" + description = "Terraform acc test group" + environment_id = "${rancher_environment.foo.id}" +} +` + +const testAccRancherStackUpdateConfig = ` +resource "rancher_environment" "foo" { + name = "foo" +} + +resource "rancher_stack" "foo" { + name = "foo2" + description = "Terraform acc test group - updated" + environment_id = "${rancher_environment.foo.id}" +} +` + +const testAccRancherStackComposeConfig = ` +resource "rancher_environment" "foo" { + name = "foo" +} + +resource "rancher_stack" "compose" { + name = "compose" + description = "Terraform acc test group - compose" + environment_id = "${rancher_environment.foo.id}" + docker_compose = "web: { image: nginx }" + rancher_compose = "web: { scale: 1 }" +} +` + +const testAccRancherStackSystemCatalogConfigInitial = ` +resource "rancher_stack" "catalog" { + name = "catalogInitial" + description = "Terraform acc test group - catalogInitial" + environment_id = "1a5" + catalog_id = "community:janitor:0" + scope = "system" + start_on_create = true + environment { + EXCLUDE_LABEL = "cleanup=false" + FREQUENCY = "60" + KEEP = "rancher/agent:*" + } +} +` + +const testAccRancherStackSystemCatalogConfigUpdate = ` +resource "rancher_stack" "catalog" { + name = "catalogUpdate" + description = "Terraform acc test group - catalogUpdate" + environment_id = "1a5" + catalog_id = "community:janitor:1" + scope = "user" + environment { + EXCLUDE_LABEL = "cleanup=false" + FREQUENCY = "60" + KEEP = "rancher/agent:*" + KEEPC = "*:*" + } +} +` + +var catalogDockerComposeInitial = `cleanup: + environment: + CLEAN_PERIOD: '60' + DELAY_TIME: '900' + KEEP_IMAGES: rancher/agent:* + labels: + io.rancher.scheduler.global: 'true' + io.rancher.scheduler.affinity:host_label_ne: cleanup=false + tty: true + image: meltwater/docker-cleanup:1.4.0 + privileged: true + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - /var/lib/docker:/var/lib/docker + stdin_open: true +` + +const catalogRancherComposeInitial = `{} +` + +const catalogDockerComposeUpdate = `cleanup: + environment: + CLEAN_PERIOD: '60' + DELAY_TIME: '900' + KEEP_CONTAINERS: '*:*' + KEEP_IMAGES: rancher/agent:* + labels: + io.rancher.scheduler.global: 'true' + io.rancher.scheduler.affinity:host_label_ne: cleanup=false + image: sshipway/docker-cleanup:1.5.2 + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - /var/lib/docker:/var/lib/docker + net: none +` + +const catalogRancherComposeUpdate = `{} +` + +var emptyEnvironment = map[string]string{} + +var catalogEnvironment = map[string]string{ + "EXCLUDE_LABEL": "cleanup=false", + "FREQUENCY": "60", + "KEEP": "rancher/agent:*", +} + +var catalogEnvironmentUpgrade = map[string]string{ + "EXCLUDE_LABEL": "cleanup=false", + "FREQUENCY": "60", + "KEEP": "rancher/agent:*", + "KEEPC": "*:*", +} diff --git a/builtin/providers/rancher/util.go b/builtin/providers/rancher/util.go new file mode 100644 index 000000000000..9e3ce8f1c332 --- /dev/null +++ b/builtin/providers/rancher/util.go @@ -0,0 +1,19 @@ +package rancher + +import "github.com/rancher/go-rancher/client" + +// GetActiveOrchestration get the name of the active orchestration for a environment +func GetActiveOrchestration(project *client.Project) string { + orch := "cattle" + + switch { + case project.Swarm: + orch = "swarm" + case project.Mesos: + orch = "mesos" + case project.Kubernetes: + orch = "kubernetes" + } + + return orch +} diff --git a/command/internal_plugin_list.go b/command/internal_plugin_list.go index e40de26646d1..fb74ebf50678 100644 --- a/command/internal_plugin_list.go +++ b/command/internal_plugin_list.go @@ -41,6 +41,7 @@ import ( postgresqlprovider "github.com/hashicorp/terraform/builtin/providers/postgresql" powerdnsprovider "github.com/hashicorp/terraform/builtin/providers/powerdns" rabbitmqprovider "github.com/hashicorp/terraform/builtin/providers/rabbitmq" + rancherprovider "github.com/hashicorp/terraform/builtin/providers/rancher" randomprovider "github.com/hashicorp/terraform/builtin/providers/random" rundeckprovider "github.com/hashicorp/terraform/builtin/providers/rundeck" scalewayprovider "github.com/hashicorp/terraform/builtin/providers/scaleway" @@ -99,6 +100,7 @@ var InternalProviders = map[string]plugin.ProviderFunc{ "postgresql": postgresqlprovider.Provider, "powerdns": powerdnsprovider.Provider, "rabbitmq": rabbitmqprovider.Provider, + "rancher": rancherprovider.Provider, "random": randomprovider.Provider, "rundeck": rundeckprovider.Provider, "scaleway": scalewayprovider.Provider, diff --git a/website/source/assets/stylesheets/_docs.scss b/website/source/assets/stylesheets/_docs.scss index af6776ad4bdb..76a60f6391fb 100755 --- a/website/source/assets/stylesheets/_docs.scss +++ b/website/source/assets/stylesheets/_docs.scss @@ -41,6 +41,7 @@ body.layout-pagerduty, body.layout-postgresql, body.layout-powerdns, body.layout-rabbitmq, +body.layout-rancher, body.layout-random, body.layout-rundeck, body.layout-scaleway, diff --git a/website/source/docs/providers/rancher/index.html.markdown b/website/source/docs/providers/rancher/index.html.markdown new file mode 100644 index 000000000000..736c1d0870f6 --- /dev/null +++ b/website/source/docs/providers/rancher/index.html.markdown @@ -0,0 +1,33 @@ +--- +layout: "rancher" +page_title: "Provider: Rancher" +sidebar_current: "docs-rancher-index" +description: |- + The Rancher provider is used to interact with Rancher container platforms. +--- + +# Rancher Provider + +The Rancher provider is used to interact with the +resources supported by Rancher. The provider needs to be configured +with the URL of the Rancher server at minimum and API credentials if +access control is enabled on the server. + +## Example Usage + +```hcl +# Configure the Rancher provider +provider "rancher" { + api_url = "http://rancher.my-domain.com:8080" + access_key = "${var.rancher_access_key}" + secret_key = "${var.rancher_secret_key}" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `api_url` - (Required) Rancher API url. It must be provided, but it can also be sourced from the `RANCHER_URL` environment variable. +* `access_key` - (Optional) Rancher API access key. It can also be sourced from the `RANCHER_ACCESS_KEY` environment variable. +* `secret_key` - (Optional) Rancher API access key. It can also be sourced from the `RANCHER_SECRET_KEY` environment variable. diff --git a/website/source/docs/providers/rancher/r/environment.html.md b/website/source/docs/providers/rancher/r/environment.html.md new file mode 100644 index 000000000000..498ebda087a9 --- /dev/null +++ b/website/source/docs/providers/rancher/r/environment.html.md @@ -0,0 +1,42 @@ +--- +layout: "rancher" +page_title: "Rancher: rancher_environment" +sidebar_current: "docs-rancher-resource-environment" +description: |- + Provides a Rancher Environment resource. This can be used to create and manage environments on rancher. +--- + +# rancher\_environment + +Provides a Rancher Environment resource. This can be used to create and manage environments on rancher. + +## Example Usage + +```hcl +# Create a new Rancher environment +resource "rancher_environment" "default" { + name = "staging" + description = "The staging environment" + orchestration = "cattle" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) The name of the environment. +* `description` - (Optional) An environment description. +* `orchestration` - (Optional) Must be one of **cattle**, **swarm**, **mesos** or **kubernetes**. Defaults to **cattle**. + +## Attributes Reference + +No further attributes are exported. + +## Import + +Environments can be imported using their Rancher API ID, e.g. + +``` +$ terraform import rancher_environment.dev 1a15 +``` diff --git a/website/source/docs/providers/rancher/r/registration_token.html.markdown b/website/source/docs/providers/rancher/r/registration_token.html.markdown new file mode 100644 index 000000000000..b94d207f781a --- /dev/null +++ b/website/source/docs/providers/rancher/r/registration_token.html.markdown @@ -0,0 +1,46 @@ +--- +layout: "rancher" +page_title: "Rancher: rancher_registration_token" +sidebar_current: "docs-rancher-resource-registration-token" +description: |- + Provides a Rancher Registration Token resource. This can be used to create registration tokens for rancher environments and retrieve their information. +--- + +# rancher\_registration\_token + +Provides a Rancher Registration Token resource. This can be used to create registration tokens for rancher environments and retrieve their information. + +## Example Usage + +```hcl +# Create a new Rancher registration token +resource "rancher_registration_token" "default" { + name = "staging_token" + description = "Registration token for the staging environment" + environment_id = "${rancher_environment.default.id}" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) The name of the registration token. +* `description` - (Optional) A registration token description. +* `environment_id` - (Required) The ID of the environment to create the token for. + +## Attributes Reference + +The following attributes are exported: + +* `command` - The command used to start a rancher agent for this environment. +* `registration_url` - The URL to use to register new nodes to the environment. +* `token` - The token to use to register new nodes to the environment. + +## Import + +Registration tokens can be imported using their Rancher API ID, e.g. + +``` +$ terraform import rancher_registration_token.dev_token 1c11 +``` diff --git a/website/source/docs/providers/rancher/r/registry.html.markdown b/website/source/docs/providers/rancher/r/registry.html.markdown new file mode 100644 index 000000000000..9183ae975c7d --- /dev/null +++ b/website/source/docs/providers/rancher/r/registry.html.markdown @@ -0,0 +1,44 @@ +--- +layout: "rancher" +page_title: "Rancher: rancher_registry" +sidebar_current: "docs-rancher-resource-registry" +description: |- + Provides a Rancher Registy resource. This can be used to create registries for rancher environments and retrieve their information. +--- + +# rancher\_registry + +Provides a Rancher Registy resource. This can be used to create registries for rancher environments and retrieve their information + +## Example Usage + +```hcl +# Create a new Rancher registry +resource "rancher_registry" "dockerhub" { + name = "dockerhub" + description = "DockerHub Registry" + environment_id = "${rancher_environment.default.id}" + server_address = "index.dockerhub.io" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) The name of the registry. +* `description` - (Optional) A registry description. +* `environment_id` - (Required) The ID of the environment to create the registry for. +* `server_address` - (Required) The server address for the registry. + +## Attributes Reference + +No further attributes are exported. + +## Import + +Registries can be imported using their Rancher API ID, e.g. + +``` +$ terraform import rancher_registry.private_registry 1sp31 +``` diff --git a/website/source/docs/providers/rancher/r/registry_credential.html.markdown b/website/source/docs/providers/rancher/r/registry_credential.html.markdown new file mode 100644 index 000000000000..533d4f4fe17b --- /dev/null +++ b/website/source/docs/providers/rancher/r/registry_credential.html.markdown @@ -0,0 +1,48 @@ +--- +layout: "rancher" +page_title: "Rancher: rancher_registry_credential" +sidebar_current: "docs-rancher-resource-registry-credential" +description: |- + Provides a Rancher Registy Credential resource. This can be used to create registry credentials for rancher environments and retrieve their information. +--- + +# rancher\_registry\_credential + +Provides a Rancher Registy Credential resource. This can be used to create registry credentials for rancher environments and retrieve their information. + +## Example Usage + +```hcl +# Create a new Rancher registry +resource "rancher_registry_credential" "dockerhub" { + name = "dockerhub" + description = "DockerHub Registry Credential" + registry_id = "${rancher_registry.dockerhub.id}" + email = "myself@company.com" + public_value = "myself" + secret_value = "mypass" +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) The name of the registry credential. +* `description` - (Optional) A registry credential description. +* `registry_id` - (Required) The ID of the registry to create the credential for. +* `email` - (Required) The email of the account. +* `public_value` - (Required) The public value (user name) of the account. +* `secret_value` - (Required) The secret value (password) of the account. + +## Attributes Reference + +No further attributes are exported. + +## Import + +Registry credentials can be imported using their Rancher API ID, e.g. + +``` +$ terraform import rancher_registry_credential.private_registry 1c605 +``` diff --git a/website/source/docs/providers/rancher/r/stack.html.markdown b/website/source/docs/providers/rancher/r/stack.html.markdown new file mode 100644 index 000000000000..ee5cd20f353f --- /dev/null +++ b/website/source/docs/providers/rancher/r/stack.html.markdown @@ -0,0 +1,64 @@ +--- +layout: "rancher" +page_title: "Rancher: rancher_stack" +sidebar_current: "docs-rancher-resource-stack" +description: |- + Provides a Rancher Stack resource. This can be used to create and manage stacks on rancher. +--- + +# rancher\_stack + +Provides a Rancher Stack resource. This can be used to create and manage stacks on rancher. + +## Example Usage + +```hcl +# Create a new empty Rancher stack +resource "rancher_stack" "external-dns" { + name = "route53" + description = "Route53 stack" + environment_id = "${rancher_environment.default.id}" + catalog_id = "library:route53:7" + scope = "system" + environment { + AWS_ACCESS_KEY = "MYKEY" + AWS_SECRET_KEY = "MYSECRET" + AWS_REGION = "eu-central-1" + TTL = "60" + ROOT_DOMAIN = "example.com" + ROUTE53_ZONE_ID = "" + HEALTH_CHECK_INTERVAL = "15" + } +} +``` + +## Argument Reference + +The following arguments are supported: + +* `name` - (Required) The name of the stack. +* `description` - (Optional) A stack description. +* `environment_id` - (Required) The ID of the environment to create the stack for. +* `docker_compose` - (Optional) The `docker-compose.yml` content to apply for the stack. +* `rancher_compose` - (Optional) The `rancher-compose.yml` content to apply for the stack. +* `environment` - (Optional) The environment to apply to interpret the docker-compose and rancher-compose files. +* `catalog_id` - (Optional) The catalog ID to link this stack to. When provided, `docker_compose` and `rancher_compose` will be retrieved from the catalog unless they are overridden. +* `scope` - (Optional) The scope to attach the stack to. Must be one of **user** or **system**. Defaults to **user**. +* `start_on_create` - (Optional) Whether to start the stack automatically. +* `finish_upgrade` - (Optional) Whether to automatically finish upgrades to this stack. + +## Attributes Reference + +The following attributes are exported: + +* `rendered_docker_compose` - The interpolated `docker_compose` applied to the stack. +* `rendered_rancher_compose` - The interpolated `rancher_compose` applied to the stack. + + +## Import + +Stacks can be imported using their Rancher API ID, e.g. + +``` +$ terraform import rancher_stack.foo 1e149 +``` diff --git a/website/source/layouts/docs.erb b/website/source/layouts/docs.erb index 25e0cc2df016..87ad3a965223 100644 --- a/website/source/layouts/docs.erb +++ b/website/source/layouts/docs.erb @@ -298,6 +298,10 @@ RabbitMQ + > + Rancher + + > Random diff --git a/website/source/layouts/rancher.erb b/website/source/layouts/rancher.erb new file mode 100644 index 000000000000..3dcd23373e5e --- /dev/null +++ b/website/source/layouts/rancher.erb @@ -0,0 +1,38 @@ +<% wrap_layout :inner do %> + <% content_for :sidebar do %> + + <% end %> + + <%= yield %> +<% end %>