From 9a48aff7095af1fc047e62d1c1b8e8a1d82d2b2a Mon Sep 17 00:00:00 2001 From: Darren Shepherd Date: Mon, 3 Oct 2016 23:10:59 -0700 Subject: [PATCH 1/2] Update vendor --- trash.conf | 6 +- .../docker/libcompose/config/merge.go | 49 +++-- .../docker/libcompose/config/merge_v1.go | 13 +- .../docker/libcompose/config/merge_v2.go | 53 +---- .../docker/libcompose/config/types.go | 7 +- .../docker/libcompose/project/project.go | 2 +- .../github.com/rancher/go-rancher/.drone.yml | 11 +- .../rancher/go-rancher/Dockerfile.dapper | 11 +- .../rancher/go-rancher/catalog/client.go | 31 ++- .../rancher/go-rancher/catalog/common.go | 59 ++++-- .../catalog/generated_api_version.go | 14 +- .../go-rancher/catalog/generated_catalog.go | 14 +- .../go-rancher/catalog/generated_client.go | 13 +- .../go-rancher/catalog/generated_error.go | 14 +- .../go-rancher/catalog/generated_question.go | 14 +- .../go-rancher/catalog/generated_template.go | 16 +- .../catalog/generated_template_version.go | 18 +- .../rancher/go-rancher/client/client.go | 31 ++- .../rancher/go-rancher/client/common.go | 48 +++-- .../go-rancher/client/generated_account.go | 14 +- .../client/generated_active_setting.go | 14 +- .../client/generated_add_outputs_input.go | 14 +- ...remove_load_balancer_service_link_input.go | 14 +- ...generated_add_remove_service_link_input.go | 14 +- .../go-rancher/client/generated_agent.go | 14 +- .../client/generated_amazonec2config.go | 14 +- .../go-rancher/client/generated_api_key.go | 14 +- .../go-rancher/client/generated_audit_log.go | 14 +- .../client/generated_azure_config.go | 14 +- .../client/generated_azureadconfig.go | 14 +- .../go-rancher/client/generated_backup.go | 14 +- .../client/generated_backup_target.go | 14 +- .../client/generated_base_machine_config.go | 14 +- .../client/generated_blkio_device_option.go | 14 +- .../client/generated_certificate.go | 14 +- .../client/generated_change_secret_input.go | 14 +- .../go-rancher/client/generated_client.go | 13 +- .../client/generated_compose_config.go | 14 +- .../client/generated_compose_config_input.go | 14 +- .../client/generated_compose_project.go | 14 +- .../client/generated_compose_service.go | 14 +- .../client/generated_config_item.go | 14 +- .../client/generated_config_item_status.go | 14 +- .../go-rancher/client/generated_container.go | 14 +- .../client/generated_container_event.go | 14 +- .../client/generated_container_exec.go | 14 +- .../client/generated_container_logs.go | 14 +- .../client/generated_container_proxy.go | 14 +- .../go-rancher/client/generated_credential.go | 14 +- .../client/generated_databasechangelog.go | 14 +- .../client/generated_databasechangeloglock.go | 14 +- .../client/generated_digitalocean_config.go | 14 +- .../client/generated_dns_service.go | 14 +- .../client/generated_docker_build.go | 14 +- .../client/generated_dynamic_schema.go | 14 +- .../client/generated_environment.go | 14 +- .../client/generated_environment_upgrade.go | 14 +- .../generated_extension_implementation.go | 14 +- .../client/generated_extension_point.go | 14 +- .../client/generated_external_dns_event.go | 14 +- .../client/generated_external_event.go | 14 +- .../client/generated_external_handler.go | 14 +- ...al_handler_external_handler_process_map.go | 14 +- .../generated_external_handler_process.go | 14 +- ...nerated_external_handler_process_config.go | 14 +- .../client/generated_external_host_event.go | 14 +- .../client/generated_external_service.go | 14 +- .../generated_external_service_event.go | 14 +- .../generated_external_storage_pool_event.go | 14 +- .../client/generated_external_volume_event.go | 14 +- .../client/generated_field_documentation.go | 14 +- .../client/generated_githubconfig.go | 14 +- .../go-rancher/client/generated_ha_config.go | 14 +- .../client/generated_ha_config_input.go | 14 +- .../client/generated_haproxy_config.go | 14 +- ...generated_healthcheck_instance_host_map.go | 14 +- .../go-rancher/client/generated_host.go | 14 +- .../client/generated_host_access.go | 14 +- .../client/generated_host_api_proxy_token.go | 14 +- .../go-rancher/client/generated_identity.go | 14 +- .../go-rancher/client/generated_image.go | 14 +- .../generated_in_service_upgrade_strategy.go | 14 +- .../go-rancher/client/generated_instance.go | 14 +- .../client/generated_instance_console.go | 14 +- .../generated_instance_console_input.go | 14 +- .../client/generated_instance_health_check.go | 14 +- .../client/generated_instance_link.go | 14 +- .../client/generated_instance_stop.go | 14 +- .../go-rancher/client/generated_ip_address.go | 14 +- .../generated_ip_address_associate_input.go | 14 +- .../client/generated_kubernetes_service.go | 14 +- .../client/generated_kubernetes_stack.go | 14 +- .../generated_kubernetes_stack_upgrade.go | 14 +- .../go-rancher/client/generated_label.go | 14 +- .../client/generated_launch_config.go | 14 +- .../go-rancher/client/generated_ldapconfig.go | 14 +- ...d_balancer_app_cookie_stickiness_policy.go | 14 +- .../client/generated_load_balancer_config.go | 14 +- ..._load_balancer_cookie_stickiness_policy.go | 14 +- .../client/generated_load_balancer_service.go | 14 +- .../generated_load_balancer_service_link.go | 14 +- .../client/generated_local_auth_config.go | 14 +- .../go-rancher/client/generated_log_config.go | 14 +- .../go-rancher/client/generated_machine.go | 14 +- .../client/generated_machine_driver.go | 14 +- .../go-rancher/client/generated_mount.go | 14 +- .../go-rancher/client/generated_network.go | 14 +- .../go-rancher/client/generated_nfs_config.go | 14 +- .../client/generated_openldapconfig.go | 14 +- .../client/generated_packet_config.go | 14 +- .../go-rancher/client/generated_password.go | 14 +- .../client/generated_physical_host.go | 14 +- .../go-rancher/client/generated_port.go | 14 +- .../client/generated_process_definition.go | 14 +- .../client/generated_process_execution.go | 14 +- .../client/generated_process_instance.go | 14 +- .../go-rancher/client/generated_project.go | 14 +- .../client/generated_project_member.go | 14 +- .../client/generated_public_endpoint.go | 14 +- .../go-rancher/client/generated_publish.go | 14 +- .../go-rancher/client/generated_pull_task.go | 14 +- ...ated_recreate_on_quorum_strategy_config.go | 14 +- .../go-rancher/client/generated_register.go | 14 +- .../client/generated_registration_token.go | 14 +- .../go-rancher/client/generated_registry.go | 14 +- .../client/generated_registry_credential.go | 14 +- .../client/generated_resource_definition.go | 14 +- .../client/generated_restart_policy.go | 14 +- .../generated_restore_from_backup_input.go | 14 +- .../generated_revert_to_snapshot_input.go | 14 +- .../generated_rolling_restart_strategy.go | 14 +- .../client/generated_scale_policy.go | 14 +- .../generated_secondary_launch_config.go | 14 +- .../go-rancher/client/generated_service.go | 14 +- .../client/generated_service_consume_map.go | 14 +- .../client/generated_service_event.go | 14 +- .../client/generated_service_expose_map.go | 14 +- .../client/generated_service_link.go | 14 +- .../client/generated_service_proxy.go | 14 +- .../client/generated_service_restart.go | 14 +- .../client/generated_service_upgrade.go | 14 +- .../generated_service_upgrade_strategy.go | 14 +- .../client/generated_services_port_range.go | 14 +- .../client/generated_set_labels_input.go | 14 +- ...d_set_load_balancer_service_links_input.go | 14 +- .../generated_set_project_members_input.go | 14 +- .../generated_set_service_links_input.go | 14 +- .../go-rancher/client/generated_setting.go | 14 +- .../go-rancher/client/generated_snapshot.go | 14 +- .../client/generated_snapshot_backup_input.go | 14 +- .../client/generated_state_transition.go | 14 +- .../client/generated_stats_access.go | 14 +- .../client/generated_storage_pool.go | 14 +- .../go-rancher/client/generated_subscribe.go | 14 +- .../go-rancher/client/generated_task.go | 14 +- .../client/generated_task_instance.go | 14 +- .../generated_to_service_upgrade_strategy.go | 14 +- .../client/generated_type_documentation.go | 14 +- .../client/generated_virtual_machine.go | 14 +- .../client/generated_virtual_machine_disk.go | 14 +- .../go-rancher/client/generated_volume.go | 14 +- .../client/generated_volume_snapshot_input.go | 14 +- .../rancher/go-rancher/client/schemas.go | 3 + .../rancher/go-rancher/v2/client.go | 34 +++- .../rancher/go-rancher/v2/common.go | 73 +++++-- .../go-rancher/v2/generated_account.go | 14 +- .../go-rancher/v2/generated_active_setting.go | 14 +- .../v2/generated_add_outputs_input.go | 14 +- ...remove_load_balancer_service_link_input.go | 14 +- ...generated_add_remove_service_link_input.go | 14 +- .../rancher/go-rancher/v2/generated_agent.go | 14 +- .../v2/generated_amazonec2config.go | 20 +- .../go-rancher/v2/generated_api_key.go | 14 +- .../go-rancher/v2/generated_audit_log.go | 14 +- .../go-rancher/v2/generated_azure_config.go | 46 ++--- .../go-rancher/v2/generated_azureadconfig.go | 14 +- .../rancher/go-rancher/v2/generated_backup.go | 14 +- .../go-rancher/v2/generated_backup_target.go | 14 +- .../v2/generated_base_machine_config.go | 14 +- .../go-rancher/v2/generated_binding.go | 14 +- .../v2/generated_blkio_device_option.go | 14 +- .../go-rancher/v2/generated_certificate.go | 14 +- .../v2/generated_change_secret_input.go | 14 +- .../rancher/go-rancher/v2/generated_client.go | 23 ++- .../go-rancher/v2/generated_compose_config.go | 14 +- .../v2/generated_compose_config_input.go | 14 +- .../v2/generated_compose_project.go | 20 +- .../v2/generated_compose_service.go | 24 ++- .../go-rancher/v2/generated_config_item.go | 14 +- .../v2/generated_config_item_status.go | 14 +- .../go-rancher/v2/generated_container.go | 29 +-- .../v2/generated_container_event.go | 14 +- .../go-rancher/v2/generated_container_exec.go | 14 +- .../go-rancher/v2/generated_container_logs.go | 14 +- .../v2/generated_container_proxy.go | 14 +- .../go-rancher/v2/generated_credential.go | 14 +- .../v2/generated_databasechangelog.go | 14 +- .../v2/generated_databasechangeloglock.go | 14 +- .../v2/generated_digitalocean_config.go | 16 +- .../go-rancher/v2/generated_dns_service.go | 22 +- .../go-rancher/v2/generated_docker_build.go | 14 +- .../go-rancher/v2/generated_dynamic_schema.go | 14 +- .../v2/generated_extension_implementation.go | 14 +- .../v2/generated_extension_point.go | 16 +- .../v2/generated_external_dns_event.go | 14 +- .../go-rancher/v2/generated_external_event.go | 14 +- .../v2/generated_external_handler.go | 16 +- ...al_handler_external_handler_process_map.go | 14 +- .../v2/generated_external_handler_process.go | 14 +- ...nerated_external_handler_process_config.go | 14 +- .../v2/generated_external_host_event.go | 14 +- .../v2/generated_external_service.go | 22 +- .../v2/generated_external_service_event.go | 14 +- .../generated_external_storage_pool_event.go | 14 +- .../v2/generated_external_volume_event.go | 14 +- .../v2/generated_field_documentation.go | 14 +- .../go-rancher/v2/generated_githubconfig.go | 16 +- .../go-rancher/v2/generated_ha_config.go | 14 +- .../v2/generated_ha_config_input.go | 14 +- .../go-rancher/v2/generated_haproxy_config.go | 14 +- ...generated_healthcheck_instance_host_map.go | 14 +- .../rancher/go-rancher/v2/generated_host.go | 74 ++++++- .../go-rancher/v2/generated_host_access.go | 14 +- .../v2/generated_host_api_proxy_token.go | 14 +- .../go-rancher/v2/generated_identity.go | 14 +- .../rancher/go-rancher/v2/generated_image.go | 14 +- .../generated_in_service_upgrade_strategy.go | 18 +- .../go-rancher/v2/generated_instance.go | 14 +- .../v2/generated_instance_console.go | 14 +- .../v2/generated_instance_console_input.go | 14 +- .../v2/generated_instance_health_check.go | 14 +- .../go-rancher/v2/generated_instance_link.go | 14 +- .../go-rancher/v2/generated_instance_stop.go | 14 +- .../go-rancher/v2/generated_ip_address.go | 14 +- .../generated_ip_address_associate_input.go | 14 +- .../v2/generated_kubernetes_service.go | 22 +- .../v2/generated_kubernetes_stack.go | 20 +- .../v2/generated_kubernetes_stack_upgrade.go | 14 +- .../rancher/go-rancher/v2/generated_label.go | 14 +- .../go-rancher/v2/generated_launch_config.go | 31 +-- .../go-rancher/v2/generated_ldapconfig.go | 16 +- ...d_balancer_app_cookie_stickiness_policy.go | 14 +- .../v2/generated_load_balancer_config.go | 14 +- ..._load_balancer_cookie_stickiness_policy.go | 14 +- .../v2/generated_load_balancer_service.go | 24 ++- .../generated_load_balancer_service_link.go | 14 +- .../v2/generated_local_auth_config.go | 14 +- .../go-rancher/v2/generated_log_config.go | 14 +- .../go-rancher/v2/generated_machine.go | 14 +- .../go-rancher/v2/generated_machine_driver.go | 16 +- .../rancher/go-rancher/v2/generated_mount.go | 14 +- .../go-rancher/v2/generated_network.go | 14 +- .../go-rancher/v2/generated_network_driver.go | 160 +++++++++++++++ .../go-rancher/v2/generated_nfs_config.go | 14 +- .../go-rancher/v2/generated_openldapconfig.go | 14 +- .../go-rancher/v2/generated_packet_config.go | 14 +- .../go-rancher/v2/generated_password.go | 14 +- .../go-rancher/v2/generated_physical_host.go | 14 +- .../rancher/go-rancher/v2/generated_port.go | 14 +- .../v2/generated_process_definition.go | 16 +- .../v2/generated_process_execution.go | 14 +- .../v2/generated_process_instance.go | 14 +- .../go-rancher/v2/generated_project.go | 26 ++- .../go-rancher/v2/generated_project_member.go | 14 +- .../v2/generated_public_endpoint.go | 14 +- .../go-rancher/v2/generated_publish.go | 14 +- .../go-rancher/v2/generated_pull_task.go | 14 +- ...ated_recreate_on_quorum_strategy_config.go | 14 +- .../go-rancher/v2/generated_register.go | 14 +- .../v2/generated_registration_token.go | 14 +- .../go-rancher/v2/generated_registry.go | 14 +- .../v2/generated_registry_credential.go | 14 +- .../v2/generated_resource_definition.go | 14 +- .../go-rancher/v2/generated_restart_policy.go | 14 +- .../v2/generated_restore_from_backup_input.go | 14 +- .../v2/generated_revert_to_snapshot_input.go | 14 +- .../v2/generated_rolling_restart_strategy.go | 14 +- .../go-rancher/v2/generated_scale_policy.go | 14 +- .../v2/generated_secondary_launch_config.go | 31 +-- .../go-rancher/v2/generated_service.go | 26 ++- .../v2/generated_service_binding.go | 16 +- .../v2/generated_service_consume_map.go | 14 +- .../go-rancher/v2/generated_service_event.go | 14 +- .../v2/generated_service_expose_map.go | 14 +- .../go-rancher/v2/generated_service_link.go | 14 +- .../go-rancher/v2/generated_service_log.go | 14 +- .../go-rancher/v2/generated_service_proxy.go | 14 +- .../v2/generated_service_restart.go | 14 +- .../v2/generated_service_upgrade.go | 14 +- .../v2/generated_service_upgrade_strategy.go | 14 +- .../v2/generated_services_port_range.go | 14 +- .../v2/generated_set_labels_input.go | 67 ------ ...d_set_load_balancer_service_links_input.go | 16 +- .../v2/generated_set_project_members_input.go | 16 +- .../v2/generated_set_service_links_input.go | 16 +- .../go-rancher/v2/generated_setting.go | 14 +- .../go-rancher/v2/generated_snapshot.go | 14 +- .../v2/generated_snapshot_backup_input.go | 14 +- .../rancher/go-rancher/v2/generated_stack.go | 20 +- .../go-rancher/v2/generated_stack_upgrade.go | 14 +- .../v2/generated_state_transition.go | 14 +- .../go-rancher/v2/generated_stats_access.go | 14 +- .../go-rancher/v2/generated_storage_driver.go | 168 ++++++++++++++++ .../go-rancher/v2/generated_storage_pool.go | 16 +- .../go-rancher/v2/generated_subscribe.go | 14 +- .../rancher/go-rancher/v2/generated_task.go | 14 +- .../go-rancher/v2/generated_task_instance.go | 14 +- .../generated_to_service_upgrade_strategy.go | 14 +- .../v2/generated_type_documentation.go | 14 +- .../v2/generated_virtual_machine.go | 31 +-- .../v2/generated_virtual_machine_disk.go | 14 +- .../rancher/go-rancher/v2/generated_volume.go | 33 +-- .../v2/generated_volume_activate_input.go | 79 ++++++++ .../v2/generated_volume_snapshot_input.go | 14 +- .../v2/generated_volume_template.go | 190 ++++++++++++++++++ .../rancher/rancher-compose/app/app.go | 1 + .../rancher-compose/preprocess/project.go | 62 +++++- .../rancher-compose/rancher/configs.go | 7 +- .../rancher-compose/rancher/context.go | 28 +-- .../rancher/rancher-compose/rancher/normal.go | 13 +- .../rancher-compose/rancher/project.go | 27 ++- .../rancher-compose/rancher/service.go | 31 +-- .../rancher/rancher-compose/rancher/volume.go | 140 +++++++++++++ .../rancher/rancher-compose/trash.conf | 6 +- 324 files changed, 5143 insertions(+), 707 deletions(-) create mode 100644 vendor/github.com/rancher/go-rancher/v2/generated_network_driver.go delete mode 100644 vendor/github.com/rancher/go-rancher/v2/generated_set_labels_input.go create mode 100644 vendor/github.com/rancher/go-rancher/v2/generated_storage_driver.go create mode 100644 vendor/github.com/rancher/go-rancher/v2/generated_volume_activate_input.go create mode 100644 vendor/github.com/rancher/go-rancher/v2/generated_volume_template.go create mode 100644 vendor/github.com/rancher/rancher-compose/rancher/volume.go diff --git a/trash.conf b/trash.conf index 67f690145..fcc02dd10 100644 --- a/trash.conf +++ b/trash.conf @@ -5,7 +5,7 @@ github.com/docker/docker 534753663161334baba06f13b8efa4cad22b5bc5 github.com/docker/engine-api 62043eb79d581a32ea849645277023c550732e52 github.com/docker/go-connections 990a1a1a70b0da4c4cb70e117971a4f0babfbf1a github.com/docker/go-units f2d77a61e3c169b43402a0a1e84f06daf29b8190 -github.com/docker/libcompose 444fe501e251841740281be421449f1551cde8dd https://github.com/rancher/libcompose +github.com/docker/libcompose 777d5bb20ebfa9b5cac8f1ea1707a4c53399a07e https://github.com/rancher/libcompose github.com/flynn/go-shlex 3f9db97f856818214da2e1057f8ad84803971cff github.com/gorilla/context 14f550f51a github.com/gorilla/mux e444e69cbd @@ -16,9 +16,9 @@ github.com/mitchellh/mapstructure ca63d7c062ee3c9f34db231e352b60012b4fd0c1 github.com/opencontainers/runc cc29e3dded8e27ba8f65738f40d251c885030a28 github.com/patrickmn/go-cache 1881a9bccb818787f68c52bfba648c6cf34c34fa github.com/pkg/errors 1d2e60385a13aaa66134984235061c2f9302520e -github.com/rancher/go-rancher 4a0d294ee53a66a8d33614d20793d799fe12faf0 +github.com/rancher/go-rancher f0378de1178a553cfb64666c0281486f593f0f05 github.com/rancher/rancher-catalog-service a3a8b500adceb82b3a0387b2c7b06a60e7eeee9a -github.com/rancher/rancher-compose 2093d693d5f4eb866d74ffff0fe404d04d3e8caa +github.com/rancher/rancher-compose cb5784e5d75067ae1ef997036d4bc3c8ee242dae github.com/rancher/rancher-docker-api-proxy 461b5e7022698283030495cf5693680699ce9c28 github.com/Sirupsen/logrus 26709e2714106fb8ad40b773b711ebce25b78914 github.com/spf13/pflag cb88ea77998c3f024757528e3305022ab50b43be diff --git a/vendor/github.com/docker/libcompose/config/merge.go b/vendor/github.com/docker/libcompose/config/merge.go index 7b02ac357..1c56d7be0 100644 --- a/vendor/github.com/docker/libcompose/config/merge.go +++ b/vendor/github.com/docker/libcompose/config/merge.go @@ -23,36 +23,55 @@ var ( } ) +// CreateConfig unmarshals bytes to config and creates config based on version +func CreateConfig(bytes []byte) (*Config, error) { + var config Config + if err := yaml.Unmarshal(bytes, &config); err != nil { + return nil, err + } + if config.Version == "2" { + for key, value := range config.Networks { + if value == nil { + config.Networks[key] = &NetworkConfig{} + } + } + for key, value := range config.Volumes { + if value == nil { + config.Volumes[key] = &VolumeConfig{} + } + } + } else { + var baseRawServices RawServiceMap + if err := yaml.Unmarshal(bytes, &baseRawServices); err != nil { + return nil, err + } + config.Services = baseRawServices + } + + return &config, nil +} + // Merge merges a compose file into an existing set of service configs func Merge(existingServices *ServiceConfigs, environmentLookup EnvironmentLookup, resourceLookup ResourceLookup, file string, bytes []byte, options *ParseOptions) (string, map[string]*ServiceConfig, map[string]*VolumeConfig, map[string]*NetworkConfig, error) { if options == nil { options = &defaultParseOptions } - var config Config - if err := yaml.Unmarshal(bytes, &config); err != nil { + config, err := CreateConfig(bytes) + if err != nil { return "", nil, nil, nil, err } + baseRawServices := config.Services var serviceConfigs map[string]*ServiceConfig - var volumeConfigs map[string]*VolumeConfig - var networkConfigs map[string]*NetworkConfig if config.Version == "2" { var err error - serviceConfigs, err = MergeServicesV2(existingServices, environmentLookup, resourceLookup, file, bytes, options) - if err != nil { - return "", nil, nil, nil, err - } - volumeConfigs, err = ParseVolumes(bytes) - if err != nil { - return "", nil, nil, nil, err - } - networkConfigs, err = ParseNetworks(bytes) + serviceConfigs, err = MergeServicesV2(existingServices, environmentLookup, resourceLookup, file, baseRawServices, options) if err != nil { return "", nil, nil, nil, err } } else { - serviceConfigsV1, err := MergeServicesV1(existingServices, environmentLookup, resourceLookup, file, bytes, options) + serviceConfigsV1, err := MergeServicesV1(existingServices, environmentLookup, resourceLookup, file, baseRawServices, options) if err != nil { return "", nil, nil, nil, err } @@ -72,7 +91,7 @@ func Merge(existingServices *ServiceConfigs, environmentLookup EnvironmentLookup } } - return config.Version, serviceConfigs, volumeConfigs, networkConfigs, nil + return config.Version, serviceConfigs, config.Volumes, config.Networks, nil } func adjustValues(configs map[string]*ServiceConfig) { diff --git a/vendor/github.com/docker/libcompose/config/merge_v1.go b/vendor/github.com/docker/libcompose/config/merge_v1.go index 6f6b8a4b3..c1eeeae73 100644 --- a/vendor/github.com/docker/libcompose/config/merge_v1.go +++ b/vendor/github.com/docker/libcompose/config/merge_v1.go @@ -6,16 +6,10 @@ import ( "github.com/Sirupsen/logrus" "github.com/docker/libcompose/utils" - "gopkg.in/yaml.v2" ) // MergeServicesV1 merges a v1 compose file into an existing set of service configs -func MergeServicesV1(existingServices *ServiceConfigs, environmentLookup EnvironmentLookup, resourceLookup ResourceLookup, file string, bytes []byte, options *ParseOptions) (map[string]*ServiceConfigV1, error) { - datas := make(RawServiceMap) - if err := yaml.Unmarshal(bytes, &datas); err != nil { - return nil, err - } - +func MergeServicesV1(existingServices *ServiceConfigs, environmentLookup EnvironmentLookup, resourceLookup ResourceLookup, file string, datas RawServiceMap, options *ParseOptions) (map[string]*ServiceConfigV1, error) { if options.Interpolate { if err := Interpolate(environmentLookup, &datas); err != nil { return nil, err @@ -116,10 +110,11 @@ func parseV1(resourceLookup ResourceLookup, environmentLookup EnvironmentLookup, return nil, err } - var baseRawServices RawServiceMap - if err := yaml.Unmarshal(bytes, &baseRawServices); err != nil { + config, err := CreateConfig(bytes) + if err != nil { return nil, err } + baseRawServices := config.Services if options.Interpolate { err = Interpolate(environmentLookup, &baseRawServices) diff --git a/vendor/github.com/docker/libcompose/config/merge_v2.go b/vendor/github.com/docker/libcompose/config/merge_v2.go index 7ff627fa1..e9e5678ba 100644 --- a/vendor/github.com/docker/libcompose/config/merge_v2.go +++ b/vendor/github.com/docker/libcompose/config/merge_v2.go @@ -6,18 +6,10 @@ import ( "github.com/Sirupsen/logrus" "github.com/docker/libcompose/utils" - "gopkg.in/yaml.v2" ) // MergeServicesV2 merges a v2 compose file into an existing set of service configs -func MergeServicesV2(existingServices *ServiceConfigs, environmentLookup EnvironmentLookup, resourceLookup ResourceLookup, file string, bytes []byte, options *ParseOptions) (map[string]*ServiceConfig, error) { - var config Config - if err := yaml.Unmarshal(bytes, &config); err != nil { - return nil, err - } - - datas := config.Services - +func MergeServicesV2(existingServices *ServiceConfigs, environmentLookup EnvironmentLookup, resourceLookup ResourceLookup, file string, datas RawServiceMap, options *ParseOptions) (map[string]*ServiceConfig, error) { if options.Interpolate { if err := Interpolate(environmentLookup, &datas); err != nil { return nil, err @@ -65,44 +57,6 @@ func MergeServicesV2(existingServices *ServiceConfigs, environmentLookup Environ return serviceConfigs, nil } -// ParseVolumes parses volumes in a compose file -func ParseVolumes(bytes []byte) (map[string]*VolumeConfig, error) { - volumeConfigs := make(map[string]*VolumeConfig) - - var config Config - if err := yaml.Unmarshal(bytes, &config); err != nil { - return nil, err - } - - if err := utils.Convert(config.Volumes, &volumeConfigs); err != nil { - return nil, err - } - - return volumeConfigs, nil -} - -// ParseNetworks parses networks in a compose file -func ParseNetworks(bytes []byte) (map[string]*NetworkConfig, error) { - networkConfigs := make(map[string]*NetworkConfig) - - var config Config - if err := yaml.Unmarshal(bytes, &config); err != nil { - return nil, err - } - - if err := utils.Convert(config.Networks, &networkConfigs); err != nil { - return nil, err - } - - for key, value := range networkConfigs { - if value == nil { - networkConfigs[key] = &NetworkConfig{} - } - } - - return networkConfigs, nil -} - func parseV2(resourceLookup ResourceLookup, environmentLookup EnvironmentLookup, inFile string, serviceData RawService, datas RawServiceMap, options *ParseOptions) (RawService, error) { serviceData, err := readEnvFile(resourceLookup, inFile, serviceData) if err != nil { @@ -147,11 +101,10 @@ func parseV2(resourceLookup ResourceLookup, environmentLookup EnvironmentLookup, return nil, err } - var config Config - if err := yaml.Unmarshal(bytes, &config); err != nil { + config, err := CreateConfig(bytes) + if err != nil { return nil, err } - baseRawServices := config.Services if options.Interpolate { diff --git a/vendor/github.com/docker/libcompose/config/types.go b/vendor/github.com/docker/libcompose/config/types.go index 1651ee1c9..a7b6f144f 100644 --- a/vendor/github.com/docker/libcompose/config/types.go +++ b/vendor/github.com/docker/libcompose/config/types.go @@ -134,9 +134,10 @@ type ServiceConfig struct { // VolumeConfig holds v2 volume configuration type VolumeConfig struct { - Driver string `yaml:"driver,omitempty"` - DriverOpts map[string]string `yaml:"driver_opts,omitempty"` - External yaml.External `yaml:"external,omitempty"` + Driver string `yaml:"driver,omitempty"` + DriverOpts map[string]string `yaml:"driver_opts,omitempty"` + External yaml.External `yaml:"external,omitempty"` + PerContainer bool `yaml:"per_container,omitempty"` } // Ipam holds v2 network IPAM information diff --git a/vendor/github.com/docker/libcompose/project/project.go b/vendor/github.com/docker/libcompose/project/project.go index fb19a9c91..4b1f80de1 100644 --- a/vendor/github.com/docker/libcompose/project/project.go +++ b/vendor/github.com/docker/libcompose/project/project.go @@ -209,7 +209,7 @@ func (p *Project) load(file string, bytes []byte) error { // Update network configuration a little bit p.handleNetworkConfig() - p.handleVolumeConfig() + //p.handleVolumeConfig() if p.context.NetworksFactory != nil { networks, err := p.context.NetworksFactory.Create(p.Name, p.NetworkConfigs, p.ServiceConfigs, p.isNetworkEnabled()) diff --git a/vendor/github.com/rancher/go-rancher/.drone.yml b/vendor/github.com/rancher/go-rancher/.drone.yml index b0f0e2ebd..2d592c3e5 100644 --- a/vendor/github.com/rancher/go-rancher/.drone.yml +++ b/vendor/github.com/rancher/go-rancher/.drone.yml @@ -1,4 +1,7 @@ -image: rancher/dind:v1.10.0-rancher1 -script: - - wrapdocker - - make ci +pipeline: + build: + image: rancher/dapper:1.10.3 + volumes: + - /var/run/docker.sock:/var/run/docker.sock + commands: + - dapper ci diff --git a/vendor/github.com/rancher/go-rancher/Dockerfile.dapper b/vendor/github.com/rancher/go-rancher/Dockerfile.dapper index 6755d3fa1..d5bfad7a7 100644 --- a/vendor/github.com/rancher/go-rancher/Dockerfile.dapper +++ b/vendor/github.com/rancher/go-rancher/Dockerfile.dapper @@ -1,7 +1,7 @@ FROM ubuntu:16.04 # FROM arm=armhf/ubuntu:16.04 -ARG DAPPER_HOST_ARCH +ARG DAPPER_HOST_ARCH=amd64 ENV HOST_ARCH=${DAPPER_HOST_ARCH} ARCH=${DAPPER_HOST_ARCH} RUN apt-get update && \ @@ -11,17 +11,16 @@ RUN apt-get update && \ 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 +RUN wget -O - https://storage.googleapis.com/golang/go1.7.1.linux-${!GOLANG_ARCH}.tar.gz | tar -xzf - -C /usr/local && \ + go get github.com/rancher/trash && go get github.com/golang/lint/golint + ENV DAPPER_SOURCE /go/src/github.com/rancher/go-rancher/ -ENV DAPPER_OUTPUT ./bin ./dist +ENV DAPPER_OUTPUT ./bin ENV DAPPER_DOCKER_SOCKET true ENV TRASH_CACHE ${DAPPER_SOURCE}/.trash-cache ENV HOME ${DAPPER_SOURCE} diff --git a/vendor/github.com/rancher/go-rancher/catalog/client.go b/vendor/github.com/rancher/go-rancher/catalog/client.go index 6beb42191..d585ef53c 100644 --- a/vendor/github.com/rancher/go-rancher/catalog/client.go +++ b/vendor/github.com/rancher/go-rancher/catalog/client.go @@ -1,7 +1,36 @@ package catalog -type RancherBaseClient struct { +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 + doNext(string, 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/rancher/go-rancher/catalog/common.go b/vendor/github.com/rancher/go-rancher/catalog/common.go index d5839e5c6..fa8aa8e62 100644 --- a/vendor/github.com/rancher/go-rancher/catalog/common.go +++ b/vendor/github.com/rancher/go-rancher/catalog/common.go @@ -10,6 +10,7 @@ import ( "net/url" "os" "regexp" + "strings" "time" "github.com/gorilla/websocket" @@ -128,7 +129,17 @@ func appendFilters(urlString string, filters map[string]interface{}) (string, er return u.String(), nil } -func setupRancherBaseClient(rancherClient *RancherBaseClient, opts *ClientOpts) error { +func setupRancherBaseClient(rancherClient *RancherBaseClientImpl, opts *ClientOpts) error { + u, err := url.Parse(opts.Url) + if err != nil { + return err + } + + if u.Path == "/v1" || strings.HasPrefix(u.Path, "/v1/") { + u.Path = strings.Replace(u.Path, "/v1", "/v2-beta", 1) + } + opts.Url = u.String() + if opts.Timeout == 0 { opts.Timeout = time.Second * 10 } @@ -202,18 +213,18 @@ func NewListOpts() *ListOpts { } } -func (rancherClient *RancherBaseClient) setupRequest(req *http.Request) { +func (rancherClient *RancherBaseClientImpl) setupRequest(req *http.Request) { req.SetBasicAuth(rancherClient.Opts.AccessKey, rancherClient.Opts.SecretKey) } -func (rancherClient *RancherBaseClient) newHttpClient() *http.Client { +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 *RancherBaseClient) doDelete(url string) error { +func (rancherClient *RancherBaseClientImpl) doDelete(url string) error { client := rancherClient.newHttpClient() req, err := http.NewRequest("DELETE", url, nil) if err != nil { @@ -237,11 +248,11 @@ func (rancherClient *RancherBaseClient) doDelete(url string) error { return nil } -func (rancherClient *RancherBaseClient) Websocket(url string, headers map[string][]string) (*websocket.Conn, *http.Response, error) { +func (rancherClient *RancherBaseClientImpl) 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 { +func (rancherClient *RancherBaseClientImpl) doGet(url string, opts *ListOpts, respObject interface{}) error { if opts == nil { opts = NewListOpts() } @@ -289,11 +300,11 @@ func (rancherClient *RancherBaseClient) doGet(url string, opts *ListOpts, respOb return nil } -func (rancherClient *RancherBaseClient) List(schemaType string, opts *ListOpts, respObject interface{}) error { +func (rancherClient *RancherBaseClientImpl) 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 { +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 + "]") @@ -311,11 +322,15 @@ func (rancherClient *RancherBaseClient) doList(schemaType string, opts *ListOpts return rancherClient.doGet(collectionUrl, opts, respObject) } -func (rancherClient *RancherBaseClient) Post(url string, createObj interface{}, respObject interface{}) error { +func (rancherClient *RancherBaseClientImpl) doNext(nextUrl string, respObject interface{}) error { + return rancherClient.doGet(nextUrl, nil, respObject) +} + +func (rancherClient *RancherBaseClientImpl) 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 { +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) @@ -324,7 +339,7 @@ func (rancherClient *RancherBaseClient) GetLink(resource Resource, link string, return rancherClient.doGet(url, &ListOpts{}, respObject) } -func (rancherClient *RancherBaseClient) doModify(method string, url string, createObj interface{}, respObject interface{}) error { +func (rancherClient *RancherBaseClientImpl) doModify(method string, url string, createObj interface{}, respObject interface{}) error { bodyContent, err := json.Marshal(createObj) if err != nil { return err @@ -371,11 +386,11 @@ func (rancherClient *RancherBaseClient) doModify(method string, url string, crea return nil } -func (rancherClient *RancherBaseClient) Create(schemaType string, createObj interface{}, respObject interface{}) error { +func (rancherClient *RancherBaseClientImpl) 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 { +func (rancherClient *RancherBaseClientImpl) doCreate(schemaType string, createObj interface{}, respObject interface{}) error { if createObj == nil { createObj = map[string]string{} } @@ -403,11 +418,11 @@ func (rancherClient *RancherBaseClient) doCreate(schemaType string, createObj in return rancherClient.doModify("POST", collectionUrl, createObj, respObject) } -func (rancherClient *RancherBaseClient) Update(schemaType string, existing *Resource, updates interface{}, respObject interface{}) error { +func (rancherClient *RancherBaseClientImpl) 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 { +func (rancherClient *RancherBaseClientImpl) doUpdate(schemaType string, existing *Resource, updates interface{}, respObject interface{}) error { if existing == nil { return errors.New("Existing object is nil") } @@ -437,11 +452,11 @@ func (rancherClient *RancherBaseClient) doUpdate(schemaType string, existing *Re return rancherClient.doModify("PUT", selfUrl, updates, respObject) } -func (rancherClient *RancherBaseClient) ById(schemaType string, id string, respObject interface{}) error { +func (rancherClient *RancherBaseClientImpl) 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 { +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 + "]") @@ -461,14 +476,14 @@ func (rancherClient *RancherBaseClient) doById(schemaType string, id string, res return err } -func (rancherClient *RancherBaseClient) Delete(existing *Resource) error { +func (rancherClient *RancherBaseClientImpl) Delete(existing *Resource) error { if existing == nil { return nil } return rancherClient.doResourceDelete(existing.Type, existing) } -func (rancherClient *RancherBaseClient) doResourceDelete(schemaType string, existing *Resource) error { +func (rancherClient *RancherBaseClientImpl) doResourceDelete(schemaType string, existing *Resource) error { schema, ok := rancherClient.Types[schemaType] if !ok { return errors.New("Unknown schema type [" + schemaType + "]") @@ -486,7 +501,7 @@ func (rancherClient *RancherBaseClient) doResourceDelete(schemaType string, exis return rancherClient.doDelete(selfUrl) } -func (rancherClient *RancherBaseClient) Reload(existing *Resource, output interface{}) error { +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)) @@ -495,12 +510,12 @@ func (rancherClient *RancherBaseClient) Reload(existing *Resource, output interf return rancherClient.doGet(selfUrl, NewListOpts(), output) } -func (rancherClient *RancherBaseClient) Action(schemaType string, action string, +func (rancherClient *RancherBaseClientImpl) 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, +func (rancherClient *RancherBaseClientImpl) doAction(schemaType string, action string, existing *Resource, inputObject, respObject interface{}) error { if existing == nil { diff --git a/vendor/github.com/rancher/go-rancher/catalog/generated_api_version.go b/vendor/github.com/rancher/go-rancher/catalog/generated_api_version.go index 436eafd91..710019178 100644 --- a/vendor/github.com/rancher/go-rancher/catalog/generated_api_version.go +++ b/vendor/github.com/rancher/go-rancher/catalog/generated_api_version.go @@ -16,7 +16,8 @@ type ApiVersion struct { type ApiVersionCollection struct { Collection - Data []ApiVersion `json:"data,omitempty"` + Data []ApiVersion `json:"data,omitempty"` + client *ApiVersionClient } type ApiVersionClient struct { @@ -52,9 +53,20 @@ func (c *ApiVersionClient) Update(existing *ApiVersion, updates interface{}) (*A func (c *ApiVersionClient) List(opts *ListOpts) (*ApiVersionCollection, error) { resp := &ApiVersionCollection{} err := c.rancherClient.doList(API_VERSION_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ApiVersionCollection) Next() (*ApiVersionCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ApiVersionCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ApiVersionClient) ById(id string) (*ApiVersion, error) { resp := &ApiVersion{} err := c.rancherClient.doById(API_VERSION_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/catalog/generated_catalog.go b/vendor/github.com/rancher/go-rancher/catalog/generated_catalog.go index 97fa356ab..7bd9ffaa5 100644 --- a/vendor/github.com/rancher/go-rancher/catalog/generated_catalog.go +++ b/vendor/github.com/rancher/go-rancher/catalog/generated_catalog.go @@ -32,7 +32,8 @@ type Catalog struct { type CatalogCollection struct { Collection - Data []Catalog `json:"data,omitempty"` + Data []Catalog `json:"data,omitempty"` + client *CatalogClient } type CatalogClient struct { @@ -68,9 +69,20 @@ func (c *CatalogClient) Update(existing *Catalog, updates interface{}) (*Catalog func (c *CatalogClient) List(opts *ListOpts) (*CatalogCollection, error) { resp := &CatalogCollection{} err := c.rancherClient.doList(CATALOG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *CatalogCollection) Next() (*CatalogCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &CatalogCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *CatalogClient) ById(id string) (*Catalog, error) { resp := &Catalog{} err := c.rancherClient.doById(CATALOG_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/catalog/generated_client.go b/vendor/github.com/rancher/go-rancher/catalog/generated_client.go index 97641b70f..cb815476e 100644 --- a/vendor/github.com/rancher/go-rancher/catalog/generated_client.go +++ b/vendor/github.com/rancher/go-rancher/catalog/generated_client.go @@ -11,11 +11,9 @@ type RancherClient struct { Error ErrorOperations } -func constructClient() *RancherClient { +func constructClient(rancherBaseClient *RancherBaseClientImpl) *RancherClient { client := &RancherClient{ - RancherBaseClient: RancherBaseClient{ - Types: map[string]Schema{}, - }, + RancherBaseClient: rancherBaseClient, } client.ApiVersion = newApiVersionClient(client) @@ -29,9 +27,12 @@ func constructClient() *RancherClient { } func NewRancherClient(opts *ClientOpts) (*RancherClient, error) { - client := constructClient() + rancherBaseClient := &RancherBaseClientImpl{ + Types: map[string]Schema{}, + } + client := constructClient(rancherBaseClient) - err := setupRancherBaseClient(&client.RancherBaseClient, opts) + err := setupRancherBaseClient(rancherBaseClient, opts) if err != nil { return nil, err } diff --git a/vendor/github.com/rancher/go-rancher/catalog/generated_error.go b/vendor/github.com/rancher/go-rancher/catalog/generated_error.go index b478c7338..9772ece0d 100644 --- a/vendor/github.com/rancher/go-rancher/catalog/generated_error.go +++ b/vendor/github.com/rancher/go-rancher/catalog/generated_error.go @@ -20,7 +20,8 @@ type Error struct { type ErrorCollection struct { Collection - Data []Error `json:"data,omitempty"` + Data []Error `json:"data,omitempty"` + client *ErrorClient } type ErrorClient struct { @@ -56,9 +57,20 @@ func (c *ErrorClient) Update(existing *Error, updates interface{}) (*Error, erro func (c *ErrorClient) List(opts *ListOpts) (*ErrorCollection, error) { resp := &ErrorCollection{} err := c.rancherClient.doList(ERROR_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ErrorCollection) Next() (*ErrorCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ErrorCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ErrorClient) ById(id string) (*Error, error) { resp := &Error{} err := c.rancherClient.doById(ERROR_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/catalog/generated_question.go b/vendor/github.com/rancher/go-rancher/catalog/generated_question.go index 06bcf9765..622288216 100644 --- a/vendor/github.com/rancher/go-rancher/catalog/generated_question.go +++ b/vendor/github.com/rancher/go-rancher/catalog/generated_question.go @@ -38,7 +38,8 @@ type Question struct { type QuestionCollection struct { Collection - Data []Question `json:"data,omitempty"` + Data []Question `json:"data,omitempty"` + client *QuestionClient } type QuestionClient struct { @@ -74,9 +75,20 @@ func (c *QuestionClient) Update(existing *Question, updates interface{}) (*Quest func (c *QuestionClient) List(opts *ListOpts) (*QuestionCollection, error) { resp := &QuestionCollection{} err := c.rancherClient.doList(QUESTION_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *QuestionCollection) Next() (*QuestionCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &QuestionCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *QuestionClient) ById(id string) (*Question, error) { resp := &Question{} err := c.rancherClient.doById(QUESTION_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/catalog/generated_template.go b/vendor/github.com/rancher/go-rancher/catalog/generated_template.go index 613e5408d..fe1bf2fb2 100644 --- a/vendor/github.com/rancher/go-rancher/catalog/generated_template.go +++ b/vendor/github.com/rancher/go-rancher/catalog/generated_template.go @@ -9,6 +9,8 @@ type Template struct { 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"` @@ -50,7 +52,8 @@ type Template struct { type TemplateCollection struct { Collection - Data []Template `json:"data,omitempty"` + Data []Template `json:"data,omitempty"` + client *TemplateClient } type TemplateClient struct { @@ -86,9 +89,20 @@ func (c *TemplateClient) Update(existing *Template, updates interface{}) (*Templ func (c *TemplateClient) List(opts *ListOpts) (*TemplateCollection, error) { resp := &TemplateCollection{} err := c.rancherClient.doList(TEMPLATE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *TemplateCollection) Next() (*TemplateCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &TemplateCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *TemplateClient) ById(id string) (*Template, error) { resp := &Template{} err := c.rancherClient.doById(TEMPLATE_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/catalog/generated_template_version.go b/vendor/github.com/rancher/go-rancher/catalog/generated_template_version.go index c39523168..55ef3d857 100644 --- a/vendor/github.com/rancher/go-rancher/catalog/generated_template_version.go +++ b/vendor/github.com/rancher/go-rancher/catalog/generated_template_version.go @@ -9,6 +9,8 @@ type TemplateVersion struct { 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"` @@ -39,7 +41,7 @@ type TemplateVersion struct { ProjectURL string `json:"projectURL,omitempty" yaml:"project_url,omitempty"` - Questions []string `json:"questions,omitempty" yaml:"questions,omitempty"` + Questions []Question `json:"questions,omitempty" yaml:"questions,omitempty"` ReadmeLink string `json:"readmeLink,omitempty" yaml:"readme_link,omitempty"` @@ -60,7 +62,8 @@ type TemplateVersion struct { type TemplateVersionCollection struct { Collection - Data []TemplateVersion `json:"data,omitempty"` + Data []TemplateVersion `json:"data,omitempty"` + client *TemplateVersionClient } type TemplateVersionClient struct { @@ -96,9 +99,20 @@ func (c *TemplateVersionClient) Update(existing *TemplateVersion, updates interf func (c *TemplateVersionClient) List(opts *ListOpts) (*TemplateVersionCollection, error) { resp := &TemplateVersionCollection{} err := c.rancherClient.doList(TEMPLATE_VERSION_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *TemplateVersionCollection) Next() (*TemplateVersionCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &TemplateVersionCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *TemplateVersionClient) ById(id string) (*TemplateVersion, error) { resp := &TemplateVersion{} err := c.rancherClient.doById(TEMPLATE_VERSION_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/client/client.go b/vendor/github.com/rancher/go-rancher/client/client.go index 0b14ada3a..6d943ce03 100644 --- a/vendor/github.com/rancher/go-rancher/client/client.go +++ b/vendor/github.com/rancher/go-rancher/client/client.go @@ -1,7 +1,36 @@ package client -type RancherBaseClient struct { +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 + doNext(string, 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/rancher/go-rancher/client/common.go b/vendor/github.com/rancher/go-rancher/client/common.go index 910285996..62e363da2 100644 --- a/vendor/github.com/rancher/go-rancher/client/common.go +++ b/vendor/github.com/rancher/go-rancher/client/common.go @@ -128,7 +128,7 @@ func appendFilters(urlString string, filters map[string]interface{}) (string, er return u.String(), nil } -func setupRancherBaseClient(rancherClient *RancherBaseClient, opts *ClientOpts) error { +func setupRancherBaseClient(rancherClient *RancherBaseClientImpl, opts *ClientOpts) error { if opts.Timeout == 0 { opts.Timeout = time.Second * 10 } @@ -202,18 +202,18 @@ func NewListOpts() *ListOpts { } } -func (rancherClient *RancherBaseClient) setupRequest(req *http.Request) { +func (rancherClient *RancherBaseClientImpl) setupRequest(req *http.Request) { req.SetBasicAuth(rancherClient.Opts.AccessKey, rancherClient.Opts.SecretKey) } -func (rancherClient *RancherBaseClient) newHttpClient() *http.Client { +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 *RancherBaseClient) doDelete(url string) error { +func (rancherClient *RancherBaseClientImpl) doDelete(url string) error { client := rancherClient.newHttpClient() req, err := http.NewRequest("DELETE", url, nil) if err != nil { @@ -237,11 +237,11 @@ func (rancherClient *RancherBaseClient) doDelete(url string) error { return nil } -func (rancherClient *RancherBaseClient) Websocket(url string, headers map[string][]string) (*websocket.Conn, *http.Response, error) { +func (rancherClient *RancherBaseClientImpl) 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 { +func (rancherClient *RancherBaseClientImpl) doGet(url string, opts *ListOpts, respObject interface{}) error { if opts == nil { opts = NewListOpts() } @@ -289,11 +289,11 @@ func (rancherClient *RancherBaseClient) doGet(url string, opts *ListOpts, respOb return nil } -func (rancherClient *RancherBaseClient) List(schemaType string, opts *ListOpts, respObject interface{}) error { +func (rancherClient *RancherBaseClientImpl) 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 { +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 + "]") @@ -311,11 +311,15 @@ func (rancherClient *RancherBaseClient) doList(schemaType string, opts *ListOpts return rancherClient.doGet(collectionUrl, opts, respObject) } -func (rancherClient *RancherBaseClient) Post(url string, createObj interface{}, respObject interface{}) error { +func (rancherClient *RancherBaseClientImpl) doNext(nextUrl string, respObject interface{}) error { + return rancherClient.doGet(nextUrl, nil, respObject) +} + +func (rancherClient *RancherBaseClientImpl) 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 { +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) @@ -324,7 +328,7 @@ func (rancherClient *RancherBaseClient) GetLink(resource Resource, link string, return rancherClient.doGet(url, &ListOpts{}, respObject) } -func (rancherClient *RancherBaseClient) doModify(method string, url string, createObj interface{}, respObject interface{}) error { +func (rancherClient *RancherBaseClientImpl) doModify(method string, url string, createObj interface{}, respObject interface{}) error { bodyContent, err := json.Marshal(createObj) if err != nil { return err @@ -371,11 +375,11 @@ func (rancherClient *RancherBaseClient) doModify(method string, url string, crea return nil } -func (rancherClient *RancherBaseClient) Create(schemaType string, createObj interface{}, respObject interface{}) error { +func (rancherClient *RancherBaseClientImpl) 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 { +func (rancherClient *RancherBaseClientImpl) doCreate(schemaType string, createObj interface{}, respObject interface{}) error { if createObj == nil { createObj = map[string]string{} } @@ -403,11 +407,11 @@ func (rancherClient *RancherBaseClient) doCreate(schemaType string, createObj in return rancherClient.doModify("POST", collectionUrl, createObj, respObject) } -func (rancherClient *RancherBaseClient) Update(schemaType string, existing *Resource, updates interface{}, respObject interface{}) error { +func (rancherClient *RancherBaseClientImpl) 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 { +func (rancherClient *RancherBaseClientImpl) doUpdate(schemaType string, existing *Resource, updates interface{}, respObject interface{}) error { if existing == nil { return errors.New("Existing object is nil") } @@ -437,11 +441,11 @@ func (rancherClient *RancherBaseClient) doUpdate(schemaType string, existing *Re return rancherClient.doModify("PUT", selfUrl, updates, respObject) } -func (rancherClient *RancherBaseClient) ById(schemaType string, id string, respObject interface{}) error { +func (rancherClient *RancherBaseClientImpl) 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 { +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 + "]") @@ -461,14 +465,14 @@ func (rancherClient *RancherBaseClient) doById(schemaType string, id string, res return err } -func (rancherClient *RancherBaseClient) Delete(existing *Resource) error { +func (rancherClient *RancherBaseClientImpl) Delete(existing *Resource) error { if existing == nil { return nil } return rancherClient.doResourceDelete(existing.Type, existing) } -func (rancherClient *RancherBaseClient) doResourceDelete(schemaType string, existing *Resource) error { +func (rancherClient *RancherBaseClientImpl) doResourceDelete(schemaType string, existing *Resource) error { schema, ok := rancherClient.Types[schemaType] if !ok { return errors.New("Unknown schema type [" + schemaType + "]") @@ -486,7 +490,7 @@ func (rancherClient *RancherBaseClient) doResourceDelete(schemaType string, exis return rancherClient.doDelete(selfUrl) } -func (rancherClient *RancherBaseClient) Reload(existing *Resource, output interface{}) error { +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)) @@ -495,12 +499,12 @@ func (rancherClient *RancherBaseClient) Reload(existing *Resource, output interf return rancherClient.doGet(selfUrl, NewListOpts(), output) } -func (rancherClient *RancherBaseClient) Action(schemaType string, action string, +func (rancherClient *RancherBaseClientImpl) 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, +func (rancherClient *RancherBaseClientImpl) doAction(schemaType string, action string, existing *Resource, inputObject, respObject interface{}) error { if existing == nil { diff --git a/vendor/github.com/rancher/go-rancher/client/generated_account.go b/vendor/github.com/rancher/go-rancher/client/generated_account.go index 3e95989ec..1697ae0dd 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_account.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_account.go @@ -40,7 +40,8 @@ type Account struct { type AccountCollection struct { Collection - Data []Account `json:"data,omitempty"` + Data []Account `json:"data,omitempty"` + client *AccountClient } type AccountClient struct { @@ -90,9 +91,20 @@ func (c *AccountClient) Update(existing *Account, updates interface{}) (*Account func (c *AccountClient) List(opts *ListOpts) (*AccountCollection, error) { resp := &AccountCollection{} err := c.rancherClient.doList(ACCOUNT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *AccountCollection) Next() (*AccountCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &AccountCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *AccountClient) ById(id string) (*Account, error) { resp := &Account{} err := c.rancherClient.doById(ACCOUNT_TYPE, id, resp) 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 index c8db84705..b1799a31d 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_active_setting.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_active_setting.go @@ -20,7 +20,8 @@ type ActiveSetting struct { type ActiveSettingCollection struct { Collection - Data []ActiveSetting `json:"data,omitempty"` + Data []ActiveSetting `json:"data,omitempty"` + client *ActiveSettingClient } type ActiveSettingClient struct { @@ -56,9 +57,20 @@ func (c *ActiveSettingClient) Update(existing *ActiveSetting, updates interface{ func (c *ActiveSettingClient) List(opts *ListOpts) (*ActiveSettingCollection, error) { resp := &ActiveSettingCollection{} err := c.rancherClient.doList(ACTIVE_SETTING_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ActiveSettingCollection) Next() (*ActiveSettingCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ActiveSettingCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ActiveSettingClient) ById(id string) (*ActiveSetting, error) { resp := &ActiveSetting{} err := c.rancherClient.doById(ACTIVE_SETTING_TYPE, id, resp) 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 index b2d51c73f..88bf4a7eb 100644 --- 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 @@ -12,7 +12,8 @@ type AddOutputsInput struct { type AddOutputsInputCollection struct { Collection - Data []AddOutputsInput `json:"data,omitempty"` + Data []AddOutputsInput `json:"data,omitempty"` + client *AddOutputsInputClient } type AddOutputsInputClient struct { @@ -48,9 +49,20 @@ func (c *AddOutputsInputClient) Update(existing *AddOutputsInput, updates interf func (c *AddOutputsInputClient) List(opts *ListOpts) (*AddOutputsInputCollection, error) { resp := &AddOutputsInputCollection{} err := c.rancherClient.doList(ADD_OUTPUTS_INPUT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *AddOutputsInputCollection) Next() (*AddOutputsInputCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &AddOutputsInputCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *AddOutputsInputClient) ById(id string) (*AddOutputsInput, error) { resp := &AddOutputsInput{} err := c.rancherClient.doById(ADD_OUTPUTS_INPUT_TYPE, id, resp) 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 index a5f010ef8..bcffcd35e 100644 --- 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 @@ -12,7 +12,8 @@ type AddRemoveLoadBalancerServiceLinkInput struct { type AddRemoveLoadBalancerServiceLinkInputCollection struct { Collection - Data []AddRemoveLoadBalancerServiceLinkInput `json:"data,omitempty"` + Data []AddRemoveLoadBalancerServiceLinkInput `json:"data,omitempty"` + client *AddRemoveLoadBalancerServiceLinkInputClient } type AddRemoveLoadBalancerServiceLinkInputClient struct { @@ -48,9 +49,20 @@ func (c *AddRemoveLoadBalancerServiceLinkInputClient) Update(existing *AddRemove func (c *AddRemoveLoadBalancerServiceLinkInputClient) List(opts *ListOpts) (*AddRemoveLoadBalancerServiceLinkInputCollection, error) { resp := &AddRemoveLoadBalancerServiceLinkInputCollection{} err := c.rancherClient.doList(ADD_REMOVE_LOAD_BALANCER_SERVICE_LINK_INPUT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *AddRemoveLoadBalancerServiceLinkInputCollection) Next() (*AddRemoveLoadBalancerServiceLinkInputCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &AddRemoveLoadBalancerServiceLinkInputCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *AddRemoveLoadBalancerServiceLinkInputClient) ById(id string) (*AddRemoveLoadBalancerServiceLinkInput, error) { resp := &AddRemoveLoadBalancerServiceLinkInput{} err := c.rancherClient.doById(ADD_REMOVE_LOAD_BALANCER_SERVICE_LINK_INPUT_TYPE, id, resp) 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 index 82c7d18bd..5366b4841 100644 --- 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 @@ -12,7 +12,8 @@ type AddRemoveServiceLinkInput struct { type AddRemoveServiceLinkInputCollection struct { Collection - Data []AddRemoveServiceLinkInput `json:"data,omitempty"` + Data []AddRemoveServiceLinkInput `json:"data,omitempty"` + client *AddRemoveServiceLinkInputClient } type AddRemoveServiceLinkInputClient struct { @@ -48,9 +49,20 @@ func (c *AddRemoveServiceLinkInputClient) Update(existing *AddRemoveServiceLinkI func (c *AddRemoveServiceLinkInputClient) List(opts *ListOpts) (*AddRemoveServiceLinkInputCollection, error) { resp := &AddRemoveServiceLinkInputCollection{} err := c.rancherClient.doList(ADD_REMOVE_SERVICE_LINK_INPUT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *AddRemoveServiceLinkInputCollection) Next() (*AddRemoveServiceLinkInputCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &AddRemoveServiceLinkInputCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *AddRemoveServiceLinkInputClient) ById(id string) (*AddRemoveServiceLinkInput, error) { resp := &AddRemoveServiceLinkInput{} err := c.rancherClient.doById(ADD_REMOVE_SERVICE_LINK_INPUT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/client/generated_agent.go b/vendor/github.com/rancher/go-rancher/client/generated_agent.go index d3bfb0729..3a1f423ec 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_agent.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_agent.go @@ -40,7 +40,8 @@ type Agent struct { type AgentCollection struct { Collection - Data []Agent `json:"data,omitempty"` + Data []Agent `json:"data,omitempty"` + client *AgentClient } type AgentClient struct { @@ -94,9 +95,20 @@ func (c *AgentClient) Update(existing *Agent, updates interface{}) (*Agent, erro func (c *AgentClient) List(opts *ListOpts) (*AgentCollection, error) { resp := &AgentCollection{} err := c.rancherClient.doList(AGENT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *AgentCollection) Next() (*AgentCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &AgentCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *AgentClient) ById(id string) (*Agent, error) { resp := &Agent{} err := c.rancherClient.doById(AGENT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/client/generated_amazonec2config.go b/vendor/github.com/rancher/go-rancher/client/generated_amazonec2config.go index 9102e4f52..2a88ca4eb 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_amazonec2config.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_amazonec2config.go @@ -60,7 +60,8 @@ type Amazonec2Config struct { type Amazonec2ConfigCollection struct { Collection - Data []Amazonec2Config `json:"data,omitempty"` + Data []Amazonec2Config `json:"data,omitempty"` + client *Amazonec2ConfigClient } type Amazonec2ConfigClient struct { @@ -96,9 +97,20 @@ func (c *Amazonec2ConfigClient) Update(existing *Amazonec2Config, updates interf func (c *Amazonec2ConfigClient) List(opts *ListOpts) (*Amazonec2ConfigCollection, error) { resp := &Amazonec2ConfigCollection{} err := c.rancherClient.doList(AMAZONEC2CONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *Amazonec2ConfigCollection) Next() (*Amazonec2ConfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &Amazonec2ConfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *Amazonec2ConfigClient) ById(id string) (*Amazonec2Config, error) { resp := &Amazonec2Config{} err := c.rancherClient.doById(AMAZONEC2CONFIG_TYPE, id, resp) 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 index c0f9c50ea..91dc09dca 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_api_key.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_api_key.go @@ -40,7 +40,8 @@ type ApiKey struct { type ApiKeyCollection struct { Collection - Data []ApiKey `json:"data,omitempty"` + Data []ApiKey `json:"data,omitempty"` + client *ApiKeyClient } type ApiKeyClient struct { @@ -88,9 +89,20 @@ func (c *ApiKeyClient) Update(existing *ApiKey, updates interface{}) (*ApiKey, e func (c *ApiKeyClient) List(opts *ListOpts) (*ApiKeyCollection, error) { resp := &ApiKeyCollection{} err := c.rancherClient.doList(API_KEY_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ApiKeyCollection) Next() (*ApiKeyCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ApiKeyCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ApiKeyClient) ById(id string) (*ApiKey, error) { resp := &ApiKey{} err := c.rancherClient.doById(API_KEY_TYPE, id, resp) 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 index d8ff08fb5..1c9d4ae0e 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_audit_log.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_audit_log.go @@ -38,7 +38,8 @@ type AuditLog struct { type AuditLogCollection struct { Collection - Data []AuditLog `json:"data,omitempty"` + Data []AuditLog `json:"data,omitempty"` + client *AuditLogClient } type AuditLogClient struct { @@ -74,9 +75,20 @@ func (c *AuditLogClient) Update(existing *AuditLog, updates interface{}) (*Audit func (c *AuditLogClient) List(opts *ListOpts) (*AuditLogCollection, error) { resp := &AuditLogCollection{} err := c.rancherClient.doList(AUDIT_LOG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *AuditLogCollection) Next() (*AuditLogCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &AuditLogCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *AuditLogClient) ById(id string) (*AuditLog, error) { resp := &AuditLog{} err := c.rancherClient.doById(AUDIT_LOG_TYPE, id, resp) 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 index 8f9de8e22..14868d7e5 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_azure_config.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_azure_config.go @@ -52,7 +52,8 @@ type AzureConfig struct { type AzureConfigCollection struct { Collection - Data []AzureConfig `json:"data,omitempty"` + Data []AzureConfig `json:"data,omitempty"` + client *AzureConfigClient } type AzureConfigClient struct { @@ -88,9 +89,20 @@ func (c *AzureConfigClient) Update(existing *AzureConfig, updates interface{}) ( func (c *AzureConfigClient) List(opts *ListOpts) (*AzureConfigCollection, error) { resp := &AzureConfigCollection{} err := c.rancherClient.doList(AZURE_CONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *AzureConfigCollection) Next() (*AzureConfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &AzureConfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *AzureConfigClient) ById(id string) (*AzureConfig, error) { resp := &AzureConfig{} err := c.rancherClient.doById(AZURE_CONFIG_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/client/generated_azureadconfig.go b/vendor/github.com/rancher/go-rancher/client/generated_azureadconfig.go index fe741e2e1..5b3117fc8 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_azureadconfig.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_azureadconfig.go @@ -26,7 +26,8 @@ type Azureadconfig struct { type AzureadconfigCollection struct { Collection - Data []Azureadconfig `json:"data,omitempty"` + Data []Azureadconfig `json:"data,omitempty"` + client *AzureadconfigClient } type AzureadconfigClient struct { @@ -62,9 +63,20 @@ func (c *AzureadconfigClient) Update(existing *Azureadconfig, updates interface{ func (c *AzureadconfigClient) List(opts *ListOpts) (*AzureadconfigCollection, error) { resp := &AzureadconfigCollection{} err := c.rancherClient.doList(AZUREADCONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *AzureadconfigCollection) Next() (*AzureadconfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &AzureadconfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *AzureadconfigClient) ById(id string) (*Azureadconfig, error) { resp := &Azureadconfig{} err := c.rancherClient.doById(AZUREADCONFIG_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/client/generated_backup.go b/vendor/github.com/rancher/go-rancher/client/generated_backup.go index 237194ced..755605eb0 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_backup.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_backup.go @@ -44,7 +44,8 @@ type Backup struct { type BackupCollection struct { Collection - Data []Backup `json:"data,omitempty"` + Data []Backup `json:"data,omitempty"` + client *BackupClient } type BackupClient struct { @@ -84,9 +85,20 @@ func (c *BackupClient) Update(existing *Backup, updates interface{}) (*Backup, e func (c *BackupClient) List(opts *ListOpts) (*BackupCollection, error) { resp := &BackupCollection{} err := c.rancherClient.doList(BACKUP_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *BackupCollection) Next() (*BackupCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &BackupCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *BackupClient) ById(id string) (*Backup, error) { resp := &Backup{} err := c.rancherClient.doById(BACKUP_TYPE, id, resp) 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 index c93d615c7..a00f2bc89 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_backup_target.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_backup_target.go @@ -38,7 +38,8 @@ type BackupTarget struct { type BackupTargetCollection struct { Collection - Data []BackupTarget `json:"data,omitempty"` + Data []BackupTarget `json:"data,omitempty"` + client *BackupTargetClient } type BackupTargetClient struct { @@ -78,9 +79,20 @@ func (c *BackupTargetClient) Update(existing *BackupTarget, updates interface{}) func (c *BackupTargetClient) List(opts *ListOpts) (*BackupTargetCollection, error) { resp := &BackupTargetCollection{} err := c.rancherClient.doList(BACKUP_TARGET_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *BackupTargetCollection) Next() (*BackupTargetCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &BackupTargetCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *BackupTargetClient) ById(id string) (*BackupTarget, error) { resp := &BackupTarget{} err := c.rancherClient.doById(BACKUP_TARGET_TYPE, id, resp) 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 index a01934241..0c0112de4 100644 --- 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 @@ -10,7 +10,8 @@ type BaseMachineConfig struct { type BaseMachineConfigCollection struct { Collection - Data []BaseMachineConfig `json:"data,omitempty"` + Data []BaseMachineConfig `json:"data,omitempty"` + client *BaseMachineConfigClient } type BaseMachineConfigClient struct { @@ -46,9 +47,20 @@ func (c *BaseMachineConfigClient) Update(existing *BaseMachineConfig, updates in func (c *BaseMachineConfigClient) List(opts *ListOpts) (*BaseMachineConfigCollection, error) { resp := &BaseMachineConfigCollection{} err := c.rancherClient.doList(BASE_MACHINE_CONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *BaseMachineConfigCollection) Next() (*BaseMachineConfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &BaseMachineConfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *BaseMachineConfigClient) ById(id string) (*BaseMachineConfig, error) { resp := &BaseMachineConfig{} err := c.rancherClient.doById(BASE_MACHINE_CONFIG_TYPE, id, resp) 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 index 4d0052255..bc33c7c11 100644 --- 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 @@ -20,7 +20,8 @@ type BlkioDeviceOption struct { type BlkioDeviceOptionCollection struct { Collection - Data []BlkioDeviceOption `json:"data,omitempty"` + Data []BlkioDeviceOption `json:"data,omitempty"` + client *BlkioDeviceOptionClient } type BlkioDeviceOptionClient struct { @@ -56,9 +57,20 @@ func (c *BlkioDeviceOptionClient) Update(existing *BlkioDeviceOption, updates in func (c *BlkioDeviceOptionClient) List(opts *ListOpts) (*BlkioDeviceOptionCollection, error) { resp := &BlkioDeviceOptionCollection{} err := c.rancherClient.doList(BLKIO_DEVICE_OPTION_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *BlkioDeviceOptionCollection) Next() (*BlkioDeviceOptionCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &BlkioDeviceOptionCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *BlkioDeviceOptionClient) ById(id string) (*BlkioDeviceOption, error) { resp := &BlkioDeviceOption{} err := c.rancherClient.doById(BLKIO_DEVICE_OPTION_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/client/generated_certificate.go b/vendor/github.com/rancher/go-rancher/client/generated_certificate.go index 02f99e3ef..fc407e8af 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_certificate.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_certificate.go @@ -62,7 +62,8 @@ type Certificate struct { type CertificateCollection struct { Collection - Data []Certificate `json:"data,omitempty"` + Data []Certificate `json:"data,omitempty"` + client *CertificateClient } type CertificateClient struct { @@ -104,9 +105,20 @@ func (c *CertificateClient) Update(existing *Certificate, updates interface{}) ( func (c *CertificateClient) List(opts *ListOpts) (*CertificateCollection, error) { resp := &CertificateCollection{} err := c.rancherClient.doList(CERTIFICATE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *CertificateCollection) Next() (*CertificateCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &CertificateCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *CertificateClient) ById(id string) (*Certificate, error) { resp := &Certificate{} err := c.rancherClient.doById(CERTIFICATE_TYPE, id, resp) 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 index 913c2eeaa..3f866812a 100644 --- 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 @@ -14,7 +14,8 @@ type ChangeSecretInput struct { type ChangeSecretInputCollection struct { Collection - Data []ChangeSecretInput `json:"data,omitempty"` + Data []ChangeSecretInput `json:"data,omitempty"` + client *ChangeSecretInputClient } type ChangeSecretInputClient struct { @@ -50,9 +51,20 @@ func (c *ChangeSecretInputClient) Update(existing *ChangeSecretInput, updates in func (c *ChangeSecretInputClient) List(opts *ListOpts) (*ChangeSecretInputCollection, error) { resp := &ChangeSecretInputCollection{} err := c.rancherClient.doList(CHANGE_SECRET_INPUT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ChangeSecretInputCollection) Next() (*ChangeSecretInputCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ChangeSecretInputCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ChangeSecretInputClient) ById(id string) (*ChangeSecretInput, error) { resp := &ChangeSecretInput{} err := c.rancherClient.doById(CHANGE_SECRET_INPUT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/client/generated_client.go b/vendor/github.com/rancher/go-rancher/client/generated_client.go index cc3d43ac4..4ce5a4963 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_client.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_client.go @@ -147,11 +147,9 @@ type RancherClient struct { VolumeSnapshotInput VolumeSnapshotInputOperations } -func constructClient() *RancherClient { +func constructClient(rancherBaseClient *RancherBaseClientImpl) *RancherClient { client := &RancherClient{ - RancherBaseClient: RancherBaseClient{ - Types: map[string]Schema{}, - }, + RancherBaseClient: rancherBaseClient, } client.Account = newAccountClient(client) @@ -301,9 +299,12 @@ func constructClient() *RancherClient { } func NewRancherClient(opts *ClientOpts) (*RancherClient, error) { - client := constructClient() + rancherBaseClient := &RancherBaseClientImpl{ + Types: map[string]Schema{}, + } + client := constructClient(rancherBaseClient) - err := setupRancherBaseClient(&client.RancherBaseClient, opts) + err := setupRancherBaseClient(rancherBaseClient, opts) if err != nil { return nil, 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 index 49ee5ba1d..b9bc013c0 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_compose_config.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_compose_config.go @@ -14,7 +14,8 @@ type ComposeConfig struct { type ComposeConfigCollection struct { Collection - Data []ComposeConfig `json:"data,omitempty"` + Data []ComposeConfig `json:"data,omitempty"` + client *ComposeConfigClient } type ComposeConfigClient struct { @@ -50,9 +51,20 @@ func (c *ComposeConfigClient) Update(existing *ComposeConfig, updates interface{ func (c *ComposeConfigClient) List(opts *ListOpts) (*ComposeConfigCollection, error) { resp := &ComposeConfigCollection{} err := c.rancherClient.doList(COMPOSE_CONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ComposeConfigCollection) Next() (*ComposeConfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ComposeConfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ComposeConfigClient) ById(id string) (*ComposeConfig, error) { resp := &ComposeConfig{} err := c.rancherClient.doById(COMPOSE_CONFIG_TYPE, id, resp) 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 index e0cdc76f9..3d03d923b 100644 --- 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 @@ -12,7 +12,8 @@ type ComposeConfigInput struct { type ComposeConfigInputCollection struct { Collection - Data []ComposeConfigInput `json:"data,omitempty"` + Data []ComposeConfigInput `json:"data,omitempty"` + client *ComposeConfigInputClient } type ComposeConfigInputClient struct { @@ -48,9 +49,20 @@ func (c *ComposeConfigInputClient) Update(existing *ComposeConfigInput, updates func (c *ComposeConfigInputClient) List(opts *ListOpts) (*ComposeConfigInputCollection, error) { resp := &ComposeConfigInputCollection{} err := c.rancherClient.doList(COMPOSE_CONFIG_INPUT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ComposeConfigInputCollection) Next() (*ComposeConfigInputCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ComposeConfigInputCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ComposeConfigInputClient) ById(id string) (*ComposeConfigInput, error) { resp := &ComposeConfigInput{} err := c.rancherClient.doById(COMPOSE_CONFIG_INPUT_TYPE, id, resp) 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 index 7d41efad1..cf5c918aa 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_compose_project.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_compose_project.go @@ -48,7 +48,8 @@ type ComposeProject struct { type ComposeProjectCollection struct { Collection - Data []ComposeProject `json:"data,omitempty"` + Data []ComposeProject `json:"data,omitempty"` + client *ComposeProjectClient } type ComposeProjectClient struct { @@ -98,9 +99,20 @@ func (c *ComposeProjectClient) Update(existing *ComposeProject, updates interfac func (c *ComposeProjectClient) List(opts *ListOpts) (*ComposeProjectCollection, error) { resp := &ComposeProjectCollection{} err := c.rancherClient.doList(COMPOSE_PROJECT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ComposeProjectCollection) Next() (*ComposeProjectCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ComposeProjectCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ComposeProjectClient) ById(id string) (*ComposeProject, error) { resp := &ComposeProject{} err := c.rancherClient.doById(COMPOSE_PROJECT_TYPE, id, resp) 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 index e8511e0bf..1af137748 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_compose_service.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_compose_service.go @@ -62,7 +62,8 @@ type ComposeService struct { type ComposeServiceCollection struct { Collection - Data []ComposeService `json:"data,omitempty"` + Data []ComposeService `json:"data,omitempty"` + client *ComposeServiceClient } type ComposeServiceClient struct { @@ -112,9 +113,20 @@ func (c *ComposeServiceClient) Update(existing *ComposeService, updates interfac func (c *ComposeServiceClient) List(opts *ListOpts) (*ComposeServiceCollection, error) { resp := &ComposeServiceCollection{} err := c.rancherClient.doList(COMPOSE_SERVICE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ComposeServiceCollection) Next() (*ComposeServiceCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ComposeServiceCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ComposeServiceClient) ById(id string) (*ComposeService, error) { resp := &ComposeService{} err := c.rancherClient.doById(COMPOSE_SERVICE_TYPE, id, resp) 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 index 71e687d22..b97306669 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_config_item.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_config_item.go @@ -14,7 +14,8 @@ type ConfigItem struct { type ConfigItemCollection struct { Collection - Data []ConfigItem `json:"data,omitempty"` + Data []ConfigItem `json:"data,omitempty"` + client *ConfigItemClient } type ConfigItemClient struct { @@ -50,9 +51,20 @@ func (c *ConfigItemClient) Update(existing *ConfigItem, updates interface{}) (*C func (c *ConfigItemClient) List(opts *ListOpts) (*ConfigItemCollection, error) { resp := &ConfigItemCollection{} err := c.rancherClient.doList(CONFIG_ITEM_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ConfigItemCollection) Next() (*ConfigItemCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ConfigItemCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ConfigItemClient) ById(id string) (*ConfigItem, error) { resp := &ConfigItem{} err := c.rancherClient.doById(CONFIG_ITEM_TYPE, id, resp) 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 index 0ffef351f..2ce32ca97 100644 --- 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 @@ -26,7 +26,8 @@ type ConfigItemStatus struct { type ConfigItemStatusCollection struct { Collection - Data []ConfigItemStatus `json:"data,omitempty"` + Data []ConfigItemStatus `json:"data,omitempty"` + client *ConfigItemStatusClient } type ConfigItemStatusClient struct { @@ -62,9 +63,20 @@ func (c *ConfigItemStatusClient) Update(existing *ConfigItemStatus, updates inte func (c *ConfigItemStatusClient) List(opts *ListOpts) (*ConfigItemStatusCollection, error) { resp := &ConfigItemStatusCollection{} err := c.rancherClient.doList(CONFIG_ITEM_STATUS_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ConfigItemStatusCollection) Next() (*ConfigItemStatusCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ConfigItemStatusCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ConfigItemStatusClient) ById(id string) (*ConfigItemStatus, error) { resp := &ConfigItemStatus{} err := c.rancherClient.doById(CONFIG_ITEM_STATUS_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/client/generated_container.go b/vendor/github.com/rancher/go-rancher/client/generated_container.go index a41dcf362..da3f17481 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_container.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_container.go @@ -156,7 +156,8 @@ type Container struct { type ContainerCollection struct { Collection - Data []Container `json:"data,omitempty"` + Data []Container `json:"data,omitempty"` + client *ContainerClient } type ContainerClient struct { @@ -232,9 +233,20 @@ func (c *ContainerClient) Update(existing *Container, updates interface{}) (*Con func (c *ContainerClient) List(opts *ListOpts) (*ContainerCollection, error) { resp := &ContainerCollection{} err := c.rancherClient.doList(CONTAINER_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ContainerCollection) Next() (*ContainerCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ContainerCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ContainerClient) ById(id string) (*Container, error) { resp := &Container{} err := c.rancherClient.doById(CONTAINER_TYPE, id, resp) 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 index 414030bde..8b95651c9 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_container_event.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_container_event.go @@ -40,7 +40,8 @@ type ContainerEvent struct { type ContainerEventCollection struct { Collection - Data []ContainerEvent `json:"data,omitempty"` + Data []ContainerEvent `json:"data,omitempty"` + client *ContainerEventClient } type ContainerEventClient struct { @@ -80,9 +81,20 @@ func (c *ContainerEventClient) Update(existing *ContainerEvent, updates interfac func (c *ContainerEventClient) List(opts *ListOpts) (*ContainerEventCollection, error) { resp := &ContainerEventCollection{} err := c.rancherClient.doList(CONTAINER_EVENT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ContainerEventCollection) Next() (*ContainerEventCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ContainerEventCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ContainerEventClient) ById(id string) (*ContainerEvent, error) { resp := &ContainerEvent{} err := c.rancherClient.doById(CONTAINER_EVENT_TYPE, id, resp) 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 index c97f7703b..196199b5c 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_container_exec.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_container_exec.go @@ -18,7 +18,8 @@ type ContainerExec struct { type ContainerExecCollection struct { Collection - Data []ContainerExec `json:"data,omitempty"` + Data []ContainerExec `json:"data,omitempty"` + client *ContainerExecClient } type ContainerExecClient struct { @@ -54,9 +55,20 @@ func (c *ContainerExecClient) Update(existing *ContainerExec, updates interface{ func (c *ContainerExecClient) List(opts *ListOpts) (*ContainerExecCollection, error) { resp := &ContainerExecCollection{} err := c.rancherClient.doList(CONTAINER_EXEC_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ContainerExecCollection) Next() (*ContainerExecCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ContainerExecCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ContainerExecClient) ById(id string) (*ContainerExec, error) { resp := &ContainerExec{} err := c.rancherClient.doById(CONTAINER_EXEC_TYPE, id, resp) 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 index 4d37dab92..2149df19f 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_container_logs.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_container_logs.go @@ -14,7 +14,8 @@ type ContainerLogs struct { type ContainerLogsCollection struct { Collection - Data []ContainerLogs `json:"data,omitempty"` + Data []ContainerLogs `json:"data,omitempty"` + client *ContainerLogsClient } type ContainerLogsClient struct { @@ -50,9 +51,20 @@ func (c *ContainerLogsClient) Update(existing *ContainerLogs, updates interface{ func (c *ContainerLogsClient) List(opts *ListOpts) (*ContainerLogsCollection, error) { resp := &ContainerLogsCollection{} err := c.rancherClient.doList(CONTAINER_LOGS_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ContainerLogsCollection) Next() (*ContainerLogsCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ContainerLogsCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ContainerLogsClient) ById(id string) (*ContainerLogs, error) { resp := &ContainerLogs{} err := c.rancherClient.doById(CONTAINER_LOGS_TYPE, id, resp) 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 index 19bcfd532..84d7670ea 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_container_proxy.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_container_proxy.go @@ -14,7 +14,8 @@ type ContainerProxy struct { type ContainerProxyCollection struct { Collection - Data []ContainerProxy `json:"data,omitempty"` + Data []ContainerProxy `json:"data,omitempty"` + client *ContainerProxyClient } type ContainerProxyClient struct { @@ -50,9 +51,20 @@ func (c *ContainerProxyClient) Update(existing *ContainerProxy, updates interfac func (c *ContainerProxyClient) List(opts *ListOpts) (*ContainerProxyCollection, error) { resp := &ContainerProxyCollection{} err := c.rancherClient.doList(CONTAINER_PROXY_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ContainerProxyCollection) Next() (*ContainerProxyCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ContainerProxyCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ContainerProxyClient) ById(id string) (*ContainerProxy, error) { resp := &ContainerProxy{} err := c.rancherClient.doById(CONTAINER_PROXY_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/client/generated_credential.go b/vendor/github.com/rancher/go-rancher/client/generated_credential.go index e1586db29..f34a563df 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_credential.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_credential.go @@ -40,7 +40,8 @@ type Credential struct { type CredentialCollection struct { Collection - Data []Credential `json:"data,omitempty"` + Data []Credential `json:"data,omitempty"` + client *CredentialClient } type CredentialClient struct { @@ -88,9 +89,20 @@ func (c *CredentialClient) Update(existing *Credential, updates interface{}) (*C func (c *CredentialClient) List(opts *ListOpts) (*CredentialCollection, error) { resp := &CredentialCollection{} err := c.rancherClient.doList(CREDENTIAL_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *CredentialCollection) Next() (*CredentialCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &CredentialCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *CredentialClient) ById(id string) (*Credential, error) { resp := &Credential{} err := c.rancherClient.doById(CREDENTIAL_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/client/generated_databasechangelog.go b/vendor/github.com/rancher/go-rancher/client/generated_databasechangelog.go index 63b3ca6cb..0d935f8a5 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_databasechangelog.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_databasechangelog.go @@ -30,7 +30,8 @@ type Databasechangelog struct { type DatabasechangelogCollection struct { Collection - Data []Databasechangelog `json:"data,omitempty"` + Data []Databasechangelog `json:"data,omitempty"` + client *DatabasechangelogClient } type DatabasechangelogClient struct { @@ -66,9 +67,20 @@ func (c *DatabasechangelogClient) Update(existing *Databasechangelog, updates in func (c *DatabasechangelogClient) List(opts *ListOpts) (*DatabasechangelogCollection, error) { resp := &DatabasechangelogCollection{} err := c.rancherClient.doList(DATABASECHANGELOG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *DatabasechangelogCollection) Next() (*DatabasechangelogCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &DatabasechangelogCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *DatabasechangelogClient) ById(id string) (*Databasechangelog, error) { resp := &Databasechangelog{} err := c.rancherClient.doById(DATABASECHANGELOG_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/client/generated_databasechangeloglock.go b/vendor/github.com/rancher/go-rancher/client/generated_databasechangeloglock.go index f01b7bbc8..a93c015a0 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_databasechangeloglock.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_databasechangeloglock.go @@ -16,7 +16,8 @@ type Databasechangeloglock struct { type DatabasechangeloglockCollection struct { Collection - Data []Databasechangeloglock `json:"data,omitempty"` + Data []Databasechangeloglock `json:"data,omitempty"` + client *DatabasechangeloglockClient } type DatabasechangeloglockClient struct { @@ -52,9 +53,20 @@ func (c *DatabasechangeloglockClient) Update(existing *Databasechangeloglock, up func (c *DatabasechangeloglockClient) List(opts *ListOpts) (*DatabasechangeloglockCollection, error) { resp := &DatabasechangeloglockCollection{} err := c.rancherClient.doList(DATABASECHANGELOGLOCK_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *DatabasechangeloglockCollection) Next() (*DatabasechangeloglockCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &DatabasechangeloglockCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *DatabasechangeloglockClient) ById(id string) (*Databasechangeloglock, error) { resp := &Databasechangeloglock{} err := c.rancherClient.doById(DATABASECHANGELOGLOCK_TYPE, id, resp) 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 index 3ae14dd47..64597575e 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_digitalocean_config.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_digitalocean_config.go @@ -32,7 +32,8 @@ type DigitaloceanConfig struct { type DigitaloceanConfigCollection struct { Collection - Data []DigitaloceanConfig `json:"data,omitempty"` + Data []DigitaloceanConfig `json:"data,omitempty"` + client *DigitaloceanConfigClient } type DigitaloceanConfigClient struct { @@ -68,9 +69,20 @@ func (c *DigitaloceanConfigClient) Update(existing *DigitaloceanConfig, updates func (c *DigitaloceanConfigClient) List(opts *ListOpts) (*DigitaloceanConfigCollection, error) { resp := &DigitaloceanConfigCollection{} err := c.rancherClient.doList(DIGITALOCEAN_CONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *DigitaloceanConfigCollection) Next() (*DigitaloceanConfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &DigitaloceanConfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *DigitaloceanConfigClient) ById(id string) (*DigitaloceanConfig, error) { resp := &DigitaloceanConfig{} err := c.rancherClient.doById(DIGITALOCEAN_CONFIG_TYPE, id, resp) 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 index 4ebfbc211..a8398b3dd 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_dns_service.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_dns_service.go @@ -58,7 +58,8 @@ type DnsService struct { type DnsServiceCollection struct { Collection - Data []DnsService `json:"data,omitempty"` + Data []DnsService `json:"data,omitempty"` + client *DnsServiceClient } type DnsServiceClient struct { @@ -122,9 +123,20 @@ func (c *DnsServiceClient) Update(existing *DnsService, updates interface{}) (*D func (c *DnsServiceClient) List(opts *ListOpts) (*DnsServiceCollection, error) { resp := &DnsServiceCollection{} err := c.rancherClient.doList(DNS_SERVICE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *DnsServiceCollection) Next() (*DnsServiceCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &DnsServiceCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *DnsServiceClient) ById(id string) (*DnsService, error) { resp := &DnsService{} err := c.rancherClient.doById(DNS_SERVICE_TYPE, id, resp) 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 index cd91f65b2..a1b1e371b 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_docker_build.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_docker_build.go @@ -22,7 +22,8 @@ type DockerBuild struct { type DockerBuildCollection struct { Collection - Data []DockerBuild `json:"data,omitempty"` + Data []DockerBuild `json:"data,omitempty"` + client *DockerBuildClient } type DockerBuildClient struct { @@ -58,9 +59,20 @@ func (c *DockerBuildClient) Update(existing *DockerBuild, updates interface{}) ( func (c *DockerBuildClient) List(opts *ListOpts) (*DockerBuildCollection, error) { resp := &DockerBuildCollection{} err := c.rancherClient.doList(DOCKER_BUILD_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *DockerBuildCollection) Next() (*DockerBuildCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &DockerBuildCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *DockerBuildClient) ById(id string) (*DockerBuild, error) { resp := &DockerBuild{} err := c.rancherClient.doById(DOCKER_BUILD_TYPE, id, resp) 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 index f9421dd66..6ee36740c 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_dynamic_schema.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_dynamic_schema.go @@ -40,7 +40,8 @@ type DynamicSchema struct { type DynamicSchemaCollection struct { Collection - Data []DynamicSchema `json:"data,omitempty"` + Data []DynamicSchema `json:"data,omitempty"` + client *DynamicSchemaClient } type DynamicSchemaClient struct { @@ -80,9 +81,20 @@ func (c *DynamicSchemaClient) Update(existing *DynamicSchema, updates interface{ func (c *DynamicSchemaClient) List(opts *ListOpts) (*DynamicSchemaCollection, error) { resp := &DynamicSchemaCollection{} err := c.rancherClient.doList(DYNAMIC_SCHEMA_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *DynamicSchemaCollection) Next() (*DynamicSchemaCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &DynamicSchemaCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *DynamicSchemaClient) ById(id string) (*DynamicSchema, error) { resp := &DynamicSchema{} err := c.rancherClient.doById(DYNAMIC_SCHEMA_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/client/generated_environment.go b/vendor/github.com/rancher/go-rancher/client/generated_environment.go index 3439fb25a..bbf3caeff 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_environment.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_environment.go @@ -54,7 +54,8 @@ type Environment struct { type EnvironmentCollection struct { Collection - Data []Environment `json:"data,omitempty"` + Data []Environment `json:"data,omitempty"` + client *EnvironmentClient } type EnvironmentClient struct { @@ -116,9 +117,20 @@ func (c *EnvironmentClient) Update(existing *Environment, updates interface{}) ( func (c *EnvironmentClient) List(opts *ListOpts) (*EnvironmentCollection, error) { resp := &EnvironmentCollection{} err := c.rancherClient.doList(ENVIRONMENT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *EnvironmentCollection) Next() (*EnvironmentCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &EnvironmentCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *EnvironmentClient) ById(id string) (*Environment, error) { resp := &Environment{} err := c.rancherClient.doById(ENVIRONMENT_TYPE, id, resp) 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 index 23a9afc49..7a7700f71 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_environment_upgrade.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_environment_upgrade.go @@ -18,7 +18,8 @@ type EnvironmentUpgrade struct { type EnvironmentUpgradeCollection struct { Collection - Data []EnvironmentUpgrade `json:"data,omitempty"` + Data []EnvironmentUpgrade `json:"data,omitempty"` + client *EnvironmentUpgradeClient } type EnvironmentUpgradeClient struct { @@ -54,9 +55,20 @@ func (c *EnvironmentUpgradeClient) Update(existing *EnvironmentUpgrade, updates func (c *EnvironmentUpgradeClient) List(opts *ListOpts) (*EnvironmentUpgradeCollection, error) { resp := &EnvironmentUpgradeCollection{} err := c.rancherClient.doList(ENVIRONMENT_UPGRADE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *EnvironmentUpgradeCollection) Next() (*EnvironmentUpgradeCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &EnvironmentUpgradeCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *EnvironmentUpgradeClient) ById(id string) (*EnvironmentUpgrade, error) { resp := &EnvironmentUpgrade{} err := c.rancherClient.doById(ENVIRONMENT_UPGRADE_TYPE, id, resp) 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 index cfa7b4aa3..216383386 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_extension_implementation.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_extension_implementation.go @@ -16,7 +16,8 @@ type ExtensionImplementation struct { type ExtensionImplementationCollection struct { Collection - Data []ExtensionImplementation `json:"data,omitempty"` + Data []ExtensionImplementation `json:"data,omitempty"` + client *ExtensionImplementationClient } type ExtensionImplementationClient struct { @@ -52,9 +53,20 @@ func (c *ExtensionImplementationClient) Update(existing *ExtensionImplementation func (c *ExtensionImplementationClient) List(opts *ListOpts) (*ExtensionImplementationCollection, error) { resp := &ExtensionImplementationCollection{} err := c.rancherClient.doList(EXTENSION_IMPLEMENTATION_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ExtensionImplementationCollection) Next() (*ExtensionImplementationCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ExtensionImplementationCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ExtensionImplementationClient) ById(id string) (*ExtensionImplementation, error) { resp := &ExtensionImplementation{} err := c.rancherClient.doById(EXTENSION_IMPLEMENTATION_TYPE, id, resp) 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 index 0b13cf548..ab0730080 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_extension_point.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_extension_point.go @@ -20,7 +20,8 @@ type ExtensionPoint struct { type ExtensionPointCollection struct { Collection - Data []ExtensionPoint `json:"data,omitempty"` + Data []ExtensionPoint `json:"data,omitempty"` + client *ExtensionPointClient } type ExtensionPointClient struct { @@ -56,9 +57,20 @@ func (c *ExtensionPointClient) Update(existing *ExtensionPoint, updates interfac func (c *ExtensionPointClient) List(opts *ListOpts) (*ExtensionPointCollection, error) { resp := &ExtensionPointCollection{} err := c.rancherClient.doList(EXTENSION_POINT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ExtensionPointCollection) Next() (*ExtensionPointCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ExtensionPointCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ExtensionPointClient) ById(id string) (*ExtensionPoint, error) { resp := &ExtensionPoint{} err := c.rancherClient.doById(EXTENSION_POINT_TYPE, id, resp) 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 index 7f4ce2562..e4c6c929b 100644 --- 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 @@ -40,7 +40,8 @@ type ExternalDnsEvent struct { type ExternalDnsEventCollection struct { Collection - Data []ExternalDnsEvent `json:"data,omitempty"` + Data []ExternalDnsEvent `json:"data,omitempty"` + client *ExternalDnsEventClient } type ExternalDnsEventClient struct { @@ -80,9 +81,20 @@ func (c *ExternalDnsEventClient) Update(existing *ExternalDnsEvent, updates inte func (c *ExternalDnsEventClient) List(opts *ListOpts) (*ExternalDnsEventCollection, error) { resp := &ExternalDnsEventCollection{} err := c.rancherClient.doList(EXTERNAL_DNS_EVENT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ExternalDnsEventCollection) Next() (*ExternalDnsEventCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ExternalDnsEventCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ExternalDnsEventClient) ById(id string) (*ExternalDnsEvent, error) { resp := &ExternalDnsEvent{} err := c.rancherClient.doById(EXTERNAL_DNS_EVENT_TYPE, id, resp) 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 index a1bf8180b..3b43545a5 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_external_event.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_external_event.go @@ -34,7 +34,8 @@ type ExternalEvent struct { type ExternalEventCollection struct { Collection - Data []ExternalEvent `json:"data,omitempty"` + Data []ExternalEvent `json:"data,omitempty"` + client *ExternalEventClient } type ExternalEventClient struct { @@ -74,9 +75,20 @@ func (c *ExternalEventClient) Update(existing *ExternalEvent, updates interface{ func (c *ExternalEventClient) List(opts *ListOpts) (*ExternalEventCollection, error) { resp := &ExternalEventCollection{} err := c.rancherClient.doList(EXTERNAL_EVENT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ExternalEventCollection) Next() (*ExternalEventCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ExternalEventCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ExternalEventClient) ById(id string) (*ExternalEvent, error) { resp := &ExternalEvent{} err := c.rancherClient.doById(EXTERNAL_EVENT_TYPE, id, resp) 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 index d325b8d55..ae7dcda65 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_external_handler.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_external_handler.go @@ -42,7 +42,8 @@ type ExternalHandler struct { type ExternalHandlerCollection struct { Collection - Data []ExternalHandler `json:"data,omitempty"` + Data []ExternalHandler `json:"data,omitempty"` + client *ExternalHandlerClient } type ExternalHandlerClient struct { @@ -92,9 +93,20 @@ func (c *ExternalHandlerClient) Update(existing *ExternalHandler, updates interf func (c *ExternalHandlerClient) List(opts *ListOpts) (*ExternalHandlerCollection, error) { resp := &ExternalHandlerCollection{} err := c.rancherClient.doList(EXTERNAL_HANDLER_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ExternalHandlerCollection) Next() (*ExternalHandlerCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ExternalHandlerCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ExternalHandlerClient) ById(id string) (*ExternalHandler, error) { resp := &ExternalHandler{} err := c.rancherClient.doById(EXTERNAL_HANDLER_TYPE, id, resp) 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 index 9852fa890..37f321821 100644 --- 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 @@ -40,7 +40,8 @@ type ExternalHandlerExternalHandlerProcessMap struct { type ExternalHandlerExternalHandlerProcessMapCollection struct { Collection - Data []ExternalHandlerExternalHandlerProcessMap `json:"data,omitempty"` + Data []ExternalHandlerExternalHandlerProcessMap `json:"data,omitempty"` + client *ExternalHandlerExternalHandlerProcessMapClient } type ExternalHandlerExternalHandlerProcessMapClient struct { @@ -90,9 +91,20 @@ func (c *ExternalHandlerExternalHandlerProcessMapClient) Update(existing *Extern func (c *ExternalHandlerExternalHandlerProcessMapClient) List(opts *ListOpts) (*ExternalHandlerExternalHandlerProcessMapCollection, error) { resp := &ExternalHandlerExternalHandlerProcessMapCollection{} err := c.rancherClient.doList(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ExternalHandlerExternalHandlerProcessMapCollection) Next() (*ExternalHandlerExternalHandlerProcessMapCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ExternalHandlerExternalHandlerProcessMapCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ExternalHandlerExternalHandlerProcessMapClient) ById(id string) (*ExternalHandlerExternalHandlerProcessMap, error) { resp := &ExternalHandlerExternalHandlerProcessMap{} err := c.rancherClient.doById(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, id, resp) 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 index a61336572..81a1b8a9a 100644 --- 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 @@ -34,7 +34,8 @@ type ExternalHandlerProcess struct { type ExternalHandlerProcessCollection struct { Collection - Data []ExternalHandlerProcess `json:"data,omitempty"` + Data []ExternalHandlerProcess `json:"data,omitempty"` + client *ExternalHandlerProcessClient } type ExternalHandlerProcessClient struct { @@ -84,9 +85,20 @@ func (c *ExternalHandlerProcessClient) Update(existing *ExternalHandlerProcess, func (c *ExternalHandlerProcessClient) List(opts *ListOpts) (*ExternalHandlerProcessCollection, error) { resp := &ExternalHandlerProcessCollection{} err := c.rancherClient.doList(EXTERNAL_HANDLER_PROCESS_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ExternalHandlerProcessCollection) Next() (*ExternalHandlerProcessCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ExternalHandlerProcessCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ExternalHandlerProcessClient) ById(id string) (*ExternalHandlerProcess, error) { resp := &ExternalHandlerProcess{} err := c.rancherClient.doById(EXTERNAL_HANDLER_PROCESS_TYPE, id, resp) 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 index de0d49eb4..08d4ab066 100644 --- 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 @@ -14,7 +14,8 @@ type ExternalHandlerProcessConfig struct { type ExternalHandlerProcessConfigCollection struct { Collection - Data []ExternalHandlerProcessConfig `json:"data,omitempty"` + Data []ExternalHandlerProcessConfig `json:"data,omitempty"` + client *ExternalHandlerProcessConfigClient } type ExternalHandlerProcessConfigClient struct { @@ -50,9 +51,20 @@ func (c *ExternalHandlerProcessConfigClient) Update(existing *ExternalHandlerPro func (c *ExternalHandlerProcessConfigClient) List(opts *ListOpts) (*ExternalHandlerProcessConfigCollection, error) { resp := &ExternalHandlerProcessConfigCollection{} err := c.rancherClient.doList(EXTERNAL_HANDLER_PROCESS_CONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ExternalHandlerProcessConfigCollection) Next() (*ExternalHandlerProcessConfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ExternalHandlerProcessConfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ExternalHandlerProcessConfigClient) ById(id string) (*ExternalHandlerProcessConfig, error) { resp := &ExternalHandlerProcessConfig{} err := c.rancherClient.doById(EXTERNAL_HANDLER_PROCESS_CONFIG_TYPE, id, resp) 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 index ae8ec14ce..e35425eb7 100644 --- 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 @@ -40,7 +40,8 @@ type ExternalHostEvent struct { type ExternalHostEventCollection struct { Collection - Data []ExternalHostEvent `json:"data,omitempty"` + Data []ExternalHostEvent `json:"data,omitempty"` + client *ExternalHostEventClient } type ExternalHostEventClient struct { @@ -80,9 +81,20 @@ func (c *ExternalHostEventClient) Update(existing *ExternalHostEvent, updates in func (c *ExternalHostEventClient) List(opts *ListOpts) (*ExternalHostEventCollection, error) { resp := &ExternalHostEventCollection{} err := c.rancherClient.doList(EXTERNAL_HOST_EVENT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ExternalHostEventCollection) Next() (*ExternalHostEventCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ExternalHostEventCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ExternalHostEventClient) ById(id string) (*ExternalHostEvent, error) { resp := &ExternalHostEvent{} err := c.rancherClient.doById(EXTERNAL_HOST_EVENT_TYPE, id, resp) 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 index 6bdc9d7d3..44f044797 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_external_service.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_external_service.go @@ -58,7 +58,8 @@ type ExternalService struct { type ExternalServiceCollection struct { Collection - Data []ExternalService `json:"data,omitempty"` + Data []ExternalService `json:"data,omitempty"` + client *ExternalServiceClient } type ExternalServiceClient struct { @@ -116,9 +117,20 @@ func (c *ExternalServiceClient) Update(existing *ExternalService, updates interf func (c *ExternalServiceClient) List(opts *ListOpts) (*ExternalServiceCollection, error) { resp := &ExternalServiceCollection{} err := c.rancherClient.doList(EXTERNAL_SERVICE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ExternalServiceCollection) Next() (*ExternalServiceCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ExternalServiceCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ExternalServiceClient) ById(id string) (*ExternalService, error) { resp := &ExternalService{} err := c.rancherClient.doById(EXTERNAL_SERVICE_TYPE, id, resp) 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 index 1eb53a599..59913d208 100644 --- 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 @@ -38,7 +38,8 @@ type ExternalServiceEvent struct { type ExternalServiceEventCollection struct { Collection - Data []ExternalServiceEvent `json:"data,omitempty"` + Data []ExternalServiceEvent `json:"data,omitempty"` + client *ExternalServiceEventClient } type ExternalServiceEventClient struct { @@ -78,9 +79,20 @@ func (c *ExternalServiceEventClient) Update(existing *ExternalServiceEvent, upda func (c *ExternalServiceEventClient) List(opts *ListOpts) (*ExternalServiceEventCollection, error) { resp := &ExternalServiceEventCollection{} err := c.rancherClient.doList(EXTERNAL_SERVICE_EVENT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ExternalServiceEventCollection) Next() (*ExternalServiceEventCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ExternalServiceEventCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ExternalServiceEventClient) ById(id string) (*ExternalServiceEvent, error) { resp := &ExternalServiceEvent{} err := c.rancherClient.doById(EXTERNAL_SERVICE_EVENT_TYPE, id, resp) 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 index 21d4ef365..30b8ca17d 100644 --- 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 @@ -38,7 +38,8 @@ type ExternalStoragePoolEvent struct { type ExternalStoragePoolEventCollection struct { Collection - Data []ExternalStoragePoolEvent `json:"data,omitempty"` + Data []ExternalStoragePoolEvent `json:"data,omitempty"` + client *ExternalStoragePoolEventClient } type ExternalStoragePoolEventClient struct { @@ -78,9 +79,20 @@ func (c *ExternalStoragePoolEventClient) Update(existing *ExternalStoragePoolEve func (c *ExternalStoragePoolEventClient) List(opts *ListOpts) (*ExternalStoragePoolEventCollection, error) { resp := &ExternalStoragePoolEventCollection{} err := c.rancherClient.doList(EXTERNAL_STORAGE_POOL_EVENT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ExternalStoragePoolEventCollection) Next() (*ExternalStoragePoolEventCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ExternalStoragePoolEventCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ExternalStoragePoolEventClient) ById(id string) (*ExternalStoragePoolEvent, error) { resp := &ExternalStoragePoolEvent{} err := c.rancherClient.doById(EXTERNAL_STORAGE_POOL_EVENT_TYPE, id, resp) 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 index 2c1fae7dc..785efb153 100644 --- 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 @@ -36,7 +36,8 @@ type ExternalVolumeEvent struct { type ExternalVolumeEventCollection struct { Collection - Data []ExternalVolumeEvent `json:"data,omitempty"` + Data []ExternalVolumeEvent `json:"data,omitempty"` + client *ExternalVolumeEventClient } type ExternalVolumeEventClient struct { @@ -76,9 +77,20 @@ func (c *ExternalVolumeEventClient) Update(existing *ExternalVolumeEvent, update func (c *ExternalVolumeEventClient) List(opts *ListOpts) (*ExternalVolumeEventCollection, error) { resp := &ExternalVolumeEventCollection{} err := c.rancherClient.doList(EXTERNAL_VOLUME_EVENT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ExternalVolumeEventCollection) Next() (*ExternalVolumeEventCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ExternalVolumeEventCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ExternalVolumeEventClient) ById(id string) (*ExternalVolumeEvent, error) { resp := &ExternalVolumeEvent{} err := c.rancherClient.doById(EXTERNAL_VOLUME_EVENT_TYPE, id, resp) 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 index 035ac23fd..511d33bec 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_field_documentation.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_field_documentation.go @@ -12,7 +12,8 @@ type FieldDocumentation struct { type FieldDocumentationCollection struct { Collection - Data []FieldDocumentation `json:"data,omitempty"` + Data []FieldDocumentation `json:"data,omitempty"` + client *FieldDocumentationClient } type FieldDocumentationClient struct { @@ -48,9 +49,20 @@ func (c *FieldDocumentationClient) Update(existing *FieldDocumentation, updates func (c *FieldDocumentationClient) List(opts *ListOpts) (*FieldDocumentationCollection, error) { resp := &FieldDocumentationCollection{} err := c.rancherClient.doList(FIELD_DOCUMENTATION_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *FieldDocumentationCollection) Next() (*FieldDocumentationCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &FieldDocumentationCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *FieldDocumentationClient) ById(id string) (*FieldDocumentation, error) { resp := &FieldDocumentation{} err := c.rancherClient.doById(FIELD_DOCUMENTATION_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/client/generated_githubconfig.go b/vendor/github.com/rancher/go-rancher/client/generated_githubconfig.go index cafb43340..c053fc3fc 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_githubconfig.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_githubconfig.go @@ -26,7 +26,8 @@ type Githubconfig struct { type GithubconfigCollection struct { Collection - Data []Githubconfig `json:"data,omitempty"` + Data []Githubconfig `json:"data,omitempty"` + client *GithubconfigClient } type GithubconfigClient struct { @@ -62,9 +63,20 @@ func (c *GithubconfigClient) Update(existing *Githubconfig, updates interface{}) func (c *GithubconfigClient) List(opts *ListOpts) (*GithubconfigCollection, error) { resp := &GithubconfigCollection{} err := c.rancherClient.doList(GITHUBCONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *GithubconfigCollection) Next() (*GithubconfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &GithubconfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *GithubconfigClient) ById(id string) (*Githubconfig, error) { resp := &Githubconfig{} err := c.rancherClient.doById(GITHUBCONFIG_TYPE, id, resp) 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 index 9b9d14c4a..f5bb82f2c 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_ha_config.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_ha_config.go @@ -18,7 +18,8 @@ type HaConfig struct { type HaConfigCollection struct { Collection - Data []HaConfig `json:"data,omitempty"` + Data []HaConfig `json:"data,omitempty"` + client *HaConfigClient } type HaConfigClient struct { @@ -54,9 +55,20 @@ func (c *HaConfigClient) Update(existing *HaConfig, updates interface{}) (*HaCon func (c *HaConfigClient) List(opts *ListOpts) (*HaConfigCollection, error) { resp := &HaConfigCollection{} err := c.rancherClient.doList(HA_CONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *HaConfigCollection) Next() (*HaConfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &HaConfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *HaConfigClient) ById(id string) (*HaConfig, error) { resp := &HaConfig{} err := c.rancherClient.doById(HA_CONFIG_TYPE, id, resp) 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 index fdff3ae1c..ce869369c 100644 --- 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 @@ -42,7 +42,8 @@ type HaConfigInput struct { type HaConfigInputCollection struct { Collection - Data []HaConfigInput `json:"data,omitempty"` + Data []HaConfigInput `json:"data,omitempty"` + client *HaConfigInputClient } type HaConfigInputClient struct { @@ -78,9 +79,20 @@ func (c *HaConfigInputClient) Update(existing *HaConfigInput, updates interface{ func (c *HaConfigInputClient) List(opts *ListOpts) (*HaConfigInputCollection, error) { resp := &HaConfigInputCollection{} err := c.rancherClient.doList(HA_CONFIG_INPUT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *HaConfigInputCollection) Next() (*HaConfigInputCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &HaConfigInputCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *HaConfigInputClient) ById(id string) (*HaConfigInput, error) { resp := &HaConfigInput{} err := c.rancherClient.doById(HA_CONFIG_INPUT_TYPE, id, resp) 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 index a1e27bcdf..e8f6cc36b 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_haproxy_config.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_haproxy_config.go @@ -14,7 +14,8 @@ type HaproxyConfig struct { type HaproxyConfigCollection struct { Collection - Data []HaproxyConfig `json:"data,omitempty"` + Data []HaproxyConfig `json:"data,omitempty"` + client *HaproxyConfigClient } type HaproxyConfigClient struct { @@ -50,9 +51,20 @@ func (c *HaproxyConfigClient) Update(existing *HaproxyConfig, updates interface{ func (c *HaproxyConfigClient) List(opts *ListOpts) (*HaproxyConfigCollection, error) { resp := &HaproxyConfigCollection{} err := c.rancherClient.doList(HAPROXY_CONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *HaproxyConfigCollection) Next() (*HaproxyConfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &HaproxyConfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *HaproxyConfigClient) ById(id string) (*HaproxyConfig, error) { resp := &HaproxyConfig{} err := c.rancherClient.doById(HAPROXY_CONFIG_TYPE, id, resp) 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 index 6329d2f83..b30b9d869 100644 --- 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 @@ -42,7 +42,8 @@ type HealthcheckInstanceHostMap struct { type HealthcheckInstanceHostMapCollection struct { Collection - Data []HealthcheckInstanceHostMap `json:"data,omitempty"` + Data []HealthcheckInstanceHostMap `json:"data,omitempty"` + client *HealthcheckInstanceHostMapClient } type HealthcheckInstanceHostMapClient struct { @@ -82,9 +83,20 @@ func (c *HealthcheckInstanceHostMapClient) Update(existing *HealthcheckInstanceH func (c *HealthcheckInstanceHostMapClient) List(opts *ListOpts) (*HealthcheckInstanceHostMapCollection, error) { resp := &HealthcheckInstanceHostMapCollection{} err := c.rancherClient.doList(HEALTHCHECK_INSTANCE_HOST_MAP_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *HealthcheckInstanceHostMapCollection) Next() (*HealthcheckInstanceHostMapCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &HealthcheckInstanceHostMapCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *HealthcheckInstanceHostMapClient) ById(id string) (*HealthcheckInstanceHostMap, error) { resp := &HealthcheckInstanceHostMap{} err := c.rancherClient.doById(HEALTHCHECK_INSTANCE_HOST_MAP_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/client/generated_host.go b/vendor/github.com/rancher/go-rancher/client/generated_host.go index f1ee94368..114c05519 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_host.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_host.go @@ -54,7 +54,8 @@ type Host struct { type HostCollection struct { Collection - Data []Host `json:"data,omitempty"` + Data []Host `json:"data,omitempty"` + client *HostClient } type HostClient struct { @@ -106,9 +107,20 @@ func (c *HostClient) Update(existing *Host, updates interface{}) (*Host, error) func (c *HostClient) List(opts *ListOpts) (*HostCollection, error) { resp := &HostCollection{} err := c.rancherClient.doList(HOST_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *HostCollection) Next() (*HostCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &HostCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *HostClient) ById(id string) (*Host, error) { resp := &Host{} err := c.rancherClient.doById(HOST_TYPE, id, resp) 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 index ee4ab3992..7ebc586b5 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_host_access.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_host_access.go @@ -14,7 +14,8 @@ type HostAccess struct { type HostAccessCollection struct { Collection - Data []HostAccess `json:"data,omitempty"` + Data []HostAccess `json:"data,omitempty"` + client *HostAccessClient } type HostAccessClient struct { @@ -50,9 +51,20 @@ func (c *HostAccessClient) Update(existing *HostAccess, updates interface{}) (*H func (c *HostAccessClient) List(opts *ListOpts) (*HostAccessCollection, error) { resp := &HostAccessCollection{} err := c.rancherClient.doList(HOST_ACCESS_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *HostAccessCollection) Next() (*HostAccessCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &HostAccessCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *HostAccessClient) ById(id string) (*HostAccess, error) { resp := &HostAccess{} err := c.rancherClient.doById(HOST_ACCESS_TYPE, id, resp) 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 index e4c508a2f..1517b79bf 100644 --- 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 @@ -16,7 +16,8 @@ type HostApiProxyToken struct { type HostApiProxyTokenCollection struct { Collection - Data []HostApiProxyToken `json:"data,omitempty"` + Data []HostApiProxyToken `json:"data,omitempty"` + client *HostApiProxyTokenClient } type HostApiProxyTokenClient struct { @@ -52,9 +53,20 @@ func (c *HostApiProxyTokenClient) Update(existing *HostApiProxyToken, updates in func (c *HostApiProxyTokenClient) List(opts *ListOpts) (*HostApiProxyTokenCollection, error) { resp := &HostApiProxyTokenCollection{} err := c.rancherClient.doList(HOST_API_PROXY_TOKEN_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *HostApiProxyTokenCollection) Next() (*HostApiProxyTokenCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &HostApiProxyTokenCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *HostApiProxyTokenClient) ById(id string) (*HostApiProxyToken, error) { resp := &HostApiProxyToken{} err := c.rancherClient.doById(HOST_API_PROXY_TOKEN_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/client/generated_identity.go b/vendor/github.com/rancher/go-rancher/client/generated_identity.go index f78f7c765..1d92de6a1 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_identity.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_identity.go @@ -28,7 +28,8 @@ type Identity struct { type IdentityCollection struct { Collection - Data []Identity `json:"data,omitempty"` + Data []Identity `json:"data,omitempty"` + client *IdentityClient } type IdentityClient struct { @@ -64,9 +65,20 @@ func (c *IdentityClient) Update(existing *Identity, updates interface{}) (*Ident func (c *IdentityClient) List(opts *ListOpts) (*IdentityCollection, error) { resp := &IdentityCollection{} err := c.rancherClient.doList(IDENTITY_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *IdentityCollection) Next() (*IdentityCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &IdentityCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *IdentityClient) ById(id string) (*Identity, error) { resp := &Identity{} err := c.rancherClient.doById(IDENTITY_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/client/generated_image.go b/vendor/github.com/rancher/go-rancher/client/generated_image.go index 84d1d0ffc..b14103b33 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_image.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_image.go @@ -36,7 +36,8 @@ type Image struct { type ImageCollection struct { Collection - Data []Image `json:"data,omitempty"` + Data []Image `json:"data,omitempty"` + client *ImageClient } type ImageClient struct { @@ -86,9 +87,20 @@ func (c *ImageClient) Update(existing *Image, updates interface{}) (*Image, erro func (c *ImageClient) List(opts *ListOpts) (*ImageCollection, error) { resp := &ImageCollection{} err := c.rancherClient.doList(IMAGE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ImageCollection) Next() (*ImageCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ImageCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ImageClient) ById(id string) (*Image, error) { resp := &Image{} err := c.rancherClient.doById(IMAGE_TYPE, id, resp) 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 index a92885793..0dc616868 100644 --- 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 @@ -24,7 +24,8 @@ type InServiceUpgradeStrategy struct { type InServiceUpgradeStrategyCollection struct { Collection - Data []InServiceUpgradeStrategy `json:"data,omitempty"` + Data []InServiceUpgradeStrategy `json:"data,omitempty"` + client *InServiceUpgradeStrategyClient } type InServiceUpgradeStrategyClient struct { @@ -60,9 +61,20 @@ func (c *InServiceUpgradeStrategyClient) Update(existing *InServiceUpgradeStrate func (c *InServiceUpgradeStrategyClient) List(opts *ListOpts) (*InServiceUpgradeStrategyCollection, error) { resp := &InServiceUpgradeStrategyCollection{} err := c.rancherClient.doList(IN_SERVICE_UPGRADE_STRATEGY_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *InServiceUpgradeStrategyCollection) Next() (*InServiceUpgradeStrategyCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &InServiceUpgradeStrategyCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *InServiceUpgradeStrategyClient) ById(id string) (*InServiceUpgradeStrategy, error) { resp := &InServiceUpgradeStrategy{} err := c.rancherClient.doById(IN_SERVICE_UPGRADE_STRATEGY_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/client/generated_instance.go b/vendor/github.com/rancher/go-rancher/client/generated_instance.go index f43f6bd57..c552f3def 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_instance.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_instance.go @@ -40,7 +40,8 @@ type Instance struct { type InstanceCollection struct { Collection - Data []Instance `json:"data,omitempty"` + Data []Instance `json:"data,omitempty"` + client *InstanceClient } type InstanceClient struct { @@ -108,9 +109,20 @@ func (c *InstanceClient) Update(existing *Instance, updates interface{}) (*Insta func (c *InstanceClient) List(opts *ListOpts) (*InstanceCollection, error) { resp := &InstanceCollection{} err := c.rancherClient.doList(INSTANCE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *InstanceCollection) Next() (*InstanceCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &InstanceCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *InstanceClient) ById(id string) (*Instance, error) { resp := &Instance{} err := c.rancherClient.doById(INSTANCE_TYPE, id, resp) 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 index bf38cb4c1..85746058d 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_instance_console.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_instance_console.go @@ -16,7 +16,8 @@ type InstanceConsole struct { type InstanceConsoleCollection struct { Collection - Data []InstanceConsole `json:"data,omitempty"` + Data []InstanceConsole `json:"data,omitempty"` + client *InstanceConsoleClient } type InstanceConsoleClient struct { @@ -52,9 +53,20 @@ func (c *InstanceConsoleClient) Update(existing *InstanceConsole, updates interf func (c *InstanceConsoleClient) List(opts *ListOpts) (*InstanceConsoleCollection, error) { resp := &InstanceConsoleCollection{} err := c.rancherClient.doList(INSTANCE_CONSOLE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *InstanceConsoleCollection) Next() (*InstanceConsoleCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &InstanceConsoleCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *InstanceConsoleClient) ById(id string) (*InstanceConsole, error) { resp := &InstanceConsole{} err := c.rancherClient.doById(INSTANCE_CONSOLE_TYPE, id, resp) 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 index 11a126f79..5bfbe81f2 100644 --- 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 @@ -10,7 +10,8 @@ type InstanceConsoleInput struct { type InstanceConsoleInputCollection struct { Collection - Data []InstanceConsoleInput `json:"data,omitempty"` + Data []InstanceConsoleInput `json:"data,omitempty"` + client *InstanceConsoleInputClient } type InstanceConsoleInputClient struct { @@ -46,9 +47,20 @@ func (c *InstanceConsoleInputClient) Update(existing *InstanceConsoleInput, upda func (c *InstanceConsoleInputClient) List(opts *ListOpts) (*InstanceConsoleInputCollection, error) { resp := &InstanceConsoleInputCollection{} err := c.rancherClient.doList(INSTANCE_CONSOLE_INPUT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *InstanceConsoleInputCollection) Next() (*InstanceConsoleInputCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &InstanceConsoleInputCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *InstanceConsoleInputClient) ById(id string) (*InstanceConsoleInput, error) { resp := &InstanceConsoleInput{} err := c.rancherClient.doById(INSTANCE_CONSOLE_INPUT_TYPE, id, resp) 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 index 305798bf8..4f2ce46c4 100644 --- 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 @@ -32,7 +32,8 @@ type InstanceHealthCheck struct { type InstanceHealthCheckCollection struct { Collection - Data []InstanceHealthCheck `json:"data,omitempty"` + Data []InstanceHealthCheck `json:"data,omitempty"` + client *InstanceHealthCheckClient } type InstanceHealthCheckClient struct { @@ -68,9 +69,20 @@ func (c *InstanceHealthCheckClient) Update(existing *InstanceHealthCheck, update func (c *InstanceHealthCheckClient) List(opts *ListOpts) (*InstanceHealthCheckCollection, error) { resp := &InstanceHealthCheckCollection{} err := c.rancherClient.doList(INSTANCE_HEALTH_CHECK_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *InstanceHealthCheckCollection) Next() (*InstanceHealthCheckCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &InstanceHealthCheckCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *InstanceHealthCheckClient) ById(id string) (*InstanceHealthCheck, error) { resp := &InstanceHealthCheck{} err := c.rancherClient.doById(INSTANCE_HEALTH_CHECK_TYPE, id, resp) 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 index 5e7146514..598d5e52f 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_instance_link.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_instance_link.go @@ -44,7 +44,8 @@ type InstanceLink struct { type InstanceLinkCollection struct { Collection - Data []InstanceLink `json:"data,omitempty"` + Data []InstanceLink `json:"data,omitempty"` + client *InstanceLinkClient } type InstanceLinkClient struct { @@ -94,9 +95,20 @@ func (c *InstanceLinkClient) Update(existing *InstanceLink, updates interface{}) func (c *InstanceLinkClient) List(opts *ListOpts) (*InstanceLinkCollection, error) { resp := &InstanceLinkCollection{} err := c.rancherClient.doList(INSTANCE_LINK_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *InstanceLinkCollection) Next() (*InstanceLinkCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &InstanceLinkCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *InstanceLinkClient) ById(id string) (*InstanceLink, error) { resp := &InstanceLink{} err := c.rancherClient.doById(INSTANCE_LINK_TYPE, id, resp) 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 index d034bd615..2e3b2b67f 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_instance_stop.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_instance_stop.go @@ -14,7 +14,8 @@ type InstanceStop struct { type InstanceStopCollection struct { Collection - Data []InstanceStop `json:"data,omitempty"` + Data []InstanceStop `json:"data,omitempty"` + client *InstanceStopClient } type InstanceStopClient struct { @@ -50,9 +51,20 @@ func (c *InstanceStopClient) Update(existing *InstanceStop, updates interface{}) func (c *InstanceStopClient) List(opts *ListOpts) (*InstanceStopCollection, error) { resp := &InstanceStopCollection{} err := c.rancherClient.doList(INSTANCE_STOP_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *InstanceStopCollection) Next() (*InstanceStopCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &InstanceStopCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *InstanceStopClient) ById(id string) (*InstanceStop, error) { resp := &InstanceStop{} err := c.rancherClient.doById(INSTANCE_STOP_TYPE, id, resp) 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 index ba7a0f39a..60932494e 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_ip_address.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_ip_address.go @@ -40,7 +40,8 @@ type IpAddress struct { type IpAddressCollection struct { Collection - Data []IpAddress `json:"data,omitempty"` + Data []IpAddress `json:"data,omitempty"` + client *IpAddressClient } type IpAddressClient struct { @@ -92,9 +93,20 @@ func (c *IpAddressClient) Update(existing *IpAddress, updates interface{}) (*IpA func (c *IpAddressClient) List(opts *ListOpts) (*IpAddressCollection, error) { resp := &IpAddressCollection{} err := c.rancherClient.doList(IP_ADDRESS_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *IpAddressCollection) Next() (*IpAddressCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &IpAddressCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *IpAddressClient) ById(id string) (*IpAddress, error) { resp := &IpAddress{} err := c.rancherClient.doById(IP_ADDRESS_TYPE, id, resp) 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 index 2184ae9a4..2fb5fe2e8 100644 --- 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 @@ -12,7 +12,8 @@ type IpAddressAssociateInput struct { type IpAddressAssociateInputCollection struct { Collection - Data []IpAddressAssociateInput `json:"data,omitempty"` + Data []IpAddressAssociateInput `json:"data,omitempty"` + client *IpAddressAssociateInputClient } type IpAddressAssociateInputClient struct { @@ -48,9 +49,20 @@ func (c *IpAddressAssociateInputClient) Update(existing *IpAddressAssociateInput func (c *IpAddressAssociateInputClient) List(opts *ListOpts) (*IpAddressAssociateInputCollection, error) { resp := &IpAddressAssociateInputCollection{} err := c.rancherClient.doList(IP_ADDRESS_ASSOCIATE_INPUT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *IpAddressAssociateInputCollection) Next() (*IpAddressAssociateInputCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &IpAddressAssociateInputCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *IpAddressAssociateInputClient) ById(id string) (*IpAddressAssociateInput, error) { resp := &IpAddressAssociateInput{} err := c.rancherClient.doById(IP_ADDRESS_ASSOCIATE_INPUT_TYPE, id, resp) 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 index a7e6f2a1c..34ac4360a 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_kubernetes_service.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_kubernetes_service.go @@ -48,7 +48,8 @@ type KubernetesService struct { type KubernetesServiceCollection struct { Collection - Data []KubernetesService `json:"data,omitempty"` + Data []KubernetesService `json:"data,omitempty"` + client *KubernetesServiceClient } type KubernetesServiceClient struct { @@ -112,9 +113,20 @@ func (c *KubernetesServiceClient) Update(existing *KubernetesService, updates in func (c *KubernetesServiceClient) List(opts *ListOpts) (*KubernetesServiceCollection, error) { resp := &KubernetesServiceCollection{} err := c.rancherClient.doList(KUBERNETES_SERVICE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *KubernetesServiceCollection) Next() (*KubernetesServiceCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &KubernetesServiceCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *KubernetesServiceClient) ById(id string) (*KubernetesService, error) { resp := &KubernetesService{} err := c.rancherClient.doById(KUBERNETES_SERVICE_TYPE, id, resp) 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 index e50de92da..136466faa 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_kubernetes_stack.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_kubernetes_stack.go @@ -50,7 +50,8 @@ type KubernetesStack struct { type KubernetesStackCollection struct { Collection - Data []KubernetesStack `json:"data,omitempty"` + Data []KubernetesStack `json:"data,omitempty"` + client *KubernetesStackClient } type KubernetesStackClient struct { @@ -102,9 +103,20 @@ func (c *KubernetesStackClient) Update(existing *KubernetesStack, updates interf func (c *KubernetesStackClient) List(opts *ListOpts) (*KubernetesStackCollection, error) { resp := &KubernetesStackCollection{} err := c.rancherClient.doList(KUBERNETES_STACK_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *KubernetesStackCollection) Next() (*KubernetesStackCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &KubernetesStackCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *KubernetesStackClient) ById(id string) (*KubernetesStack, error) { resp := &KubernetesStack{} err := c.rancherClient.doById(KUBERNETES_STACK_TYPE, id, resp) 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 index 11d7f9322..58c6c5ca8 100644 --- 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 @@ -16,7 +16,8 @@ type KubernetesStackUpgrade struct { type KubernetesStackUpgradeCollection struct { Collection - Data []KubernetesStackUpgrade `json:"data,omitempty"` + Data []KubernetesStackUpgrade `json:"data,omitempty"` + client *KubernetesStackUpgradeClient } type KubernetesStackUpgradeClient struct { @@ -52,9 +53,20 @@ func (c *KubernetesStackUpgradeClient) Update(existing *KubernetesStackUpgrade, func (c *KubernetesStackUpgradeClient) List(opts *ListOpts) (*KubernetesStackUpgradeCollection, error) { resp := &KubernetesStackUpgradeCollection{} err := c.rancherClient.doList(KUBERNETES_STACK_UPGRADE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *KubernetesStackUpgradeCollection) Next() (*KubernetesStackUpgradeCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &KubernetesStackUpgradeCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *KubernetesStackUpgradeClient) ById(id string) (*KubernetesStackUpgrade, error) { resp := &KubernetesStackUpgrade{} err := c.rancherClient.doById(KUBERNETES_STACK_UPGRADE_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/client/generated_label.go b/vendor/github.com/rancher/go-rancher/client/generated_label.go index 004a75d9d..6b67a2e84 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_label.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_label.go @@ -40,7 +40,8 @@ type Label struct { type LabelCollection struct { Collection - Data []Label `json:"data,omitempty"` + Data []Label `json:"data,omitempty"` + client *LabelClient } type LabelClient struct { @@ -80,9 +81,20 @@ func (c *LabelClient) Update(existing *Label, updates interface{}) (*Label, erro func (c *LabelClient) List(opts *ListOpts) (*LabelCollection, error) { resp := &LabelCollection{} err := c.rancherClient.doList(LABEL_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *LabelCollection) Next() (*LabelCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &LabelCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *LabelClient) ById(id string) (*Label, error) { resp := &Label{} err := c.rancherClient.doById(LABEL_TYPE, id, resp) 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 index b24cf4b26..11b43558a 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_launch_config.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_launch_config.go @@ -166,7 +166,8 @@ type LaunchConfig struct { type LaunchConfigCollection struct { Collection - Data []LaunchConfig `json:"data,omitempty"` + Data []LaunchConfig `json:"data,omitempty"` + client *LaunchConfigClient } type LaunchConfigClient struct { @@ -240,9 +241,20 @@ func (c *LaunchConfigClient) Update(existing *LaunchConfig, updates interface{}) func (c *LaunchConfigClient) List(opts *ListOpts) (*LaunchConfigCollection, error) { resp := &LaunchConfigCollection{} err := c.rancherClient.doList(LAUNCH_CONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *LaunchConfigCollection) Next() (*LaunchConfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &LaunchConfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *LaunchConfigClient) ById(id string) (*LaunchConfig, error) { resp := &LaunchConfig{} err := c.rancherClient.doById(LAUNCH_CONFIG_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/client/generated_ldapconfig.go b/vendor/github.com/rancher/go-rancher/client/generated_ldapconfig.go index f760cfc95..fb8a1c937 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_ldapconfig.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_ldapconfig.go @@ -56,7 +56,8 @@ type Ldapconfig struct { type LdapconfigCollection struct { Collection - Data []Ldapconfig `json:"data,omitempty"` + Data []Ldapconfig `json:"data,omitempty"` + client *LdapconfigClient } type LdapconfigClient struct { @@ -92,9 +93,20 @@ func (c *LdapconfigClient) Update(existing *Ldapconfig, updates interface{}) (*L func (c *LdapconfigClient) List(opts *ListOpts) (*LdapconfigCollection, error) { resp := &LdapconfigCollection{} err := c.rancherClient.doList(LDAPCONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *LdapconfigCollection) Next() (*LdapconfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &LdapconfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *LdapconfigClient) ById(id string) (*Ldapconfig, error) { resp := &Ldapconfig{} err := c.rancherClient.doById(LDAPCONFIG_TYPE, id, resp) 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 index 235252cd3..9a0e7407e 100644 --- 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 @@ -24,7 +24,8 @@ type LoadBalancerAppCookieStickinessPolicy struct { type LoadBalancerAppCookieStickinessPolicyCollection struct { Collection - Data []LoadBalancerAppCookieStickinessPolicy `json:"data,omitempty"` + Data []LoadBalancerAppCookieStickinessPolicy `json:"data,omitempty"` + client *LoadBalancerAppCookieStickinessPolicyClient } type LoadBalancerAppCookieStickinessPolicyClient struct { @@ -60,9 +61,20 @@ func (c *LoadBalancerAppCookieStickinessPolicyClient) Update(existing *LoadBalan func (c *LoadBalancerAppCookieStickinessPolicyClient) List(opts *ListOpts) (*LoadBalancerAppCookieStickinessPolicyCollection, error) { resp := &LoadBalancerAppCookieStickinessPolicyCollection{} err := c.rancherClient.doList(LOAD_BALANCER_APP_COOKIE_STICKINESS_POLICY_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *LoadBalancerAppCookieStickinessPolicyCollection) Next() (*LoadBalancerAppCookieStickinessPolicyCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &LoadBalancerAppCookieStickinessPolicyCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *LoadBalancerAppCookieStickinessPolicyClient) ById(id string) (*LoadBalancerAppCookieStickinessPolicy, error) { resp := &LoadBalancerAppCookieStickinessPolicy{} err := c.rancherClient.doById(LOAD_BALANCER_APP_COOKIE_STICKINESS_POLICY_TYPE, id, resp) 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 index 8c23c42e3..aabc4ef64 100644 --- 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 @@ -14,7 +14,8 @@ type LoadBalancerConfig struct { type LoadBalancerConfigCollection struct { Collection - Data []LoadBalancerConfig `json:"data,omitempty"` + Data []LoadBalancerConfig `json:"data,omitempty"` + client *LoadBalancerConfigClient } type LoadBalancerConfigClient struct { @@ -50,9 +51,20 @@ func (c *LoadBalancerConfigClient) Update(existing *LoadBalancerConfig, updates func (c *LoadBalancerConfigClient) List(opts *ListOpts) (*LoadBalancerConfigCollection, error) { resp := &LoadBalancerConfigCollection{} err := c.rancherClient.doList(LOAD_BALANCER_CONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *LoadBalancerConfigCollection) Next() (*LoadBalancerConfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &LoadBalancerConfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *LoadBalancerConfigClient) ById(id string) (*LoadBalancerConfig, error) { resp := &LoadBalancerConfig{} err := c.rancherClient.doById(LOAD_BALANCER_CONFIG_TYPE, id, resp) 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 index 0fc5699a5..4a8d69893 100644 --- 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 @@ -24,7 +24,8 @@ type LoadBalancerCookieStickinessPolicy struct { type LoadBalancerCookieStickinessPolicyCollection struct { Collection - Data []LoadBalancerCookieStickinessPolicy `json:"data,omitempty"` + Data []LoadBalancerCookieStickinessPolicy `json:"data,omitempty"` + client *LoadBalancerCookieStickinessPolicyClient } type LoadBalancerCookieStickinessPolicyClient struct { @@ -60,9 +61,20 @@ func (c *LoadBalancerCookieStickinessPolicyClient) Update(existing *LoadBalancer func (c *LoadBalancerCookieStickinessPolicyClient) List(opts *ListOpts) (*LoadBalancerCookieStickinessPolicyCollection, error) { resp := &LoadBalancerCookieStickinessPolicyCollection{} err := c.rancherClient.doList(LOAD_BALANCER_COOKIE_STICKINESS_POLICY_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *LoadBalancerCookieStickinessPolicyCollection) Next() (*LoadBalancerCookieStickinessPolicyCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &LoadBalancerCookieStickinessPolicyCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *LoadBalancerCookieStickinessPolicyClient) ById(id string) (*LoadBalancerCookieStickinessPolicy, error) { resp := &LoadBalancerCookieStickinessPolicy{} err := c.rancherClient.doById(LOAD_BALANCER_COOKIE_STICKINESS_POLICY_TYPE, id, resp) 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 index ad6b7ba2d..5aec49576 100644 --- 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 @@ -74,7 +74,8 @@ type LoadBalancerService struct { type LoadBalancerServiceCollection struct { Collection - Data []LoadBalancerService `json:"data,omitempty"` + Data []LoadBalancerService `json:"data,omitempty"` + client *LoadBalancerServiceClient } type LoadBalancerServiceClient struct { @@ -138,9 +139,20 @@ func (c *LoadBalancerServiceClient) Update(existing *LoadBalancerService, update func (c *LoadBalancerServiceClient) List(opts *ListOpts) (*LoadBalancerServiceCollection, error) { resp := &LoadBalancerServiceCollection{} err := c.rancherClient.doList(LOAD_BALANCER_SERVICE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *LoadBalancerServiceCollection) Next() (*LoadBalancerServiceCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &LoadBalancerServiceCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *LoadBalancerServiceClient) ById(id string) (*LoadBalancerService, error) { resp := &LoadBalancerService{} err := c.rancherClient.doById(LOAD_BALANCER_SERVICE_TYPE, id, resp) 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 index b30c45be9..87b74c3de 100644 --- 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 @@ -16,7 +16,8 @@ type LoadBalancerServiceLink struct { type LoadBalancerServiceLinkCollection struct { Collection - Data []LoadBalancerServiceLink `json:"data,omitempty"` + Data []LoadBalancerServiceLink `json:"data,omitempty"` + client *LoadBalancerServiceLinkClient } type LoadBalancerServiceLinkClient struct { @@ -52,9 +53,20 @@ func (c *LoadBalancerServiceLinkClient) Update(existing *LoadBalancerServiceLink func (c *LoadBalancerServiceLinkClient) List(opts *ListOpts) (*LoadBalancerServiceLinkCollection, error) { resp := &LoadBalancerServiceLinkCollection{} err := c.rancherClient.doList(LOAD_BALANCER_SERVICE_LINK_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *LoadBalancerServiceLinkCollection) Next() (*LoadBalancerServiceLinkCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &LoadBalancerServiceLinkCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *LoadBalancerServiceLinkClient) ById(id string) (*LoadBalancerServiceLink, error) { resp := &LoadBalancerServiceLink{} err := c.rancherClient.doById(LOAD_BALANCER_SERVICE_LINK_TYPE, id, resp) 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 index 16d985545..664f137c1 100644 --- 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 @@ -20,7 +20,8 @@ type LocalAuthConfig struct { type LocalAuthConfigCollection struct { Collection - Data []LocalAuthConfig `json:"data,omitempty"` + Data []LocalAuthConfig `json:"data,omitempty"` + client *LocalAuthConfigClient } type LocalAuthConfigClient struct { @@ -56,9 +57,20 @@ func (c *LocalAuthConfigClient) Update(existing *LocalAuthConfig, updates interf func (c *LocalAuthConfigClient) List(opts *ListOpts) (*LocalAuthConfigCollection, error) { resp := &LocalAuthConfigCollection{} err := c.rancherClient.doList(LOCAL_AUTH_CONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *LocalAuthConfigCollection) Next() (*LocalAuthConfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &LocalAuthConfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *LocalAuthConfigClient) ById(id string) (*LocalAuthConfig, error) { resp := &LocalAuthConfig{} err := c.rancherClient.doById(LOCAL_AUTH_CONFIG_TYPE, id, resp) 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 index 1abfc4c93..3f799aac9 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_log_config.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_log_config.go @@ -14,7 +14,8 @@ type LogConfig struct { type LogConfigCollection struct { Collection - Data []LogConfig `json:"data,omitempty"` + Data []LogConfig `json:"data,omitempty"` + client *LogConfigClient } type LogConfigClient struct { @@ -50,9 +51,20 @@ func (c *LogConfigClient) Update(existing *LogConfig, updates interface{}) (*Log func (c *LogConfigClient) List(opts *ListOpts) (*LogConfigCollection, error) { resp := &LogConfigCollection{} err := c.rancherClient.doList(LOG_CONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *LogConfigCollection) Next() (*LogConfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &LogConfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *LogConfigClient) ById(id string) (*LogConfig, error) { resp := &LogConfig{} err := c.rancherClient.doById(LOG_CONFIG_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/client/generated_machine.go b/vendor/github.com/rancher/go-rancher/client/generated_machine.go index fb7768d97..be7be96b0 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_machine.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_machine.go @@ -72,7 +72,8 @@ type Machine struct { type MachineCollection struct { Collection - Data []Machine `json:"data,omitempty"` + Data []Machine `json:"data,omitempty"` + client *MachineClient } type MachineClient struct { @@ -118,9 +119,20 @@ func (c *MachineClient) Update(existing *Machine, updates interface{}) (*Machine func (c *MachineClient) List(opts *ListOpts) (*MachineCollection, error) { resp := &MachineCollection{} err := c.rancherClient.doList(MACHINE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *MachineCollection) Next() (*MachineCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &MachineCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *MachineClient) ById(id string) (*Machine, error) { resp := &Machine{} err := c.rancherClient.doById(MACHINE_TYPE, id, resp) 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 index c54bcd4b6..d7bb94b20 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_machine_driver.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_machine_driver.go @@ -48,7 +48,8 @@ type MachineDriver struct { type MachineDriverCollection struct { Collection - Data []MachineDriver `json:"data,omitempty"` + Data []MachineDriver `json:"data,omitempty"` + client *MachineDriverClient } type MachineDriverClient struct { @@ -96,9 +97,20 @@ func (c *MachineDriverClient) Update(existing *MachineDriver, updates interface{ func (c *MachineDriverClient) List(opts *ListOpts) (*MachineDriverCollection, error) { resp := &MachineDriverCollection{} err := c.rancherClient.doList(MACHINE_DRIVER_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *MachineDriverCollection) Next() (*MachineDriverCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &MachineDriverCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *MachineDriverClient) ById(id string) (*MachineDriver, error) { resp := &MachineDriver{} err := c.rancherClient.doById(MACHINE_DRIVER_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/client/generated_mount.go b/vendor/github.com/rancher/go-rancher/client/generated_mount.go index 59c976303..efa68a501 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_mount.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_mount.go @@ -44,7 +44,8 @@ type Mount struct { type MountCollection struct { Collection - Data []Mount `json:"data,omitempty"` + Data []Mount `json:"data,omitempty"` + client *MountClient } type MountClient struct { @@ -86,9 +87,20 @@ func (c *MountClient) Update(existing *Mount, updates interface{}) (*Mount, erro func (c *MountClient) List(opts *ListOpts) (*MountCollection, error) { resp := &MountCollection{} err := c.rancherClient.doList(MOUNT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *MountCollection) Next() (*MountCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &MountCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *MountClient) ById(id string) (*Mount, error) { resp := &Mount{} err := c.rancherClient.doById(MOUNT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/client/generated_network.go b/vendor/github.com/rancher/go-rancher/client/generated_network.go index 53c59be4b..3147d9f43 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_network.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_network.go @@ -36,7 +36,8 @@ type Network struct { type NetworkCollection struct { Collection - Data []Network `json:"data,omitempty"` + Data []Network `json:"data,omitempty"` + client *NetworkClient } type NetworkClient struct { @@ -86,9 +87,20 @@ func (c *NetworkClient) Update(existing *Network, updates interface{}) (*Network func (c *NetworkClient) List(opts *ListOpts) (*NetworkCollection, error) { resp := &NetworkCollection{} err := c.rancherClient.doList(NETWORK_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *NetworkCollection) Next() (*NetworkCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &NetworkCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *NetworkClient) ById(id string) (*Network, error) { resp := &Network{} err := c.rancherClient.doById(NETWORK_TYPE, id, resp) 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 index d7fecc473..1c0143fbf 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_nfs_config.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_nfs_config.go @@ -16,7 +16,8 @@ type NfsConfig struct { type NfsConfigCollection struct { Collection - Data []NfsConfig `json:"data,omitempty"` + Data []NfsConfig `json:"data,omitempty"` + client *NfsConfigClient } type NfsConfigClient struct { @@ -52,9 +53,20 @@ func (c *NfsConfigClient) Update(existing *NfsConfig, updates interface{}) (*Nfs func (c *NfsConfigClient) List(opts *ListOpts) (*NfsConfigCollection, error) { resp := &NfsConfigCollection{} err := c.rancherClient.doList(NFS_CONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *NfsConfigCollection) Next() (*NfsConfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &NfsConfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *NfsConfigClient) ById(id string) (*NfsConfig, error) { resp := &NfsConfig{} err := c.rancherClient.doById(NFS_CONFIG_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/client/generated_openldapconfig.go b/vendor/github.com/rancher/go-rancher/client/generated_openldapconfig.go index 7b24f4132..0f69016f4 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_openldapconfig.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_openldapconfig.go @@ -54,7 +54,8 @@ type Openldapconfig struct { type OpenldapconfigCollection struct { Collection - Data []Openldapconfig `json:"data,omitempty"` + Data []Openldapconfig `json:"data,omitempty"` + client *OpenldapconfigClient } type OpenldapconfigClient struct { @@ -90,9 +91,20 @@ func (c *OpenldapconfigClient) Update(existing *Openldapconfig, updates interfac func (c *OpenldapconfigClient) List(opts *ListOpts) (*OpenldapconfigCollection, error) { resp := &OpenldapconfigCollection{} err := c.rancherClient.doList(OPENLDAPCONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *OpenldapconfigCollection) Next() (*OpenldapconfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &OpenldapconfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *OpenldapconfigClient) ById(id string) (*Openldapconfig, error) { resp := &Openldapconfig{} err := c.rancherClient.doById(OPENLDAPCONFIG_TYPE, id, resp) 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 index f0d03e51f..3f3c4ff31 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_packet_config.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_packet_config.go @@ -22,7 +22,8 @@ type PacketConfig struct { type PacketConfigCollection struct { Collection - Data []PacketConfig `json:"data,omitempty"` + Data []PacketConfig `json:"data,omitempty"` + client *PacketConfigClient } type PacketConfigClient struct { @@ -58,9 +59,20 @@ func (c *PacketConfigClient) Update(existing *PacketConfig, updates interface{}) func (c *PacketConfigClient) List(opts *ListOpts) (*PacketConfigCollection, error) { resp := &PacketConfigCollection{} err := c.rancherClient.doList(PACKET_CONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *PacketConfigCollection) Next() (*PacketConfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &PacketConfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *PacketConfigClient) ById(id string) (*PacketConfig, error) { resp := &PacketConfig{} err := c.rancherClient.doById(PACKET_CONFIG_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/client/generated_password.go b/vendor/github.com/rancher/go-rancher/client/generated_password.go index 427eca312..5fb0d358d 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_password.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_password.go @@ -40,7 +40,8 @@ type Password struct { type PasswordCollection struct { Collection - Data []Password `json:"data,omitempty"` + Data []Password `json:"data,omitempty"` + client *PasswordClient } type PasswordClient struct { @@ -90,9 +91,20 @@ func (c *PasswordClient) Update(existing *Password, updates interface{}) (*Passw func (c *PasswordClient) List(opts *ListOpts) (*PasswordCollection, error) { resp := &PasswordCollection{} err := c.rancherClient.doList(PASSWORD_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *PasswordCollection) Next() (*PasswordCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &PasswordCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *PasswordClient) ById(id string) (*Password, error) { resp := &Password{} err := c.rancherClient.doById(PASSWORD_TYPE, id, resp) 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 index 99b623677..30039c490 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_physical_host.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_physical_host.go @@ -40,7 +40,8 @@ type PhysicalHost struct { type PhysicalHostCollection struct { Collection - Data []PhysicalHost `json:"data,omitempty"` + Data []PhysicalHost `json:"data,omitempty"` + client *PhysicalHostClient } type PhysicalHostClient struct { @@ -86,9 +87,20 @@ func (c *PhysicalHostClient) Update(existing *PhysicalHost, updates interface{}) func (c *PhysicalHostClient) List(opts *ListOpts) (*PhysicalHostCollection, error) { resp := &PhysicalHostCollection{} err := c.rancherClient.doList(PHYSICAL_HOST_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *PhysicalHostCollection) Next() (*PhysicalHostCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &PhysicalHostCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *PhysicalHostClient) ById(id string) (*PhysicalHost, error) { resp := &PhysicalHost{} err := c.rancherClient.doById(PHYSICAL_HOST_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/client/generated_port.go b/vendor/github.com/rancher/go-rancher/client/generated_port.go index 3db9283d2..04261f770 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_port.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_port.go @@ -50,7 +50,8 @@ type Port struct { type PortCollection struct { Collection - Data []Port `json:"data,omitempty"` + Data []Port `json:"data,omitempty"` + client *PortClient } type PortClient struct { @@ -100,9 +101,20 @@ func (c *PortClient) Update(existing *Port, updates interface{}) (*Port, error) func (c *PortClient) List(opts *ListOpts) (*PortCollection, error) { resp := &PortCollection{} err := c.rancherClient.doList(PORT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *PortCollection) Next() (*PortCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &PortCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *PortClient) ById(id string) (*Port, error) { resp := &Port{} err := c.rancherClient.doById(PORT_TYPE, id, resp) 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 index e6403303f..b6c9d94a3 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_process_definition.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_process_definition.go @@ -24,7 +24,8 @@ type ProcessDefinition struct { type ProcessDefinitionCollection struct { Collection - Data []ProcessDefinition `json:"data,omitempty"` + Data []ProcessDefinition `json:"data,omitempty"` + client *ProcessDefinitionClient } type ProcessDefinitionClient struct { @@ -60,9 +61,20 @@ func (c *ProcessDefinitionClient) Update(existing *ProcessDefinition, updates in func (c *ProcessDefinitionClient) List(opts *ListOpts) (*ProcessDefinitionCollection, error) { resp := &ProcessDefinitionCollection{} err := c.rancherClient.doList(PROCESS_DEFINITION_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ProcessDefinitionCollection) Next() (*ProcessDefinitionCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ProcessDefinitionCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ProcessDefinitionClient) ById(id string) (*ProcessDefinition, error) { resp := &ProcessDefinition{} err := c.rancherClient.doById(PROCESS_DEFINITION_TYPE, id, resp) 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 index 05e12914a..7356dce8d 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_process_execution.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_process_execution.go @@ -18,7 +18,8 @@ type ProcessExecution struct { type ProcessExecutionCollection struct { Collection - Data []ProcessExecution `json:"data,omitempty"` + Data []ProcessExecution `json:"data,omitempty"` + client *ProcessExecutionClient } type ProcessExecutionClient struct { @@ -54,9 +55,20 @@ func (c *ProcessExecutionClient) Update(existing *ProcessExecution, updates inte func (c *ProcessExecutionClient) List(opts *ListOpts) (*ProcessExecutionCollection, error) { resp := &ProcessExecutionCollection{} err := c.rancherClient.doList(PROCESS_EXECUTION_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ProcessExecutionCollection) Next() (*ProcessExecutionCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ProcessExecutionCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ProcessExecutionClient) ById(id string) (*ProcessExecution, error) { resp := &ProcessExecution{} err := c.rancherClient.doById(PROCESS_EXECUTION_TYPE, id, resp) 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 index 6ba08dfea..7dc874a79 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_process_instance.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_process_instance.go @@ -34,7 +34,8 @@ type ProcessInstance struct { type ProcessInstanceCollection struct { Collection - Data []ProcessInstance `json:"data,omitempty"` + Data []ProcessInstance `json:"data,omitempty"` + client *ProcessInstanceClient } type ProcessInstanceClient struct { @@ -70,9 +71,20 @@ func (c *ProcessInstanceClient) Update(existing *ProcessInstance, updates interf func (c *ProcessInstanceClient) List(opts *ListOpts) (*ProcessInstanceCollection, error) { resp := &ProcessInstanceCollection{} err := c.rancherClient.doList(PROCESS_INSTANCE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ProcessInstanceCollection) Next() (*ProcessInstanceCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ProcessInstanceCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ProcessInstanceClient) ById(id string) (*ProcessInstance, error) { resp := &ProcessInstance{} err := c.rancherClient.doById(PROCESS_INSTANCE_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/client/generated_project.go b/vendor/github.com/rancher/go-rancher/client/generated_project.go index 17f21401c..b8986a701 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_project.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_project.go @@ -50,7 +50,8 @@ type Project struct { type ProjectCollection struct { Collection - Data []Project `json:"data,omitempty"` + Data []Project `json:"data,omitempty"` + client *ProjectClient } type ProjectClient struct { @@ -102,9 +103,20 @@ func (c *ProjectClient) Update(existing *Project, updates interface{}) (*Project func (c *ProjectClient) List(opts *ListOpts) (*ProjectCollection, error) { resp := &ProjectCollection{} err := c.rancherClient.doList(PROJECT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ProjectCollection) Next() (*ProjectCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ProjectCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ProjectClient) ById(id string) (*Project, error) { resp := &Project{} err := c.rancherClient.doById(PROJECT_TYPE, id, resp) 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 index 82ba10bd4..96c6a7715 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_project_member.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_project_member.go @@ -42,7 +42,8 @@ type ProjectMember struct { type ProjectMemberCollection struct { Collection - Data []ProjectMember `json:"data,omitempty"` + Data []ProjectMember `json:"data,omitempty"` + client *ProjectMemberClient } type ProjectMemberClient struct { @@ -92,9 +93,20 @@ func (c *ProjectMemberClient) Update(existing *ProjectMember, updates interface{ func (c *ProjectMemberClient) List(opts *ListOpts) (*ProjectMemberCollection, error) { resp := &ProjectMemberCollection{} err := c.rancherClient.doList(PROJECT_MEMBER_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ProjectMemberCollection) Next() (*ProjectMemberCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ProjectMemberCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ProjectMemberClient) ById(id string) (*ProjectMember, error) { resp := &ProjectMember{} err := c.rancherClient.doById(PROJECT_MEMBER_TYPE, id, resp) 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 index 3d85858ef..14898e492 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_public_endpoint.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_public_endpoint.go @@ -20,7 +20,8 @@ type PublicEndpoint struct { type PublicEndpointCollection struct { Collection - Data []PublicEndpoint `json:"data,omitempty"` + Data []PublicEndpoint `json:"data,omitempty"` + client *PublicEndpointClient } type PublicEndpointClient struct { @@ -56,9 +57,20 @@ func (c *PublicEndpointClient) Update(existing *PublicEndpoint, updates interfac func (c *PublicEndpointClient) List(opts *ListOpts) (*PublicEndpointCollection, error) { resp := &PublicEndpointCollection{} err := c.rancherClient.doList(PUBLIC_ENDPOINT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *PublicEndpointCollection) Next() (*PublicEndpointCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &PublicEndpointCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *PublicEndpointClient) ById(id string) (*PublicEndpoint, error) { resp := &PublicEndpoint{} err := c.rancherClient.doById(PUBLIC_ENDPOINT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/client/generated_publish.go b/vendor/github.com/rancher/go-rancher/client/generated_publish.go index 9071207f5..af7f7cd50 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_publish.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_publish.go @@ -32,7 +32,8 @@ type Publish struct { type PublishCollection struct { Collection - Data []Publish `json:"data,omitempty"` + Data []Publish `json:"data,omitempty"` + client *PublishClient } type PublishClient struct { @@ -68,9 +69,20 @@ func (c *PublishClient) Update(existing *Publish, updates interface{}) (*Publish func (c *PublishClient) List(opts *ListOpts) (*PublishCollection, error) { resp := &PublishCollection{} err := c.rancherClient.doList(PUBLISH_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *PublishCollection) Next() (*PublishCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &PublishCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *PublishClient) ById(id string) (*Publish, error) { resp := &Publish{} err := c.rancherClient.doById(PUBLISH_TYPE, id, resp) 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 index a077e8885..d7fd58140 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_pull_task.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_pull_task.go @@ -44,7 +44,8 @@ type PullTask struct { type PullTaskCollection struct { Collection - Data []PullTask `json:"data,omitempty"` + Data []PullTask `json:"data,omitempty"` + client *PullTaskClient } type PullTaskClient struct { @@ -80,9 +81,20 @@ func (c *PullTaskClient) Update(existing *PullTask, updates interface{}) (*PullT func (c *PullTaskClient) List(opts *ListOpts) (*PullTaskCollection, error) { resp := &PullTaskCollection{} err := c.rancherClient.doList(PULL_TASK_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *PullTaskCollection) Next() (*PullTaskCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &PullTaskCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *PullTaskClient) ById(id string) (*PullTask, error) { resp := &PullTask{} err := c.rancherClient.doById(PULL_TASK_TYPE, id, resp) 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 index a8a89ed8c..ad1e7189c 100644 --- 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 @@ -12,7 +12,8 @@ type RecreateOnQuorumStrategyConfig struct { type RecreateOnQuorumStrategyConfigCollection struct { Collection - Data []RecreateOnQuorumStrategyConfig `json:"data,omitempty"` + Data []RecreateOnQuorumStrategyConfig `json:"data,omitempty"` + client *RecreateOnQuorumStrategyConfigClient } type RecreateOnQuorumStrategyConfigClient struct { @@ -48,9 +49,20 @@ func (c *RecreateOnQuorumStrategyConfigClient) Update(existing *RecreateOnQuorum func (c *RecreateOnQuorumStrategyConfigClient) List(opts *ListOpts) (*RecreateOnQuorumStrategyConfigCollection, error) { resp := &RecreateOnQuorumStrategyConfigCollection{} err := c.rancherClient.doList(RECREATE_ON_QUORUM_STRATEGY_CONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *RecreateOnQuorumStrategyConfigCollection) Next() (*RecreateOnQuorumStrategyConfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &RecreateOnQuorumStrategyConfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *RecreateOnQuorumStrategyConfigClient) ById(id string) (*RecreateOnQuorumStrategyConfig, error) { resp := &RecreateOnQuorumStrategyConfig{} err := c.rancherClient.doById(RECREATE_ON_QUORUM_STRATEGY_CONFIG_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/client/generated_register.go b/vendor/github.com/rancher/go-rancher/client/generated_register.go index 510cd1602..3e180b8ee 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_register.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_register.go @@ -42,7 +42,8 @@ type Register struct { type RegisterCollection struct { Collection - Data []Register `json:"data,omitempty"` + Data []Register `json:"data,omitempty"` + client *RegisterClient } type RegisterClient struct { @@ -80,9 +81,20 @@ func (c *RegisterClient) Update(existing *Register, updates interface{}) (*Regis func (c *RegisterClient) List(opts *ListOpts) (*RegisterCollection, error) { resp := &RegisterCollection{} err := c.rancherClient.doList(REGISTER_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *RegisterCollection) Next() (*RegisterCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &RegisterCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *RegisterClient) ById(id string) (*Register, error) { resp := &Register{} err := c.rancherClient.doById(REGISTER_TYPE, id, resp) 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 index 01b8cd8e1..1cbf178ac 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_registration_token.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_registration_token.go @@ -44,7 +44,8 @@ type RegistrationToken struct { type RegistrationTokenCollection struct { Collection - Data []RegistrationToken `json:"data,omitempty"` + Data []RegistrationToken `json:"data,omitempty"` + client *RegistrationTokenClient } type RegistrationTokenClient struct { @@ -92,9 +93,20 @@ func (c *RegistrationTokenClient) Update(existing *RegistrationToken, updates in func (c *RegistrationTokenClient) List(opts *ListOpts) (*RegistrationTokenCollection, error) { resp := &RegistrationTokenCollection{} err := c.rancherClient.doList(REGISTRATION_TOKEN_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *RegistrationTokenCollection) Next() (*RegistrationTokenCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &RegistrationTokenCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *RegistrationTokenClient) ById(id string) (*RegistrationToken, error) { resp := &RegistrationToken{} err := c.rancherClient.doById(REGISTRATION_TOKEN_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/client/generated_registry.go b/vendor/github.com/rancher/go-rancher/client/generated_registry.go index 6dbeb4fb7..e5dae9857 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_registry.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_registry.go @@ -48,7 +48,8 @@ type Registry struct { type RegistryCollection struct { Collection - Data []Registry `json:"data,omitempty"` + Data []Registry `json:"data,omitempty"` + client *RegistryClient } type RegistryClient struct { @@ -98,9 +99,20 @@ func (c *RegistryClient) Update(existing *Registry, updates interface{}) (*Regis func (c *RegistryClient) List(opts *ListOpts) (*RegistryCollection, error) { resp := &RegistryCollection{} err := c.rancherClient.doList(REGISTRY_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *RegistryCollection) Next() (*RegistryCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &RegistryCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *RegistryClient) ById(id string) (*Registry, error) { resp := &Registry{} err := c.rancherClient.doById(REGISTRY_TYPE, id, resp) 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 index e17ab42df..59bd5f823 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_registry_credential.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_registry_credential.go @@ -44,7 +44,8 @@ type RegistryCredential struct { type RegistryCredentialCollection struct { Collection - Data []RegistryCredential `json:"data,omitempty"` + Data []RegistryCredential `json:"data,omitempty"` + client *RegistryCredentialClient } type RegistryCredentialClient struct { @@ -92,9 +93,20 @@ func (c *RegistryCredentialClient) Update(existing *RegistryCredential, updates func (c *RegistryCredentialClient) List(opts *ListOpts) (*RegistryCredentialCollection, error) { resp := &RegistryCredentialCollection{} err := c.rancherClient.doList(REGISTRY_CREDENTIAL_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *RegistryCredentialCollection) Next() (*RegistryCredentialCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &RegistryCredentialCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *RegistryCredentialClient) ById(id string) (*RegistryCredential, error) { resp := &RegistryCredential{} err := c.rancherClient.doById(REGISTRY_CREDENTIAL_TYPE, id, resp) 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 index bb9a4a173..bc65daab2 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_resource_definition.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_resource_definition.go @@ -12,7 +12,8 @@ type ResourceDefinition struct { type ResourceDefinitionCollection struct { Collection - Data []ResourceDefinition `json:"data,omitempty"` + Data []ResourceDefinition `json:"data,omitempty"` + client *ResourceDefinitionClient } type ResourceDefinitionClient struct { @@ -48,9 +49,20 @@ func (c *ResourceDefinitionClient) Update(existing *ResourceDefinition, updates func (c *ResourceDefinitionClient) List(opts *ListOpts) (*ResourceDefinitionCollection, error) { resp := &ResourceDefinitionCollection{} err := c.rancherClient.doList(RESOURCE_DEFINITION_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ResourceDefinitionCollection) Next() (*ResourceDefinitionCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ResourceDefinitionCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ResourceDefinitionClient) ById(id string) (*ResourceDefinition, error) { resp := &ResourceDefinition{} err := c.rancherClient.doById(RESOURCE_DEFINITION_TYPE, id, resp) 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 index f301adb5a..23c4d81fa 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_restart_policy.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_restart_policy.go @@ -14,7 +14,8 @@ type RestartPolicy struct { type RestartPolicyCollection struct { Collection - Data []RestartPolicy `json:"data,omitempty"` + Data []RestartPolicy `json:"data,omitempty"` + client *RestartPolicyClient } type RestartPolicyClient struct { @@ -50,9 +51,20 @@ func (c *RestartPolicyClient) Update(existing *RestartPolicy, updates interface{ func (c *RestartPolicyClient) List(opts *ListOpts) (*RestartPolicyCollection, error) { resp := &RestartPolicyCollection{} err := c.rancherClient.doList(RESTART_POLICY_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *RestartPolicyCollection) Next() (*RestartPolicyCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &RestartPolicyCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *RestartPolicyClient) ById(id string) (*RestartPolicy, error) { resp := &RestartPolicy{} err := c.rancherClient.doById(RESTART_POLICY_TYPE, id, resp) 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 index a4878de4b..f4178081a 100644 --- 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 @@ -12,7 +12,8 @@ type RestoreFromBackupInput struct { type RestoreFromBackupInputCollection struct { Collection - Data []RestoreFromBackupInput `json:"data,omitempty"` + Data []RestoreFromBackupInput `json:"data,omitempty"` + client *RestoreFromBackupInputClient } type RestoreFromBackupInputClient struct { @@ -48,9 +49,20 @@ func (c *RestoreFromBackupInputClient) Update(existing *RestoreFromBackupInput, func (c *RestoreFromBackupInputClient) List(opts *ListOpts) (*RestoreFromBackupInputCollection, error) { resp := &RestoreFromBackupInputCollection{} err := c.rancherClient.doList(RESTORE_FROM_BACKUP_INPUT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *RestoreFromBackupInputCollection) Next() (*RestoreFromBackupInputCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &RestoreFromBackupInputCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *RestoreFromBackupInputClient) ById(id string) (*RestoreFromBackupInput, error) { resp := &RestoreFromBackupInput{} err := c.rancherClient.doById(RESTORE_FROM_BACKUP_INPUT_TYPE, id, resp) 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 index db702c9c8..0612f8182 100644 --- 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 @@ -12,7 +12,8 @@ type RevertToSnapshotInput struct { type RevertToSnapshotInputCollection struct { Collection - Data []RevertToSnapshotInput `json:"data,omitempty"` + Data []RevertToSnapshotInput `json:"data,omitempty"` + client *RevertToSnapshotInputClient } type RevertToSnapshotInputClient struct { @@ -48,9 +49,20 @@ func (c *RevertToSnapshotInputClient) Update(existing *RevertToSnapshotInput, up func (c *RevertToSnapshotInputClient) List(opts *ListOpts) (*RevertToSnapshotInputCollection, error) { resp := &RevertToSnapshotInputCollection{} err := c.rancherClient.doList(REVERT_TO_SNAPSHOT_INPUT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *RevertToSnapshotInputCollection) Next() (*RevertToSnapshotInputCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &RevertToSnapshotInputCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *RevertToSnapshotInputClient) ById(id string) (*RevertToSnapshotInput, error) { resp := &RevertToSnapshotInput{} err := c.rancherClient.doById(REVERT_TO_SNAPSHOT_INPUT_TYPE, id, resp) 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 index 443f9f1ec..f2384cdec 100644 --- 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 @@ -14,7 +14,8 @@ type RollingRestartStrategy struct { type RollingRestartStrategyCollection struct { Collection - Data []RollingRestartStrategy `json:"data,omitempty"` + Data []RollingRestartStrategy `json:"data,omitempty"` + client *RollingRestartStrategyClient } type RollingRestartStrategyClient struct { @@ -50,9 +51,20 @@ func (c *RollingRestartStrategyClient) Update(existing *RollingRestartStrategy, func (c *RollingRestartStrategyClient) List(opts *ListOpts) (*RollingRestartStrategyCollection, error) { resp := &RollingRestartStrategyCollection{} err := c.rancherClient.doList(ROLLING_RESTART_STRATEGY_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *RollingRestartStrategyCollection) Next() (*RollingRestartStrategyCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &RollingRestartStrategyCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *RollingRestartStrategyClient) ById(id string) (*RollingRestartStrategy, error) { resp := &RollingRestartStrategy{} err := c.rancherClient.doById(ROLLING_RESTART_STRATEGY_TYPE, id, resp) 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 index abcd1bb5b..eb0ac83a5 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_scale_policy.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_scale_policy.go @@ -16,7 +16,8 @@ type ScalePolicy struct { type ScalePolicyCollection struct { Collection - Data []ScalePolicy `json:"data,omitempty"` + Data []ScalePolicy `json:"data,omitempty"` + client *ScalePolicyClient } type ScalePolicyClient struct { @@ -52,9 +53,20 @@ func (c *ScalePolicyClient) Update(existing *ScalePolicy, updates interface{}) ( func (c *ScalePolicyClient) List(opts *ListOpts) (*ScalePolicyCollection, error) { resp := &ScalePolicyCollection{} err := c.rancherClient.doList(SCALE_POLICY_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ScalePolicyCollection) Next() (*ScalePolicyCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ScalePolicyCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ScalePolicyClient) ById(id string) (*ScalePolicy, error) { resp := &ScalePolicy{} err := c.rancherClient.doById(SCALE_POLICY_TYPE, id, resp) 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 index ab7425587..5561fad81 100644 --- 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 @@ -168,7 +168,8 @@ type SecondaryLaunchConfig struct { type SecondaryLaunchConfigCollection struct { Collection - Data []SecondaryLaunchConfig `json:"data,omitempty"` + Data []SecondaryLaunchConfig `json:"data,omitempty"` + client *SecondaryLaunchConfigClient } type SecondaryLaunchConfigClient struct { @@ -242,9 +243,20 @@ func (c *SecondaryLaunchConfigClient) Update(existing *SecondaryLaunchConfig, up func (c *SecondaryLaunchConfigClient) List(opts *ListOpts) (*SecondaryLaunchConfigCollection, error) { resp := &SecondaryLaunchConfigCollection{} err := c.rancherClient.doList(SECONDARY_LAUNCH_CONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *SecondaryLaunchConfigCollection) Next() (*SecondaryLaunchConfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &SecondaryLaunchConfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *SecondaryLaunchConfigClient) ById(id string) (*SecondaryLaunchConfig, error) { resp := &SecondaryLaunchConfig{} err := c.rancherClient.doById(SECONDARY_LAUNCH_CONFIG_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/client/generated_service.go b/vendor/github.com/rancher/go-rancher/client/generated_service.go index 063bcff23..0fd19891c 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_service.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_service.go @@ -74,7 +74,8 @@ type Service struct { type ServiceCollection struct { Collection - Data []Service `json:"data,omitempty"` + Data []Service `json:"data,omitempty"` + client *ServiceClient } type ServiceClient struct { @@ -138,9 +139,20 @@ func (c *ServiceClient) Update(existing *Service, updates interface{}) (*Service func (c *ServiceClient) List(opts *ListOpts) (*ServiceCollection, error) { resp := &ServiceCollection{} err := c.rancherClient.doList(SERVICE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ServiceCollection) Next() (*ServiceCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ServiceCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ServiceClient) ById(id string) (*Service, error) { resp := &Service{} err := c.rancherClient.doById(SERVICE_TYPE, id, resp) 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 index 822a9aac5..138afde3c 100644 --- 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 @@ -42,7 +42,8 @@ type ServiceConsumeMap struct { type ServiceConsumeMapCollection struct { Collection - Data []ServiceConsumeMap `json:"data,omitempty"` + Data []ServiceConsumeMap `json:"data,omitempty"` + client *ServiceConsumeMapClient } type ServiceConsumeMapClient struct { @@ -84,9 +85,20 @@ func (c *ServiceConsumeMapClient) Update(existing *ServiceConsumeMap, updates in func (c *ServiceConsumeMapClient) List(opts *ListOpts) (*ServiceConsumeMapCollection, error) { resp := &ServiceConsumeMapCollection{} err := c.rancherClient.doList(SERVICE_CONSUME_MAP_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ServiceConsumeMapCollection) Next() (*ServiceConsumeMapCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ServiceConsumeMapCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ServiceConsumeMapClient) ById(id string) (*ServiceConsumeMap, error) { resp := &ServiceConsumeMap{} err := c.rancherClient.doById(SERVICE_CONSUME_MAP_TYPE, id, resp) 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 index 7d046b38b..71b3082f6 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_service_event.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_service_event.go @@ -46,7 +46,8 @@ type ServiceEvent struct { type ServiceEventCollection struct { Collection - Data []ServiceEvent `json:"data,omitempty"` + Data []ServiceEvent `json:"data,omitempty"` + client *ServiceEventClient } type ServiceEventClient struct { @@ -86,9 +87,20 @@ func (c *ServiceEventClient) Update(existing *ServiceEvent, updates interface{}) func (c *ServiceEventClient) List(opts *ListOpts) (*ServiceEventCollection, error) { resp := &ServiceEventCollection{} err := c.rancherClient.doList(SERVICE_EVENT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ServiceEventCollection) Next() (*ServiceEventCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ServiceEventCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ServiceEventClient) ById(id string) (*ServiceEvent, error) { resp := &ServiceEvent{} err := c.rancherClient.doById(SERVICE_EVENT_TYPE, id, resp) 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 index 60fe5f2f8..06453bf48 100644 --- 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 @@ -44,7 +44,8 @@ type ServiceExposeMap struct { type ServiceExposeMapCollection struct { Collection - Data []ServiceExposeMap `json:"data,omitempty"` + Data []ServiceExposeMap `json:"data,omitempty"` + client *ServiceExposeMapClient } type ServiceExposeMapClient struct { @@ -84,9 +85,20 @@ func (c *ServiceExposeMapClient) Update(existing *ServiceExposeMap, updates inte func (c *ServiceExposeMapClient) List(opts *ListOpts) (*ServiceExposeMapCollection, error) { resp := &ServiceExposeMapCollection{} err := c.rancherClient.doList(SERVICE_EXPOSE_MAP_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ServiceExposeMapCollection) Next() (*ServiceExposeMapCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ServiceExposeMapCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ServiceExposeMapClient) ById(id string) (*ServiceExposeMap, error) { resp := &ServiceExposeMap{} err := c.rancherClient.doById(SERVICE_EXPOSE_MAP_TYPE, id, resp) 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 index 52c75ac53..9532b2a36 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_service_link.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_service_link.go @@ -16,7 +16,8 @@ type ServiceLink struct { type ServiceLinkCollection struct { Collection - Data []ServiceLink `json:"data,omitempty"` + Data []ServiceLink `json:"data,omitempty"` + client *ServiceLinkClient } type ServiceLinkClient struct { @@ -52,9 +53,20 @@ func (c *ServiceLinkClient) Update(existing *ServiceLink, updates interface{}) ( func (c *ServiceLinkClient) List(opts *ListOpts) (*ServiceLinkCollection, error) { resp := &ServiceLinkCollection{} err := c.rancherClient.doList(SERVICE_LINK_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ServiceLinkCollection) Next() (*ServiceLinkCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ServiceLinkCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ServiceLinkClient) ById(id string) (*ServiceLink, error) { resp := &ServiceLink{} err := c.rancherClient.doById(SERVICE_LINK_TYPE, id, resp) 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 index fd6c32868..2af160e9a 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_service_proxy.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_service_proxy.go @@ -20,7 +20,8 @@ type ServiceProxy struct { type ServiceProxyCollection struct { Collection - Data []ServiceProxy `json:"data,omitempty"` + Data []ServiceProxy `json:"data,omitempty"` + client *ServiceProxyClient } type ServiceProxyClient struct { @@ -56,9 +57,20 @@ func (c *ServiceProxyClient) Update(existing *ServiceProxy, updates interface{}) func (c *ServiceProxyClient) List(opts *ListOpts) (*ServiceProxyCollection, error) { resp := &ServiceProxyCollection{} err := c.rancherClient.doList(SERVICE_PROXY_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ServiceProxyCollection) Next() (*ServiceProxyCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ServiceProxyCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ServiceProxyClient) ById(id string) (*ServiceProxy, error) { resp := &ServiceProxy{} err := c.rancherClient.doById(SERVICE_PROXY_TYPE, id, resp) 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 index 5b95e8c68..5a470186a 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_service_restart.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_service_restart.go @@ -12,7 +12,8 @@ type ServiceRestart struct { type ServiceRestartCollection struct { Collection - Data []ServiceRestart `json:"data,omitempty"` + Data []ServiceRestart `json:"data,omitempty"` + client *ServiceRestartClient } type ServiceRestartClient struct { @@ -48,9 +49,20 @@ func (c *ServiceRestartClient) Update(existing *ServiceRestart, updates interfac func (c *ServiceRestartClient) List(opts *ListOpts) (*ServiceRestartCollection, error) { resp := &ServiceRestartCollection{} err := c.rancherClient.doList(SERVICE_RESTART_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ServiceRestartCollection) Next() (*ServiceRestartCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ServiceRestartCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ServiceRestartClient) ById(id string) (*ServiceRestart, error) { resp := &ServiceRestart{} err := c.rancherClient.doById(SERVICE_RESTART_TYPE, id, resp) 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 index 25b453f2b..1c9748168 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_service_upgrade.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_service_upgrade.go @@ -14,7 +14,8 @@ type ServiceUpgrade struct { type ServiceUpgradeCollection struct { Collection - Data []ServiceUpgrade `json:"data,omitempty"` + Data []ServiceUpgrade `json:"data,omitempty"` + client *ServiceUpgradeClient } type ServiceUpgradeClient struct { @@ -50,9 +51,20 @@ func (c *ServiceUpgradeClient) Update(existing *ServiceUpgrade, updates interfac func (c *ServiceUpgradeClient) List(opts *ListOpts) (*ServiceUpgradeCollection, error) { resp := &ServiceUpgradeCollection{} err := c.rancherClient.doList(SERVICE_UPGRADE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ServiceUpgradeCollection) Next() (*ServiceUpgradeCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ServiceUpgradeCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ServiceUpgradeClient) ById(id string) (*ServiceUpgrade, error) { resp := &ServiceUpgrade{} err := c.rancherClient.doById(SERVICE_UPGRADE_TYPE, id, resp) 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 index 834606b61..621403d39 100644 --- 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 @@ -14,7 +14,8 @@ type ServiceUpgradeStrategy struct { type ServiceUpgradeStrategyCollection struct { Collection - Data []ServiceUpgradeStrategy `json:"data,omitempty"` + Data []ServiceUpgradeStrategy `json:"data,omitempty"` + client *ServiceUpgradeStrategyClient } type ServiceUpgradeStrategyClient struct { @@ -50,9 +51,20 @@ func (c *ServiceUpgradeStrategyClient) Update(existing *ServiceUpgradeStrategy, func (c *ServiceUpgradeStrategyClient) List(opts *ListOpts) (*ServiceUpgradeStrategyCollection, error) { resp := &ServiceUpgradeStrategyCollection{} err := c.rancherClient.doList(SERVICE_UPGRADE_STRATEGY_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ServiceUpgradeStrategyCollection) Next() (*ServiceUpgradeStrategyCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ServiceUpgradeStrategyCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ServiceUpgradeStrategyClient) ById(id string) (*ServiceUpgradeStrategy, error) { resp := &ServiceUpgradeStrategy{} err := c.rancherClient.doById(SERVICE_UPGRADE_STRATEGY_TYPE, id, resp) 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 index d3c0eb91d..1d112c7a7 100644 --- 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 @@ -14,7 +14,8 @@ type ServicesPortRange struct { type ServicesPortRangeCollection struct { Collection - Data []ServicesPortRange `json:"data,omitempty"` + Data []ServicesPortRange `json:"data,omitempty"` + client *ServicesPortRangeClient } type ServicesPortRangeClient struct { @@ -50,9 +51,20 @@ func (c *ServicesPortRangeClient) Update(existing *ServicesPortRange, updates in func (c *ServicesPortRangeClient) List(opts *ListOpts) (*ServicesPortRangeCollection, error) { resp := &ServicesPortRangeCollection{} err := c.rancherClient.doList(SERVICES_PORT_RANGE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ServicesPortRangeCollection) Next() (*ServicesPortRangeCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ServicesPortRangeCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ServicesPortRangeClient) ById(id string) (*ServicesPortRange, error) { resp := &ServicesPortRange{} err := c.rancherClient.doById(SERVICES_PORT_RANGE_TYPE, id, resp) 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 index 96d894512..55d2e3115 100644 --- 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 @@ -12,7 +12,8 @@ type SetLabelsInput struct { type SetLabelsInputCollection struct { Collection - Data []SetLabelsInput `json:"data,omitempty"` + Data []SetLabelsInput `json:"data,omitempty"` + client *SetLabelsInputClient } type SetLabelsInputClient struct { @@ -48,9 +49,20 @@ func (c *SetLabelsInputClient) Update(existing *SetLabelsInput, updates interfac func (c *SetLabelsInputClient) List(opts *ListOpts) (*SetLabelsInputCollection, error) { resp := &SetLabelsInputCollection{} err := c.rancherClient.doList(SET_LABELS_INPUT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *SetLabelsInputCollection) Next() (*SetLabelsInputCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &SetLabelsInputCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *SetLabelsInputClient) ById(id string) (*SetLabelsInput, error) { resp := &SetLabelsInput{} err := c.rancherClient.doById(SET_LABELS_INPUT_TYPE, id, resp) 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 index 76d8684cf..dd57f60cd 100644 --- 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 @@ -12,7 +12,8 @@ type SetLoadBalancerServiceLinksInput struct { type SetLoadBalancerServiceLinksInputCollection struct { Collection - Data []SetLoadBalancerServiceLinksInput `json:"data,omitempty"` + Data []SetLoadBalancerServiceLinksInput `json:"data,omitempty"` + client *SetLoadBalancerServiceLinksInputClient } type SetLoadBalancerServiceLinksInputClient struct { @@ -48,9 +49,20 @@ func (c *SetLoadBalancerServiceLinksInputClient) Update(existing *SetLoadBalance func (c *SetLoadBalancerServiceLinksInputClient) List(opts *ListOpts) (*SetLoadBalancerServiceLinksInputCollection, error) { resp := &SetLoadBalancerServiceLinksInputCollection{} err := c.rancherClient.doList(SET_LOAD_BALANCER_SERVICE_LINKS_INPUT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *SetLoadBalancerServiceLinksInputCollection) Next() (*SetLoadBalancerServiceLinksInputCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &SetLoadBalancerServiceLinksInputCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *SetLoadBalancerServiceLinksInputClient) ById(id string) (*SetLoadBalancerServiceLinksInput, error) { resp := &SetLoadBalancerServiceLinksInput{} err := c.rancherClient.doById(SET_LOAD_BALANCER_SERVICE_LINKS_INPUT_TYPE, id, resp) 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 index bc8c2f201..29cbc786d 100644 --- 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 @@ -12,7 +12,8 @@ type SetProjectMembersInput struct { type SetProjectMembersInputCollection struct { Collection - Data []SetProjectMembersInput `json:"data,omitempty"` + Data []SetProjectMembersInput `json:"data,omitempty"` + client *SetProjectMembersInputClient } type SetProjectMembersInputClient struct { @@ -48,9 +49,20 @@ func (c *SetProjectMembersInputClient) Update(existing *SetProjectMembersInput, func (c *SetProjectMembersInputClient) List(opts *ListOpts) (*SetProjectMembersInputCollection, error) { resp := &SetProjectMembersInputCollection{} err := c.rancherClient.doList(SET_PROJECT_MEMBERS_INPUT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *SetProjectMembersInputCollection) Next() (*SetProjectMembersInputCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &SetProjectMembersInputCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *SetProjectMembersInputClient) ById(id string) (*SetProjectMembersInput, error) { resp := &SetProjectMembersInput{} err := c.rancherClient.doById(SET_PROJECT_MEMBERS_INPUT_TYPE, id, resp) 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 index b471e96c2..9ee69531f 100644 --- 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 @@ -12,7 +12,8 @@ type SetServiceLinksInput struct { type SetServiceLinksInputCollection struct { Collection - Data []SetServiceLinksInput `json:"data,omitempty"` + Data []SetServiceLinksInput `json:"data,omitempty"` + client *SetServiceLinksInputClient } type SetServiceLinksInputClient struct { @@ -48,9 +49,20 @@ func (c *SetServiceLinksInputClient) Update(existing *SetServiceLinksInput, upda func (c *SetServiceLinksInputClient) List(opts *ListOpts) (*SetServiceLinksInputCollection, error) { resp := &SetServiceLinksInputCollection{} err := c.rancherClient.doList(SET_SERVICE_LINKS_INPUT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *SetServiceLinksInputCollection) Next() (*SetServiceLinksInputCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &SetServiceLinksInputCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *SetServiceLinksInputClient) ById(id string) (*SetServiceLinksInput, error) { resp := &SetServiceLinksInput{} err := c.rancherClient.doById(SET_SERVICE_LINKS_INPUT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/client/generated_setting.go b/vendor/github.com/rancher/go-rancher/client/generated_setting.go index 1aa7655b3..02dd2df9c 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_setting.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_setting.go @@ -20,7 +20,8 @@ type Setting struct { type SettingCollection struct { Collection - Data []Setting `json:"data,omitempty"` + Data []Setting `json:"data,omitempty"` + client *SettingClient } type SettingClient struct { @@ -56,9 +57,20 @@ func (c *SettingClient) Update(existing *Setting, updates interface{}) (*Setting func (c *SettingClient) List(opts *ListOpts) (*SettingCollection, error) { resp := &SettingCollection{} err := c.rancherClient.doList(SETTING_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *SettingCollection) Next() (*SettingCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &SettingCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *SettingClient) ById(id string) (*Setting, error) { resp := &Setting{} err := c.rancherClient.doById(SETTING_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/client/generated_snapshot.go b/vendor/github.com/rancher/go-rancher/client/generated_snapshot.go index 554035673..1c4ea033a 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_snapshot.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_snapshot.go @@ -38,7 +38,8 @@ type Snapshot struct { type SnapshotCollection struct { Collection - Data []Snapshot `json:"data,omitempty"` + Data []Snapshot `json:"data,omitempty"` + client *SnapshotClient } type SnapshotClient struct { @@ -80,9 +81,20 @@ func (c *SnapshotClient) Update(existing *Snapshot, updates interface{}) (*Snaps func (c *SnapshotClient) List(opts *ListOpts) (*SnapshotCollection, error) { resp := &SnapshotCollection{} err := c.rancherClient.doList(SNAPSHOT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *SnapshotCollection) Next() (*SnapshotCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &SnapshotCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *SnapshotClient) ById(id string) (*Snapshot, error) { resp := &Snapshot{} err := c.rancherClient.doById(SNAPSHOT_TYPE, id, resp) 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 index deb2fcc1b..9577ee6f5 100644 --- 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 @@ -18,7 +18,8 @@ type SnapshotBackupInput struct { type SnapshotBackupInputCollection struct { Collection - Data []SnapshotBackupInput `json:"data,omitempty"` + Data []SnapshotBackupInput `json:"data,omitempty"` + client *SnapshotBackupInputClient } type SnapshotBackupInputClient struct { @@ -58,9 +59,20 @@ func (c *SnapshotBackupInputClient) Update(existing *SnapshotBackupInput, update func (c *SnapshotBackupInputClient) List(opts *ListOpts) (*SnapshotBackupInputCollection, error) { resp := &SnapshotBackupInputCollection{} err := c.rancherClient.doList(SNAPSHOT_BACKUP_INPUT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *SnapshotBackupInputCollection) Next() (*SnapshotBackupInputCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &SnapshotBackupInputCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *SnapshotBackupInputClient) ById(id string) (*SnapshotBackupInput, error) { resp := &SnapshotBackupInput{} err := c.rancherClient.doById(SNAPSHOT_BACKUP_INPUT_TYPE, id, resp) 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 index d763903f4..4fb565537 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_state_transition.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_state_transition.go @@ -10,7 +10,8 @@ type StateTransition struct { type StateTransitionCollection struct { Collection - Data []StateTransition `json:"data,omitempty"` + Data []StateTransition `json:"data,omitempty"` + client *StateTransitionClient } type StateTransitionClient struct { @@ -46,9 +47,20 @@ func (c *StateTransitionClient) Update(existing *StateTransition, updates interf func (c *StateTransitionClient) List(opts *ListOpts) (*StateTransitionCollection, error) { resp := &StateTransitionCollection{} err := c.rancherClient.doList(STATE_TRANSITION_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *StateTransitionCollection) Next() (*StateTransitionCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &StateTransitionCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *StateTransitionClient) ById(id string) (*StateTransition, error) { resp := &StateTransition{} err := c.rancherClient.doById(STATE_TRANSITION_TYPE, id, resp) 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 index 1ec4d45be..1b7d814f3 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_stats_access.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_stats_access.go @@ -14,7 +14,8 @@ type StatsAccess struct { type StatsAccessCollection struct { Collection - Data []StatsAccess `json:"data,omitempty"` + Data []StatsAccess `json:"data,omitempty"` + client *StatsAccessClient } type StatsAccessClient struct { @@ -50,9 +51,20 @@ func (c *StatsAccessClient) Update(existing *StatsAccess, updates interface{}) ( func (c *StatsAccessClient) List(opts *ListOpts) (*StatsAccessCollection, error) { resp := &StatsAccessCollection{} err := c.rancherClient.doList(STATS_ACCESS_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *StatsAccessCollection) Next() (*StatsAccessCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &StatsAccessCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *StatsAccessClient) ById(id string) (*StatsAccess, error) { resp := &StatsAccess{} err := c.rancherClient.doById(STATS_ACCESS_TYPE, id, resp) 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 index 1175cfd8a..92448dedf 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_storage_pool.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_storage_pool.go @@ -46,7 +46,8 @@ type StoragePool struct { type StoragePoolCollection struct { Collection - Data []StoragePool `json:"data,omitempty"` + Data []StoragePool `json:"data,omitempty"` + client *StoragePoolClient } type StoragePoolClient struct { @@ -96,9 +97,20 @@ func (c *StoragePoolClient) Update(existing *StoragePool, updates interface{}) ( func (c *StoragePoolClient) List(opts *ListOpts) (*StoragePoolCollection, error) { resp := &StoragePoolCollection{} err := c.rancherClient.doList(STORAGE_POOL_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *StoragePoolCollection) Next() (*StoragePoolCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &StoragePoolCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *StoragePoolClient) ById(id string) (*StoragePool, error) { resp := &StoragePool{} err := c.rancherClient.doById(STORAGE_POOL_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/client/generated_subscribe.go b/vendor/github.com/rancher/go-rancher/client/generated_subscribe.go index b8c6aa072..ec908982a 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_subscribe.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_subscribe.go @@ -14,7 +14,8 @@ type Subscribe struct { type SubscribeCollection struct { Collection - Data []Subscribe `json:"data,omitempty"` + Data []Subscribe `json:"data,omitempty"` + client *SubscribeClient } type SubscribeClient struct { @@ -50,9 +51,20 @@ func (c *SubscribeClient) Update(existing *Subscribe, updates interface{}) (*Sub func (c *SubscribeClient) List(opts *ListOpts) (*SubscribeCollection, error) { resp := &SubscribeCollection{} err := c.rancherClient.doList(SUBSCRIBE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *SubscribeCollection) Next() (*SubscribeCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &SubscribeCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *SubscribeClient) ById(id string) (*Subscribe, error) { resp := &Subscribe{} err := c.rancherClient.doById(SUBSCRIBE_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/client/generated_task.go b/vendor/github.com/rancher/go-rancher/client/generated_task.go index 13730c4ee..8fa65e2db 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_task.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_task.go @@ -12,7 +12,8 @@ type Task struct { type TaskCollection struct { Collection - Data []Task `json:"data,omitempty"` + Data []Task `json:"data,omitempty"` + client *TaskClient } type TaskClient struct { @@ -50,9 +51,20 @@ func (c *TaskClient) Update(existing *Task, updates interface{}) (*Task, error) func (c *TaskClient) List(opts *ListOpts) (*TaskCollection, error) { resp := &TaskCollection{} err := c.rancherClient.doList(TASK_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *TaskCollection) Next() (*TaskCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &TaskCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *TaskClient) ById(id string) (*Task, error) { resp := &Task{} err := c.rancherClient.doById(TASK_TYPE, id, resp) 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 index 52739b118..5bb58273e 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_task_instance.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_task_instance.go @@ -22,7 +22,8 @@ type TaskInstance struct { type TaskInstanceCollection struct { Collection - Data []TaskInstance `json:"data,omitempty"` + Data []TaskInstance `json:"data,omitempty"` + client *TaskInstanceClient } type TaskInstanceClient struct { @@ -58,9 +59,20 @@ func (c *TaskInstanceClient) Update(existing *TaskInstance, updates interface{}) func (c *TaskInstanceClient) List(opts *ListOpts) (*TaskInstanceCollection, error) { resp := &TaskInstanceCollection{} err := c.rancherClient.doList(TASK_INSTANCE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *TaskInstanceCollection) Next() (*TaskInstanceCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &TaskInstanceCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *TaskInstanceClient) ById(id string) (*TaskInstance, error) { resp := &TaskInstance{} err := c.rancherClient.doById(TASK_INSTANCE_TYPE, id, resp) 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 index 3abdc456f..3ed74115c 100644 --- 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 @@ -20,7 +20,8 @@ type ToServiceUpgradeStrategy struct { type ToServiceUpgradeStrategyCollection struct { Collection - Data []ToServiceUpgradeStrategy `json:"data,omitempty"` + Data []ToServiceUpgradeStrategy `json:"data,omitempty"` + client *ToServiceUpgradeStrategyClient } type ToServiceUpgradeStrategyClient struct { @@ -56,9 +57,20 @@ func (c *ToServiceUpgradeStrategyClient) Update(existing *ToServiceUpgradeStrate func (c *ToServiceUpgradeStrategyClient) List(opts *ListOpts) (*ToServiceUpgradeStrategyCollection, error) { resp := &ToServiceUpgradeStrategyCollection{} err := c.rancherClient.doList(TO_SERVICE_UPGRADE_STRATEGY_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ToServiceUpgradeStrategyCollection) Next() (*ToServiceUpgradeStrategyCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ToServiceUpgradeStrategyCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ToServiceUpgradeStrategyClient) ById(id string) (*ToServiceUpgradeStrategy, error) { resp := &ToServiceUpgradeStrategy{} err := c.rancherClient.doById(TO_SERVICE_UPGRADE_STRATEGY_TYPE, id, resp) 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 index dc1d5ef82..cdfe18649 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_type_documentation.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_type_documentation.go @@ -14,7 +14,8 @@ type TypeDocumentation struct { type TypeDocumentationCollection struct { Collection - Data []TypeDocumentation `json:"data,omitempty"` + Data []TypeDocumentation `json:"data,omitempty"` + client *TypeDocumentationClient } type TypeDocumentationClient struct { @@ -50,9 +51,20 @@ func (c *TypeDocumentationClient) Update(existing *TypeDocumentation, updates in func (c *TypeDocumentationClient) List(opts *ListOpts) (*TypeDocumentationCollection, error) { resp := &TypeDocumentationCollection{} err := c.rancherClient.doList(TYPE_DOCUMENTATION_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *TypeDocumentationCollection) Next() (*TypeDocumentationCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &TypeDocumentationCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *TypeDocumentationClient) ById(id string) (*TypeDocumentation, error) { resp := &TypeDocumentation{} err := c.rancherClient.doById(TYPE_DOCUMENTATION_TYPE, id, resp) 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 index cf8abedfb..a41f3b5a6 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_virtual_machine.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_virtual_machine.go @@ -126,7 +126,8 @@ type VirtualMachine struct { type VirtualMachineCollection struct { Collection - Data []VirtualMachine `json:"data,omitempty"` + Data []VirtualMachine `json:"data,omitempty"` + client *VirtualMachineClient } type VirtualMachineClient struct { @@ -202,9 +203,20 @@ func (c *VirtualMachineClient) Update(existing *VirtualMachine, updates interfac func (c *VirtualMachineClient) List(opts *ListOpts) (*VirtualMachineCollection, error) { resp := &VirtualMachineCollection{} err := c.rancherClient.doList(VIRTUAL_MACHINE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *VirtualMachineCollection) Next() (*VirtualMachineCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &VirtualMachineCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *VirtualMachineClient) ById(id string) (*VirtualMachine, error) { resp := &VirtualMachine{} err := c.rancherClient.doById(VIRTUAL_MACHINE_TYPE, id, resp) 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 index 7e1e8a526..af52418d3 100644 --- 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 @@ -24,7 +24,8 @@ type VirtualMachineDisk struct { type VirtualMachineDiskCollection struct { Collection - Data []VirtualMachineDisk `json:"data,omitempty"` + Data []VirtualMachineDisk `json:"data,omitempty"` + client *VirtualMachineDiskClient } type VirtualMachineDiskClient struct { @@ -60,9 +61,20 @@ func (c *VirtualMachineDiskClient) Update(existing *VirtualMachineDisk, updates func (c *VirtualMachineDiskClient) List(opts *ListOpts) (*VirtualMachineDiskCollection, error) { resp := &VirtualMachineDiskCollection{} err := c.rancherClient.doList(VIRTUAL_MACHINE_DISK_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *VirtualMachineDiskCollection) Next() (*VirtualMachineDiskCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &VirtualMachineDiskCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *VirtualMachineDiskClient) ById(id string) (*VirtualMachineDisk, error) { resp := &VirtualMachineDisk{} err := c.rancherClient.doById(VIRTUAL_MACHINE_DISK_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/client/generated_volume.go b/vendor/github.com/rancher/go-rancher/client/generated_volume.go index 395deb6de..02ea2e518 100644 --- a/vendor/github.com/rancher/go-rancher/client/generated_volume.go +++ b/vendor/github.com/rancher/go-rancher/client/generated_volume.go @@ -52,7 +52,8 @@ type Volume struct { type VolumeCollection struct { Collection - Data []Volume `json:"data,omitempty"` + Data []Volume `json:"data,omitempty"` + client *VolumeClient } type VolumeClient struct { @@ -110,9 +111,20 @@ func (c *VolumeClient) Update(existing *Volume, updates interface{}) (*Volume, e func (c *VolumeClient) List(opts *ListOpts) (*VolumeCollection, error) { resp := &VolumeCollection{} err := c.rancherClient.doList(VOLUME_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *VolumeCollection) Next() (*VolumeCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &VolumeCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *VolumeClient) ById(id string) (*Volume, error) { resp := &Volume{} err := c.rancherClient.doById(VOLUME_TYPE, id, resp) 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 index 10df7edea..2e2425a26 100644 --- 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 @@ -12,7 +12,8 @@ type VolumeSnapshotInput struct { type VolumeSnapshotInputCollection struct { Collection - Data []VolumeSnapshotInput `json:"data,omitempty"` + Data []VolumeSnapshotInput `json:"data,omitempty"` + client *VolumeSnapshotInputClient } type VolumeSnapshotInputClient struct { @@ -48,9 +49,20 @@ func (c *VolumeSnapshotInputClient) Update(existing *VolumeSnapshotInput, update func (c *VolumeSnapshotInputClient) List(opts *ListOpts) (*VolumeSnapshotInputCollection, error) { resp := &VolumeSnapshotInputCollection{} err := c.rancherClient.doList(VOLUME_SNAPSHOT_INPUT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *VolumeSnapshotInputCollection) Next() (*VolumeSnapshotInputCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &VolumeSnapshotInputCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *VolumeSnapshotInputClient) ById(id string) (*VolumeSnapshotInput, error) { resp := &VolumeSnapshotInput{} err := c.rancherClient.doById(VOLUME_SNAPSHOT_INPUT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/client/schemas.go b/vendor/github.com/rancher/go-rancher/client/schemas.go index e5fd2f54f..53d094066 100644 --- a/vendor/github.com/rancher/go-rancher/client/schemas.go +++ b/vendor/github.com/rancher/go-rancher/client/schemas.go @@ -75,6 +75,9 @@ func typeToFields(t reflect.Type) map[string]Field { case fieldString == "slice": // HACK schemaField.Type = "array[string]" + case fieldString == "struct": + schemaField.Type = typeField.Type.String() + } name := strings.Split(typeField.Tag.Get("json"), ",")[0] diff --git a/vendor/github.com/rancher/go-rancher/v2/client.go b/vendor/github.com/rancher/go-rancher/v2/client.go index 0b14ada3a..fef9e40fa 100644 --- a/vendor/github.com/rancher/go-rancher/v2/client.go +++ b/vendor/github.com/rancher/go-rancher/v2/client.go @@ -1,7 +1,39 @@ package client -type RancherBaseClient struct { +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 + GetOpts() *ClientOpts + GetSchemas() *Schemas + GetTypes() map[string]Schema + + doGet(string, *ListOpts, interface{}) error + doList(string, *ListOpts, interface{}) error + doNext(string, 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/rancher/go-rancher/v2/common.go b/vendor/github.com/rancher/go-rancher/v2/common.go index 910285996..7663cc67c 100644 --- a/vendor/github.com/rancher/go-rancher/v2/common.go +++ b/vendor/github.com/rancher/go-rancher/v2/common.go @@ -10,6 +10,7 @@ import ( "net/url" "os" "regexp" + "strings" "time" "github.com/gorilla/websocket" @@ -128,7 +129,19 @@ func appendFilters(urlString string, filters map[string]interface{}) (string, er return u.String(), nil } -func setupRancherBaseClient(rancherClient *RancherBaseClient, opts *ClientOpts) error { +func setupRancherBaseClient(rancherClient *RancherBaseClientImpl, opts *ClientOpts) error { + u, err := url.Parse(opts.Url) + if err != nil { + return err + } + + if u.Path == "" || u.Path == "/" { + u.Path = "v2-beta" + } else if u.Path == "/v1" || strings.HasPrefix(u.Path, "/v1/") { + u.Path = strings.Replace(u.Path, "/v1", "/v2-beta", 1) + } + opts.Url = u.String() + if opts.Timeout == 0 { opts.Timeout = time.Second * 10 } @@ -202,18 +215,18 @@ func NewListOpts() *ListOpts { } } -func (rancherClient *RancherBaseClient) setupRequest(req *http.Request) { +func (rancherClient *RancherBaseClientImpl) setupRequest(req *http.Request) { req.SetBasicAuth(rancherClient.Opts.AccessKey, rancherClient.Opts.SecretKey) } -func (rancherClient *RancherBaseClient) newHttpClient() *http.Client { +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 *RancherBaseClient) doDelete(url string) error { +func (rancherClient *RancherBaseClientImpl) doDelete(url string) error { client := rancherClient.newHttpClient() req, err := http.NewRequest("DELETE", url, nil) if err != nil { @@ -237,11 +250,11 @@ func (rancherClient *RancherBaseClient) doDelete(url string) error { return nil } -func (rancherClient *RancherBaseClient) Websocket(url string, headers map[string][]string) (*websocket.Conn, *http.Response, error) { +func (rancherClient *RancherBaseClientImpl) 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 { +func (rancherClient *RancherBaseClientImpl) doGet(url string, opts *ListOpts, respObject interface{}) error { if opts == nil { opts = NewListOpts() } @@ -289,11 +302,11 @@ func (rancherClient *RancherBaseClient) doGet(url string, opts *ListOpts, respOb return nil } -func (rancherClient *RancherBaseClient) List(schemaType string, opts *ListOpts, respObject interface{}) error { +func (rancherClient *RancherBaseClientImpl) 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 { +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 + "]") @@ -311,11 +324,15 @@ func (rancherClient *RancherBaseClient) doList(schemaType string, opts *ListOpts return rancherClient.doGet(collectionUrl, opts, respObject) } -func (rancherClient *RancherBaseClient) Post(url string, createObj interface{}, respObject interface{}) error { +func (rancherClient *RancherBaseClientImpl) doNext(nextUrl string, respObject interface{}) error { + return rancherClient.doGet(nextUrl, nil, respObject) +} + +func (rancherClient *RancherBaseClientImpl) 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 { +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) @@ -324,7 +341,7 @@ func (rancherClient *RancherBaseClient) GetLink(resource Resource, link string, return rancherClient.doGet(url, &ListOpts{}, respObject) } -func (rancherClient *RancherBaseClient) doModify(method string, url string, createObj interface{}, respObject interface{}) error { +func (rancherClient *RancherBaseClientImpl) doModify(method string, url string, createObj interface{}, respObject interface{}) error { bodyContent, err := json.Marshal(createObj) if err != nil { return err @@ -371,11 +388,11 @@ func (rancherClient *RancherBaseClient) doModify(method string, url string, crea return nil } -func (rancherClient *RancherBaseClient) Create(schemaType string, createObj interface{}, respObject interface{}) error { +func (rancherClient *RancherBaseClientImpl) 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 { +func (rancherClient *RancherBaseClientImpl) doCreate(schemaType string, createObj interface{}, respObject interface{}) error { if createObj == nil { createObj = map[string]string{} } @@ -403,11 +420,11 @@ func (rancherClient *RancherBaseClient) doCreate(schemaType string, createObj in return rancherClient.doModify("POST", collectionUrl, createObj, respObject) } -func (rancherClient *RancherBaseClient) Update(schemaType string, existing *Resource, updates interface{}, respObject interface{}) error { +func (rancherClient *RancherBaseClientImpl) 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 { +func (rancherClient *RancherBaseClientImpl) doUpdate(schemaType string, existing *Resource, updates interface{}, respObject interface{}) error { if existing == nil { return errors.New("Existing object is nil") } @@ -437,11 +454,11 @@ func (rancherClient *RancherBaseClient) doUpdate(schemaType string, existing *Re return rancherClient.doModify("PUT", selfUrl, updates, respObject) } -func (rancherClient *RancherBaseClient) ById(schemaType string, id string, respObject interface{}) error { +func (rancherClient *RancherBaseClientImpl) 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 { +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 + "]") @@ -461,14 +478,14 @@ func (rancherClient *RancherBaseClient) doById(schemaType string, id string, res return err } -func (rancherClient *RancherBaseClient) Delete(existing *Resource) error { +func (rancherClient *RancherBaseClientImpl) Delete(existing *Resource) error { if existing == nil { return nil } return rancherClient.doResourceDelete(existing.Type, existing) } -func (rancherClient *RancherBaseClient) doResourceDelete(schemaType string, existing *Resource) error { +func (rancherClient *RancherBaseClientImpl) doResourceDelete(schemaType string, existing *Resource) error { schema, ok := rancherClient.Types[schemaType] if !ok { return errors.New("Unknown schema type [" + schemaType + "]") @@ -486,7 +503,7 @@ func (rancherClient *RancherBaseClient) doResourceDelete(schemaType string, exis return rancherClient.doDelete(selfUrl) } -func (rancherClient *RancherBaseClient) Reload(existing *Resource, output interface{}) error { +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)) @@ -495,12 +512,12 @@ func (rancherClient *RancherBaseClient) Reload(existing *Resource, output interf return rancherClient.doGet(selfUrl, NewListOpts(), output) } -func (rancherClient *RancherBaseClient) Action(schemaType string, action string, +func (rancherClient *RancherBaseClientImpl) 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, +func (rancherClient *RancherBaseClientImpl) doAction(schemaType string, action string, existing *Resource, inputObject, respObject interface{}) error { if existing == nil { @@ -563,6 +580,18 @@ func (rancherClient *RancherBaseClient) doAction(schemaType string, action strin return json.Unmarshal(byteContent, respObject) } +func (rancherClient *RancherBaseClientImpl) GetOpts() *ClientOpts { + return rancherClient.Opts +} + +func (rancherClient *RancherBaseClientImpl) GetSchemas() *Schemas { + return rancherClient.Schemas +} + +func (rancherClient *RancherBaseClientImpl) GetTypes() map[string]Schema { + return rancherClient.Types +} + func init() { debug = os.Getenv("RANCHER_CLIENT_DEBUG") == "true" if debug { diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_account.go b/vendor/github.com/rancher/go-rancher/v2/generated_account.go index 3e95989ec..1697ae0dd 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_account.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_account.go @@ -40,7 +40,8 @@ type Account struct { type AccountCollection struct { Collection - Data []Account `json:"data,omitempty"` + Data []Account `json:"data,omitempty"` + client *AccountClient } type AccountClient struct { @@ -90,9 +91,20 @@ func (c *AccountClient) Update(existing *Account, updates interface{}) (*Account func (c *AccountClient) List(opts *ListOpts) (*AccountCollection, error) { resp := &AccountCollection{} err := c.rancherClient.doList(ACCOUNT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *AccountCollection) Next() (*AccountCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &AccountCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *AccountClient) ById(id string) (*Account, error) { resp := &Account{} err := c.rancherClient.doById(ACCOUNT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_active_setting.go b/vendor/github.com/rancher/go-rancher/v2/generated_active_setting.go index c8db84705..b1799a31d 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_active_setting.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_active_setting.go @@ -20,7 +20,8 @@ type ActiveSetting struct { type ActiveSettingCollection struct { Collection - Data []ActiveSetting `json:"data,omitempty"` + Data []ActiveSetting `json:"data,omitempty"` + client *ActiveSettingClient } type ActiveSettingClient struct { @@ -56,9 +57,20 @@ func (c *ActiveSettingClient) Update(existing *ActiveSetting, updates interface{ func (c *ActiveSettingClient) List(opts *ListOpts) (*ActiveSettingCollection, error) { resp := &ActiveSettingCollection{} err := c.rancherClient.doList(ACTIVE_SETTING_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ActiveSettingCollection) Next() (*ActiveSettingCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ActiveSettingCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ActiveSettingClient) ById(id string) (*ActiveSetting, error) { resp := &ActiveSetting{} err := c.rancherClient.doById(ACTIVE_SETTING_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_add_outputs_input.go b/vendor/github.com/rancher/go-rancher/v2/generated_add_outputs_input.go index b2d51c73f..88bf4a7eb 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_add_outputs_input.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_add_outputs_input.go @@ -12,7 +12,8 @@ type AddOutputsInput struct { type AddOutputsInputCollection struct { Collection - Data []AddOutputsInput `json:"data,omitempty"` + Data []AddOutputsInput `json:"data,omitempty"` + client *AddOutputsInputClient } type AddOutputsInputClient struct { @@ -48,9 +49,20 @@ func (c *AddOutputsInputClient) Update(existing *AddOutputsInput, updates interf func (c *AddOutputsInputClient) List(opts *ListOpts) (*AddOutputsInputCollection, error) { resp := &AddOutputsInputCollection{} err := c.rancherClient.doList(ADD_OUTPUTS_INPUT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *AddOutputsInputCollection) Next() (*AddOutputsInputCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &AddOutputsInputCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *AddOutputsInputClient) ById(id string) (*AddOutputsInput, error) { resp := &AddOutputsInput{} err := c.rancherClient.doById(ADD_OUTPUTS_INPUT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_add_remove_load_balancer_service_link_input.go b/vendor/github.com/rancher/go-rancher/v2/generated_add_remove_load_balancer_service_link_input.go index a5f010ef8..bcffcd35e 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_add_remove_load_balancer_service_link_input.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_add_remove_load_balancer_service_link_input.go @@ -12,7 +12,8 @@ type AddRemoveLoadBalancerServiceLinkInput struct { type AddRemoveLoadBalancerServiceLinkInputCollection struct { Collection - Data []AddRemoveLoadBalancerServiceLinkInput `json:"data,omitempty"` + Data []AddRemoveLoadBalancerServiceLinkInput `json:"data,omitempty"` + client *AddRemoveLoadBalancerServiceLinkInputClient } type AddRemoveLoadBalancerServiceLinkInputClient struct { @@ -48,9 +49,20 @@ func (c *AddRemoveLoadBalancerServiceLinkInputClient) Update(existing *AddRemove func (c *AddRemoveLoadBalancerServiceLinkInputClient) List(opts *ListOpts) (*AddRemoveLoadBalancerServiceLinkInputCollection, error) { resp := &AddRemoveLoadBalancerServiceLinkInputCollection{} err := c.rancherClient.doList(ADD_REMOVE_LOAD_BALANCER_SERVICE_LINK_INPUT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *AddRemoveLoadBalancerServiceLinkInputCollection) Next() (*AddRemoveLoadBalancerServiceLinkInputCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &AddRemoveLoadBalancerServiceLinkInputCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *AddRemoveLoadBalancerServiceLinkInputClient) ById(id string) (*AddRemoveLoadBalancerServiceLinkInput, error) { resp := &AddRemoveLoadBalancerServiceLinkInput{} err := c.rancherClient.doById(ADD_REMOVE_LOAD_BALANCER_SERVICE_LINK_INPUT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_add_remove_service_link_input.go b/vendor/github.com/rancher/go-rancher/v2/generated_add_remove_service_link_input.go index 82c7d18bd..5366b4841 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_add_remove_service_link_input.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_add_remove_service_link_input.go @@ -12,7 +12,8 @@ type AddRemoveServiceLinkInput struct { type AddRemoveServiceLinkInputCollection struct { Collection - Data []AddRemoveServiceLinkInput `json:"data,omitempty"` + Data []AddRemoveServiceLinkInput `json:"data,omitempty"` + client *AddRemoveServiceLinkInputClient } type AddRemoveServiceLinkInputClient struct { @@ -48,9 +49,20 @@ func (c *AddRemoveServiceLinkInputClient) Update(existing *AddRemoveServiceLinkI func (c *AddRemoveServiceLinkInputClient) List(opts *ListOpts) (*AddRemoveServiceLinkInputCollection, error) { resp := &AddRemoveServiceLinkInputCollection{} err := c.rancherClient.doList(ADD_REMOVE_SERVICE_LINK_INPUT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *AddRemoveServiceLinkInputCollection) Next() (*AddRemoveServiceLinkInputCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &AddRemoveServiceLinkInputCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *AddRemoveServiceLinkInputClient) ById(id string) (*AddRemoveServiceLinkInput, error) { resp := &AddRemoveServiceLinkInput{} err := c.rancherClient.doById(ADD_REMOVE_SERVICE_LINK_INPUT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_agent.go b/vendor/github.com/rancher/go-rancher/v2/generated_agent.go index d3bfb0729..3a1f423ec 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_agent.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_agent.go @@ -40,7 +40,8 @@ type Agent struct { type AgentCollection struct { Collection - Data []Agent `json:"data,omitempty"` + Data []Agent `json:"data,omitempty"` + client *AgentClient } type AgentClient struct { @@ -94,9 +95,20 @@ func (c *AgentClient) Update(existing *Agent, updates interface{}) (*Agent, erro func (c *AgentClient) List(opts *ListOpts) (*AgentCollection, error) { resp := &AgentCollection{} err := c.rancherClient.doList(AGENT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *AgentCollection) Next() (*AgentCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &AgentCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *AgentClient) ById(id string) (*Agent, error) { resp := &Agent{} err := c.rancherClient.doById(AGENT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_amazonec2config.go b/vendor/github.com/rancher/go-rancher/v2/generated_amazonec2config.go index 9102e4f52..80be6ab1c 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_amazonec2config.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_amazonec2config.go @@ -13,14 +13,20 @@ type Amazonec2Config struct { DeviceName string `json:"deviceName,omitempty" yaml:"device_name,omitempty"` + Endpoint string `json:"endpoint,omitempty" yaml:"endpoint,omitempty"` + IamInstanceProfile string `json:"iamInstanceProfile,omitempty" yaml:"iam_instance_profile,omitempty"` + InsecureTransport bool `json:"insecureTransport,omitempty" yaml:"insecure_transport,omitempty"` + InstanceType string `json:"instanceType,omitempty" yaml:"instance_type,omitempty"` KeypairName string `json:"keypairName,omitempty" yaml:"keypair_name,omitempty"` Monitoring bool `json:"monitoring,omitempty" yaml:"monitoring,omitempty"` + OpenPort []string `json:"openPort,omitempty" yaml:"open_port,omitempty"` + PrivateAddressOnly bool `json:"privateAddressOnly,omitempty" yaml:"private_address_only,omitempty"` Region string `json:"region,omitempty" yaml:"region,omitempty"` @@ -60,7 +66,8 @@ type Amazonec2Config struct { type Amazonec2ConfigCollection struct { Collection - Data []Amazonec2Config `json:"data,omitempty"` + Data []Amazonec2Config `json:"data,omitempty"` + client *Amazonec2ConfigClient } type Amazonec2ConfigClient struct { @@ -96,9 +103,20 @@ func (c *Amazonec2ConfigClient) Update(existing *Amazonec2Config, updates interf func (c *Amazonec2ConfigClient) List(opts *ListOpts) (*Amazonec2ConfigCollection, error) { resp := &Amazonec2ConfigCollection{} err := c.rancherClient.doList(AMAZONEC2CONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *Amazonec2ConfigCollection) Next() (*Amazonec2ConfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &Amazonec2ConfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *Amazonec2ConfigClient) ById(id string) (*Amazonec2Config, error) { resp := &Amazonec2Config{} err := c.rancherClient.doById(AMAZONEC2CONFIG_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_api_key.go b/vendor/github.com/rancher/go-rancher/v2/generated_api_key.go index c0f9c50ea..91dc09dca 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_api_key.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_api_key.go @@ -40,7 +40,8 @@ type ApiKey struct { type ApiKeyCollection struct { Collection - Data []ApiKey `json:"data,omitempty"` + Data []ApiKey `json:"data,omitempty"` + client *ApiKeyClient } type ApiKeyClient struct { @@ -88,9 +89,20 @@ func (c *ApiKeyClient) Update(existing *ApiKey, updates interface{}) (*ApiKey, e func (c *ApiKeyClient) List(opts *ListOpts) (*ApiKeyCollection, error) { resp := &ApiKeyCollection{} err := c.rancherClient.doList(API_KEY_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ApiKeyCollection) Next() (*ApiKeyCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ApiKeyCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ApiKeyClient) ById(id string) (*ApiKey, error) { resp := &ApiKey{} err := c.rancherClient.doById(API_KEY_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_audit_log.go b/vendor/github.com/rancher/go-rancher/v2/generated_audit_log.go index d8ff08fb5..1c9d4ae0e 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_audit_log.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_audit_log.go @@ -38,7 +38,8 @@ type AuditLog struct { type AuditLogCollection struct { Collection - Data []AuditLog `json:"data,omitempty"` + Data []AuditLog `json:"data,omitempty"` + client *AuditLogClient } type AuditLogClient struct { @@ -74,9 +75,20 @@ func (c *AuditLogClient) Update(existing *AuditLog, updates interface{}) (*Audit func (c *AuditLogClient) List(opts *ListOpts) (*AuditLogCollection, error) { resp := &AuditLogCollection{} err := c.rancherClient.doList(AUDIT_LOG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *AuditLogCollection) Next() (*AuditLogCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &AuditLogCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *AuditLogClient) ById(id string) (*AuditLog, error) { resp := &AuditLog{} err := c.rancherClient.doById(AUDIT_LOG_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_azure_config.go b/vendor/github.com/rancher/go-rancher/v2/generated_azure_config.go index 8f9de8e22..4647a1d8f 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_azure_config.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_azure_config.go @@ -7,52 +7,33 @@ const ( type AzureConfig struct { Resource - AvailabilitySet string `json:"availabilitySet,omitempty" yaml:"availability_set,omitempty"` - - ClientId string `json:"clientId,omitempty" yaml:"client_id,omitempty"` - - ClientSecret string `json:"clientSecret,omitempty" yaml:"client_secret,omitempty"` - - CustomData string `json:"customData,omitempty" yaml:"custom_data,omitempty"` - DockerPort string `json:"dockerPort,omitempty" yaml:"docker_port,omitempty"` - Environment string `json:"environment,omitempty" yaml:"environment,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"` - NoPublicIp bool `json:"noPublicIp,omitempty" yaml:"no_public_ip,omitempty"` + Password string `json:"password,omitempty" yaml:"password,omitempty"` - OpenPort []string `json:"openPort,omitempty" yaml:"open_port,omitempty"` - - PrivateIpAddress string `json:"privateIpAddress,omitempty" yaml:"private_ip_address,omitempty"` - - ResourceGroup string `json:"resourceGroup,omitempty" yaml:"resource_group,omitempty"` + PublishSettingsFile string `json:"publishSettingsFile,omitempty" yaml:"publish_settings_file,omitempty"` Size string `json:"size,omitempty" yaml:"size,omitempty"` - SshUser string `json:"sshUser,omitempty" yaml:"ssh_user,omitempty"` - - StaticPublicIp bool `json:"staticPublicIp,omitempty" yaml:"static_public_ip,omitempty"` + SshPort string `json:"sshPort,omitempty" yaml:"ssh_port,omitempty"` - StorageType string `json:"storageType,omitempty" yaml:"storage_type,omitempty"` - - Subnet string `json:"subnet,omitempty" yaml:"subnet,omitempty"` - - SubnetPrefix string `json:"subnetPrefix,omitempty" yaml:"subnet_prefix,omitempty"` + SubscriptionCert string `json:"subscriptionCert,omitempty" yaml:"subscription_cert,omitempty"` SubscriptionId string `json:"subscriptionId,omitempty" yaml:"subscription_id,omitempty"` - UsePrivateIp bool `json:"usePrivateIp,omitempty" yaml:"use_private_ip,omitempty"` - - Vnet string `json:"vnet,omitempty" yaml:"vnet,omitempty"` + Username string `json:"username,omitempty" yaml:"username,omitempty"` } type AzureConfigCollection struct { Collection - Data []AzureConfig `json:"data,omitempty"` + Data []AzureConfig `json:"data,omitempty"` + client *AzureConfigClient } type AzureConfigClient struct { @@ -88,9 +69,20 @@ func (c *AzureConfigClient) Update(existing *AzureConfig, updates interface{}) ( func (c *AzureConfigClient) List(opts *ListOpts) (*AzureConfigCollection, error) { resp := &AzureConfigCollection{} err := c.rancherClient.doList(AZURE_CONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *AzureConfigCollection) Next() (*AzureConfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &AzureConfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *AzureConfigClient) ById(id string) (*AzureConfig, error) { resp := &AzureConfig{} err := c.rancherClient.doById(AZURE_CONFIG_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_azureadconfig.go b/vendor/github.com/rancher/go-rancher/v2/generated_azureadconfig.go index fe741e2e1..5b3117fc8 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_azureadconfig.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_azureadconfig.go @@ -26,7 +26,8 @@ type Azureadconfig struct { type AzureadconfigCollection struct { Collection - Data []Azureadconfig `json:"data,omitempty"` + Data []Azureadconfig `json:"data,omitempty"` + client *AzureadconfigClient } type AzureadconfigClient struct { @@ -62,9 +63,20 @@ func (c *AzureadconfigClient) Update(existing *Azureadconfig, updates interface{ func (c *AzureadconfigClient) List(opts *ListOpts) (*AzureadconfigCollection, error) { resp := &AzureadconfigCollection{} err := c.rancherClient.doList(AZUREADCONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *AzureadconfigCollection) Next() (*AzureadconfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &AzureadconfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *AzureadconfigClient) ById(id string) (*Azureadconfig, error) { resp := &Azureadconfig{} err := c.rancherClient.doById(AZUREADCONFIG_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_backup.go b/vendor/github.com/rancher/go-rancher/v2/generated_backup.go index 237194ced..755605eb0 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_backup.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_backup.go @@ -44,7 +44,8 @@ type Backup struct { type BackupCollection struct { Collection - Data []Backup `json:"data,omitempty"` + Data []Backup `json:"data,omitempty"` + client *BackupClient } type BackupClient struct { @@ -84,9 +85,20 @@ func (c *BackupClient) Update(existing *Backup, updates interface{}) (*Backup, e func (c *BackupClient) List(opts *ListOpts) (*BackupCollection, error) { resp := &BackupCollection{} err := c.rancherClient.doList(BACKUP_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *BackupCollection) Next() (*BackupCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &BackupCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *BackupClient) ById(id string) (*Backup, error) { resp := &Backup{} err := c.rancherClient.doById(BACKUP_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_backup_target.go b/vendor/github.com/rancher/go-rancher/v2/generated_backup_target.go index c93d615c7..a00f2bc89 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_backup_target.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_backup_target.go @@ -38,7 +38,8 @@ type BackupTarget struct { type BackupTargetCollection struct { Collection - Data []BackupTarget `json:"data,omitempty"` + Data []BackupTarget `json:"data,omitempty"` + client *BackupTargetClient } type BackupTargetClient struct { @@ -78,9 +79,20 @@ func (c *BackupTargetClient) Update(existing *BackupTarget, updates interface{}) func (c *BackupTargetClient) List(opts *ListOpts) (*BackupTargetCollection, error) { resp := &BackupTargetCollection{} err := c.rancherClient.doList(BACKUP_TARGET_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *BackupTargetCollection) Next() (*BackupTargetCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &BackupTargetCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *BackupTargetClient) ById(id string) (*BackupTarget, error) { resp := &BackupTarget{} err := c.rancherClient.doById(BACKUP_TARGET_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_base_machine_config.go b/vendor/github.com/rancher/go-rancher/v2/generated_base_machine_config.go index a01934241..0c0112de4 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_base_machine_config.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_base_machine_config.go @@ -10,7 +10,8 @@ type BaseMachineConfig struct { type BaseMachineConfigCollection struct { Collection - Data []BaseMachineConfig `json:"data,omitempty"` + Data []BaseMachineConfig `json:"data,omitempty"` + client *BaseMachineConfigClient } type BaseMachineConfigClient struct { @@ -46,9 +47,20 @@ func (c *BaseMachineConfigClient) Update(existing *BaseMachineConfig, updates in func (c *BaseMachineConfigClient) List(opts *ListOpts) (*BaseMachineConfigCollection, error) { resp := &BaseMachineConfigCollection{} err := c.rancherClient.doList(BASE_MACHINE_CONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *BaseMachineConfigCollection) Next() (*BaseMachineConfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &BaseMachineConfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *BaseMachineConfigClient) ById(id string) (*BaseMachineConfig, error) { resp := &BaseMachineConfig{} err := c.rancherClient.doById(BASE_MACHINE_CONFIG_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_binding.go b/vendor/github.com/rancher/go-rancher/v2/generated_binding.go index 7766284fd..9cb4e1758 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_binding.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_binding.go @@ -12,7 +12,8 @@ type Binding struct { type BindingCollection struct { Collection - Data []Binding `json:"data,omitempty"` + Data []Binding `json:"data,omitempty"` + client *BindingClient } type BindingClient struct { @@ -48,9 +49,20 @@ func (c *BindingClient) Update(existing *Binding, updates interface{}) (*Binding func (c *BindingClient) List(opts *ListOpts) (*BindingCollection, error) { resp := &BindingCollection{} err := c.rancherClient.doList(BINDING_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *BindingCollection) Next() (*BindingCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &BindingCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *BindingClient) ById(id string) (*Binding, error) { resp := &Binding{} err := c.rancherClient.doById(BINDING_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_blkio_device_option.go b/vendor/github.com/rancher/go-rancher/v2/generated_blkio_device_option.go index 4d0052255..bc33c7c11 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_blkio_device_option.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_blkio_device_option.go @@ -20,7 +20,8 @@ type BlkioDeviceOption struct { type BlkioDeviceOptionCollection struct { Collection - Data []BlkioDeviceOption `json:"data,omitempty"` + Data []BlkioDeviceOption `json:"data,omitempty"` + client *BlkioDeviceOptionClient } type BlkioDeviceOptionClient struct { @@ -56,9 +57,20 @@ func (c *BlkioDeviceOptionClient) Update(existing *BlkioDeviceOption, updates in func (c *BlkioDeviceOptionClient) List(opts *ListOpts) (*BlkioDeviceOptionCollection, error) { resp := &BlkioDeviceOptionCollection{} err := c.rancherClient.doList(BLKIO_DEVICE_OPTION_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *BlkioDeviceOptionCollection) Next() (*BlkioDeviceOptionCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &BlkioDeviceOptionCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *BlkioDeviceOptionClient) ById(id string) (*BlkioDeviceOption, error) { resp := &BlkioDeviceOption{} err := c.rancherClient.doById(BLKIO_DEVICE_OPTION_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_certificate.go b/vendor/github.com/rancher/go-rancher/v2/generated_certificate.go index 02f99e3ef..fc407e8af 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_certificate.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_certificate.go @@ -62,7 +62,8 @@ type Certificate struct { type CertificateCollection struct { Collection - Data []Certificate `json:"data,omitempty"` + Data []Certificate `json:"data,omitempty"` + client *CertificateClient } type CertificateClient struct { @@ -104,9 +105,20 @@ func (c *CertificateClient) Update(existing *Certificate, updates interface{}) ( func (c *CertificateClient) List(opts *ListOpts) (*CertificateCollection, error) { resp := &CertificateCollection{} err := c.rancherClient.doList(CERTIFICATE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *CertificateCollection) Next() (*CertificateCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &CertificateCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *CertificateClient) ById(id string) (*Certificate, error) { resp := &Certificate{} err := c.rancherClient.doById(CERTIFICATE_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_change_secret_input.go b/vendor/github.com/rancher/go-rancher/v2/generated_change_secret_input.go index 913c2eeaa..3f866812a 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_change_secret_input.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_change_secret_input.go @@ -14,7 +14,8 @@ type ChangeSecretInput struct { type ChangeSecretInputCollection struct { Collection - Data []ChangeSecretInput `json:"data,omitempty"` + Data []ChangeSecretInput `json:"data,omitempty"` + client *ChangeSecretInputClient } type ChangeSecretInputClient struct { @@ -50,9 +51,20 @@ func (c *ChangeSecretInputClient) Update(existing *ChangeSecretInput, updates in func (c *ChangeSecretInputClient) List(opts *ListOpts) (*ChangeSecretInputCollection, error) { resp := &ChangeSecretInputCollection{} err := c.rancherClient.doList(CHANGE_SECRET_INPUT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ChangeSecretInputCollection) Next() (*ChangeSecretInputCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ChangeSecretInputCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ChangeSecretInputClient) ById(id string) (*ChangeSecretInput, error) { resp := &ChangeSecretInput{} err := c.rancherClient.doById(CHANGE_SECRET_INPUT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_client.go b/vendor/github.com/rancher/go-rancher/v2/generated_client.go index 0b7a39610..0737d5d38 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_client.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_client.go @@ -89,6 +89,7 @@ type RancherClient struct { MachineDriver MachineDriverOperations Mount MountOperations Network NetworkOperations + NetworkDriver NetworkDriverOperations NfsConfig NfsConfigOperations Openldapconfig OpenldapconfigOperations PacketConfig PacketConfigOperations @@ -127,7 +128,6 @@ type RancherClient struct { ServiceUpgrade ServiceUpgradeOperations ServiceUpgradeStrategy ServiceUpgradeStrategyOperations ServicesPortRange ServicesPortRangeOperations - SetLabelsInput SetLabelsInputOperations SetLoadBalancerServiceLinksInput SetLoadBalancerServiceLinksInputOperations SetProjectMembersInput SetProjectMembersInputOperations SetServiceLinksInput SetServiceLinksInputOperations @@ -138,6 +138,7 @@ type RancherClient struct { StackUpgrade StackUpgradeOperations StateTransition StateTransitionOperations StatsAccess StatsAccessOperations + StorageDriver StorageDriverOperations StoragePool StoragePoolOperations Subscribe SubscribeOperations Task TaskOperations @@ -147,14 +148,14 @@ type RancherClient struct { VirtualMachine VirtualMachineOperations VirtualMachineDisk VirtualMachineDiskOperations Volume VolumeOperations + VolumeActivateInput VolumeActivateInputOperations VolumeSnapshotInput VolumeSnapshotInputOperations + VolumeTemplate VolumeTemplateOperations } -func constructClient() *RancherClient { +func constructClient(rancherBaseClient *RancherBaseClientImpl) *RancherClient { client := &RancherClient{ - RancherBaseClient: RancherBaseClient{ - Types: map[string]Schema{}, - }, + RancherBaseClient: rancherBaseClient, } client.Account = newAccountClient(client) @@ -243,6 +244,7 @@ func constructClient() *RancherClient { client.MachineDriver = newMachineDriverClient(client) client.Mount = newMountClient(client) client.Network = newNetworkClient(client) + client.NetworkDriver = newNetworkDriverClient(client) client.NfsConfig = newNfsConfigClient(client) client.Openldapconfig = newOpenldapconfigClient(client) client.PacketConfig = newPacketConfigClient(client) @@ -281,7 +283,6 @@ func constructClient() *RancherClient { 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) @@ -292,6 +293,7 @@ func constructClient() *RancherClient { client.StackUpgrade = newStackUpgradeClient(client) client.StateTransition = newStateTransitionClient(client) client.StatsAccess = newStatsAccessClient(client) + client.StorageDriver = newStorageDriverClient(client) client.StoragePool = newStoragePoolClient(client) client.Subscribe = newSubscribeClient(client) client.Task = newTaskClient(client) @@ -301,15 +303,20 @@ func constructClient() *RancherClient { client.VirtualMachine = newVirtualMachineClient(client) client.VirtualMachineDisk = newVirtualMachineDiskClient(client) client.Volume = newVolumeClient(client) + client.VolumeActivateInput = newVolumeActivateInputClient(client) client.VolumeSnapshotInput = newVolumeSnapshotInputClient(client) + client.VolumeTemplate = newVolumeTemplateClient(client) return client } func NewRancherClient(opts *ClientOpts) (*RancherClient, error) { - client := constructClient() + rancherBaseClient := &RancherBaseClientImpl{ + Types: map[string]Schema{}, + } + client := constructClient(rancherBaseClient) - err := setupRancherBaseClient(&client.RancherBaseClient, opts) + err := setupRancherBaseClient(rancherBaseClient, opts) if err != nil { return nil, err } diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_compose_config.go b/vendor/github.com/rancher/go-rancher/v2/generated_compose_config.go index 49ee5ba1d..b9bc013c0 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_compose_config.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_compose_config.go @@ -14,7 +14,8 @@ type ComposeConfig struct { type ComposeConfigCollection struct { Collection - Data []ComposeConfig `json:"data,omitempty"` + Data []ComposeConfig `json:"data,omitempty"` + client *ComposeConfigClient } type ComposeConfigClient struct { @@ -50,9 +51,20 @@ func (c *ComposeConfigClient) Update(existing *ComposeConfig, updates interface{ func (c *ComposeConfigClient) List(opts *ListOpts) (*ComposeConfigCollection, error) { resp := &ComposeConfigCollection{} err := c.rancherClient.doList(COMPOSE_CONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ComposeConfigCollection) Next() (*ComposeConfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ComposeConfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ComposeConfigClient) ById(id string) (*ComposeConfig, error) { resp := &ComposeConfig{} err := c.rancherClient.doById(COMPOSE_CONFIG_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_compose_config_input.go b/vendor/github.com/rancher/go-rancher/v2/generated_compose_config_input.go index e0cdc76f9..3d03d923b 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_compose_config_input.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_compose_config_input.go @@ -12,7 +12,8 @@ type ComposeConfigInput struct { type ComposeConfigInputCollection struct { Collection - Data []ComposeConfigInput `json:"data,omitempty"` + Data []ComposeConfigInput `json:"data,omitempty"` + client *ComposeConfigInputClient } type ComposeConfigInputClient struct { @@ -48,9 +49,20 @@ func (c *ComposeConfigInputClient) Update(existing *ComposeConfigInput, updates func (c *ComposeConfigInputClient) List(opts *ListOpts) (*ComposeConfigInputCollection, error) { resp := &ComposeConfigInputCollection{} err := c.rancherClient.doList(COMPOSE_CONFIG_INPUT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ComposeConfigInputCollection) Next() (*ComposeConfigInputCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ComposeConfigInputCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ComposeConfigInputClient) ById(id string) (*ComposeConfigInput, error) { resp := &ComposeConfigInput{} err := c.rancherClient.doById(COMPOSE_CONFIG_INPUT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_compose_project.go b/vendor/github.com/rancher/go-rancher/v2/generated_compose_project.go index 20232bf8f..d64e03295 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_compose_project.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_compose_project.go @@ -21,6 +21,8 @@ type ComposeProject struct { ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"` + Group string `json:"group,omitempty" yaml:"group,omitempty"` + HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"` Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` @@ -35,8 +37,12 @@ type ComposeProject struct { Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + ServiceIds []string `json:"serviceIds,omitempty" yaml:"service_ids,omitempty"` + State string `json:"state,omitempty" yaml:"state,omitempty"` + System bool `json:"system,omitempty" yaml:"system,omitempty"` + Templates map[string]interface{} `json:"templates,omitempty" yaml:"templates,omitempty"` Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` @@ -50,7 +56,8 @@ type ComposeProject struct { type ComposeProjectCollection struct { Collection - Data []ComposeProject `json:"data,omitempty"` + Data []ComposeProject `json:"data,omitempty"` + client *ComposeProjectClient } type ComposeProjectClient struct { @@ -98,9 +105,20 @@ func (c *ComposeProjectClient) Update(existing *ComposeProject, updates interfac func (c *ComposeProjectClient) List(opts *ListOpts) (*ComposeProjectCollection, error) { resp := &ComposeProjectCollection{} err := c.rancherClient.doList(COMPOSE_PROJECT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ComposeProjectCollection) Next() (*ComposeProjectCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ComposeProjectCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ComposeProjectClient) ById(id string) (*ComposeProject, error) { resp := &ComposeProject{} err := c.rancherClient.doById(COMPOSE_PROJECT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_compose_service.go b/vendor/github.com/rancher/go-rancher/v2/generated_compose_service.go index 5965a8c2f..99d01d78d 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_compose_service.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_compose_service.go @@ -9,6 +9,10 @@ type ComposeService struct { AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + ConsumedByServiceIds []string `json:"consumedByServiceIds,omitempty" yaml:"consumed_by_service_ids,omitempty"` + + ConsumedServiceIds []string `json:"consumedServiceIds,omitempty" yaml:"consumed_service_ids,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` CurrentScale int64 `json:"currentScale,omitempty" yaml:"current_scale,omitempty"` @@ -23,13 +27,15 @@ type ComposeService struct { HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"` + InstanceIds []string `json:"instanceIds,omitempty" yaml:"instance_ids,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"` + PublicEndpoints []PublicEndpoint `json:"publicEndpoints,omitempty" yaml:"public_endpoints,omitempty"` RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` @@ -49,6 +55,8 @@ type ComposeService struct { State string `json:"state,omitempty" yaml:"state,omitempty"` + System bool `json:"system,omitempty" yaml:"system,omitempty"` + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` @@ -62,7 +70,8 @@ type ComposeService struct { type ComposeServiceCollection struct { Collection - Data []ComposeService `json:"data,omitempty"` + Data []ComposeService `json:"data,omitempty"` + client *ComposeServiceClient } type ComposeServiceClient struct { @@ -112,9 +121,20 @@ func (c *ComposeServiceClient) Update(existing *ComposeService, updates interfac func (c *ComposeServiceClient) List(opts *ListOpts) (*ComposeServiceCollection, error) { resp := &ComposeServiceCollection{} err := c.rancherClient.doList(COMPOSE_SERVICE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ComposeServiceCollection) Next() (*ComposeServiceCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ComposeServiceCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ComposeServiceClient) ById(id string) (*ComposeService, error) { resp := &ComposeService{} err := c.rancherClient.doById(COMPOSE_SERVICE_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_config_item.go b/vendor/github.com/rancher/go-rancher/v2/generated_config_item.go index 71e687d22..b97306669 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_config_item.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_config_item.go @@ -14,7 +14,8 @@ type ConfigItem struct { type ConfigItemCollection struct { Collection - Data []ConfigItem `json:"data,omitempty"` + Data []ConfigItem `json:"data,omitempty"` + client *ConfigItemClient } type ConfigItemClient struct { @@ -50,9 +51,20 @@ func (c *ConfigItemClient) Update(existing *ConfigItem, updates interface{}) (*C func (c *ConfigItemClient) List(opts *ListOpts) (*ConfigItemCollection, error) { resp := &ConfigItemCollection{} err := c.rancherClient.doList(CONFIG_ITEM_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ConfigItemCollection) Next() (*ConfigItemCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ConfigItemCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ConfigItemClient) ById(id string) (*ConfigItem, error) { resp := &ConfigItem{} err := c.rancherClient.doById(CONFIG_ITEM_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_config_item_status.go b/vendor/github.com/rancher/go-rancher/v2/generated_config_item_status.go index 0ffef351f..2ce32ca97 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_config_item_status.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_config_item_status.go @@ -26,7 +26,8 @@ type ConfigItemStatus struct { type ConfigItemStatusCollection struct { Collection - Data []ConfigItemStatus `json:"data,omitempty"` + Data []ConfigItemStatus `json:"data,omitempty"` + client *ConfigItemStatusClient } type ConfigItemStatusClient struct { @@ -62,9 +63,20 @@ func (c *ConfigItemStatusClient) Update(existing *ConfigItemStatus, updates inte func (c *ConfigItemStatusClient) List(opts *ListOpts) (*ConfigItemStatusCollection, error) { resp := &ConfigItemStatusCollection{} err := c.rancherClient.doList(CONFIG_ITEM_STATUS_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ConfigItemStatusCollection) Next() (*ConfigItemStatusCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ConfigItemStatusCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ConfigItemStatusClient) ById(id string) (*ConfigItemStatus, error) { resp := &ConfigItemStatus{} err := c.rancherClient.doById(CONFIG_ITEM_STATUS_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_container.go b/vendor/github.com/rancher/go-rancher/v2/generated_container.go index a41dcf362..0549c8d9d 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_container.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_container.go @@ -123,6 +123,8 @@ type Container struct { SecurityOpt []string `json:"securityOpt,omitempty" yaml:"security_opt,omitempty"` + ServiceIds []string `json:"serviceIds,omitempty" yaml:"service_ids,omitempty"` + StartCount int64 `json:"startCount,omitempty" yaml:"start_count,omitempty"` StartOnCreate bool `json:"startOnCreate,omitempty" yaml:"start_on_create,omitempty"` @@ -131,6 +133,8 @@ type Container struct { StdinOpen bool `json:"stdinOpen,omitempty" yaml:"stdin_open,omitempty"` + System bool `json:"system,omitempty" yaml:"system,omitempty"` + SystemContainer string `json:"systemContainer,omitempty" yaml:"system_container,omitempty"` Token string `json:"token,omitempty" yaml:"token,omitempty"` @@ -156,7 +160,8 @@ type Container struct { type ContainerCollection struct { Collection - Data []Container `json:"data,omitempty"` + Data []Container `json:"data,omitempty"` + client *ContainerClient } type ContainerClient struct { @@ -196,8 +201,6 @@ type ContainerOperations interface { ActionRestore(*Container) (*Instance, error) - ActionSetlabels(*Container, *SetLabelsInput) (*Container, error) - ActionStart(*Container) (*Instance, error) ActionStop(*Container, *InstanceStop) (*Instance, error) @@ -232,9 +235,20 @@ func (c *ContainerClient) Update(existing *Container, updates interface{}) (*Con func (c *ContainerClient) List(opts *ListOpts) (*ContainerCollection, error) { resp := &ContainerCollection{} err := c.rancherClient.doList(CONTAINER_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ContainerCollection) Next() (*ContainerCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ContainerCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ContainerClient) ById(id string) (*Container, error) { resp := &Container{} err := c.rancherClient.doById(CONTAINER_TYPE, id, resp) @@ -367,15 +381,6 @@ func (c *ContainerClient) ActionRestore(resource *Container) (*Instance, error) 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{} diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_container_event.go b/vendor/github.com/rancher/go-rancher/v2/generated_container_event.go index 414030bde..8b95651c9 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_container_event.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_container_event.go @@ -40,7 +40,8 @@ type ContainerEvent struct { type ContainerEventCollection struct { Collection - Data []ContainerEvent `json:"data,omitempty"` + Data []ContainerEvent `json:"data,omitempty"` + client *ContainerEventClient } type ContainerEventClient struct { @@ -80,9 +81,20 @@ func (c *ContainerEventClient) Update(existing *ContainerEvent, updates interfac func (c *ContainerEventClient) List(opts *ListOpts) (*ContainerEventCollection, error) { resp := &ContainerEventCollection{} err := c.rancherClient.doList(CONTAINER_EVENT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ContainerEventCollection) Next() (*ContainerEventCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ContainerEventCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ContainerEventClient) ById(id string) (*ContainerEvent, error) { resp := &ContainerEvent{} err := c.rancherClient.doById(CONTAINER_EVENT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_container_exec.go b/vendor/github.com/rancher/go-rancher/v2/generated_container_exec.go index c97f7703b..196199b5c 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_container_exec.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_container_exec.go @@ -18,7 +18,8 @@ type ContainerExec struct { type ContainerExecCollection struct { Collection - Data []ContainerExec `json:"data,omitempty"` + Data []ContainerExec `json:"data,omitempty"` + client *ContainerExecClient } type ContainerExecClient struct { @@ -54,9 +55,20 @@ func (c *ContainerExecClient) Update(existing *ContainerExec, updates interface{ func (c *ContainerExecClient) List(opts *ListOpts) (*ContainerExecCollection, error) { resp := &ContainerExecCollection{} err := c.rancherClient.doList(CONTAINER_EXEC_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ContainerExecCollection) Next() (*ContainerExecCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ContainerExecCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ContainerExecClient) ById(id string) (*ContainerExec, error) { resp := &ContainerExec{} err := c.rancherClient.doById(CONTAINER_EXEC_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_container_logs.go b/vendor/github.com/rancher/go-rancher/v2/generated_container_logs.go index 4d37dab92..2149df19f 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_container_logs.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_container_logs.go @@ -14,7 +14,8 @@ type ContainerLogs struct { type ContainerLogsCollection struct { Collection - Data []ContainerLogs `json:"data,omitempty"` + Data []ContainerLogs `json:"data,omitempty"` + client *ContainerLogsClient } type ContainerLogsClient struct { @@ -50,9 +51,20 @@ func (c *ContainerLogsClient) Update(existing *ContainerLogs, updates interface{ func (c *ContainerLogsClient) List(opts *ListOpts) (*ContainerLogsCollection, error) { resp := &ContainerLogsCollection{} err := c.rancherClient.doList(CONTAINER_LOGS_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ContainerLogsCollection) Next() (*ContainerLogsCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ContainerLogsCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ContainerLogsClient) ById(id string) (*ContainerLogs, error) { resp := &ContainerLogs{} err := c.rancherClient.doById(CONTAINER_LOGS_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_container_proxy.go b/vendor/github.com/rancher/go-rancher/v2/generated_container_proxy.go index 19bcfd532..84d7670ea 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_container_proxy.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_container_proxy.go @@ -14,7 +14,8 @@ type ContainerProxy struct { type ContainerProxyCollection struct { Collection - Data []ContainerProxy `json:"data,omitempty"` + Data []ContainerProxy `json:"data,omitempty"` + client *ContainerProxyClient } type ContainerProxyClient struct { @@ -50,9 +51,20 @@ func (c *ContainerProxyClient) Update(existing *ContainerProxy, updates interfac func (c *ContainerProxyClient) List(opts *ListOpts) (*ContainerProxyCollection, error) { resp := &ContainerProxyCollection{} err := c.rancherClient.doList(CONTAINER_PROXY_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ContainerProxyCollection) Next() (*ContainerProxyCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ContainerProxyCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ContainerProxyClient) ById(id string) (*ContainerProxy, error) { resp := &ContainerProxy{} err := c.rancherClient.doById(CONTAINER_PROXY_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_credential.go b/vendor/github.com/rancher/go-rancher/v2/generated_credential.go index e1586db29..f34a563df 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_credential.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_credential.go @@ -40,7 +40,8 @@ type Credential struct { type CredentialCollection struct { Collection - Data []Credential `json:"data,omitempty"` + Data []Credential `json:"data,omitempty"` + client *CredentialClient } type CredentialClient struct { @@ -88,9 +89,20 @@ func (c *CredentialClient) Update(existing *Credential, updates interface{}) (*C func (c *CredentialClient) List(opts *ListOpts) (*CredentialCollection, error) { resp := &CredentialCollection{} err := c.rancherClient.doList(CREDENTIAL_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *CredentialCollection) Next() (*CredentialCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &CredentialCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *CredentialClient) ById(id string) (*Credential, error) { resp := &Credential{} err := c.rancherClient.doById(CREDENTIAL_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_databasechangelog.go b/vendor/github.com/rancher/go-rancher/v2/generated_databasechangelog.go index 63b3ca6cb..0d935f8a5 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_databasechangelog.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_databasechangelog.go @@ -30,7 +30,8 @@ type Databasechangelog struct { type DatabasechangelogCollection struct { Collection - Data []Databasechangelog `json:"data,omitempty"` + Data []Databasechangelog `json:"data,omitempty"` + client *DatabasechangelogClient } type DatabasechangelogClient struct { @@ -66,9 +67,20 @@ func (c *DatabasechangelogClient) Update(existing *Databasechangelog, updates in func (c *DatabasechangelogClient) List(opts *ListOpts) (*DatabasechangelogCollection, error) { resp := &DatabasechangelogCollection{} err := c.rancherClient.doList(DATABASECHANGELOG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *DatabasechangelogCollection) Next() (*DatabasechangelogCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &DatabasechangelogCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *DatabasechangelogClient) ById(id string) (*Databasechangelog, error) { resp := &Databasechangelog{} err := c.rancherClient.doById(DATABASECHANGELOG_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_databasechangeloglock.go b/vendor/github.com/rancher/go-rancher/v2/generated_databasechangeloglock.go index f01b7bbc8..a93c015a0 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_databasechangeloglock.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_databasechangeloglock.go @@ -16,7 +16,8 @@ type Databasechangeloglock struct { type DatabasechangeloglockCollection struct { Collection - Data []Databasechangeloglock `json:"data,omitempty"` + Data []Databasechangeloglock `json:"data,omitempty"` + client *DatabasechangeloglockClient } type DatabasechangeloglockClient struct { @@ -52,9 +53,20 @@ func (c *DatabasechangeloglockClient) Update(existing *Databasechangeloglock, up func (c *DatabasechangeloglockClient) List(opts *ListOpts) (*DatabasechangeloglockCollection, error) { resp := &DatabasechangeloglockCollection{} err := c.rancherClient.doList(DATABASECHANGELOGLOCK_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *DatabasechangeloglockCollection) Next() (*DatabasechangeloglockCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &DatabasechangeloglockCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *DatabasechangeloglockClient) ById(id string) (*Databasechangeloglock, error) { resp := &Databasechangeloglock{} err := c.rancherClient.doById(DATABASECHANGELOGLOCK_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_digitalocean_config.go b/vendor/github.com/rancher/go-rancher/v2/generated_digitalocean_config.go index 3ae14dd47..e39ef4ed4 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_digitalocean_config.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_digitalocean_config.go @@ -21,8 +21,6 @@ type DigitaloceanConfig struct { Size string `json:"size,omitempty" yaml:"size,omitempty"` - SshKeyFingerprint string `json:"sshKeyFingerprint,omitempty" yaml:"ssh_key_fingerprint,omitempty"` - SshPort string `json:"sshPort,omitempty" yaml:"ssh_port,omitempty"` SshUser string `json:"sshUser,omitempty" yaml:"ssh_user,omitempty"` @@ -32,7 +30,8 @@ type DigitaloceanConfig struct { type DigitaloceanConfigCollection struct { Collection - Data []DigitaloceanConfig `json:"data,omitempty"` + Data []DigitaloceanConfig `json:"data,omitempty"` + client *DigitaloceanConfigClient } type DigitaloceanConfigClient struct { @@ -68,9 +67,20 @@ func (c *DigitaloceanConfigClient) Update(existing *DigitaloceanConfig, updates func (c *DigitaloceanConfigClient) List(opts *ListOpts) (*DigitaloceanConfigCollection, error) { resp := &DigitaloceanConfigCollection{} err := c.rancherClient.doList(DIGITALOCEAN_CONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *DigitaloceanConfigCollection) Next() (*DigitaloceanConfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &DigitaloceanConfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *DigitaloceanConfigClient) ById(id string) (*DigitaloceanConfig, error) { resp := &DigitaloceanConfig{} err := c.rancherClient.doById(DIGITALOCEAN_CONFIG_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_dns_service.go b/vendor/github.com/rancher/go-rancher/v2/generated_dns_service.go index 4f9d9255b..f385ccd4f 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_dns_service.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_dns_service.go @@ -11,6 +11,10 @@ type DnsService struct { AssignServiceIpAddress bool `json:"assignServiceIpAddress,omitempty" yaml:"assign_service_ip_address,omitempty"` + ConsumedByServiceIds []string `json:"consumedByServiceIds,omitempty" yaml:"consumed_by_service_ids,omitempty"` + + ConsumedServiceIds []string `json:"consumedServiceIds,omitempty" yaml:"consumed_service_ids,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` @@ -23,6 +27,8 @@ type DnsService struct { HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"` + InstanceIds []string `json:"instanceIds,omitempty" yaml:"instance_ids,omitempty"` + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` LaunchConfig *LaunchConfig `json:"launchConfig,omitempty" yaml:"launch_config,omitempty"` @@ -45,6 +51,8 @@ type DnsService struct { State string `json:"state,omitempty" yaml:"state,omitempty"` + System bool `json:"system,omitempty" yaml:"system,omitempty"` + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` @@ -58,7 +66,8 @@ type DnsService struct { type DnsServiceCollection struct { Collection - Data []DnsService `json:"data,omitempty"` + Data []DnsService `json:"data,omitempty"` + client *DnsServiceClient } type DnsServiceClient struct { @@ -122,9 +131,20 @@ func (c *DnsServiceClient) Update(existing *DnsService, updates interface{}) (*D func (c *DnsServiceClient) List(opts *ListOpts) (*DnsServiceCollection, error) { resp := &DnsServiceCollection{} err := c.rancherClient.doList(DNS_SERVICE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *DnsServiceCollection) Next() (*DnsServiceCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &DnsServiceCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *DnsServiceClient) ById(id string) (*DnsService, error) { resp := &DnsService{} err := c.rancherClient.doById(DNS_SERVICE_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_docker_build.go b/vendor/github.com/rancher/go-rancher/v2/generated_docker_build.go index cd91f65b2..a1b1e371b 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_docker_build.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_docker_build.go @@ -22,7 +22,8 @@ type DockerBuild struct { type DockerBuildCollection struct { Collection - Data []DockerBuild `json:"data,omitempty"` + Data []DockerBuild `json:"data,omitempty"` + client *DockerBuildClient } type DockerBuildClient struct { @@ -58,9 +59,20 @@ func (c *DockerBuildClient) Update(existing *DockerBuild, updates interface{}) ( func (c *DockerBuildClient) List(opts *ListOpts) (*DockerBuildCollection, error) { resp := &DockerBuildCollection{} err := c.rancherClient.doList(DOCKER_BUILD_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *DockerBuildCollection) Next() (*DockerBuildCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &DockerBuildCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *DockerBuildClient) ById(id string) (*DockerBuild, error) { resp := &DockerBuild{} err := c.rancherClient.doById(DOCKER_BUILD_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_dynamic_schema.go b/vendor/github.com/rancher/go-rancher/v2/generated_dynamic_schema.go index f9421dd66..6ee36740c 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_dynamic_schema.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_dynamic_schema.go @@ -40,7 +40,8 @@ type DynamicSchema struct { type DynamicSchemaCollection struct { Collection - Data []DynamicSchema `json:"data,omitempty"` + Data []DynamicSchema `json:"data,omitempty"` + client *DynamicSchemaClient } type DynamicSchemaClient struct { @@ -80,9 +81,20 @@ func (c *DynamicSchemaClient) Update(existing *DynamicSchema, updates interface{ func (c *DynamicSchemaClient) List(opts *ListOpts) (*DynamicSchemaCollection, error) { resp := &DynamicSchemaCollection{} err := c.rancherClient.doList(DYNAMIC_SCHEMA_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *DynamicSchemaCollection) Next() (*DynamicSchemaCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &DynamicSchemaCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *DynamicSchemaClient) ById(id string) (*DynamicSchema, error) { resp := &DynamicSchema{} err := c.rancherClient.doById(DYNAMIC_SCHEMA_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_extension_implementation.go b/vendor/github.com/rancher/go-rancher/v2/generated_extension_implementation.go index cfa7b4aa3..216383386 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_extension_implementation.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_extension_implementation.go @@ -16,7 +16,8 @@ type ExtensionImplementation struct { type ExtensionImplementationCollection struct { Collection - Data []ExtensionImplementation `json:"data,omitempty"` + Data []ExtensionImplementation `json:"data,omitempty"` + client *ExtensionImplementationClient } type ExtensionImplementationClient struct { @@ -52,9 +53,20 @@ func (c *ExtensionImplementationClient) Update(existing *ExtensionImplementation func (c *ExtensionImplementationClient) List(opts *ListOpts) (*ExtensionImplementationCollection, error) { resp := &ExtensionImplementationCollection{} err := c.rancherClient.doList(EXTENSION_IMPLEMENTATION_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ExtensionImplementationCollection) Next() (*ExtensionImplementationCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ExtensionImplementationCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ExtensionImplementationClient) ById(id string) (*ExtensionImplementation, error) { resp := &ExtensionImplementation{} err := c.rancherClient.doById(EXTENSION_IMPLEMENTATION_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_extension_point.go b/vendor/github.com/rancher/go-rancher/v2/generated_extension_point.go index 0b13cf548..e3c0b87ab 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_extension_point.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_extension_point.go @@ -9,7 +9,7 @@ type ExtensionPoint struct { ExcludeSetting string `json:"excludeSetting,omitempty" yaml:"exclude_setting,omitempty"` - Implementations []interface{} `json:"implementations,omitempty" yaml:"implementations,omitempty"` + Implementations []ExtensionImplementation `json:"implementations,omitempty" yaml:"implementations,omitempty"` IncludeSetting string `json:"includeSetting,omitempty" yaml:"include_setting,omitempty"` @@ -20,7 +20,8 @@ type ExtensionPoint struct { type ExtensionPointCollection struct { Collection - Data []ExtensionPoint `json:"data,omitempty"` + Data []ExtensionPoint `json:"data,omitempty"` + client *ExtensionPointClient } type ExtensionPointClient struct { @@ -56,9 +57,20 @@ func (c *ExtensionPointClient) Update(existing *ExtensionPoint, updates interfac func (c *ExtensionPointClient) List(opts *ListOpts) (*ExtensionPointCollection, error) { resp := &ExtensionPointCollection{} err := c.rancherClient.doList(EXTENSION_POINT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ExtensionPointCollection) Next() (*ExtensionPointCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ExtensionPointCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ExtensionPointClient) ById(id string) (*ExtensionPoint, error) { resp := &ExtensionPoint{} err := c.rancherClient.doById(EXTENSION_POINT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_external_dns_event.go b/vendor/github.com/rancher/go-rancher/v2/generated_external_dns_event.go index 7f4ce2562..e4c6c929b 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_external_dns_event.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_external_dns_event.go @@ -40,7 +40,8 @@ type ExternalDnsEvent struct { type ExternalDnsEventCollection struct { Collection - Data []ExternalDnsEvent `json:"data,omitempty"` + Data []ExternalDnsEvent `json:"data,omitempty"` + client *ExternalDnsEventClient } type ExternalDnsEventClient struct { @@ -80,9 +81,20 @@ func (c *ExternalDnsEventClient) Update(existing *ExternalDnsEvent, updates inte func (c *ExternalDnsEventClient) List(opts *ListOpts) (*ExternalDnsEventCollection, error) { resp := &ExternalDnsEventCollection{} err := c.rancherClient.doList(EXTERNAL_DNS_EVENT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ExternalDnsEventCollection) Next() (*ExternalDnsEventCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ExternalDnsEventCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ExternalDnsEventClient) ById(id string) (*ExternalDnsEvent, error) { resp := &ExternalDnsEvent{} err := c.rancherClient.doById(EXTERNAL_DNS_EVENT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_external_event.go b/vendor/github.com/rancher/go-rancher/v2/generated_external_event.go index a1bf8180b..3b43545a5 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_external_event.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_external_event.go @@ -34,7 +34,8 @@ type ExternalEvent struct { type ExternalEventCollection struct { Collection - Data []ExternalEvent `json:"data,omitempty"` + Data []ExternalEvent `json:"data,omitempty"` + client *ExternalEventClient } type ExternalEventClient struct { @@ -74,9 +75,20 @@ func (c *ExternalEventClient) Update(existing *ExternalEvent, updates interface{ func (c *ExternalEventClient) List(opts *ListOpts) (*ExternalEventCollection, error) { resp := &ExternalEventCollection{} err := c.rancherClient.doList(EXTERNAL_EVENT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ExternalEventCollection) Next() (*ExternalEventCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ExternalEventCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ExternalEventClient) ById(id string) (*ExternalEvent, error) { resp := &ExternalEvent{} err := c.rancherClient.doById(EXTERNAL_EVENT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_external_handler.go b/vendor/github.com/rancher/go-rancher/v2/generated_external_handler.go index d325b8d55..09f1b6a9b 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_external_handler.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_external_handler.go @@ -19,7 +19,7 @@ type ExternalHandler struct { Priority int64 `json:"priority,omitempty" yaml:"priority,omitempty"` - ProcessConfigs []interface{} `json:"processConfigs,omitempty" yaml:"process_configs,omitempty"` + ProcessConfigs []ExternalHandlerProcessConfig `json:"processConfigs,omitempty" yaml:"process_configs,omitempty"` RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` @@ -42,7 +42,8 @@ type ExternalHandler struct { type ExternalHandlerCollection struct { Collection - Data []ExternalHandler `json:"data,omitempty"` + Data []ExternalHandler `json:"data,omitempty"` + client *ExternalHandlerClient } type ExternalHandlerClient struct { @@ -92,9 +93,20 @@ func (c *ExternalHandlerClient) Update(existing *ExternalHandler, updates interf func (c *ExternalHandlerClient) List(opts *ListOpts) (*ExternalHandlerCollection, error) { resp := &ExternalHandlerCollection{} err := c.rancherClient.doList(EXTERNAL_HANDLER_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ExternalHandlerCollection) Next() (*ExternalHandlerCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ExternalHandlerCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ExternalHandlerClient) ById(id string) (*ExternalHandler, error) { resp := &ExternalHandler{} err := c.rancherClient.doById(EXTERNAL_HANDLER_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_external_handler_external_handler_process_map.go b/vendor/github.com/rancher/go-rancher/v2/generated_external_handler_external_handler_process_map.go index b90847ee2..733fa8d79 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_external_handler_external_handler_process_map.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_external_handler_external_handler_process_map.go @@ -42,7 +42,8 @@ type ExternalHandlerExternalHandlerProcessMap struct { type ExternalHandlerExternalHandlerProcessMapCollection struct { Collection - Data []ExternalHandlerExternalHandlerProcessMap `json:"data,omitempty"` + Data []ExternalHandlerExternalHandlerProcessMap `json:"data,omitempty"` + client *ExternalHandlerExternalHandlerProcessMapClient } type ExternalHandlerExternalHandlerProcessMapClient struct { @@ -92,9 +93,20 @@ func (c *ExternalHandlerExternalHandlerProcessMapClient) Update(existing *Extern func (c *ExternalHandlerExternalHandlerProcessMapClient) List(opts *ListOpts) (*ExternalHandlerExternalHandlerProcessMapCollection, error) { resp := &ExternalHandlerExternalHandlerProcessMapCollection{} err := c.rancherClient.doList(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ExternalHandlerExternalHandlerProcessMapCollection) Next() (*ExternalHandlerExternalHandlerProcessMapCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ExternalHandlerExternalHandlerProcessMapCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ExternalHandlerExternalHandlerProcessMapClient) ById(id string) (*ExternalHandlerExternalHandlerProcessMap, error) { resp := &ExternalHandlerExternalHandlerProcessMap{} err := c.rancherClient.doById(EXTERNAL_HANDLER_EXTERNAL_HANDLER_PROCESS_MAP_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_external_handler_process.go b/vendor/github.com/rancher/go-rancher/v2/generated_external_handler_process.go index a61336572..81a1b8a9a 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_external_handler_process.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_external_handler_process.go @@ -34,7 +34,8 @@ type ExternalHandlerProcess struct { type ExternalHandlerProcessCollection struct { Collection - Data []ExternalHandlerProcess `json:"data,omitempty"` + Data []ExternalHandlerProcess `json:"data,omitempty"` + client *ExternalHandlerProcessClient } type ExternalHandlerProcessClient struct { @@ -84,9 +85,20 @@ func (c *ExternalHandlerProcessClient) Update(existing *ExternalHandlerProcess, func (c *ExternalHandlerProcessClient) List(opts *ListOpts) (*ExternalHandlerProcessCollection, error) { resp := &ExternalHandlerProcessCollection{} err := c.rancherClient.doList(EXTERNAL_HANDLER_PROCESS_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ExternalHandlerProcessCollection) Next() (*ExternalHandlerProcessCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ExternalHandlerProcessCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ExternalHandlerProcessClient) ById(id string) (*ExternalHandlerProcess, error) { resp := &ExternalHandlerProcess{} err := c.rancherClient.doById(EXTERNAL_HANDLER_PROCESS_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_external_handler_process_config.go b/vendor/github.com/rancher/go-rancher/v2/generated_external_handler_process_config.go index de0d49eb4..08d4ab066 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_external_handler_process_config.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_external_handler_process_config.go @@ -14,7 +14,8 @@ type ExternalHandlerProcessConfig struct { type ExternalHandlerProcessConfigCollection struct { Collection - Data []ExternalHandlerProcessConfig `json:"data,omitempty"` + Data []ExternalHandlerProcessConfig `json:"data,omitempty"` + client *ExternalHandlerProcessConfigClient } type ExternalHandlerProcessConfigClient struct { @@ -50,9 +51,20 @@ func (c *ExternalHandlerProcessConfigClient) Update(existing *ExternalHandlerPro func (c *ExternalHandlerProcessConfigClient) List(opts *ListOpts) (*ExternalHandlerProcessConfigCollection, error) { resp := &ExternalHandlerProcessConfigCollection{} err := c.rancherClient.doList(EXTERNAL_HANDLER_PROCESS_CONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ExternalHandlerProcessConfigCollection) Next() (*ExternalHandlerProcessConfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ExternalHandlerProcessConfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ExternalHandlerProcessConfigClient) ById(id string) (*ExternalHandlerProcessConfig, error) { resp := &ExternalHandlerProcessConfig{} err := c.rancherClient.doById(EXTERNAL_HANDLER_PROCESS_CONFIG_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_external_host_event.go b/vendor/github.com/rancher/go-rancher/v2/generated_external_host_event.go index ae8ec14ce..e35425eb7 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_external_host_event.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_external_host_event.go @@ -40,7 +40,8 @@ type ExternalHostEvent struct { type ExternalHostEventCollection struct { Collection - Data []ExternalHostEvent `json:"data,omitempty"` + Data []ExternalHostEvent `json:"data,omitempty"` + client *ExternalHostEventClient } type ExternalHostEventClient struct { @@ -80,9 +81,20 @@ func (c *ExternalHostEventClient) Update(existing *ExternalHostEvent, updates in func (c *ExternalHostEventClient) List(opts *ListOpts) (*ExternalHostEventCollection, error) { resp := &ExternalHostEventCollection{} err := c.rancherClient.doList(EXTERNAL_HOST_EVENT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ExternalHostEventCollection) Next() (*ExternalHostEventCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ExternalHostEventCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ExternalHostEventClient) ById(id string) (*ExternalHostEvent, error) { resp := &ExternalHostEvent{} err := c.rancherClient.doById(EXTERNAL_HOST_EVENT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_external_service.go b/vendor/github.com/rancher/go-rancher/v2/generated_external_service.go index b4a4e9440..088e02cde 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_external_service.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_external_service.go @@ -9,6 +9,10 @@ type ExternalService struct { AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + ConsumedByServiceIds []string `json:"consumedByServiceIds,omitempty" yaml:"consumed_by_service_ids,omitempty"` + + ConsumedServiceIds []string `json:"consumedServiceIds,omitempty" yaml:"consumed_service_ids,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` @@ -27,6 +31,8 @@ type ExternalService struct { Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"` + InstanceIds []string `json:"instanceIds,omitempty" yaml:"instance_ids,omitempty"` + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` LaunchConfig *LaunchConfig `json:"launchConfig,omitempty" yaml:"launch_config,omitempty"` @@ -45,6 +51,8 @@ type ExternalService struct { State string `json:"state,omitempty" yaml:"state,omitempty"` + System bool `json:"system,omitempty" yaml:"system,omitempty"` + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` @@ -58,7 +66,8 @@ type ExternalService struct { type ExternalServiceCollection struct { Collection - Data []ExternalService `json:"data,omitempty"` + Data []ExternalService `json:"data,omitempty"` + client *ExternalServiceClient } type ExternalServiceClient struct { @@ -116,9 +125,20 @@ func (c *ExternalServiceClient) Update(existing *ExternalService, updates interf func (c *ExternalServiceClient) List(opts *ListOpts) (*ExternalServiceCollection, error) { resp := &ExternalServiceCollection{} err := c.rancherClient.doList(EXTERNAL_SERVICE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ExternalServiceCollection) Next() (*ExternalServiceCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ExternalServiceCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ExternalServiceClient) ById(id string) (*ExternalService, error) { resp := &ExternalService{} err := c.rancherClient.doById(EXTERNAL_SERVICE_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_external_service_event.go b/vendor/github.com/rancher/go-rancher/v2/generated_external_service_event.go index 1eb53a599..59913d208 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_external_service_event.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_external_service_event.go @@ -38,7 +38,8 @@ type ExternalServiceEvent struct { type ExternalServiceEventCollection struct { Collection - Data []ExternalServiceEvent `json:"data,omitempty"` + Data []ExternalServiceEvent `json:"data,omitempty"` + client *ExternalServiceEventClient } type ExternalServiceEventClient struct { @@ -78,9 +79,20 @@ func (c *ExternalServiceEventClient) Update(existing *ExternalServiceEvent, upda func (c *ExternalServiceEventClient) List(opts *ListOpts) (*ExternalServiceEventCollection, error) { resp := &ExternalServiceEventCollection{} err := c.rancherClient.doList(EXTERNAL_SERVICE_EVENT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ExternalServiceEventCollection) Next() (*ExternalServiceEventCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ExternalServiceEventCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ExternalServiceEventClient) ById(id string) (*ExternalServiceEvent, error) { resp := &ExternalServiceEvent{} err := c.rancherClient.doById(EXTERNAL_SERVICE_EVENT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_external_storage_pool_event.go b/vendor/github.com/rancher/go-rancher/v2/generated_external_storage_pool_event.go index 21d4ef365..30b8ca17d 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_external_storage_pool_event.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_external_storage_pool_event.go @@ -38,7 +38,8 @@ type ExternalStoragePoolEvent struct { type ExternalStoragePoolEventCollection struct { Collection - Data []ExternalStoragePoolEvent `json:"data,omitempty"` + Data []ExternalStoragePoolEvent `json:"data,omitempty"` + client *ExternalStoragePoolEventClient } type ExternalStoragePoolEventClient struct { @@ -78,9 +79,20 @@ func (c *ExternalStoragePoolEventClient) Update(existing *ExternalStoragePoolEve func (c *ExternalStoragePoolEventClient) List(opts *ListOpts) (*ExternalStoragePoolEventCollection, error) { resp := &ExternalStoragePoolEventCollection{} err := c.rancherClient.doList(EXTERNAL_STORAGE_POOL_EVENT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ExternalStoragePoolEventCollection) Next() (*ExternalStoragePoolEventCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ExternalStoragePoolEventCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ExternalStoragePoolEventClient) ById(id string) (*ExternalStoragePoolEvent, error) { resp := &ExternalStoragePoolEvent{} err := c.rancherClient.doById(EXTERNAL_STORAGE_POOL_EVENT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_external_volume_event.go b/vendor/github.com/rancher/go-rancher/v2/generated_external_volume_event.go index 2c1fae7dc..785efb153 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_external_volume_event.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_external_volume_event.go @@ -36,7 +36,8 @@ type ExternalVolumeEvent struct { type ExternalVolumeEventCollection struct { Collection - Data []ExternalVolumeEvent `json:"data,omitempty"` + Data []ExternalVolumeEvent `json:"data,omitempty"` + client *ExternalVolumeEventClient } type ExternalVolumeEventClient struct { @@ -76,9 +77,20 @@ func (c *ExternalVolumeEventClient) Update(existing *ExternalVolumeEvent, update func (c *ExternalVolumeEventClient) List(opts *ListOpts) (*ExternalVolumeEventCollection, error) { resp := &ExternalVolumeEventCollection{} err := c.rancherClient.doList(EXTERNAL_VOLUME_EVENT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ExternalVolumeEventCollection) Next() (*ExternalVolumeEventCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ExternalVolumeEventCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ExternalVolumeEventClient) ById(id string) (*ExternalVolumeEvent, error) { resp := &ExternalVolumeEvent{} err := c.rancherClient.doById(EXTERNAL_VOLUME_EVENT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_field_documentation.go b/vendor/github.com/rancher/go-rancher/v2/generated_field_documentation.go index 035ac23fd..511d33bec 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_field_documentation.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_field_documentation.go @@ -12,7 +12,8 @@ type FieldDocumentation struct { type FieldDocumentationCollection struct { Collection - Data []FieldDocumentation `json:"data,omitempty"` + Data []FieldDocumentation `json:"data,omitempty"` + client *FieldDocumentationClient } type FieldDocumentationClient struct { @@ -48,9 +49,20 @@ func (c *FieldDocumentationClient) Update(existing *FieldDocumentation, updates func (c *FieldDocumentationClient) List(opts *ListOpts) (*FieldDocumentationCollection, error) { resp := &FieldDocumentationCollection{} err := c.rancherClient.doList(FIELD_DOCUMENTATION_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *FieldDocumentationCollection) Next() (*FieldDocumentationCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &FieldDocumentationCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *FieldDocumentationClient) ById(id string) (*FieldDocumentation, error) { resp := &FieldDocumentation{} err := c.rancherClient.doById(FIELD_DOCUMENTATION_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_githubconfig.go b/vendor/github.com/rancher/go-rancher/v2/generated_githubconfig.go index cafb43340..037d7741a 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_githubconfig.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_githubconfig.go @@ -9,7 +9,7 @@ type Githubconfig struct { AccessMode string `json:"accessMode,omitempty" yaml:"access_mode,omitempty"` - AllowedIdentities []interface{} `json:"allowedIdentities,omitempty" yaml:"allowed_identities,omitempty"` + AllowedIdentities []Identity `json:"allowedIdentities,omitempty" yaml:"allowed_identities,omitempty"` ClientId string `json:"clientId,omitempty" yaml:"client_id,omitempty"` @@ -26,7 +26,8 @@ type Githubconfig struct { type GithubconfigCollection struct { Collection - Data []Githubconfig `json:"data,omitempty"` + Data []Githubconfig `json:"data,omitempty"` + client *GithubconfigClient } type GithubconfigClient struct { @@ -62,9 +63,20 @@ func (c *GithubconfigClient) Update(existing *Githubconfig, updates interface{}) func (c *GithubconfigClient) List(opts *ListOpts) (*GithubconfigCollection, error) { resp := &GithubconfigCollection{} err := c.rancherClient.doList(GITHUBCONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *GithubconfigCollection) Next() (*GithubconfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &GithubconfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *GithubconfigClient) ById(id string) (*Githubconfig, error) { resp := &Githubconfig{} err := c.rancherClient.doById(GITHUBCONFIG_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_ha_config.go b/vendor/github.com/rancher/go-rancher/v2/generated_ha_config.go index 9b9d14c4a..f5bb82f2c 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_ha_config.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_ha_config.go @@ -18,7 +18,8 @@ type HaConfig struct { type HaConfigCollection struct { Collection - Data []HaConfig `json:"data,omitempty"` + Data []HaConfig `json:"data,omitempty"` + client *HaConfigClient } type HaConfigClient struct { @@ -54,9 +55,20 @@ func (c *HaConfigClient) Update(existing *HaConfig, updates interface{}) (*HaCon func (c *HaConfigClient) List(opts *ListOpts) (*HaConfigCollection, error) { resp := &HaConfigCollection{} err := c.rancherClient.doList(HA_CONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *HaConfigCollection) Next() (*HaConfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &HaConfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *HaConfigClient) ById(id string) (*HaConfig, error) { resp := &HaConfig{} err := c.rancherClient.doById(HA_CONFIG_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_ha_config_input.go b/vendor/github.com/rancher/go-rancher/v2/generated_ha_config_input.go index fdff3ae1c..ce869369c 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_ha_config_input.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_ha_config_input.go @@ -42,7 +42,8 @@ type HaConfigInput struct { type HaConfigInputCollection struct { Collection - Data []HaConfigInput `json:"data,omitempty"` + Data []HaConfigInput `json:"data,omitempty"` + client *HaConfigInputClient } type HaConfigInputClient struct { @@ -78,9 +79,20 @@ func (c *HaConfigInputClient) Update(existing *HaConfigInput, updates interface{ func (c *HaConfigInputClient) List(opts *ListOpts) (*HaConfigInputCollection, error) { resp := &HaConfigInputCollection{} err := c.rancherClient.doList(HA_CONFIG_INPUT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *HaConfigInputCollection) Next() (*HaConfigInputCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &HaConfigInputCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *HaConfigInputClient) ById(id string) (*HaConfigInput, error) { resp := &HaConfigInput{} err := c.rancherClient.doById(HA_CONFIG_INPUT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_haproxy_config.go b/vendor/github.com/rancher/go-rancher/v2/generated_haproxy_config.go index a1e27bcdf..e8f6cc36b 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_haproxy_config.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_haproxy_config.go @@ -14,7 +14,8 @@ type HaproxyConfig struct { type HaproxyConfigCollection struct { Collection - Data []HaproxyConfig `json:"data,omitempty"` + Data []HaproxyConfig `json:"data,omitempty"` + client *HaproxyConfigClient } type HaproxyConfigClient struct { @@ -50,9 +51,20 @@ func (c *HaproxyConfigClient) Update(existing *HaproxyConfig, updates interface{ func (c *HaproxyConfigClient) List(opts *ListOpts) (*HaproxyConfigCollection, error) { resp := &HaproxyConfigCollection{} err := c.rancherClient.doList(HAPROXY_CONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *HaproxyConfigCollection) Next() (*HaproxyConfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &HaproxyConfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *HaproxyConfigClient) ById(id string) (*HaproxyConfig, error) { resp := &HaproxyConfig{} err := c.rancherClient.doById(HAPROXY_CONFIG_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_healthcheck_instance_host_map.go b/vendor/github.com/rancher/go-rancher/v2/generated_healthcheck_instance_host_map.go index 6329d2f83..b30b9d869 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_healthcheck_instance_host_map.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_healthcheck_instance_host_map.go @@ -42,7 +42,8 @@ type HealthcheckInstanceHostMap struct { type HealthcheckInstanceHostMapCollection struct { Collection - Data []HealthcheckInstanceHostMap `json:"data,omitempty"` + Data []HealthcheckInstanceHostMap `json:"data,omitempty"` + client *HealthcheckInstanceHostMapClient } type HealthcheckInstanceHostMapClient struct { @@ -82,9 +83,20 @@ func (c *HealthcheckInstanceHostMapClient) Update(existing *HealthcheckInstanceH func (c *HealthcheckInstanceHostMapClient) List(opts *ListOpts) (*HealthcheckInstanceHostMapCollection, error) { resp := &HealthcheckInstanceHostMapCollection{} err := c.rancherClient.doList(HEALTHCHECK_INSTANCE_HOST_MAP_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *HealthcheckInstanceHostMapCollection) Next() (*HealthcheckInstanceHostMapCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &HealthcheckInstanceHostMapCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *HealthcheckInstanceHostMapClient) ById(id string) (*HealthcheckInstanceHostMap, error) { resp := &HealthcheckInstanceHostMap{} err := c.rancherClient.doById(HEALTHCHECK_INSTANCE_HOST_MAP_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_host.go b/vendor/github.com/rancher/go-rancher/v2/generated_host.go index f1ee94368..bb9ebf156 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_host.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_host.go @@ -11,10 +11,20 @@ type Host struct { AgentId string `json:"agentId,omitempty" yaml:"agent_id,omitempty"` + AgentIpAddress string `json:"agentIpAddress,omitempty" yaml:"agent_ip_address,omitempty"` + AgentState string `json:"agentState,omitempty" yaml:"agent_state,omitempty"` + Amazonec2Config *Amazonec2Config `json:"amazonec2Config,omitempty" yaml:"amazonec2config,omitempty"` + ApiProxy string `json:"apiProxy,omitempty" yaml:"api_proxy,omitempty"` + AuthCertificateAuthority string `json:"authCertificateAuthority,omitempty" yaml:"auth_certificate_authority,omitempty"` + + AuthKey string `json:"authKey,omitempty" yaml:"auth_key,omitempty"` + + AzureConfig *AzureConfig `json:"azureConfig,omitempty" yaml:"azure_config,omitempty"` + ComputeTotal int64 `json:"computeTotal,omitempty" yaml:"compute_total,omitempty"` Created string `json:"created,omitempty" yaml:"created,omitempty"` @@ -23,19 +33,45 @@ type Host struct { Description string `json:"description,omitempty" yaml:"description,omitempty"` + DigitaloceanConfig *DigitaloceanConfig `json:"digitaloceanConfig,omitempty" yaml:"digitalocean_config,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"` + + ExtractedConfig string `json:"extractedConfig,omitempty" yaml:"extracted_config,omitempty"` + Hostname string `json:"hostname,omitempty" yaml:"hostname,omitempty"` Info interface{} `json:"info,omitempty" yaml:"info,omitempty"` + InstanceIds []string `json:"instanceIds,omitempty" yaml:"instance_ids,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"` + PacketConfig *PacketConfig `json:"packetConfig,omitempty" yaml:"packet_config,omitempty"` + PhysicalHostId string `json:"physicalHostId,omitempty" yaml:"physical_host_id,omitempty"` - PublicEndpoints []interface{} `json:"publicEndpoints,omitempty" yaml:"public_endpoints,omitempty"` + PublicEndpoints []PublicEndpoint `json:"publicEndpoints,omitempty" yaml:"public_endpoints,omitempty"` RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` @@ -54,7 +90,8 @@ type Host struct { type HostCollection struct { Collection - Data []Host `json:"data,omitempty"` + Data []Host `json:"data,omitempty"` + client *HostClient } type HostClient struct { @@ -76,6 +113,10 @@ type HostOperations interface { ActionDockersocket(*Host) (*HostAccess, error) + ActionError(*Host) (*Host, error) + + ActionProvision(*Host) (*Host, error) + ActionPurge(*Host) (*Host, error) ActionRemove(*Host) (*Host, error) @@ -106,9 +147,20 @@ func (c *HostClient) Update(existing *Host, updates interface{}) (*Host, error) func (c *HostClient) List(opts *ListOpts) (*HostCollection, error) { resp := &HostCollection{} err := c.rancherClient.doList(HOST_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *HostCollection) Next() (*HostCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &HostCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *HostClient) ById(id string) (*Host, error) { resp := &Host{} err := c.rancherClient.doById(HOST_TYPE, id, resp) @@ -160,6 +212,24 @@ func (c *HostClient) ActionDockersocket(resource *Host) (*HostAccess, error) { return resp, err } +func (c *HostClient) ActionError(resource *Host) (*Host, error) { + + resp := &Host{} + + err := c.rancherClient.doAction(HOST_TYPE, "error", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *HostClient) ActionProvision(resource *Host) (*Host, error) { + + resp := &Host{} + + err := c.rancherClient.doAction(HOST_TYPE, "provision", &resource.Resource, nil, resp) + + return resp, err +} + func (c *HostClient) ActionPurge(resource *Host) (*Host, error) { resp := &Host{} diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_host_access.go b/vendor/github.com/rancher/go-rancher/v2/generated_host_access.go index ee4ab3992..7ebc586b5 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_host_access.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_host_access.go @@ -14,7 +14,8 @@ type HostAccess struct { type HostAccessCollection struct { Collection - Data []HostAccess `json:"data,omitempty"` + Data []HostAccess `json:"data,omitempty"` + client *HostAccessClient } type HostAccessClient struct { @@ -50,9 +51,20 @@ func (c *HostAccessClient) Update(existing *HostAccess, updates interface{}) (*H func (c *HostAccessClient) List(opts *ListOpts) (*HostAccessCollection, error) { resp := &HostAccessCollection{} err := c.rancherClient.doList(HOST_ACCESS_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *HostAccessCollection) Next() (*HostAccessCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &HostAccessCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *HostAccessClient) ById(id string) (*HostAccess, error) { resp := &HostAccess{} err := c.rancherClient.doById(HOST_ACCESS_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_host_api_proxy_token.go b/vendor/github.com/rancher/go-rancher/v2/generated_host_api_proxy_token.go index e4c508a2f..1517b79bf 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_host_api_proxy_token.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_host_api_proxy_token.go @@ -16,7 +16,8 @@ type HostApiProxyToken struct { type HostApiProxyTokenCollection struct { Collection - Data []HostApiProxyToken `json:"data,omitempty"` + Data []HostApiProxyToken `json:"data,omitempty"` + client *HostApiProxyTokenClient } type HostApiProxyTokenClient struct { @@ -52,9 +53,20 @@ func (c *HostApiProxyTokenClient) Update(existing *HostApiProxyToken, updates in func (c *HostApiProxyTokenClient) List(opts *ListOpts) (*HostApiProxyTokenCollection, error) { resp := &HostApiProxyTokenCollection{} err := c.rancherClient.doList(HOST_API_PROXY_TOKEN_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *HostApiProxyTokenCollection) Next() (*HostApiProxyTokenCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &HostApiProxyTokenCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *HostApiProxyTokenClient) ById(id string) (*HostApiProxyToken, error) { resp := &HostApiProxyToken{} err := c.rancherClient.doById(HOST_API_PROXY_TOKEN_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_identity.go b/vendor/github.com/rancher/go-rancher/v2/generated_identity.go index f78f7c765..1d92de6a1 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_identity.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_identity.go @@ -28,7 +28,8 @@ type Identity struct { type IdentityCollection struct { Collection - Data []Identity `json:"data,omitempty"` + Data []Identity `json:"data,omitempty"` + client *IdentityClient } type IdentityClient struct { @@ -64,9 +65,20 @@ func (c *IdentityClient) Update(existing *Identity, updates interface{}) (*Ident func (c *IdentityClient) List(opts *ListOpts) (*IdentityCollection, error) { resp := &IdentityCollection{} err := c.rancherClient.doList(IDENTITY_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *IdentityCollection) Next() (*IdentityCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &IdentityCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *IdentityClient) ById(id string) (*Identity, error) { resp := &Identity{} err := c.rancherClient.doById(IDENTITY_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_image.go b/vendor/github.com/rancher/go-rancher/v2/generated_image.go index 84d1d0ffc..b14103b33 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_image.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_image.go @@ -36,7 +36,8 @@ type Image struct { type ImageCollection struct { Collection - Data []Image `json:"data,omitempty"` + Data []Image `json:"data,omitempty"` + client *ImageClient } type ImageClient struct { @@ -86,9 +87,20 @@ func (c *ImageClient) Update(existing *Image, updates interface{}) (*Image, erro func (c *ImageClient) List(opts *ListOpts) (*ImageCollection, error) { resp := &ImageCollection{} err := c.rancherClient.doList(IMAGE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ImageCollection) Next() (*ImageCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ImageCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ImageClient) ById(id string) (*Image, error) { resp := &Image{} err := c.rancherClient.doById(IMAGE_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_in_service_upgrade_strategy.go b/vendor/github.com/rancher/go-rancher/v2/generated_in_service_upgrade_strategy.go index a92885793..3e93a776b 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_in_service_upgrade_strategy.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_in_service_upgrade_strategy.go @@ -15,16 +15,17 @@ type InServiceUpgradeStrategy struct { PreviousLaunchConfig *LaunchConfig `json:"previousLaunchConfig,omitempty" yaml:"previous_launch_config,omitempty"` - PreviousSecondaryLaunchConfigs []interface{} `json:"previousSecondaryLaunchConfigs,omitempty" yaml:"previous_secondary_launch_configs,omitempty"` + PreviousSecondaryLaunchConfigs []SecondaryLaunchConfig `json:"previousSecondaryLaunchConfigs,omitempty" yaml:"previous_secondary_launch_configs,omitempty"` - SecondaryLaunchConfigs []interface{} `json:"secondaryLaunchConfigs,omitempty" yaml:"secondary_launch_configs,omitempty"` + SecondaryLaunchConfigs []SecondaryLaunchConfig `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"` + Data []InServiceUpgradeStrategy `json:"data,omitempty"` + client *InServiceUpgradeStrategyClient } type InServiceUpgradeStrategyClient struct { @@ -60,9 +61,20 @@ func (c *InServiceUpgradeStrategyClient) Update(existing *InServiceUpgradeStrate func (c *InServiceUpgradeStrategyClient) List(opts *ListOpts) (*InServiceUpgradeStrategyCollection, error) { resp := &InServiceUpgradeStrategyCollection{} err := c.rancherClient.doList(IN_SERVICE_UPGRADE_STRATEGY_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *InServiceUpgradeStrategyCollection) Next() (*InServiceUpgradeStrategyCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &InServiceUpgradeStrategyCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *InServiceUpgradeStrategyClient) ById(id string) (*InServiceUpgradeStrategy, error) { resp := &InServiceUpgradeStrategy{} err := c.rancherClient.doById(IN_SERVICE_UPGRADE_STRATEGY_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_instance.go b/vendor/github.com/rancher/go-rancher/v2/generated_instance.go index f43f6bd57..c552f3def 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_instance.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_instance.go @@ -40,7 +40,8 @@ type Instance struct { type InstanceCollection struct { Collection - Data []Instance `json:"data,omitempty"` + Data []Instance `json:"data,omitempty"` + client *InstanceClient } type InstanceClient struct { @@ -108,9 +109,20 @@ func (c *InstanceClient) Update(existing *Instance, updates interface{}) (*Insta func (c *InstanceClient) List(opts *ListOpts) (*InstanceCollection, error) { resp := &InstanceCollection{} err := c.rancherClient.doList(INSTANCE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *InstanceCollection) Next() (*InstanceCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &InstanceCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *InstanceClient) ById(id string) (*Instance, error) { resp := &Instance{} err := c.rancherClient.doById(INSTANCE_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_instance_console.go b/vendor/github.com/rancher/go-rancher/v2/generated_instance_console.go index bf38cb4c1..85746058d 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_instance_console.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_instance_console.go @@ -16,7 +16,8 @@ type InstanceConsole struct { type InstanceConsoleCollection struct { Collection - Data []InstanceConsole `json:"data,omitempty"` + Data []InstanceConsole `json:"data,omitempty"` + client *InstanceConsoleClient } type InstanceConsoleClient struct { @@ -52,9 +53,20 @@ func (c *InstanceConsoleClient) Update(existing *InstanceConsole, updates interf func (c *InstanceConsoleClient) List(opts *ListOpts) (*InstanceConsoleCollection, error) { resp := &InstanceConsoleCollection{} err := c.rancherClient.doList(INSTANCE_CONSOLE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *InstanceConsoleCollection) Next() (*InstanceConsoleCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &InstanceConsoleCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *InstanceConsoleClient) ById(id string) (*InstanceConsole, error) { resp := &InstanceConsole{} err := c.rancherClient.doById(INSTANCE_CONSOLE_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_instance_console_input.go b/vendor/github.com/rancher/go-rancher/v2/generated_instance_console_input.go index 11a126f79..5bfbe81f2 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_instance_console_input.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_instance_console_input.go @@ -10,7 +10,8 @@ type InstanceConsoleInput struct { type InstanceConsoleInputCollection struct { Collection - Data []InstanceConsoleInput `json:"data,omitempty"` + Data []InstanceConsoleInput `json:"data,omitempty"` + client *InstanceConsoleInputClient } type InstanceConsoleInputClient struct { @@ -46,9 +47,20 @@ func (c *InstanceConsoleInputClient) Update(existing *InstanceConsoleInput, upda func (c *InstanceConsoleInputClient) List(opts *ListOpts) (*InstanceConsoleInputCollection, error) { resp := &InstanceConsoleInputCollection{} err := c.rancherClient.doList(INSTANCE_CONSOLE_INPUT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *InstanceConsoleInputCollection) Next() (*InstanceConsoleInputCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &InstanceConsoleInputCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *InstanceConsoleInputClient) ById(id string) (*InstanceConsoleInput, error) { resp := &InstanceConsoleInput{} err := c.rancherClient.doById(INSTANCE_CONSOLE_INPUT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_instance_health_check.go b/vendor/github.com/rancher/go-rancher/v2/generated_instance_health_check.go index 305798bf8..4f2ce46c4 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_instance_health_check.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_instance_health_check.go @@ -32,7 +32,8 @@ type InstanceHealthCheck struct { type InstanceHealthCheckCollection struct { Collection - Data []InstanceHealthCheck `json:"data,omitempty"` + Data []InstanceHealthCheck `json:"data,omitempty"` + client *InstanceHealthCheckClient } type InstanceHealthCheckClient struct { @@ -68,9 +69,20 @@ func (c *InstanceHealthCheckClient) Update(existing *InstanceHealthCheck, update func (c *InstanceHealthCheckClient) List(opts *ListOpts) (*InstanceHealthCheckCollection, error) { resp := &InstanceHealthCheckCollection{} err := c.rancherClient.doList(INSTANCE_HEALTH_CHECK_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *InstanceHealthCheckCollection) Next() (*InstanceHealthCheckCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &InstanceHealthCheckCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *InstanceHealthCheckClient) ById(id string) (*InstanceHealthCheck, error) { resp := &InstanceHealthCheck{} err := c.rancherClient.doById(INSTANCE_HEALTH_CHECK_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_instance_link.go b/vendor/github.com/rancher/go-rancher/v2/generated_instance_link.go index 5e7146514..598d5e52f 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_instance_link.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_instance_link.go @@ -44,7 +44,8 @@ type InstanceLink struct { type InstanceLinkCollection struct { Collection - Data []InstanceLink `json:"data,omitempty"` + Data []InstanceLink `json:"data,omitempty"` + client *InstanceLinkClient } type InstanceLinkClient struct { @@ -94,9 +95,20 @@ func (c *InstanceLinkClient) Update(existing *InstanceLink, updates interface{}) func (c *InstanceLinkClient) List(opts *ListOpts) (*InstanceLinkCollection, error) { resp := &InstanceLinkCollection{} err := c.rancherClient.doList(INSTANCE_LINK_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *InstanceLinkCollection) Next() (*InstanceLinkCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &InstanceLinkCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *InstanceLinkClient) ById(id string) (*InstanceLink, error) { resp := &InstanceLink{} err := c.rancherClient.doById(INSTANCE_LINK_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_instance_stop.go b/vendor/github.com/rancher/go-rancher/v2/generated_instance_stop.go index d034bd615..2e3b2b67f 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_instance_stop.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_instance_stop.go @@ -14,7 +14,8 @@ type InstanceStop struct { type InstanceStopCollection struct { Collection - Data []InstanceStop `json:"data,omitempty"` + Data []InstanceStop `json:"data,omitempty"` + client *InstanceStopClient } type InstanceStopClient struct { @@ -50,9 +51,20 @@ func (c *InstanceStopClient) Update(existing *InstanceStop, updates interface{}) func (c *InstanceStopClient) List(opts *ListOpts) (*InstanceStopCollection, error) { resp := &InstanceStopCollection{} err := c.rancherClient.doList(INSTANCE_STOP_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *InstanceStopCollection) Next() (*InstanceStopCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &InstanceStopCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *InstanceStopClient) ById(id string) (*InstanceStop, error) { resp := &InstanceStop{} err := c.rancherClient.doById(INSTANCE_STOP_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_ip_address.go b/vendor/github.com/rancher/go-rancher/v2/generated_ip_address.go index ba7a0f39a..60932494e 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_ip_address.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_ip_address.go @@ -40,7 +40,8 @@ type IpAddress struct { type IpAddressCollection struct { Collection - Data []IpAddress `json:"data,omitempty"` + Data []IpAddress `json:"data,omitempty"` + client *IpAddressClient } type IpAddressClient struct { @@ -92,9 +93,20 @@ func (c *IpAddressClient) Update(existing *IpAddress, updates interface{}) (*IpA func (c *IpAddressClient) List(opts *ListOpts) (*IpAddressCollection, error) { resp := &IpAddressCollection{} err := c.rancherClient.doList(IP_ADDRESS_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *IpAddressCollection) Next() (*IpAddressCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &IpAddressCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *IpAddressClient) ById(id string) (*IpAddress, error) { resp := &IpAddress{} err := c.rancherClient.doById(IP_ADDRESS_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_ip_address_associate_input.go b/vendor/github.com/rancher/go-rancher/v2/generated_ip_address_associate_input.go index 2184ae9a4..2fb5fe2e8 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_ip_address_associate_input.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_ip_address_associate_input.go @@ -12,7 +12,8 @@ type IpAddressAssociateInput struct { type IpAddressAssociateInputCollection struct { Collection - Data []IpAddressAssociateInput `json:"data,omitempty"` + Data []IpAddressAssociateInput `json:"data,omitempty"` + client *IpAddressAssociateInputClient } type IpAddressAssociateInputClient struct { @@ -48,9 +49,20 @@ func (c *IpAddressAssociateInputClient) Update(existing *IpAddressAssociateInput func (c *IpAddressAssociateInputClient) List(opts *ListOpts) (*IpAddressAssociateInputCollection, error) { resp := &IpAddressAssociateInputCollection{} err := c.rancherClient.doList(IP_ADDRESS_ASSOCIATE_INPUT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *IpAddressAssociateInputCollection) Next() (*IpAddressAssociateInputCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &IpAddressAssociateInputCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *IpAddressAssociateInputClient) ById(id string) (*IpAddressAssociateInput, error) { resp := &IpAddressAssociateInput{} err := c.rancherClient.doById(IP_ADDRESS_ASSOCIATE_INPUT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_kubernetes_service.go b/vendor/github.com/rancher/go-rancher/v2/generated_kubernetes_service.go index a5e63475c..ea1f48fff 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_kubernetes_service.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_kubernetes_service.go @@ -9,6 +9,10 @@ type KubernetesService struct { AccountId string `json:"accountId,omitempty" yaml:"account_id,omitempty"` + ConsumedByServiceIds []string `json:"consumedByServiceIds,omitempty" yaml:"consumed_by_service_ids,omitempty"` + + ConsumedServiceIds []string `json:"consumedServiceIds,omitempty" yaml:"consumed_service_ids,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` Data map[string]interface{} `json:"data,omitempty" yaml:"data,omitempty"` @@ -19,6 +23,8 @@ type KubernetesService struct { HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"` + InstanceIds []string `json:"instanceIds,omitempty" yaml:"instance_ids,omitempty"` + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` Name string `json:"name,omitempty" yaml:"name,omitempty"` @@ -33,6 +39,8 @@ type KubernetesService struct { State string `json:"state,omitempty" yaml:"state,omitempty"` + System bool `json:"system,omitempty" yaml:"system,omitempty"` + Template interface{} `json:"template,omitempty" yaml:"template,omitempty"` Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` @@ -48,7 +56,8 @@ type KubernetesService struct { type KubernetesServiceCollection struct { Collection - Data []KubernetesService `json:"data,omitempty"` + Data []KubernetesService `json:"data,omitempty"` + client *KubernetesServiceClient } type KubernetesServiceClient struct { @@ -112,9 +121,20 @@ func (c *KubernetesServiceClient) Update(existing *KubernetesService, updates in func (c *KubernetesServiceClient) List(opts *ListOpts) (*KubernetesServiceCollection, error) { resp := &KubernetesServiceCollection{} err := c.rancherClient.doList(KUBERNETES_SERVICE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *KubernetesServiceCollection) Next() (*KubernetesServiceCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &KubernetesServiceCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *KubernetesServiceClient) ById(id string) (*KubernetesService, error) { resp := &KubernetesService{} err := c.rancherClient.doById(KUBERNETES_SERVICE_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_kubernetes_stack.go b/vendor/github.com/rancher/go-rancher/v2/generated_kubernetes_stack.go index 5df948e42..08c3d7e17 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_kubernetes_stack.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_kubernetes_stack.go @@ -21,6 +21,8 @@ type KubernetesStack struct { ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"` + Group string `json:"group,omitempty" yaml:"group,omitempty"` + HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"` Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` @@ -37,8 +39,12 @@ type KubernetesStack struct { Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + ServiceIds []string `json:"serviceIds,omitempty" yaml:"service_ids,omitempty"` + State string `json:"state,omitempty" yaml:"state,omitempty"` + System bool `json:"system,omitempty" yaml:"system,omitempty"` + Templates map[string]interface{} `json:"templates,omitempty" yaml:"templates,omitempty"` Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` @@ -52,7 +58,8 @@ type KubernetesStack struct { type KubernetesStackCollection struct { Collection - Data []KubernetesStack `json:"data,omitempty"` + Data []KubernetesStack `json:"data,omitempty"` + client *KubernetesStackClient } type KubernetesStackClient struct { @@ -102,9 +109,20 @@ func (c *KubernetesStackClient) Update(existing *KubernetesStack, updates interf func (c *KubernetesStackClient) List(opts *ListOpts) (*KubernetesStackCollection, error) { resp := &KubernetesStackCollection{} err := c.rancherClient.doList(KUBERNETES_STACK_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *KubernetesStackCollection) Next() (*KubernetesStackCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &KubernetesStackCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *KubernetesStackClient) ById(id string) (*KubernetesStack, error) { resp := &KubernetesStack{} err := c.rancherClient.doById(KUBERNETES_STACK_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_kubernetes_stack_upgrade.go b/vendor/github.com/rancher/go-rancher/v2/generated_kubernetes_stack_upgrade.go index 11d7f9322..58c6c5ca8 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_kubernetes_stack_upgrade.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_kubernetes_stack_upgrade.go @@ -16,7 +16,8 @@ type KubernetesStackUpgrade struct { type KubernetesStackUpgradeCollection struct { Collection - Data []KubernetesStackUpgrade `json:"data,omitempty"` + Data []KubernetesStackUpgrade `json:"data,omitempty"` + client *KubernetesStackUpgradeClient } type KubernetesStackUpgradeClient struct { @@ -52,9 +53,20 @@ func (c *KubernetesStackUpgradeClient) Update(existing *KubernetesStackUpgrade, func (c *KubernetesStackUpgradeClient) List(opts *ListOpts) (*KubernetesStackUpgradeCollection, error) { resp := &KubernetesStackUpgradeCollection{} err := c.rancherClient.doList(KUBERNETES_STACK_UPGRADE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *KubernetesStackUpgradeCollection) Next() (*KubernetesStackUpgradeCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &KubernetesStackUpgradeCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *KubernetesStackUpgradeClient) ById(id string) (*KubernetesStackUpgrade, error) { resp := &KubernetesStackUpgrade{} err := c.rancherClient.doById(KUBERNETES_STACK_UPGRADE_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_label.go b/vendor/github.com/rancher/go-rancher/v2/generated_label.go index 004a75d9d..6b67a2e84 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_label.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_label.go @@ -40,7 +40,8 @@ type Label struct { type LabelCollection struct { Collection - Data []Label `json:"data,omitempty"` + Data []Label `json:"data,omitempty"` + client *LabelClient } type LabelClient struct { @@ -80,9 +81,20 @@ func (c *LabelClient) Update(existing *Label, updates interface{}) (*Label, erro func (c *LabelClient) List(opts *ListOpts) (*LabelCollection, error) { resp := &LabelCollection{} err := c.rancherClient.doList(LABEL_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *LabelCollection) Next() (*LabelCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &LabelCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *LabelClient) ById(id string) (*Label, error) { resp := &Label{} err := c.rancherClient.doById(LABEL_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_launch_config.go b/vendor/github.com/rancher/go-rancher/v2/generated_launch_config.go index b24cf4b26..b03ba22a6 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_launch_config.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_launch_config.go @@ -49,7 +49,7 @@ type LaunchConfig struct { Devices []string `json:"devices,omitempty" yaml:"devices,omitempty"` - Disks []interface{} `json:"disks,omitempty" yaml:"disks,omitempty"` + Disks []VirtualMachineDisk `json:"disks,omitempty" yaml:"disks,omitempty"` Dns []string `json:"dns,omitempty" yaml:"dns,omitempty"` @@ -129,6 +129,8 @@ type LaunchConfig struct { SecurityOpt []string `json:"securityOpt,omitempty" yaml:"security_opt,omitempty"` + ServiceIds []string `json:"serviceIds,omitempty" yaml:"service_ids,omitempty"` + StartCount int64 `json:"startCount,omitempty" yaml:"start_count,omitempty"` StartOnCreate bool `json:"startOnCreate,omitempty" yaml:"start_on_create,omitempty"` @@ -137,6 +139,8 @@ type LaunchConfig struct { StdinOpen bool `json:"stdinOpen,omitempty" yaml:"stdin_open,omitempty"` + System bool `json:"system,omitempty" yaml:"system,omitempty"` + SystemContainer string `json:"systemContainer,omitempty" yaml:"system_container,omitempty"` Token string `json:"token,omitempty" yaml:"token,omitempty"` @@ -166,7 +170,8 @@ type LaunchConfig struct { type LaunchConfigCollection struct { Collection - Data []LaunchConfig `json:"data,omitempty"` + Data []LaunchConfig `json:"data,omitempty"` + client *LaunchConfigClient } type LaunchConfigClient struct { @@ -204,8 +209,6 @@ type LaunchConfigOperations interface { ActionRestore(*LaunchConfig) (*Instance, error) - ActionSetlabels(*LaunchConfig, *SetLabelsInput) (*Container, error) - ActionStart(*LaunchConfig) (*Instance, error) ActionStop(*LaunchConfig, *InstanceStop) (*Instance, error) @@ -240,9 +243,20 @@ func (c *LaunchConfigClient) Update(existing *LaunchConfig, updates interface{}) func (c *LaunchConfigClient) List(opts *ListOpts) (*LaunchConfigCollection, error) { resp := &LaunchConfigCollection{} err := c.rancherClient.doList(LAUNCH_CONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *LaunchConfigCollection) Next() (*LaunchConfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &LaunchConfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *LaunchConfigClient) ById(id string) (*LaunchConfig, error) { resp := &LaunchConfig{} err := c.rancherClient.doById(LAUNCH_CONFIG_TYPE, id, resp) @@ -366,15 +380,6 @@ func (c *LaunchConfigClient) ActionRestore(resource *LaunchConfig) (*Instance, e 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{} diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_ldapconfig.go b/vendor/github.com/rancher/go-rancher/v2/generated_ldapconfig.go index f760cfc95..747c911ae 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_ldapconfig.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_ldapconfig.go @@ -9,7 +9,7 @@ type Ldapconfig struct { AccessMode string `json:"accessMode,omitempty" yaml:"access_mode,omitempty"` - AllowedIdentities []interface{} `json:"allowedIdentities,omitempty" yaml:"allowed_identities,omitempty"` + AllowedIdentities []Identity `json:"allowedIdentities,omitempty" yaml:"allowed_identities,omitempty"` ConnectionTimeout int64 `json:"connectionTimeout,omitempty" yaml:"connection_timeout,omitempty"` @@ -56,7 +56,8 @@ type Ldapconfig struct { type LdapconfigCollection struct { Collection - Data []Ldapconfig `json:"data,omitempty"` + Data []Ldapconfig `json:"data,omitempty"` + client *LdapconfigClient } type LdapconfigClient struct { @@ -92,9 +93,20 @@ func (c *LdapconfigClient) Update(existing *Ldapconfig, updates interface{}) (*L func (c *LdapconfigClient) List(opts *ListOpts) (*LdapconfigCollection, error) { resp := &LdapconfigCollection{} err := c.rancherClient.doList(LDAPCONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *LdapconfigCollection) Next() (*LdapconfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &LdapconfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *LdapconfigClient) ById(id string) (*Ldapconfig, error) { resp := &Ldapconfig{} err := c.rancherClient.doById(LDAPCONFIG_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_load_balancer_app_cookie_stickiness_policy.go b/vendor/github.com/rancher/go-rancher/v2/generated_load_balancer_app_cookie_stickiness_policy.go index 235252cd3..9a0e7407e 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_load_balancer_app_cookie_stickiness_policy.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_load_balancer_app_cookie_stickiness_policy.go @@ -24,7 +24,8 @@ type LoadBalancerAppCookieStickinessPolicy struct { type LoadBalancerAppCookieStickinessPolicyCollection struct { Collection - Data []LoadBalancerAppCookieStickinessPolicy `json:"data,omitempty"` + Data []LoadBalancerAppCookieStickinessPolicy `json:"data,omitempty"` + client *LoadBalancerAppCookieStickinessPolicyClient } type LoadBalancerAppCookieStickinessPolicyClient struct { @@ -60,9 +61,20 @@ func (c *LoadBalancerAppCookieStickinessPolicyClient) Update(existing *LoadBalan func (c *LoadBalancerAppCookieStickinessPolicyClient) List(opts *ListOpts) (*LoadBalancerAppCookieStickinessPolicyCollection, error) { resp := &LoadBalancerAppCookieStickinessPolicyCollection{} err := c.rancherClient.doList(LOAD_BALANCER_APP_COOKIE_STICKINESS_POLICY_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *LoadBalancerAppCookieStickinessPolicyCollection) Next() (*LoadBalancerAppCookieStickinessPolicyCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &LoadBalancerAppCookieStickinessPolicyCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *LoadBalancerAppCookieStickinessPolicyClient) ById(id string) (*LoadBalancerAppCookieStickinessPolicy, error) { resp := &LoadBalancerAppCookieStickinessPolicy{} err := c.rancherClient.doById(LOAD_BALANCER_APP_COOKIE_STICKINESS_POLICY_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_load_balancer_config.go b/vendor/github.com/rancher/go-rancher/v2/generated_load_balancer_config.go index 8c23c42e3..aabc4ef64 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_load_balancer_config.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_load_balancer_config.go @@ -14,7 +14,8 @@ type LoadBalancerConfig struct { type LoadBalancerConfigCollection struct { Collection - Data []LoadBalancerConfig `json:"data,omitempty"` + Data []LoadBalancerConfig `json:"data,omitempty"` + client *LoadBalancerConfigClient } type LoadBalancerConfigClient struct { @@ -50,9 +51,20 @@ func (c *LoadBalancerConfigClient) Update(existing *LoadBalancerConfig, updates func (c *LoadBalancerConfigClient) List(opts *ListOpts) (*LoadBalancerConfigCollection, error) { resp := &LoadBalancerConfigCollection{} err := c.rancherClient.doList(LOAD_BALANCER_CONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *LoadBalancerConfigCollection) Next() (*LoadBalancerConfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &LoadBalancerConfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *LoadBalancerConfigClient) ById(id string) (*LoadBalancerConfig, error) { resp := &LoadBalancerConfig{} err := c.rancherClient.doById(LOAD_BALANCER_CONFIG_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_load_balancer_cookie_stickiness_policy.go b/vendor/github.com/rancher/go-rancher/v2/generated_load_balancer_cookie_stickiness_policy.go index 0fc5699a5..4a8d69893 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_load_balancer_cookie_stickiness_policy.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_load_balancer_cookie_stickiness_policy.go @@ -24,7 +24,8 @@ type LoadBalancerCookieStickinessPolicy struct { type LoadBalancerCookieStickinessPolicyCollection struct { Collection - Data []LoadBalancerCookieStickinessPolicy `json:"data,omitempty"` + Data []LoadBalancerCookieStickinessPolicy `json:"data,omitempty"` + client *LoadBalancerCookieStickinessPolicyClient } type LoadBalancerCookieStickinessPolicyClient struct { @@ -60,9 +61,20 @@ func (c *LoadBalancerCookieStickinessPolicyClient) Update(existing *LoadBalancer func (c *LoadBalancerCookieStickinessPolicyClient) List(opts *ListOpts) (*LoadBalancerCookieStickinessPolicyCollection, error) { resp := &LoadBalancerCookieStickinessPolicyCollection{} err := c.rancherClient.doList(LOAD_BALANCER_COOKIE_STICKINESS_POLICY_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *LoadBalancerCookieStickinessPolicyCollection) Next() (*LoadBalancerCookieStickinessPolicyCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &LoadBalancerCookieStickinessPolicyCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *LoadBalancerCookieStickinessPolicyClient) ById(id string) (*LoadBalancerCookieStickinessPolicy, error) { resp := &LoadBalancerCookieStickinessPolicy{} err := c.rancherClient.doById(LOAD_BALANCER_COOKIE_STICKINESS_POLICY_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_load_balancer_service.go b/vendor/github.com/rancher/go-rancher/v2/generated_load_balancer_service.go index 728eb8c9f..8d3ab4578 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_load_balancer_service.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_load_balancer_service.go @@ -13,6 +13,10 @@ type LoadBalancerService struct { CertificateIds []string `json:"certificateIds,omitempty" yaml:"certificate_ids,omitempty"` + ConsumedByServiceIds []string `json:"consumedByServiceIds,omitempty" yaml:"consumed_by_service_ids,omitempty"` + + ConsumedServiceIds []string `json:"consumedServiceIds,omitempty" yaml:"consumed_service_ids,omitempty"` + Created string `json:"created,omitempty" yaml:"created,omitempty"` CurrentScale int64 `json:"currentScale,omitempty" yaml:"current_scale,omitempty"` @@ -29,6 +33,8 @@ type LoadBalancerService struct { HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"` + InstanceIds []string `json:"instanceIds,omitempty" yaml:"instance_ids,omitempty"` + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` LaunchConfig *LaunchConfig `json:"launchConfig,omitempty" yaml:"launch_config,omitempty"` @@ -39,7 +45,7 @@ type LoadBalancerService struct { Name string `json:"name,omitempty" yaml:"name,omitempty"` - PublicEndpoints []interface{} `json:"publicEndpoints,omitempty" yaml:"public_endpoints,omitempty"` + PublicEndpoints []PublicEndpoint `json:"publicEndpoints,omitempty" yaml:"public_endpoints,omitempty"` RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` @@ -59,6 +65,8 @@ type LoadBalancerService struct { State string `json:"state,omitempty" yaml:"state,omitempty"` + System bool `json:"system,omitempty" yaml:"system,omitempty"` + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` @@ -74,7 +82,8 @@ type LoadBalancerService struct { type LoadBalancerServiceCollection struct { Collection - Data []LoadBalancerService `json:"data,omitempty"` + Data []LoadBalancerService `json:"data,omitempty"` + client *LoadBalancerServiceClient } type LoadBalancerServiceClient struct { @@ -138,9 +147,20 @@ func (c *LoadBalancerServiceClient) Update(existing *LoadBalancerService, update func (c *LoadBalancerServiceClient) List(opts *ListOpts) (*LoadBalancerServiceCollection, error) { resp := &LoadBalancerServiceCollection{} err := c.rancherClient.doList(LOAD_BALANCER_SERVICE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *LoadBalancerServiceCollection) Next() (*LoadBalancerServiceCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &LoadBalancerServiceCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *LoadBalancerServiceClient) ById(id string) (*LoadBalancerService, error) { resp := &LoadBalancerService{} err := c.rancherClient.doById(LOAD_BALANCER_SERVICE_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_load_balancer_service_link.go b/vendor/github.com/rancher/go-rancher/v2/generated_load_balancer_service_link.go index b30c45be9..87b74c3de 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_load_balancer_service_link.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_load_balancer_service_link.go @@ -16,7 +16,8 @@ type LoadBalancerServiceLink struct { type LoadBalancerServiceLinkCollection struct { Collection - Data []LoadBalancerServiceLink `json:"data,omitempty"` + Data []LoadBalancerServiceLink `json:"data,omitempty"` + client *LoadBalancerServiceLinkClient } type LoadBalancerServiceLinkClient struct { @@ -52,9 +53,20 @@ func (c *LoadBalancerServiceLinkClient) Update(existing *LoadBalancerServiceLink func (c *LoadBalancerServiceLinkClient) List(opts *ListOpts) (*LoadBalancerServiceLinkCollection, error) { resp := &LoadBalancerServiceLinkCollection{} err := c.rancherClient.doList(LOAD_BALANCER_SERVICE_LINK_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *LoadBalancerServiceLinkCollection) Next() (*LoadBalancerServiceLinkCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &LoadBalancerServiceLinkCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *LoadBalancerServiceLinkClient) ById(id string) (*LoadBalancerServiceLink, error) { resp := &LoadBalancerServiceLink{} err := c.rancherClient.doById(LOAD_BALANCER_SERVICE_LINK_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_local_auth_config.go b/vendor/github.com/rancher/go-rancher/v2/generated_local_auth_config.go index 16d985545..664f137c1 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_local_auth_config.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_local_auth_config.go @@ -20,7 +20,8 @@ type LocalAuthConfig struct { type LocalAuthConfigCollection struct { Collection - Data []LocalAuthConfig `json:"data,omitempty"` + Data []LocalAuthConfig `json:"data,omitempty"` + client *LocalAuthConfigClient } type LocalAuthConfigClient struct { @@ -56,9 +57,20 @@ func (c *LocalAuthConfigClient) Update(existing *LocalAuthConfig, updates interf func (c *LocalAuthConfigClient) List(opts *ListOpts) (*LocalAuthConfigCollection, error) { resp := &LocalAuthConfigCollection{} err := c.rancherClient.doList(LOCAL_AUTH_CONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *LocalAuthConfigCollection) Next() (*LocalAuthConfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &LocalAuthConfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *LocalAuthConfigClient) ById(id string) (*LocalAuthConfig, error) { resp := &LocalAuthConfig{} err := c.rancherClient.doById(LOCAL_AUTH_CONFIG_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_log_config.go b/vendor/github.com/rancher/go-rancher/v2/generated_log_config.go index 1abfc4c93..3f799aac9 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_log_config.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_log_config.go @@ -14,7 +14,8 @@ type LogConfig struct { type LogConfigCollection struct { Collection - Data []LogConfig `json:"data,omitempty"` + Data []LogConfig `json:"data,omitempty"` + client *LogConfigClient } type LogConfigClient struct { @@ -50,9 +51,20 @@ func (c *LogConfigClient) Update(existing *LogConfig, updates interface{}) (*Log func (c *LogConfigClient) List(opts *ListOpts) (*LogConfigCollection, error) { resp := &LogConfigCollection{} err := c.rancherClient.doList(LOG_CONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *LogConfigCollection) Next() (*LogConfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &LogConfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *LogConfigClient) ById(id string) (*LogConfig, error) { resp := &LogConfig{} err := c.rancherClient.doById(LOG_CONFIG_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_machine.go b/vendor/github.com/rancher/go-rancher/v2/generated_machine.go index fb7768d97..be7be96b0 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_machine.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_machine.go @@ -72,7 +72,8 @@ type Machine struct { type MachineCollection struct { Collection - Data []Machine `json:"data,omitempty"` + Data []Machine `json:"data,omitempty"` + client *MachineClient } type MachineClient struct { @@ -118,9 +119,20 @@ func (c *MachineClient) Update(existing *Machine, updates interface{}) (*Machine func (c *MachineClient) List(opts *ListOpts) (*MachineCollection, error) { resp := &MachineCollection{} err := c.rancherClient.doList(MACHINE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *MachineCollection) Next() (*MachineCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &MachineCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *MachineClient) ById(id string) (*Machine, error) { resp := &Machine{} err := c.rancherClient.doById(MACHINE_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_machine_driver.go b/vendor/github.com/rancher/go-rancher/v2/generated_machine_driver.go index c54bcd4b6..b20c78c84 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_machine_driver.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_machine_driver.go @@ -31,6 +31,8 @@ type MachineDriver struct { Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + SchemaVersion string `json:"schemaVersion,omitempty" yaml:"schema_version,omitempty"` + State string `json:"state,omitempty" yaml:"state,omitempty"` Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` @@ -48,7 +50,8 @@ type MachineDriver struct { type MachineDriverCollection struct { Collection - Data []MachineDriver `json:"data,omitempty"` + Data []MachineDriver `json:"data,omitempty"` + client *MachineDriverClient } type MachineDriverClient struct { @@ -96,9 +99,20 @@ func (c *MachineDriverClient) Update(existing *MachineDriver, updates interface{ func (c *MachineDriverClient) List(opts *ListOpts) (*MachineDriverCollection, error) { resp := &MachineDriverCollection{} err := c.rancherClient.doList(MACHINE_DRIVER_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *MachineDriverCollection) Next() (*MachineDriverCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &MachineDriverCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *MachineDriverClient) ById(id string) (*MachineDriver, error) { resp := &MachineDriver{} err := c.rancherClient.doById(MACHINE_DRIVER_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_mount.go b/vendor/github.com/rancher/go-rancher/v2/generated_mount.go index 59c976303..efa68a501 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_mount.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_mount.go @@ -44,7 +44,8 @@ type Mount struct { type MountCollection struct { Collection - Data []Mount `json:"data,omitempty"` + Data []Mount `json:"data,omitempty"` + client *MountClient } type MountClient struct { @@ -86,9 +87,20 @@ func (c *MountClient) Update(existing *Mount, updates interface{}) (*Mount, erro func (c *MountClient) List(opts *ListOpts) (*MountCollection, error) { resp := &MountCollection{} err := c.rancherClient.doList(MOUNT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *MountCollection) Next() (*MountCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &MountCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *MountClient) ById(id string) (*Mount, error) { resp := &Mount{} err := c.rancherClient.doById(MOUNT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_network.go b/vendor/github.com/rancher/go-rancher/v2/generated_network.go index 53c59be4b..3147d9f43 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_network.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_network.go @@ -36,7 +36,8 @@ type Network struct { type NetworkCollection struct { Collection - Data []Network `json:"data,omitempty"` + Data []Network `json:"data,omitempty"` + client *NetworkClient } type NetworkClient struct { @@ -86,9 +87,20 @@ func (c *NetworkClient) Update(existing *Network, updates interface{}) (*Network func (c *NetworkClient) List(opts *ListOpts) (*NetworkCollection, error) { resp := &NetworkCollection{} err := c.rancherClient.doList(NETWORK_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *NetworkCollection) Next() (*NetworkCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &NetworkCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *NetworkClient) ById(id string) (*Network, error) { resp := &Network{} err := c.rancherClient.doById(NETWORK_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_network_driver.go b/vendor/github.com/rancher/go-rancher/v2/generated_network_driver.go new file mode 100644 index 000000000..68e4e6d7a --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/v2/generated_network_driver.go @@ -0,0 +1,160 @@ +package client + +const ( + NETWORK_DRIVER_TYPE = "networkDriver" +) + +type NetworkDriver 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"` + + 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 NetworkDriverCollection struct { + Collection + Data []NetworkDriver `json:"data,omitempty"` + client *NetworkDriverClient +} + +type NetworkDriverClient struct { + rancherClient *RancherClient +} + +type NetworkDriverOperations interface { + List(opts *ListOpts) (*NetworkDriverCollection, error) + Create(opts *NetworkDriver) (*NetworkDriver, error) + Update(existing *NetworkDriver, updates interface{}) (*NetworkDriver, error) + ById(id string) (*NetworkDriver, error) + Delete(container *NetworkDriver) error + + ActionActivate(*NetworkDriver) (*NetworkDriver, error) + + ActionCreate(*NetworkDriver) (*NetworkDriver, error) + + ActionDeactivate(*NetworkDriver) (*NetworkDriver, error) + + ActionRemove(*NetworkDriver) (*NetworkDriver, error) + + ActionUpdate(*NetworkDriver) (*NetworkDriver, error) +} + +func newNetworkDriverClient(rancherClient *RancherClient) *NetworkDriverClient { + return &NetworkDriverClient{ + rancherClient: rancherClient, + } +} + +func (c *NetworkDriverClient) Create(container *NetworkDriver) (*NetworkDriver, error) { + resp := &NetworkDriver{} + err := c.rancherClient.doCreate(NETWORK_DRIVER_TYPE, container, resp) + return resp, err +} + +func (c *NetworkDriverClient) Update(existing *NetworkDriver, updates interface{}) (*NetworkDriver, error) { + resp := &NetworkDriver{} + err := c.rancherClient.doUpdate(NETWORK_DRIVER_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *NetworkDriverClient) List(opts *ListOpts) (*NetworkDriverCollection, error) { + resp := &NetworkDriverCollection{} + err := c.rancherClient.doList(NETWORK_DRIVER_TYPE, opts, resp) + resp.client = c + return resp, err +} + +func (cc *NetworkDriverCollection) Next() (*NetworkDriverCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &NetworkDriverCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *NetworkDriverClient) ById(id string) (*NetworkDriver, error) { + resp := &NetworkDriver{} + err := c.rancherClient.doById(NETWORK_DRIVER_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *NetworkDriverClient) Delete(container *NetworkDriver) error { + return c.rancherClient.doResourceDelete(NETWORK_DRIVER_TYPE, &container.Resource) +} + +func (c *NetworkDriverClient) ActionActivate(resource *NetworkDriver) (*NetworkDriver, error) { + + resp := &NetworkDriver{} + + err := c.rancherClient.doAction(NETWORK_DRIVER_TYPE, "activate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *NetworkDriverClient) ActionCreate(resource *NetworkDriver) (*NetworkDriver, error) { + + resp := &NetworkDriver{} + + err := c.rancherClient.doAction(NETWORK_DRIVER_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *NetworkDriverClient) ActionDeactivate(resource *NetworkDriver) (*NetworkDriver, error) { + + resp := &NetworkDriver{} + + err := c.rancherClient.doAction(NETWORK_DRIVER_TYPE, "deactivate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *NetworkDriverClient) ActionRemove(resource *NetworkDriver) (*NetworkDriver, error) { + + resp := &NetworkDriver{} + + err := c.rancherClient.doAction(NETWORK_DRIVER_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *NetworkDriverClient) ActionUpdate(resource *NetworkDriver) (*NetworkDriver, error) { + + resp := &NetworkDriver{} + + err := c.rancherClient.doAction(NETWORK_DRIVER_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_nfs_config.go b/vendor/github.com/rancher/go-rancher/v2/generated_nfs_config.go index d7fecc473..1c0143fbf 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_nfs_config.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_nfs_config.go @@ -16,7 +16,8 @@ type NfsConfig struct { type NfsConfigCollection struct { Collection - Data []NfsConfig `json:"data,omitempty"` + Data []NfsConfig `json:"data,omitempty"` + client *NfsConfigClient } type NfsConfigClient struct { @@ -52,9 +53,20 @@ func (c *NfsConfigClient) Update(existing *NfsConfig, updates interface{}) (*Nfs func (c *NfsConfigClient) List(opts *ListOpts) (*NfsConfigCollection, error) { resp := &NfsConfigCollection{} err := c.rancherClient.doList(NFS_CONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *NfsConfigCollection) Next() (*NfsConfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &NfsConfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *NfsConfigClient) ById(id string) (*NfsConfig, error) { resp := &NfsConfig{} err := c.rancherClient.doById(NFS_CONFIG_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_openldapconfig.go b/vendor/github.com/rancher/go-rancher/v2/generated_openldapconfig.go index 7b24f4132..0f69016f4 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_openldapconfig.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_openldapconfig.go @@ -54,7 +54,8 @@ type Openldapconfig struct { type OpenldapconfigCollection struct { Collection - Data []Openldapconfig `json:"data,omitempty"` + Data []Openldapconfig `json:"data,omitempty"` + client *OpenldapconfigClient } type OpenldapconfigClient struct { @@ -90,9 +91,20 @@ func (c *OpenldapconfigClient) Update(existing *Openldapconfig, updates interfac func (c *OpenldapconfigClient) List(opts *ListOpts) (*OpenldapconfigCollection, error) { resp := &OpenldapconfigCollection{} err := c.rancherClient.doList(OPENLDAPCONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *OpenldapconfigCollection) Next() (*OpenldapconfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &OpenldapconfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *OpenldapconfigClient) ById(id string) (*Openldapconfig, error) { resp := &Openldapconfig{} err := c.rancherClient.doById(OPENLDAPCONFIG_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_packet_config.go b/vendor/github.com/rancher/go-rancher/v2/generated_packet_config.go index f0d03e51f..3f3c4ff31 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_packet_config.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_packet_config.go @@ -22,7 +22,8 @@ type PacketConfig struct { type PacketConfigCollection struct { Collection - Data []PacketConfig `json:"data,omitempty"` + Data []PacketConfig `json:"data,omitempty"` + client *PacketConfigClient } type PacketConfigClient struct { @@ -58,9 +59,20 @@ func (c *PacketConfigClient) Update(existing *PacketConfig, updates interface{}) func (c *PacketConfigClient) List(opts *ListOpts) (*PacketConfigCollection, error) { resp := &PacketConfigCollection{} err := c.rancherClient.doList(PACKET_CONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *PacketConfigCollection) Next() (*PacketConfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &PacketConfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *PacketConfigClient) ById(id string) (*PacketConfig, error) { resp := &PacketConfig{} err := c.rancherClient.doById(PACKET_CONFIG_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_password.go b/vendor/github.com/rancher/go-rancher/v2/generated_password.go index 427eca312..5fb0d358d 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_password.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_password.go @@ -40,7 +40,8 @@ type Password struct { type PasswordCollection struct { Collection - Data []Password `json:"data,omitempty"` + Data []Password `json:"data,omitempty"` + client *PasswordClient } type PasswordClient struct { @@ -90,9 +91,20 @@ func (c *PasswordClient) Update(existing *Password, updates interface{}) (*Passw func (c *PasswordClient) List(opts *ListOpts) (*PasswordCollection, error) { resp := &PasswordCollection{} err := c.rancherClient.doList(PASSWORD_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *PasswordCollection) Next() (*PasswordCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &PasswordCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *PasswordClient) ById(id string) (*Password, error) { resp := &Password{} err := c.rancherClient.doById(PASSWORD_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_physical_host.go b/vendor/github.com/rancher/go-rancher/v2/generated_physical_host.go index 99b623677..30039c490 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_physical_host.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_physical_host.go @@ -40,7 +40,8 @@ type PhysicalHost struct { type PhysicalHostCollection struct { Collection - Data []PhysicalHost `json:"data,omitempty"` + Data []PhysicalHost `json:"data,omitempty"` + client *PhysicalHostClient } type PhysicalHostClient struct { @@ -86,9 +87,20 @@ func (c *PhysicalHostClient) Update(existing *PhysicalHost, updates interface{}) func (c *PhysicalHostClient) List(opts *ListOpts) (*PhysicalHostCollection, error) { resp := &PhysicalHostCollection{} err := c.rancherClient.doList(PHYSICAL_HOST_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *PhysicalHostCollection) Next() (*PhysicalHostCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &PhysicalHostCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *PhysicalHostClient) ById(id string) (*PhysicalHost, error) { resp := &PhysicalHost{} err := c.rancherClient.doById(PHYSICAL_HOST_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_port.go b/vendor/github.com/rancher/go-rancher/v2/generated_port.go index 3db9283d2..04261f770 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_port.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_port.go @@ -50,7 +50,8 @@ type Port struct { type PortCollection struct { Collection - Data []Port `json:"data,omitempty"` + Data []Port `json:"data,omitempty"` + client *PortClient } type PortClient struct { @@ -100,9 +101,20 @@ func (c *PortClient) Update(existing *Port, updates interface{}) (*Port, error) func (c *PortClient) List(opts *ListOpts) (*PortCollection, error) { resp := &PortCollection{} err := c.rancherClient.doList(PORT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *PortCollection) Next() (*PortCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &PortCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *PortClient) ById(id string) (*Port, error) { resp := &Port{} err := c.rancherClient.doById(PORT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_process_definition.go b/vendor/github.com/rancher/go-rancher/v2/generated_process_definition.go index e6403303f..9da63d81f 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_process_definition.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_process_definition.go @@ -19,12 +19,13 @@ type ProcessDefinition struct { ResourceType string `json:"resourceType,omitempty" yaml:"resource_type,omitempty"` - StateTransitions []interface{} `json:"stateTransitions,omitempty" yaml:"state_transitions,omitempty"` + StateTransitions []StateTransition `json:"stateTransitions,omitempty" yaml:"state_transitions,omitempty"` } type ProcessDefinitionCollection struct { Collection - Data []ProcessDefinition `json:"data,omitempty"` + Data []ProcessDefinition `json:"data,omitempty"` + client *ProcessDefinitionClient } type ProcessDefinitionClient struct { @@ -60,9 +61,20 @@ func (c *ProcessDefinitionClient) Update(existing *ProcessDefinition, updates in func (c *ProcessDefinitionClient) List(opts *ListOpts) (*ProcessDefinitionCollection, error) { resp := &ProcessDefinitionCollection{} err := c.rancherClient.doList(PROCESS_DEFINITION_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ProcessDefinitionCollection) Next() (*ProcessDefinitionCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ProcessDefinitionCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ProcessDefinitionClient) ById(id string) (*ProcessDefinition, error) { resp := &ProcessDefinition{} err := c.rancherClient.doById(PROCESS_DEFINITION_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_process_execution.go b/vendor/github.com/rancher/go-rancher/v2/generated_process_execution.go index 05e12914a..7356dce8d 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_process_execution.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_process_execution.go @@ -18,7 +18,8 @@ type ProcessExecution struct { type ProcessExecutionCollection struct { Collection - Data []ProcessExecution `json:"data,omitempty"` + Data []ProcessExecution `json:"data,omitempty"` + client *ProcessExecutionClient } type ProcessExecutionClient struct { @@ -54,9 +55,20 @@ func (c *ProcessExecutionClient) Update(existing *ProcessExecution, updates inte func (c *ProcessExecutionClient) List(opts *ListOpts) (*ProcessExecutionCollection, error) { resp := &ProcessExecutionCollection{} err := c.rancherClient.doList(PROCESS_EXECUTION_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ProcessExecutionCollection) Next() (*ProcessExecutionCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ProcessExecutionCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ProcessExecutionClient) ById(id string) (*ProcessExecution, error) { resp := &ProcessExecution{} err := c.rancherClient.doById(PROCESS_EXECUTION_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_process_instance.go b/vendor/github.com/rancher/go-rancher/v2/generated_process_instance.go index 6ba08dfea..7dc874a79 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_process_instance.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_process_instance.go @@ -34,7 +34,8 @@ type ProcessInstance struct { type ProcessInstanceCollection struct { Collection - Data []ProcessInstance `json:"data,omitempty"` + Data []ProcessInstance `json:"data,omitempty"` + client *ProcessInstanceClient } type ProcessInstanceClient struct { @@ -70,9 +71,20 @@ func (c *ProcessInstanceClient) Update(existing *ProcessInstance, updates interf func (c *ProcessInstanceClient) List(opts *ListOpts) (*ProcessInstanceCollection, error) { resp := &ProcessInstanceCollection{} err := c.rancherClient.doList(PROCESS_INSTANCE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ProcessInstanceCollection) Next() (*ProcessInstanceCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ProcessInstanceCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ProcessInstanceClient) ById(id string) (*ProcessInstance, error) { resp := &ProcessInstance{} err := c.rancherClient.doById(PROCESS_INSTANCE_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_project.go b/vendor/github.com/rancher/go-rancher/v2/generated_project.go index 17f21401c..53571d9ec 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_project.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_project.go @@ -15,17 +15,15 @@ type Project struct { Description string `json:"description,omitempty" yaml:"description,omitempty"` - Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` - - Kubernetes bool `json:"kubernetes,omitempty" yaml:"kubernetes,omitempty"` + HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"` - Members []interface{} `json:"members,omitempty" yaml:"members,omitempty"` + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` - Mesos bool `json:"mesos,omitempty" yaml:"mesos,omitempty"` + Members []ProjectMember `json:"members,omitempty" yaml:"members,omitempty"` Name string `json:"name,omitempty" yaml:"name,omitempty"` - PublicDns bool `json:"publicDns,omitempty" yaml:"public_dns,omitempty"` + Orchestration string `json:"orchestration,omitempty" yaml:"orchestration,omitempty"` RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` @@ -35,8 +33,6 @@ type Project struct { 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"` @@ -50,7 +46,8 @@ type Project struct { type ProjectCollection struct { Collection - Data []Project `json:"data,omitempty"` + Data []Project `json:"data,omitempty"` + client *ProjectClient } type ProjectClient struct { @@ -102,9 +99,20 @@ func (c *ProjectClient) Update(existing *Project, updates interface{}) (*Project func (c *ProjectClient) List(opts *ListOpts) (*ProjectCollection, error) { resp := &ProjectCollection{} err := c.rancherClient.doList(PROJECT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ProjectCollection) Next() (*ProjectCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ProjectCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ProjectClient) ById(id string) (*Project, error) { resp := &Project{} err := c.rancherClient.doById(PROJECT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_project_member.go b/vendor/github.com/rancher/go-rancher/v2/generated_project_member.go index 82ba10bd4..96c6a7715 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_project_member.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_project_member.go @@ -42,7 +42,8 @@ type ProjectMember struct { type ProjectMemberCollection struct { Collection - Data []ProjectMember `json:"data,omitempty"` + Data []ProjectMember `json:"data,omitempty"` + client *ProjectMemberClient } type ProjectMemberClient struct { @@ -92,9 +93,20 @@ func (c *ProjectMemberClient) Update(existing *ProjectMember, updates interface{ func (c *ProjectMemberClient) List(opts *ListOpts) (*ProjectMemberCollection, error) { resp := &ProjectMemberCollection{} err := c.rancherClient.doList(PROJECT_MEMBER_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ProjectMemberCollection) Next() (*ProjectMemberCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ProjectMemberCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ProjectMemberClient) ById(id string) (*ProjectMember, error) { resp := &ProjectMember{} err := c.rancherClient.doById(PROJECT_MEMBER_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_public_endpoint.go b/vendor/github.com/rancher/go-rancher/v2/generated_public_endpoint.go index 3d85858ef..14898e492 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_public_endpoint.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_public_endpoint.go @@ -20,7 +20,8 @@ type PublicEndpoint struct { type PublicEndpointCollection struct { Collection - Data []PublicEndpoint `json:"data,omitempty"` + Data []PublicEndpoint `json:"data,omitempty"` + client *PublicEndpointClient } type PublicEndpointClient struct { @@ -56,9 +57,20 @@ func (c *PublicEndpointClient) Update(existing *PublicEndpoint, updates interfac func (c *PublicEndpointClient) List(opts *ListOpts) (*PublicEndpointCollection, error) { resp := &PublicEndpointCollection{} err := c.rancherClient.doList(PUBLIC_ENDPOINT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *PublicEndpointCollection) Next() (*PublicEndpointCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &PublicEndpointCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *PublicEndpointClient) ById(id string) (*PublicEndpoint, error) { resp := &PublicEndpoint{} err := c.rancherClient.doById(PUBLIC_ENDPOINT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_publish.go b/vendor/github.com/rancher/go-rancher/v2/generated_publish.go index 9071207f5..af7f7cd50 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_publish.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_publish.go @@ -32,7 +32,8 @@ type Publish struct { type PublishCollection struct { Collection - Data []Publish `json:"data,omitempty"` + Data []Publish `json:"data,omitempty"` + client *PublishClient } type PublishClient struct { @@ -68,9 +69,20 @@ func (c *PublishClient) Update(existing *Publish, updates interface{}) (*Publish func (c *PublishClient) List(opts *ListOpts) (*PublishCollection, error) { resp := &PublishCollection{} err := c.rancherClient.doList(PUBLISH_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *PublishCollection) Next() (*PublishCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &PublishCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *PublishClient) ById(id string) (*Publish, error) { resp := &Publish{} err := c.rancherClient.doById(PUBLISH_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_pull_task.go b/vendor/github.com/rancher/go-rancher/v2/generated_pull_task.go index a077e8885..d7fd58140 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_pull_task.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_pull_task.go @@ -44,7 +44,8 @@ type PullTask struct { type PullTaskCollection struct { Collection - Data []PullTask `json:"data,omitempty"` + Data []PullTask `json:"data,omitempty"` + client *PullTaskClient } type PullTaskClient struct { @@ -80,9 +81,20 @@ func (c *PullTaskClient) Update(existing *PullTask, updates interface{}) (*PullT func (c *PullTaskClient) List(opts *ListOpts) (*PullTaskCollection, error) { resp := &PullTaskCollection{} err := c.rancherClient.doList(PULL_TASK_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *PullTaskCollection) Next() (*PullTaskCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &PullTaskCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *PullTaskClient) ById(id string) (*PullTask, error) { resp := &PullTask{} err := c.rancherClient.doById(PULL_TASK_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_recreate_on_quorum_strategy_config.go b/vendor/github.com/rancher/go-rancher/v2/generated_recreate_on_quorum_strategy_config.go index a8a89ed8c..ad1e7189c 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_recreate_on_quorum_strategy_config.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_recreate_on_quorum_strategy_config.go @@ -12,7 +12,8 @@ type RecreateOnQuorumStrategyConfig struct { type RecreateOnQuorumStrategyConfigCollection struct { Collection - Data []RecreateOnQuorumStrategyConfig `json:"data,omitempty"` + Data []RecreateOnQuorumStrategyConfig `json:"data,omitempty"` + client *RecreateOnQuorumStrategyConfigClient } type RecreateOnQuorumStrategyConfigClient struct { @@ -48,9 +49,20 @@ func (c *RecreateOnQuorumStrategyConfigClient) Update(existing *RecreateOnQuorum func (c *RecreateOnQuorumStrategyConfigClient) List(opts *ListOpts) (*RecreateOnQuorumStrategyConfigCollection, error) { resp := &RecreateOnQuorumStrategyConfigCollection{} err := c.rancherClient.doList(RECREATE_ON_QUORUM_STRATEGY_CONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *RecreateOnQuorumStrategyConfigCollection) Next() (*RecreateOnQuorumStrategyConfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &RecreateOnQuorumStrategyConfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *RecreateOnQuorumStrategyConfigClient) ById(id string) (*RecreateOnQuorumStrategyConfig, error) { resp := &RecreateOnQuorumStrategyConfig{} err := c.rancherClient.doById(RECREATE_ON_QUORUM_STRATEGY_CONFIG_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_register.go b/vendor/github.com/rancher/go-rancher/v2/generated_register.go index 510cd1602..3e180b8ee 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_register.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_register.go @@ -42,7 +42,8 @@ type Register struct { type RegisterCollection struct { Collection - Data []Register `json:"data,omitempty"` + Data []Register `json:"data,omitempty"` + client *RegisterClient } type RegisterClient struct { @@ -80,9 +81,20 @@ func (c *RegisterClient) Update(existing *Register, updates interface{}) (*Regis func (c *RegisterClient) List(opts *ListOpts) (*RegisterCollection, error) { resp := &RegisterCollection{} err := c.rancherClient.doList(REGISTER_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *RegisterCollection) Next() (*RegisterCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &RegisterCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *RegisterClient) ById(id string) (*Register, error) { resp := &Register{} err := c.rancherClient.doById(REGISTER_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_registration_token.go b/vendor/github.com/rancher/go-rancher/v2/generated_registration_token.go index 01b8cd8e1..1cbf178ac 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_registration_token.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_registration_token.go @@ -44,7 +44,8 @@ type RegistrationToken struct { type RegistrationTokenCollection struct { Collection - Data []RegistrationToken `json:"data,omitempty"` + Data []RegistrationToken `json:"data,omitempty"` + client *RegistrationTokenClient } type RegistrationTokenClient struct { @@ -92,9 +93,20 @@ func (c *RegistrationTokenClient) Update(existing *RegistrationToken, updates in func (c *RegistrationTokenClient) List(opts *ListOpts) (*RegistrationTokenCollection, error) { resp := &RegistrationTokenCollection{} err := c.rancherClient.doList(REGISTRATION_TOKEN_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *RegistrationTokenCollection) Next() (*RegistrationTokenCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &RegistrationTokenCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *RegistrationTokenClient) ById(id string) (*RegistrationToken, error) { resp := &RegistrationToken{} err := c.rancherClient.doById(REGISTRATION_TOKEN_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_registry.go b/vendor/github.com/rancher/go-rancher/v2/generated_registry.go index 6dbeb4fb7..e5dae9857 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_registry.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_registry.go @@ -48,7 +48,8 @@ type Registry struct { type RegistryCollection struct { Collection - Data []Registry `json:"data,omitempty"` + Data []Registry `json:"data,omitempty"` + client *RegistryClient } type RegistryClient struct { @@ -98,9 +99,20 @@ func (c *RegistryClient) Update(existing *Registry, updates interface{}) (*Regis func (c *RegistryClient) List(opts *ListOpts) (*RegistryCollection, error) { resp := &RegistryCollection{} err := c.rancherClient.doList(REGISTRY_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *RegistryCollection) Next() (*RegistryCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &RegistryCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *RegistryClient) ById(id string) (*Registry, error) { resp := &Registry{} err := c.rancherClient.doById(REGISTRY_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_registry_credential.go b/vendor/github.com/rancher/go-rancher/v2/generated_registry_credential.go index e17ab42df..59bd5f823 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_registry_credential.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_registry_credential.go @@ -44,7 +44,8 @@ type RegistryCredential struct { type RegistryCredentialCollection struct { Collection - Data []RegistryCredential `json:"data,omitempty"` + Data []RegistryCredential `json:"data,omitempty"` + client *RegistryCredentialClient } type RegistryCredentialClient struct { @@ -92,9 +93,20 @@ func (c *RegistryCredentialClient) Update(existing *RegistryCredential, updates func (c *RegistryCredentialClient) List(opts *ListOpts) (*RegistryCredentialCollection, error) { resp := &RegistryCredentialCollection{} err := c.rancherClient.doList(REGISTRY_CREDENTIAL_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *RegistryCredentialCollection) Next() (*RegistryCredentialCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &RegistryCredentialCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *RegistryCredentialClient) ById(id string) (*RegistryCredential, error) { resp := &RegistryCredential{} err := c.rancherClient.doById(REGISTRY_CREDENTIAL_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_resource_definition.go b/vendor/github.com/rancher/go-rancher/v2/generated_resource_definition.go index bb9a4a173..bc65daab2 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_resource_definition.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_resource_definition.go @@ -12,7 +12,8 @@ type ResourceDefinition struct { type ResourceDefinitionCollection struct { Collection - Data []ResourceDefinition `json:"data,omitempty"` + Data []ResourceDefinition `json:"data,omitempty"` + client *ResourceDefinitionClient } type ResourceDefinitionClient struct { @@ -48,9 +49,20 @@ func (c *ResourceDefinitionClient) Update(existing *ResourceDefinition, updates func (c *ResourceDefinitionClient) List(opts *ListOpts) (*ResourceDefinitionCollection, error) { resp := &ResourceDefinitionCollection{} err := c.rancherClient.doList(RESOURCE_DEFINITION_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ResourceDefinitionCollection) Next() (*ResourceDefinitionCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ResourceDefinitionCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ResourceDefinitionClient) ById(id string) (*ResourceDefinition, error) { resp := &ResourceDefinition{} err := c.rancherClient.doById(RESOURCE_DEFINITION_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_restart_policy.go b/vendor/github.com/rancher/go-rancher/v2/generated_restart_policy.go index f301adb5a..23c4d81fa 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_restart_policy.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_restart_policy.go @@ -14,7 +14,8 @@ type RestartPolicy struct { type RestartPolicyCollection struct { Collection - Data []RestartPolicy `json:"data,omitempty"` + Data []RestartPolicy `json:"data,omitempty"` + client *RestartPolicyClient } type RestartPolicyClient struct { @@ -50,9 +51,20 @@ func (c *RestartPolicyClient) Update(existing *RestartPolicy, updates interface{ func (c *RestartPolicyClient) List(opts *ListOpts) (*RestartPolicyCollection, error) { resp := &RestartPolicyCollection{} err := c.rancherClient.doList(RESTART_POLICY_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *RestartPolicyCollection) Next() (*RestartPolicyCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &RestartPolicyCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *RestartPolicyClient) ById(id string) (*RestartPolicy, error) { resp := &RestartPolicy{} err := c.rancherClient.doById(RESTART_POLICY_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_restore_from_backup_input.go b/vendor/github.com/rancher/go-rancher/v2/generated_restore_from_backup_input.go index a4878de4b..f4178081a 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_restore_from_backup_input.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_restore_from_backup_input.go @@ -12,7 +12,8 @@ type RestoreFromBackupInput struct { type RestoreFromBackupInputCollection struct { Collection - Data []RestoreFromBackupInput `json:"data,omitempty"` + Data []RestoreFromBackupInput `json:"data,omitempty"` + client *RestoreFromBackupInputClient } type RestoreFromBackupInputClient struct { @@ -48,9 +49,20 @@ func (c *RestoreFromBackupInputClient) Update(existing *RestoreFromBackupInput, func (c *RestoreFromBackupInputClient) List(opts *ListOpts) (*RestoreFromBackupInputCollection, error) { resp := &RestoreFromBackupInputCollection{} err := c.rancherClient.doList(RESTORE_FROM_BACKUP_INPUT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *RestoreFromBackupInputCollection) Next() (*RestoreFromBackupInputCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &RestoreFromBackupInputCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *RestoreFromBackupInputClient) ById(id string) (*RestoreFromBackupInput, error) { resp := &RestoreFromBackupInput{} err := c.rancherClient.doById(RESTORE_FROM_BACKUP_INPUT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_revert_to_snapshot_input.go b/vendor/github.com/rancher/go-rancher/v2/generated_revert_to_snapshot_input.go index db702c9c8..0612f8182 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_revert_to_snapshot_input.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_revert_to_snapshot_input.go @@ -12,7 +12,8 @@ type RevertToSnapshotInput struct { type RevertToSnapshotInputCollection struct { Collection - Data []RevertToSnapshotInput `json:"data,omitempty"` + Data []RevertToSnapshotInput `json:"data,omitempty"` + client *RevertToSnapshotInputClient } type RevertToSnapshotInputClient struct { @@ -48,9 +49,20 @@ func (c *RevertToSnapshotInputClient) Update(existing *RevertToSnapshotInput, up func (c *RevertToSnapshotInputClient) List(opts *ListOpts) (*RevertToSnapshotInputCollection, error) { resp := &RevertToSnapshotInputCollection{} err := c.rancherClient.doList(REVERT_TO_SNAPSHOT_INPUT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *RevertToSnapshotInputCollection) Next() (*RevertToSnapshotInputCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &RevertToSnapshotInputCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *RevertToSnapshotInputClient) ById(id string) (*RevertToSnapshotInput, error) { resp := &RevertToSnapshotInput{} err := c.rancherClient.doById(REVERT_TO_SNAPSHOT_INPUT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_rolling_restart_strategy.go b/vendor/github.com/rancher/go-rancher/v2/generated_rolling_restart_strategy.go index 443f9f1ec..f2384cdec 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_rolling_restart_strategy.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_rolling_restart_strategy.go @@ -14,7 +14,8 @@ type RollingRestartStrategy struct { type RollingRestartStrategyCollection struct { Collection - Data []RollingRestartStrategy `json:"data,omitempty"` + Data []RollingRestartStrategy `json:"data,omitempty"` + client *RollingRestartStrategyClient } type RollingRestartStrategyClient struct { @@ -50,9 +51,20 @@ func (c *RollingRestartStrategyClient) Update(existing *RollingRestartStrategy, func (c *RollingRestartStrategyClient) List(opts *ListOpts) (*RollingRestartStrategyCollection, error) { resp := &RollingRestartStrategyCollection{} err := c.rancherClient.doList(ROLLING_RESTART_STRATEGY_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *RollingRestartStrategyCollection) Next() (*RollingRestartStrategyCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &RollingRestartStrategyCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *RollingRestartStrategyClient) ById(id string) (*RollingRestartStrategy, error) { resp := &RollingRestartStrategy{} err := c.rancherClient.doById(ROLLING_RESTART_STRATEGY_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_scale_policy.go b/vendor/github.com/rancher/go-rancher/v2/generated_scale_policy.go index abcd1bb5b..eb0ac83a5 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_scale_policy.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_scale_policy.go @@ -16,7 +16,8 @@ type ScalePolicy struct { type ScalePolicyCollection struct { Collection - Data []ScalePolicy `json:"data,omitempty"` + Data []ScalePolicy `json:"data,omitempty"` + client *ScalePolicyClient } type ScalePolicyClient struct { @@ -52,9 +53,20 @@ func (c *ScalePolicyClient) Update(existing *ScalePolicy, updates interface{}) ( func (c *ScalePolicyClient) List(opts *ListOpts) (*ScalePolicyCollection, error) { resp := &ScalePolicyCollection{} err := c.rancherClient.doList(SCALE_POLICY_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ScalePolicyCollection) Next() (*ScalePolicyCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ScalePolicyCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ScalePolicyClient) ById(id string) (*ScalePolicy, error) { resp := &ScalePolicy{} err := c.rancherClient.doById(SCALE_POLICY_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_secondary_launch_config.go b/vendor/github.com/rancher/go-rancher/v2/generated_secondary_launch_config.go index ab7425587..958e3eb23 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_secondary_launch_config.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_secondary_launch_config.go @@ -49,7 +49,7 @@ type SecondaryLaunchConfig struct { Devices []string `json:"devices,omitempty" yaml:"devices,omitempty"` - Disks []interface{} `json:"disks,omitempty" yaml:"disks,omitempty"` + Disks []VirtualMachineDisk `json:"disks,omitempty" yaml:"disks,omitempty"` Dns []string `json:"dns,omitempty" yaml:"dns,omitempty"` @@ -131,6 +131,8 @@ type SecondaryLaunchConfig struct { SecurityOpt []string `json:"securityOpt,omitempty" yaml:"security_opt,omitempty"` + ServiceIds []string `json:"serviceIds,omitempty" yaml:"service_ids,omitempty"` + StartCount int64 `json:"startCount,omitempty" yaml:"start_count,omitempty"` StartOnCreate bool `json:"startOnCreate,omitempty" yaml:"start_on_create,omitempty"` @@ -139,6 +141,8 @@ type SecondaryLaunchConfig struct { StdinOpen bool `json:"stdinOpen,omitempty" yaml:"stdin_open,omitempty"` + System bool `json:"system,omitempty" yaml:"system,omitempty"` + SystemContainer string `json:"systemContainer,omitempty" yaml:"system_container,omitempty"` Token string `json:"token,omitempty" yaml:"token,omitempty"` @@ -168,7 +172,8 @@ type SecondaryLaunchConfig struct { type SecondaryLaunchConfigCollection struct { Collection - Data []SecondaryLaunchConfig `json:"data,omitempty"` + Data []SecondaryLaunchConfig `json:"data,omitempty"` + client *SecondaryLaunchConfigClient } type SecondaryLaunchConfigClient struct { @@ -206,8 +211,6 @@ type SecondaryLaunchConfigOperations interface { ActionRestore(*SecondaryLaunchConfig) (*Instance, error) - ActionSetlabels(*SecondaryLaunchConfig, *SetLabelsInput) (*Container, error) - ActionStart(*SecondaryLaunchConfig) (*Instance, error) ActionStop(*SecondaryLaunchConfig, *InstanceStop) (*Instance, error) @@ -242,9 +245,20 @@ func (c *SecondaryLaunchConfigClient) Update(existing *SecondaryLaunchConfig, up func (c *SecondaryLaunchConfigClient) List(opts *ListOpts) (*SecondaryLaunchConfigCollection, error) { resp := &SecondaryLaunchConfigCollection{} err := c.rancherClient.doList(SECONDARY_LAUNCH_CONFIG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *SecondaryLaunchConfigCollection) Next() (*SecondaryLaunchConfigCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &SecondaryLaunchConfigCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *SecondaryLaunchConfigClient) ById(id string) (*SecondaryLaunchConfig, error) { resp := &SecondaryLaunchConfig{} err := c.rancherClient.doById(SECONDARY_LAUNCH_CONFIG_TYPE, id, resp) @@ -368,15 +382,6 @@ func (c *SecondaryLaunchConfigClient) ActionRestore(resource *SecondaryLaunchCon 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{} diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_service.go b/vendor/github.com/rancher/go-rancher/v2/generated_service.go index 5ad61fc88..d575ed758 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_service.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_service.go @@ -11,6 +11,10 @@ type Service struct { AssignServiceIpAddress bool `json:"assignServiceIpAddress,omitempty" yaml:"assign_service_ip_address,omitempty"` + ConsumedByServiceIds []string `json:"consumedByServiceIds,omitempty" yaml:"consumed_by_service_ids,omitempty"` + + ConsumedServiceIds []string `json:"consumedServiceIds,omitempty" yaml:"consumed_service_ids,omitempty"` + CreateIndex int64 `json:"createIndex,omitempty" yaml:"create_index,omitempty"` Created string `json:"created,omitempty" yaml:"created,omitempty"` @@ -27,6 +31,8 @@ type Service struct { HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"` + InstanceIds []string `json:"instanceIds,omitempty" yaml:"instance_ids,omitempty"` + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` LaunchConfig *LaunchConfig `json:"launchConfig,omitempty" yaml:"launch_config,omitempty"` @@ -35,7 +41,7 @@ type Service struct { Name string `json:"name,omitempty" yaml:"name,omitempty"` - PublicEndpoints []interface{} `json:"publicEndpoints,omitempty" yaml:"public_endpoints,omitempty"` + PublicEndpoints []PublicEndpoint `json:"publicEndpoints,omitempty" yaml:"public_endpoints,omitempty"` RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` @@ -47,7 +53,7 @@ type Service struct { ScalePolicy *ScalePolicy `json:"scalePolicy,omitempty" yaml:"scale_policy,omitempty"` - SecondaryLaunchConfigs []interface{} `json:"secondaryLaunchConfigs,omitempty" yaml:"secondary_launch_configs,omitempty"` + SecondaryLaunchConfigs []SecondaryLaunchConfig `json:"secondaryLaunchConfigs,omitempty" yaml:"secondary_launch_configs,omitempty"` SelectorContainer string `json:"selectorContainer,omitempty" yaml:"selector_container,omitempty"` @@ -59,6 +65,8 @@ type Service struct { State string `json:"state,omitempty" yaml:"state,omitempty"` + System bool `json:"system,omitempty" yaml:"system,omitempty"` + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` @@ -74,7 +82,8 @@ type Service struct { type ServiceCollection struct { Collection - Data []Service `json:"data,omitempty"` + Data []Service `json:"data,omitempty"` + client *ServiceClient } type ServiceClient struct { @@ -138,9 +147,20 @@ func (c *ServiceClient) Update(existing *Service, updates interface{}) (*Service func (c *ServiceClient) List(opts *ListOpts) (*ServiceCollection, error) { resp := &ServiceCollection{} err := c.rancherClient.doList(SERVICE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ServiceCollection) Next() (*ServiceCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ServiceCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ServiceClient) ById(id string) (*Service, error) { resp := &Service{} err := c.rancherClient.doById(SERVICE_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_service_binding.go b/vendor/github.com/rancher/go-rancher/v2/generated_service_binding.go index e93040eba..362691742 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_service_binding.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_service_binding.go @@ -10,13 +10,12 @@ type ServiceBinding struct { Labels map[string]interface{} `json:"labels,omitempty" yaml:"labels,omitempty"` Ports []string `json:"ports,omitempty" yaml:"ports,omitempty"` - - Scale string `json:"scale,omitempty" yaml:"scale,omitempty"` } type ServiceBindingCollection struct { Collection - Data []ServiceBinding `json:"data,omitempty"` + Data []ServiceBinding `json:"data,omitempty"` + client *ServiceBindingClient } type ServiceBindingClient struct { @@ -52,9 +51,20 @@ func (c *ServiceBindingClient) Update(existing *ServiceBinding, updates interfac func (c *ServiceBindingClient) List(opts *ListOpts) (*ServiceBindingCollection, error) { resp := &ServiceBindingCollection{} err := c.rancherClient.doList(SERVICE_BINDING_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ServiceBindingCollection) Next() (*ServiceBindingCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ServiceBindingCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ServiceBindingClient) ById(id string) (*ServiceBinding, error) { resp := &ServiceBinding{} err := c.rancherClient.doById(SERVICE_BINDING_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_service_consume_map.go b/vendor/github.com/rancher/go-rancher/v2/generated_service_consume_map.go index 822a9aac5..138afde3c 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_service_consume_map.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_service_consume_map.go @@ -42,7 +42,8 @@ type ServiceConsumeMap struct { type ServiceConsumeMapCollection struct { Collection - Data []ServiceConsumeMap `json:"data,omitempty"` + Data []ServiceConsumeMap `json:"data,omitempty"` + client *ServiceConsumeMapClient } type ServiceConsumeMapClient struct { @@ -84,9 +85,20 @@ func (c *ServiceConsumeMapClient) Update(existing *ServiceConsumeMap, updates in func (c *ServiceConsumeMapClient) List(opts *ListOpts) (*ServiceConsumeMapCollection, error) { resp := &ServiceConsumeMapCollection{} err := c.rancherClient.doList(SERVICE_CONSUME_MAP_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ServiceConsumeMapCollection) Next() (*ServiceConsumeMapCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ServiceConsumeMapCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ServiceConsumeMapClient) ById(id string) (*ServiceConsumeMap, error) { resp := &ServiceConsumeMap{} err := c.rancherClient.doById(SERVICE_CONSUME_MAP_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_service_event.go b/vendor/github.com/rancher/go-rancher/v2/generated_service_event.go index 7d046b38b..71b3082f6 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_service_event.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_service_event.go @@ -46,7 +46,8 @@ type ServiceEvent struct { type ServiceEventCollection struct { Collection - Data []ServiceEvent `json:"data,omitempty"` + Data []ServiceEvent `json:"data,omitempty"` + client *ServiceEventClient } type ServiceEventClient struct { @@ -86,9 +87,20 @@ func (c *ServiceEventClient) Update(existing *ServiceEvent, updates interface{}) func (c *ServiceEventClient) List(opts *ListOpts) (*ServiceEventCollection, error) { resp := &ServiceEventCollection{} err := c.rancherClient.doList(SERVICE_EVENT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ServiceEventCollection) Next() (*ServiceEventCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ServiceEventCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ServiceEventClient) ById(id string) (*ServiceEvent, error) { resp := &ServiceEvent{} err := c.rancherClient.doById(SERVICE_EVENT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_service_expose_map.go b/vendor/github.com/rancher/go-rancher/v2/generated_service_expose_map.go index 60fe5f2f8..06453bf48 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_service_expose_map.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_service_expose_map.go @@ -44,7 +44,8 @@ type ServiceExposeMap struct { type ServiceExposeMapCollection struct { Collection - Data []ServiceExposeMap `json:"data,omitempty"` + Data []ServiceExposeMap `json:"data,omitempty"` + client *ServiceExposeMapClient } type ServiceExposeMapClient struct { @@ -84,9 +85,20 @@ func (c *ServiceExposeMapClient) Update(existing *ServiceExposeMap, updates inte func (c *ServiceExposeMapClient) List(opts *ListOpts) (*ServiceExposeMapCollection, error) { resp := &ServiceExposeMapCollection{} err := c.rancherClient.doList(SERVICE_EXPOSE_MAP_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ServiceExposeMapCollection) Next() (*ServiceExposeMapCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ServiceExposeMapCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ServiceExposeMapClient) ById(id string) (*ServiceExposeMap, error) { resp := &ServiceExposeMap{} err := c.rancherClient.doById(SERVICE_EXPOSE_MAP_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_service_link.go b/vendor/github.com/rancher/go-rancher/v2/generated_service_link.go index 52c75ac53..9532b2a36 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_service_link.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_service_link.go @@ -16,7 +16,8 @@ type ServiceLink struct { type ServiceLinkCollection struct { Collection - Data []ServiceLink `json:"data,omitempty"` + Data []ServiceLink `json:"data,omitempty"` + client *ServiceLinkClient } type ServiceLinkClient struct { @@ -52,9 +53,20 @@ func (c *ServiceLinkClient) Update(existing *ServiceLink, updates interface{}) ( func (c *ServiceLinkClient) List(opts *ListOpts) (*ServiceLinkCollection, error) { resp := &ServiceLinkCollection{} err := c.rancherClient.doList(SERVICE_LINK_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ServiceLinkCollection) Next() (*ServiceLinkCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ServiceLinkCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ServiceLinkClient) ById(id string) (*ServiceLink, error) { resp := &ServiceLink{} err := c.rancherClient.doById(SERVICE_LINK_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_service_log.go b/vendor/github.com/rancher/go-rancher/v2/generated_service_log.go index 0757d820f..81c2236e7 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_service_log.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_service_log.go @@ -34,7 +34,8 @@ type ServiceLog struct { type ServiceLogCollection struct { Collection - Data []ServiceLog `json:"data,omitempty"` + Data []ServiceLog `json:"data,omitempty"` + client *ServiceLogClient } type ServiceLogClient struct { @@ -70,9 +71,20 @@ func (c *ServiceLogClient) Update(existing *ServiceLog, updates interface{}) (*S func (c *ServiceLogClient) List(opts *ListOpts) (*ServiceLogCollection, error) { resp := &ServiceLogCollection{} err := c.rancherClient.doList(SERVICE_LOG_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ServiceLogCollection) Next() (*ServiceLogCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ServiceLogCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ServiceLogClient) ById(id string) (*ServiceLog, error) { resp := &ServiceLog{} err := c.rancherClient.doById(SERVICE_LOG_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_service_proxy.go b/vendor/github.com/rancher/go-rancher/v2/generated_service_proxy.go index fd6c32868..2af160e9a 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_service_proxy.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_service_proxy.go @@ -20,7 +20,8 @@ type ServiceProxy struct { type ServiceProxyCollection struct { Collection - Data []ServiceProxy `json:"data,omitempty"` + Data []ServiceProxy `json:"data,omitempty"` + client *ServiceProxyClient } type ServiceProxyClient struct { @@ -56,9 +57,20 @@ func (c *ServiceProxyClient) Update(existing *ServiceProxy, updates interface{}) func (c *ServiceProxyClient) List(opts *ListOpts) (*ServiceProxyCollection, error) { resp := &ServiceProxyCollection{} err := c.rancherClient.doList(SERVICE_PROXY_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ServiceProxyCollection) Next() (*ServiceProxyCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ServiceProxyCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ServiceProxyClient) ById(id string) (*ServiceProxy, error) { resp := &ServiceProxy{} err := c.rancherClient.doById(SERVICE_PROXY_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_service_restart.go b/vendor/github.com/rancher/go-rancher/v2/generated_service_restart.go index 5b95e8c68..5a470186a 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_service_restart.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_service_restart.go @@ -12,7 +12,8 @@ type ServiceRestart struct { type ServiceRestartCollection struct { Collection - Data []ServiceRestart `json:"data,omitempty"` + Data []ServiceRestart `json:"data,omitempty"` + client *ServiceRestartClient } type ServiceRestartClient struct { @@ -48,9 +49,20 @@ func (c *ServiceRestartClient) Update(existing *ServiceRestart, updates interfac func (c *ServiceRestartClient) List(opts *ListOpts) (*ServiceRestartCollection, error) { resp := &ServiceRestartCollection{} err := c.rancherClient.doList(SERVICE_RESTART_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ServiceRestartCollection) Next() (*ServiceRestartCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ServiceRestartCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ServiceRestartClient) ById(id string) (*ServiceRestart, error) { resp := &ServiceRestart{} err := c.rancherClient.doById(SERVICE_RESTART_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_service_upgrade.go b/vendor/github.com/rancher/go-rancher/v2/generated_service_upgrade.go index 25b453f2b..1c9748168 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_service_upgrade.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_service_upgrade.go @@ -14,7 +14,8 @@ type ServiceUpgrade struct { type ServiceUpgradeCollection struct { Collection - Data []ServiceUpgrade `json:"data,omitempty"` + Data []ServiceUpgrade `json:"data,omitempty"` + client *ServiceUpgradeClient } type ServiceUpgradeClient struct { @@ -50,9 +51,20 @@ func (c *ServiceUpgradeClient) Update(existing *ServiceUpgrade, updates interfac func (c *ServiceUpgradeClient) List(opts *ListOpts) (*ServiceUpgradeCollection, error) { resp := &ServiceUpgradeCollection{} err := c.rancherClient.doList(SERVICE_UPGRADE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ServiceUpgradeCollection) Next() (*ServiceUpgradeCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ServiceUpgradeCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ServiceUpgradeClient) ById(id string) (*ServiceUpgrade, error) { resp := &ServiceUpgrade{} err := c.rancherClient.doById(SERVICE_UPGRADE_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_service_upgrade_strategy.go b/vendor/github.com/rancher/go-rancher/v2/generated_service_upgrade_strategy.go index 834606b61..621403d39 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_service_upgrade_strategy.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_service_upgrade_strategy.go @@ -14,7 +14,8 @@ type ServiceUpgradeStrategy struct { type ServiceUpgradeStrategyCollection struct { Collection - Data []ServiceUpgradeStrategy `json:"data,omitempty"` + Data []ServiceUpgradeStrategy `json:"data,omitempty"` + client *ServiceUpgradeStrategyClient } type ServiceUpgradeStrategyClient struct { @@ -50,9 +51,20 @@ func (c *ServiceUpgradeStrategyClient) Update(existing *ServiceUpgradeStrategy, func (c *ServiceUpgradeStrategyClient) List(opts *ListOpts) (*ServiceUpgradeStrategyCollection, error) { resp := &ServiceUpgradeStrategyCollection{} err := c.rancherClient.doList(SERVICE_UPGRADE_STRATEGY_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ServiceUpgradeStrategyCollection) Next() (*ServiceUpgradeStrategyCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ServiceUpgradeStrategyCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ServiceUpgradeStrategyClient) ById(id string) (*ServiceUpgradeStrategy, error) { resp := &ServiceUpgradeStrategy{} err := c.rancherClient.doById(SERVICE_UPGRADE_STRATEGY_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_services_port_range.go b/vendor/github.com/rancher/go-rancher/v2/generated_services_port_range.go index d3c0eb91d..1d112c7a7 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_services_port_range.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_services_port_range.go @@ -14,7 +14,8 @@ type ServicesPortRange struct { type ServicesPortRangeCollection struct { Collection - Data []ServicesPortRange `json:"data,omitempty"` + Data []ServicesPortRange `json:"data,omitempty"` + client *ServicesPortRangeClient } type ServicesPortRangeClient struct { @@ -50,9 +51,20 @@ func (c *ServicesPortRangeClient) Update(existing *ServicesPortRange, updates in func (c *ServicesPortRangeClient) List(opts *ListOpts) (*ServicesPortRangeCollection, error) { resp := &ServicesPortRangeCollection{} err := c.rancherClient.doList(SERVICES_PORT_RANGE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ServicesPortRangeCollection) Next() (*ServicesPortRangeCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ServicesPortRangeCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ServicesPortRangeClient) ById(id string) (*ServicesPortRange, error) { resp := &ServicesPortRange{} err := c.rancherClient.doById(SERVICES_PORT_RANGE_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_set_labels_input.go b/vendor/github.com/rancher/go-rancher/v2/generated_set_labels_input.go deleted file mode 100644 index 96d894512..000000000 --- a/vendor/github.com/rancher/go-rancher/v2/generated_set_labels_input.go +++ /dev/null @@ -1,67 +0,0 @@ -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/v2/generated_set_load_balancer_service_links_input.go b/vendor/github.com/rancher/go-rancher/v2/generated_set_load_balancer_service_links_input.go index 76d8684cf..f4c09940c 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_set_load_balancer_service_links_input.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_set_load_balancer_service_links_input.go @@ -7,12 +7,13 @@ const ( type SetLoadBalancerServiceLinksInput struct { Resource - ServiceLinks []interface{} `json:"serviceLinks,omitempty" yaml:"service_links,omitempty"` + ServiceLinks []LoadBalancerServiceLink `json:"serviceLinks,omitempty" yaml:"service_links,omitempty"` } type SetLoadBalancerServiceLinksInputCollection struct { Collection - Data []SetLoadBalancerServiceLinksInput `json:"data,omitempty"` + Data []SetLoadBalancerServiceLinksInput `json:"data,omitempty"` + client *SetLoadBalancerServiceLinksInputClient } type SetLoadBalancerServiceLinksInputClient struct { @@ -48,9 +49,20 @@ func (c *SetLoadBalancerServiceLinksInputClient) Update(existing *SetLoadBalance func (c *SetLoadBalancerServiceLinksInputClient) List(opts *ListOpts) (*SetLoadBalancerServiceLinksInputCollection, error) { resp := &SetLoadBalancerServiceLinksInputCollection{} err := c.rancherClient.doList(SET_LOAD_BALANCER_SERVICE_LINKS_INPUT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *SetLoadBalancerServiceLinksInputCollection) Next() (*SetLoadBalancerServiceLinksInputCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &SetLoadBalancerServiceLinksInputCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *SetLoadBalancerServiceLinksInputClient) ById(id string) (*SetLoadBalancerServiceLinksInput, error) { resp := &SetLoadBalancerServiceLinksInput{} err := c.rancherClient.doById(SET_LOAD_BALANCER_SERVICE_LINKS_INPUT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_set_project_members_input.go b/vendor/github.com/rancher/go-rancher/v2/generated_set_project_members_input.go index bc8c2f201..6d09c9c3b 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_set_project_members_input.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_set_project_members_input.go @@ -7,12 +7,13 @@ const ( type SetProjectMembersInput struct { Resource - Members []interface{} `json:"members,omitempty" yaml:"members,omitempty"` + Members []ProjectMember `json:"members,omitempty" yaml:"members,omitempty"` } type SetProjectMembersInputCollection struct { Collection - Data []SetProjectMembersInput `json:"data,omitempty"` + Data []SetProjectMembersInput `json:"data,omitempty"` + client *SetProjectMembersInputClient } type SetProjectMembersInputClient struct { @@ -48,9 +49,20 @@ func (c *SetProjectMembersInputClient) Update(existing *SetProjectMembersInput, func (c *SetProjectMembersInputClient) List(opts *ListOpts) (*SetProjectMembersInputCollection, error) { resp := &SetProjectMembersInputCollection{} err := c.rancherClient.doList(SET_PROJECT_MEMBERS_INPUT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *SetProjectMembersInputCollection) Next() (*SetProjectMembersInputCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &SetProjectMembersInputCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *SetProjectMembersInputClient) ById(id string) (*SetProjectMembersInput, error) { resp := &SetProjectMembersInput{} err := c.rancherClient.doById(SET_PROJECT_MEMBERS_INPUT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_set_service_links_input.go b/vendor/github.com/rancher/go-rancher/v2/generated_set_service_links_input.go index b471e96c2..a67d8c4de 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_set_service_links_input.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_set_service_links_input.go @@ -7,12 +7,13 @@ const ( type SetServiceLinksInput struct { Resource - ServiceLinks []interface{} `json:"serviceLinks,omitempty" yaml:"service_links,omitempty"` + ServiceLinks []ServiceLink `json:"serviceLinks,omitempty" yaml:"service_links,omitempty"` } type SetServiceLinksInputCollection struct { Collection - Data []SetServiceLinksInput `json:"data,omitempty"` + Data []SetServiceLinksInput `json:"data,omitempty"` + client *SetServiceLinksInputClient } type SetServiceLinksInputClient struct { @@ -48,9 +49,20 @@ func (c *SetServiceLinksInputClient) Update(existing *SetServiceLinksInput, upda func (c *SetServiceLinksInputClient) List(opts *ListOpts) (*SetServiceLinksInputCollection, error) { resp := &SetServiceLinksInputCollection{} err := c.rancherClient.doList(SET_SERVICE_LINKS_INPUT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *SetServiceLinksInputCollection) Next() (*SetServiceLinksInputCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &SetServiceLinksInputCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *SetServiceLinksInputClient) ById(id string) (*SetServiceLinksInput, error) { resp := &SetServiceLinksInput{} err := c.rancherClient.doById(SET_SERVICE_LINKS_INPUT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_setting.go b/vendor/github.com/rancher/go-rancher/v2/generated_setting.go index 1aa7655b3..02dd2df9c 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_setting.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_setting.go @@ -20,7 +20,8 @@ type Setting struct { type SettingCollection struct { Collection - Data []Setting `json:"data,omitempty"` + Data []Setting `json:"data,omitempty"` + client *SettingClient } type SettingClient struct { @@ -56,9 +57,20 @@ func (c *SettingClient) Update(existing *Setting, updates interface{}) (*Setting func (c *SettingClient) List(opts *ListOpts) (*SettingCollection, error) { resp := &SettingCollection{} err := c.rancherClient.doList(SETTING_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *SettingCollection) Next() (*SettingCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &SettingCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *SettingClient) ById(id string) (*Setting, error) { resp := &Setting{} err := c.rancherClient.doById(SETTING_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_snapshot.go b/vendor/github.com/rancher/go-rancher/v2/generated_snapshot.go index 554035673..1c4ea033a 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_snapshot.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_snapshot.go @@ -38,7 +38,8 @@ type Snapshot struct { type SnapshotCollection struct { Collection - Data []Snapshot `json:"data,omitempty"` + Data []Snapshot `json:"data,omitempty"` + client *SnapshotClient } type SnapshotClient struct { @@ -80,9 +81,20 @@ func (c *SnapshotClient) Update(existing *Snapshot, updates interface{}) (*Snaps func (c *SnapshotClient) List(opts *ListOpts) (*SnapshotCollection, error) { resp := &SnapshotCollection{} err := c.rancherClient.doList(SNAPSHOT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *SnapshotCollection) Next() (*SnapshotCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &SnapshotCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *SnapshotClient) ById(id string) (*Snapshot, error) { resp := &Snapshot{} err := c.rancherClient.doById(SNAPSHOT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_snapshot_backup_input.go b/vendor/github.com/rancher/go-rancher/v2/generated_snapshot_backup_input.go index deb2fcc1b..9577ee6f5 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_snapshot_backup_input.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_snapshot_backup_input.go @@ -18,7 +18,8 @@ type SnapshotBackupInput struct { type SnapshotBackupInputCollection struct { Collection - Data []SnapshotBackupInput `json:"data,omitempty"` + Data []SnapshotBackupInput `json:"data,omitempty"` + client *SnapshotBackupInputClient } type SnapshotBackupInputClient struct { @@ -58,9 +59,20 @@ func (c *SnapshotBackupInputClient) Update(existing *SnapshotBackupInput, update func (c *SnapshotBackupInputClient) List(opts *ListOpts) (*SnapshotBackupInputCollection, error) { resp := &SnapshotBackupInputCollection{} err := c.rancherClient.doList(SNAPSHOT_BACKUP_INPUT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *SnapshotBackupInputCollection) Next() (*SnapshotBackupInputCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &SnapshotBackupInputCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *SnapshotBackupInputClient) ById(id string) (*SnapshotBackupInput, error) { resp := &SnapshotBackupInput{} err := c.rancherClient.doById(SNAPSHOT_BACKUP_INPUT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_stack.go b/vendor/github.com/rancher/go-rancher/v2/generated_stack.go index e761b2a30..d1d3b43be 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_stack.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_stack.go @@ -23,6 +23,8 @@ type Stack struct { ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"` + Group string `json:"group,omitempty" yaml:"group,omitempty"` + HealthState string `json:"healthState,omitempty" yaml:"health_state,omitempty"` Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` @@ -41,10 +43,14 @@ type Stack struct { Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + ServiceIds []string `json:"serviceIds,omitempty" yaml:"service_ids,omitempty"` + StartOnCreate bool `json:"startOnCreate,omitempty" yaml:"start_on_create,omitempty"` State string `json:"state,omitempty" yaml:"state,omitempty"` + System bool `json:"system,omitempty" yaml:"system,omitempty"` + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` @@ -56,7 +62,8 @@ type Stack struct { type StackCollection struct { Collection - Data []Stack `json:"data,omitempty"` + Data []Stack `json:"data,omitempty"` + client *StackClient } type StackClient struct { @@ -116,9 +123,20 @@ func (c *StackClient) Update(existing *Stack, updates interface{}) (*Stack, erro func (c *StackClient) List(opts *ListOpts) (*StackCollection, error) { resp := &StackCollection{} err := c.rancherClient.doList(STACK_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *StackCollection) Next() (*StackCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &StackCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *StackClient) ById(id string) (*Stack, error) { resp := &Stack{} err := c.rancherClient.doById(STACK_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_stack_upgrade.go b/vendor/github.com/rancher/go-rancher/v2/generated_stack_upgrade.go index 76a823900..a167ab541 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_stack_upgrade.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_stack_upgrade.go @@ -18,7 +18,8 @@ type StackUpgrade struct { type StackUpgradeCollection struct { Collection - Data []StackUpgrade `json:"data,omitempty"` + Data []StackUpgrade `json:"data,omitempty"` + client *StackUpgradeClient } type StackUpgradeClient struct { @@ -54,9 +55,20 @@ func (c *StackUpgradeClient) Update(existing *StackUpgrade, updates interface{}) func (c *StackUpgradeClient) List(opts *ListOpts) (*StackUpgradeCollection, error) { resp := &StackUpgradeCollection{} err := c.rancherClient.doList(STACK_UPGRADE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *StackUpgradeCollection) Next() (*StackUpgradeCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &StackUpgradeCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *StackUpgradeClient) ById(id string) (*StackUpgrade, error) { resp := &StackUpgrade{} err := c.rancherClient.doById(STACK_UPGRADE_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_state_transition.go b/vendor/github.com/rancher/go-rancher/v2/generated_state_transition.go index d763903f4..4fb565537 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_state_transition.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_state_transition.go @@ -10,7 +10,8 @@ type StateTransition struct { type StateTransitionCollection struct { Collection - Data []StateTransition `json:"data,omitempty"` + Data []StateTransition `json:"data,omitempty"` + client *StateTransitionClient } type StateTransitionClient struct { @@ -46,9 +47,20 @@ func (c *StateTransitionClient) Update(existing *StateTransition, updates interf func (c *StateTransitionClient) List(opts *ListOpts) (*StateTransitionCollection, error) { resp := &StateTransitionCollection{} err := c.rancherClient.doList(STATE_TRANSITION_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *StateTransitionCollection) Next() (*StateTransitionCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &StateTransitionCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *StateTransitionClient) ById(id string) (*StateTransition, error) { resp := &StateTransition{} err := c.rancherClient.doById(STATE_TRANSITION_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_stats_access.go b/vendor/github.com/rancher/go-rancher/v2/generated_stats_access.go index 1ec4d45be..1b7d814f3 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_stats_access.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_stats_access.go @@ -14,7 +14,8 @@ type StatsAccess struct { type StatsAccessCollection struct { Collection - Data []StatsAccess `json:"data,omitempty"` + Data []StatsAccess `json:"data,omitempty"` + client *StatsAccessClient } type StatsAccessClient struct { @@ -50,9 +51,20 @@ func (c *StatsAccessClient) Update(existing *StatsAccess, updates interface{}) ( func (c *StatsAccessClient) List(opts *ListOpts) (*StatsAccessCollection, error) { resp := &StatsAccessCollection{} err := c.rancherClient.doList(STATS_ACCESS_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *StatsAccessCollection) Next() (*StatsAccessCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &StatsAccessCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *StatsAccessClient) ById(id string) (*StatsAccess, error) { resp := &StatsAccess{} err := c.rancherClient.doById(STATS_ACCESS_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_storage_driver.go b/vendor/github.com/rancher/go-rancher/v2/generated_storage_driver.go new file mode 100644 index 000000000..bf54aa4f3 --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/v2/generated_storage_driver.go @@ -0,0 +1,168 @@ +package client + +const ( + STORAGE_DRIVER_TYPE = "storageDriver" +) + +type StorageDriver 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"` + + 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"` + + Scope string `json:"scope,omitempty" yaml:"scope,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"` + + VolumeAccessMode string `json:"volumeAccessMode,omitempty" yaml:"volume_access_mode,omitempty"` + + VolumeCapabilities []string `json:"volumeCapabilities,omitempty" yaml:"volume_capabilities,omitempty"` +} + +type StorageDriverCollection struct { + Collection + Data []StorageDriver `json:"data,omitempty"` + client *StorageDriverClient +} + +type StorageDriverClient struct { + rancherClient *RancherClient +} + +type StorageDriverOperations interface { + List(opts *ListOpts) (*StorageDriverCollection, error) + Create(opts *StorageDriver) (*StorageDriver, error) + Update(existing *StorageDriver, updates interface{}) (*StorageDriver, error) + ById(id string) (*StorageDriver, error) + Delete(container *StorageDriver) error + + ActionActivate(*StorageDriver) (*StorageDriver, error) + + ActionCreate(*StorageDriver) (*StorageDriver, error) + + ActionDeactivate(*StorageDriver) (*StorageDriver, error) + + ActionRemove(*StorageDriver) (*StorageDriver, error) + + ActionUpdate(*StorageDriver) (*StorageDriver, error) +} + +func newStorageDriverClient(rancherClient *RancherClient) *StorageDriverClient { + return &StorageDriverClient{ + rancherClient: rancherClient, + } +} + +func (c *StorageDriverClient) Create(container *StorageDriver) (*StorageDriver, error) { + resp := &StorageDriver{} + err := c.rancherClient.doCreate(STORAGE_DRIVER_TYPE, container, resp) + return resp, err +} + +func (c *StorageDriverClient) Update(existing *StorageDriver, updates interface{}) (*StorageDriver, error) { + resp := &StorageDriver{} + err := c.rancherClient.doUpdate(STORAGE_DRIVER_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *StorageDriverClient) List(opts *ListOpts) (*StorageDriverCollection, error) { + resp := &StorageDriverCollection{} + err := c.rancherClient.doList(STORAGE_DRIVER_TYPE, opts, resp) + resp.client = c + return resp, err +} + +func (cc *StorageDriverCollection) Next() (*StorageDriverCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &StorageDriverCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *StorageDriverClient) ById(id string) (*StorageDriver, error) { + resp := &StorageDriver{} + err := c.rancherClient.doById(STORAGE_DRIVER_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *StorageDriverClient) Delete(container *StorageDriver) error { + return c.rancherClient.doResourceDelete(STORAGE_DRIVER_TYPE, &container.Resource) +} + +func (c *StorageDriverClient) ActionActivate(resource *StorageDriver) (*StorageDriver, error) { + + resp := &StorageDriver{} + + err := c.rancherClient.doAction(STORAGE_DRIVER_TYPE, "activate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *StorageDriverClient) ActionCreate(resource *StorageDriver) (*StorageDriver, error) { + + resp := &StorageDriver{} + + err := c.rancherClient.doAction(STORAGE_DRIVER_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *StorageDriverClient) ActionDeactivate(resource *StorageDriver) (*StorageDriver, error) { + + resp := &StorageDriver{} + + err := c.rancherClient.doAction(STORAGE_DRIVER_TYPE, "deactivate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *StorageDriverClient) ActionRemove(resource *StorageDriver) (*StorageDriver, error) { + + resp := &StorageDriver{} + + err := c.rancherClient.doAction(STORAGE_DRIVER_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *StorageDriverClient) ActionUpdate(resource *StorageDriver) (*StorageDriver, error) { + + resp := &StorageDriver{} + + err := c.rancherClient.doAction(STORAGE_DRIVER_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_storage_pool.go b/vendor/github.com/rancher/go-rancher/v2/generated_storage_pool.go index 1175cfd8a..d68575236 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_storage_pool.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_storage_pool.go @@ -31,6 +31,8 @@ type StoragePool struct { State string `json:"state,omitempty" yaml:"state,omitempty"` + StorageDriverId string `json:"storageDriverId,omitempty" yaml:"storage_driver_id,omitempty"` + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` @@ -46,7 +48,8 @@ type StoragePool struct { type StoragePoolCollection struct { Collection - Data []StoragePool `json:"data,omitempty"` + Data []StoragePool `json:"data,omitempty"` + client *StoragePoolClient } type StoragePoolClient struct { @@ -96,9 +99,20 @@ func (c *StoragePoolClient) Update(existing *StoragePool, updates interface{}) ( func (c *StoragePoolClient) List(opts *ListOpts) (*StoragePoolCollection, error) { resp := &StoragePoolCollection{} err := c.rancherClient.doList(STORAGE_POOL_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *StoragePoolCollection) Next() (*StoragePoolCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &StoragePoolCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *StoragePoolClient) ById(id string) (*StoragePool, error) { resp := &StoragePool{} err := c.rancherClient.doById(STORAGE_POOL_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_subscribe.go b/vendor/github.com/rancher/go-rancher/v2/generated_subscribe.go index b8c6aa072..ec908982a 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_subscribe.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_subscribe.go @@ -14,7 +14,8 @@ type Subscribe struct { type SubscribeCollection struct { Collection - Data []Subscribe `json:"data,omitempty"` + Data []Subscribe `json:"data,omitempty"` + client *SubscribeClient } type SubscribeClient struct { @@ -50,9 +51,20 @@ func (c *SubscribeClient) Update(existing *Subscribe, updates interface{}) (*Sub func (c *SubscribeClient) List(opts *ListOpts) (*SubscribeCollection, error) { resp := &SubscribeCollection{} err := c.rancherClient.doList(SUBSCRIBE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *SubscribeCollection) Next() (*SubscribeCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &SubscribeCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *SubscribeClient) ById(id string) (*Subscribe, error) { resp := &Subscribe{} err := c.rancherClient.doById(SUBSCRIBE_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_task.go b/vendor/github.com/rancher/go-rancher/v2/generated_task.go index 13730c4ee..8fa65e2db 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_task.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_task.go @@ -12,7 +12,8 @@ type Task struct { type TaskCollection struct { Collection - Data []Task `json:"data,omitempty"` + Data []Task `json:"data,omitempty"` + client *TaskClient } type TaskClient struct { @@ -50,9 +51,20 @@ func (c *TaskClient) Update(existing *Task, updates interface{}) (*Task, error) func (c *TaskClient) List(opts *ListOpts) (*TaskCollection, error) { resp := &TaskCollection{} err := c.rancherClient.doList(TASK_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *TaskCollection) Next() (*TaskCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &TaskCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *TaskClient) ById(id string) (*Task, error) { resp := &Task{} err := c.rancherClient.doById(TASK_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_task_instance.go b/vendor/github.com/rancher/go-rancher/v2/generated_task_instance.go index 52739b118..5bb58273e 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_task_instance.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_task_instance.go @@ -22,7 +22,8 @@ type TaskInstance struct { type TaskInstanceCollection struct { Collection - Data []TaskInstance `json:"data,omitempty"` + Data []TaskInstance `json:"data,omitempty"` + client *TaskInstanceClient } type TaskInstanceClient struct { @@ -58,9 +59,20 @@ func (c *TaskInstanceClient) Update(existing *TaskInstance, updates interface{}) func (c *TaskInstanceClient) List(opts *ListOpts) (*TaskInstanceCollection, error) { resp := &TaskInstanceCollection{} err := c.rancherClient.doList(TASK_INSTANCE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *TaskInstanceCollection) Next() (*TaskInstanceCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &TaskInstanceCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *TaskInstanceClient) ById(id string) (*TaskInstance, error) { resp := &TaskInstance{} err := c.rancherClient.doById(TASK_INSTANCE_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_to_service_upgrade_strategy.go b/vendor/github.com/rancher/go-rancher/v2/generated_to_service_upgrade_strategy.go index 3abdc456f..3ed74115c 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_to_service_upgrade_strategy.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_to_service_upgrade_strategy.go @@ -20,7 +20,8 @@ type ToServiceUpgradeStrategy struct { type ToServiceUpgradeStrategyCollection struct { Collection - Data []ToServiceUpgradeStrategy `json:"data,omitempty"` + Data []ToServiceUpgradeStrategy `json:"data,omitempty"` + client *ToServiceUpgradeStrategyClient } type ToServiceUpgradeStrategyClient struct { @@ -56,9 +57,20 @@ func (c *ToServiceUpgradeStrategyClient) Update(existing *ToServiceUpgradeStrate func (c *ToServiceUpgradeStrategyClient) List(opts *ListOpts) (*ToServiceUpgradeStrategyCollection, error) { resp := &ToServiceUpgradeStrategyCollection{} err := c.rancherClient.doList(TO_SERVICE_UPGRADE_STRATEGY_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *ToServiceUpgradeStrategyCollection) Next() (*ToServiceUpgradeStrategyCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &ToServiceUpgradeStrategyCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *ToServiceUpgradeStrategyClient) ById(id string) (*ToServiceUpgradeStrategy, error) { resp := &ToServiceUpgradeStrategy{} err := c.rancherClient.doById(TO_SERVICE_UPGRADE_STRATEGY_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_type_documentation.go b/vendor/github.com/rancher/go-rancher/v2/generated_type_documentation.go index dc1d5ef82..cdfe18649 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_type_documentation.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_type_documentation.go @@ -14,7 +14,8 @@ type TypeDocumentation struct { type TypeDocumentationCollection struct { Collection - Data []TypeDocumentation `json:"data,omitempty"` + Data []TypeDocumentation `json:"data,omitempty"` + client *TypeDocumentationClient } type TypeDocumentationClient struct { @@ -50,9 +51,20 @@ func (c *TypeDocumentationClient) Update(existing *TypeDocumentation, updates in func (c *TypeDocumentationClient) List(opts *ListOpts) (*TypeDocumentationCollection, error) { resp := &TypeDocumentationCollection{} err := c.rancherClient.doList(TYPE_DOCUMENTATION_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *TypeDocumentationCollection) Next() (*TypeDocumentationCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &TypeDocumentationCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *TypeDocumentationClient) ById(id string) (*TypeDocumentation, error) { resp := &TypeDocumentation{} err := c.rancherClient.doById(TYPE_DOCUMENTATION_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_virtual_machine.go b/vendor/github.com/rancher/go-rancher/v2/generated_virtual_machine.go index cf8abedfb..f22b93cde 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_virtual_machine.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_virtual_machine.go @@ -33,7 +33,7 @@ type VirtualMachine struct { Description string `json:"description,omitempty" yaml:"description,omitempty"` - Disks []interface{} `json:"disks,omitempty" yaml:"disks,omitempty"` + Disks []VirtualMachineDisk `json:"disks,omitempty" yaml:"disks,omitempty"` Dns []string `json:"dns,omitempty" yaml:"dns,omitempty"` @@ -97,12 +97,16 @@ type VirtualMachine struct { SecurityOpt []string `json:"securityOpt,omitempty" yaml:"security_opt,omitempty"` + ServiceIds []string `json:"serviceIds,omitempty" yaml:"service_ids,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"` + System bool `json:"system,omitempty" yaml:"system,omitempty"` + SystemContainer string `json:"systemContainer,omitempty" yaml:"system_container,omitempty"` Token string `json:"token,omitempty" yaml:"token,omitempty"` @@ -126,7 +130,8 @@ type VirtualMachine struct { type VirtualMachineCollection struct { Collection - Data []VirtualMachine `json:"data,omitempty"` + Data []VirtualMachine `json:"data,omitempty"` + client *VirtualMachineClient } type VirtualMachineClient struct { @@ -166,8 +171,6 @@ type VirtualMachineOperations interface { ActionRestore(*VirtualMachine) (*Instance, error) - ActionSetlabels(*VirtualMachine, *SetLabelsInput) (*Container, error) - ActionStart(*VirtualMachine) (*Instance, error) ActionStop(*VirtualMachine, *InstanceStop) (*Instance, error) @@ -202,9 +205,20 @@ func (c *VirtualMachineClient) Update(existing *VirtualMachine, updates interfac func (c *VirtualMachineClient) List(opts *ListOpts) (*VirtualMachineCollection, error) { resp := &VirtualMachineCollection{} err := c.rancherClient.doList(VIRTUAL_MACHINE_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *VirtualMachineCollection) Next() (*VirtualMachineCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &VirtualMachineCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *VirtualMachineClient) ById(id string) (*VirtualMachine, error) { resp := &VirtualMachine{} err := c.rancherClient.doById(VIRTUAL_MACHINE_TYPE, id, resp) @@ -337,15 +351,6 @@ func (c *VirtualMachineClient) ActionRestore(resource *VirtualMachine) (*Instanc 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{} diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_virtual_machine_disk.go b/vendor/github.com/rancher/go-rancher/v2/generated_virtual_machine_disk.go index 7e1e8a526..af52418d3 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_virtual_machine_disk.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_virtual_machine_disk.go @@ -24,7 +24,8 @@ type VirtualMachineDisk struct { type VirtualMachineDiskCollection struct { Collection - Data []VirtualMachineDisk `json:"data,omitempty"` + Data []VirtualMachineDisk `json:"data,omitempty"` + client *VirtualMachineDiskClient } type VirtualMachineDiskClient struct { @@ -60,9 +61,20 @@ func (c *VirtualMachineDiskClient) Update(existing *VirtualMachineDisk, updates func (c *VirtualMachineDiskClient) List(opts *ListOpts) (*VirtualMachineDiskCollection, error) { resp := &VirtualMachineDiskCollection{} err := c.rancherClient.doList(VIRTUAL_MACHINE_DISK_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *VirtualMachineDiskCollection) Next() (*VirtualMachineDiskCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &VirtualMachineDiskCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *VirtualMachineDiskClient) ById(id string) (*VirtualMachineDisk, error) { resp := &VirtualMachineDisk{} err := c.rancherClient.doById(VIRTUAL_MACHINE_DISK_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_volume.go b/vendor/github.com/rancher/go-rancher/v2/generated_volume.go index 395deb6de..640e4f8b0 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_volume.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_volume.go @@ -23,6 +23,8 @@ type Volume struct { ExternalId string `json:"externalId,omitempty" yaml:"external_id,omitempty"` + HostId string `json:"hostId,omitempty" yaml:"host_id,omitempty"` + ImageId string `json:"imageId,omitempty" yaml:"image_id,omitempty"` InstanceId string `json:"instanceId,omitempty" yaml:"instance_id,omitempty"` @@ -37,8 +39,12 @@ type Volume struct { Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + StackId string `json:"stackId,omitempty" yaml:"stack_id,omitempty"` + State string `json:"state,omitempty" yaml:"state,omitempty"` + StorageDriverId string `json:"storageDriverId,omitempty" yaml:"storage_driver_id,omitempty"` + Transitioning string `json:"transitioning,omitempty" yaml:"transitioning,omitempty"` TransitioningMessage string `json:"transitioningMessage,omitempty" yaml:"transitioning_message,omitempty"` @@ -48,11 +54,14 @@ type Volume struct { Uri string `json:"uri,omitempty" yaml:"uri,omitempty"` Uuid string `json:"uuid,omitempty" yaml:"uuid,omitempty"` + + VolumeTemplateId string `json:"volumeTemplateId,omitempty" yaml:"volume_template_id,omitempty"` } type VolumeCollection struct { Collection - Data []Volume `json:"data,omitempty"` + Data []Volume `json:"data,omitempty"` + client *VolumeClient } type VolumeClient struct { @@ -66,8 +75,6 @@ type VolumeOperations interface { ById(id string) (*Volume, error) Delete(container *Volume) error - ActionActivate(*Volume) (*Volume, error) - ActionAllocate(*Volume) (*Volume, error) ActionCreate(*Volume) (*Volume, error) @@ -110,9 +117,20 @@ func (c *VolumeClient) Update(existing *Volume, updates interface{}) (*Volume, e func (c *VolumeClient) List(opts *ListOpts) (*VolumeCollection, error) { resp := &VolumeCollection{} err := c.rancherClient.doList(VOLUME_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *VolumeCollection) Next() (*VolumeCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &VolumeCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *VolumeClient) ById(id string) (*Volume, error) { resp := &Volume{} err := c.rancherClient.doById(VOLUME_TYPE, id, resp) @@ -128,15 +146,6 @@ 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{} diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_volume_activate_input.go b/vendor/github.com/rancher/go-rancher/v2/generated_volume_activate_input.go new file mode 100644 index 000000000..be4269a6e --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/v2/generated_volume_activate_input.go @@ -0,0 +1,79 @@ +package client + +const ( + VOLUME_ACTIVATE_INPUT_TYPE = "volumeActivateInput" +) + +type VolumeActivateInput struct { + Resource + + HostId string `json:"hostId,omitempty" yaml:"host_id,omitempty"` +} + +type VolumeActivateInputCollection struct { + Collection + Data []VolumeActivateInput `json:"data,omitempty"` + client *VolumeActivateInputClient +} + +type VolumeActivateInputClient struct { + rancherClient *RancherClient +} + +type VolumeActivateInputOperations interface { + List(opts *ListOpts) (*VolumeActivateInputCollection, error) + Create(opts *VolumeActivateInput) (*VolumeActivateInput, error) + Update(existing *VolumeActivateInput, updates interface{}) (*VolumeActivateInput, error) + ById(id string) (*VolumeActivateInput, error) + Delete(container *VolumeActivateInput) error +} + +func newVolumeActivateInputClient(rancherClient *RancherClient) *VolumeActivateInputClient { + return &VolumeActivateInputClient{ + rancherClient: rancherClient, + } +} + +func (c *VolumeActivateInputClient) Create(container *VolumeActivateInput) (*VolumeActivateInput, error) { + resp := &VolumeActivateInput{} + err := c.rancherClient.doCreate(VOLUME_ACTIVATE_INPUT_TYPE, container, resp) + return resp, err +} + +func (c *VolumeActivateInputClient) Update(existing *VolumeActivateInput, updates interface{}) (*VolumeActivateInput, error) { + resp := &VolumeActivateInput{} + err := c.rancherClient.doUpdate(VOLUME_ACTIVATE_INPUT_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *VolumeActivateInputClient) List(opts *ListOpts) (*VolumeActivateInputCollection, error) { + resp := &VolumeActivateInputCollection{} + err := c.rancherClient.doList(VOLUME_ACTIVATE_INPUT_TYPE, opts, resp) + resp.client = c + return resp, err +} + +func (cc *VolumeActivateInputCollection) Next() (*VolumeActivateInputCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &VolumeActivateInputCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *VolumeActivateInputClient) ById(id string) (*VolumeActivateInput, error) { + resp := &VolumeActivateInput{} + err := c.rancherClient.doById(VOLUME_ACTIVATE_INPUT_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *VolumeActivateInputClient) Delete(container *VolumeActivateInput) error { + return c.rancherClient.doResourceDelete(VOLUME_ACTIVATE_INPUT_TYPE, &container.Resource) +} diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_volume_snapshot_input.go b/vendor/github.com/rancher/go-rancher/v2/generated_volume_snapshot_input.go index 10df7edea..2e2425a26 100644 --- a/vendor/github.com/rancher/go-rancher/v2/generated_volume_snapshot_input.go +++ b/vendor/github.com/rancher/go-rancher/v2/generated_volume_snapshot_input.go @@ -12,7 +12,8 @@ type VolumeSnapshotInput struct { type VolumeSnapshotInputCollection struct { Collection - Data []VolumeSnapshotInput `json:"data,omitempty"` + Data []VolumeSnapshotInput `json:"data,omitempty"` + client *VolumeSnapshotInputClient } type VolumeSnapshotInputClient struct { @@ -48,9 +49,20 @@ func (c *VolumeSnapshotInputClient) Update(existing *VolumeSnapshotInput, update func (c *VolumeSnapshotInputClient) List(opts *ListOpts) (*VolumeSnapshotInputCollection, error) { resp := &VolumeSnapshotInputCollection{} err := c.rancherClient.doList(VOLUME_SNAPSHOT_INPUT_TYPE, opts, resp) + resp.client = c return resp, err } +func (cc *VolumeSnapshotInputCollection) Next() (*VolumeSnapshotInputCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &VolumeSnapshotInputCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + func (c *VolumeSnapshotInputClient) ById(id string) (*VolumeSnapshotInput, error) { resp := &VolumeSnapshotInput{} err := c.rancherClient.doById(VOLUME_SNAPSHOT_INPUT_TYPE, id, resp) diff --git a/vendor/github.com/rancher/go-rancher/v2/generated_volume_template.go b/vendor/github.com/rancher/go-rancher/v2/generated_volume_template.go new file mode 100644 index 000000000..a2433bafc --- /dev/null +++ b/vendor/github.com/rancher/go-rancher/v2/generated_volume_template.go @@ -0,0 +1,190 @@ +package client + +const ( + VOLUME_TEMPLATE_TYPE = "volumeTemplate" +) + +type VolumeTemplate 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"` + + DriverOpts map[string]interface{} `json:"driverOpts,omitempty" yaml:"driver_opts,omitempty"` + + External bool `json:"external,omitempty" yaml:"external,omitempty"` + + Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` + + Name string `json:"name,omitempty" yaml:"name,omitempty"` + + PerContainer bool `json:"perContainer,omitempty" yaml:"per_container,omitempty"` + + RemoveTime string `json:"removeTime,omitempty" yaml:"remove_time,omitempty"` + + Removed string `json:"removed,omitempty" yaml:"removed,omitempty"` + + StackId string `json:"stackId,omitempty" yaml:"stack_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 VolumeTemplateCollection struct { + Collection + Data []VolumeTemplate `json:"data,omitempty"` + client *VolumeTemplateClient +} + +type VolumeTemplateClient struct { + rancherClient *RancherClient +} + +type VolumeTemplateOperations interface { + List(opts *ListOpts) (*VolumeTemplateCollection, error) + Create(opts *VolumeTemplate) (*VolumeTemplate, error) + Update(existing *VolumeTemplate, updates interface{}) (*VolumeTemplate, error) + ById(id string) (*VolumeTemplate, error) + Delete(container *VolumeTemplate) error + + ActionActivate(*VolumeTemplate) (*VolumeTemplate, error) + + ActionCreate(*VolumeTemplate) (*VolumeTemplate, error) + + ActionDeactivate(*VolumeTemplate) (*VolumeTemplate, error) + + ActionPurge(*VolumeTemplate) (*VolumeTemplate, error) + + ActionRemove(*VolumeTemplate) (*VolumeTemplate, error) + + ActionRestore(*VolumeTemplate) (*VolumeTemplate, error) + + ActionUpdate(*VolumeTemplate) (*VolumeTemplate, error) +} + +func newVolumeTemplateClient(rancherClient *RancherClient) *VolumeTemplateClient { + return &VolumeTemplateClient{ + rancherClient: rancherClient, + } +} + +func (c *VolumeTemplateClient) Create(container *VolumeTemplate) (*VolumeTemplate, error) { + resp := &VolumeTemplate{} + err := c.rancherClient.doCreate(VOLUME_TEMPLATE_TYPE, container, resp) + return resp, err +} + +func (c *VolumeTemplateClient) Update(existing *VolumeTemplate, updates interface{}) (*VolumeTemplate, error) { + resp := &VolumeTemplate{} + err := c.rancherClient.doUpdate(VOLUME_TEMPLATE_TYPE, &existing.Resource, updates, resp) + return resp, err +} + +func (c *VolumeTemplateClient) List(opts *ListOpts) (*VolumeTemplateCollection, error) { + resp := &VolumeTemplateCollection{} + err := c.rancherClient.doList(VOLUME_TEMPLATE_TYPE, opts, resp) + resp.client = c + return resp, err +} + +func (cc *VolumeTemplateCollection) Next() (*VolumeTemplateCollection, error) { + if cc != nil && cc.Pagination != nil && cc.Pagination.Next != "" { + resp := &VolumeTemplateCollection{} + err := cc.client.rancherClient.doNext(cc.Pagination.Next, resp) + resp.client = cc.client + return resp, err + } + return nil, nil +} + +func (c *VolumeTemplateClient) ById(id string) (*VolumeTemplate, error) { + resp := &VolumeTemplate{} + err := c.rancherClient.doById(VOLUME_TEMPLATE_TYPE, id, resp) + if apiError, ok := err.(*ApiError); ok { + if apiError.StatusCode == 404 { + return nil, nil + } + } + return resp, err +} + +func (c *VolumeTemplateClient) Delete(container *VolumeTemplate) error { + return c.rancherClient.doResourceDelete(VOLUME_TEMPLATE_TYPE, &container.Resource) +} + +func (c *VolumeTemplateClient) ActionActivate(resource *VolumeTemplate) (*VolumeTemplate, error) { + + resp := &VolumeTemplate{} + + err := c.rancherClient.doAction(VOLUME_TEMPLATE_TYPE, "activate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *VolumeTemplateClient) ActionCreate(resource *VolumeTemplate) (*VolumeTemplate, error) { + + resp := &VolumeTemplate{} + + err := c.rancherClient.doAction(VOLUME_TEMPLATE_TYPE, "create", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *VolumeTemplateClient) ActionDeactivate(resource *VolumeTemplate) (*VolumeTemplate, error) { + + resp := &VolumeTemplate{} + + err := c.rancherClient.doAction(VOLUME_TEMPLATE_TYPE, "deactivate", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *VolumeTemplateClient) ActionPurge(resource *VolumeTemplate) (*VolumeTemplate, error) { + + resp := &VolumeTemplate{} + + err := c.rancherClient.doAction(VOLUME_TEMPLATE_TYPE, "purge", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *VolumeTemplateClient) ActionRemove(resource *VolumeTemplate) (*VolumeTemplate, error) { + + resp := &VolumeTemplate{} + + err := c.rancherClient.doAction(VOLUME_TEMPLATE_TYPE, "remove", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *VolumeTemplateClient) ActionRestore(resource *VolumeTemplate) (*VolumeTemplate, error) { + + resp := &VolumeTemplate{} + + err := c.rancherClient.doAction(VOLUME_TEMPLATE_TYPE, "restore", &resource.Resource, nil, resp) + + return resp, err +} + +func (c *VolumeTemplateClient) ActionUpdate(resource *VolumeTemplate) (*VolumeTemplate, error) { + + resp := &VolumeTemplate{} + + err := c.rancherClient.doAction(VOLUME_TEMPLATE_TYPE, "update", &resource.Resource, nil, resp) + + return resp, err +} diff --git a/vendor/github.com/rancher/rancher-compose/app/app.go b/vendor/github.com/rancher/rancher-compose/app/app.go index 1d5e9188c..e8c55ff16 100644 --- a/vendor/github.com/rancher/rancher-compose/app/app.go +++ b/vendor/github.com/rancher/rancher-compose/app/app.go @@ -49,6 +49,7 @@ func (p *ProjectFactory) Create(c *cli.Context) (project.APIProject, error) { PullCached: c.Bool("cached"), Uploader: &rancher.S3Uploader{}, Args: c.Args(), + BindingsFile: c.GlobalString("bindings-file"), } qLookup.Context = context diff --git a/vendor/github.com/rancher/rancher-compose/preprocess/project.go b/vendor/github.com/rancher/rancher-compose/preprocess/project.go index 39c122b34..0e9fe3004 100644 --- a/vendor/github.com/rancher/rancher-compose/preprocess/project.go +++ b/vendor/github.com/rancher/rancher-compose/preprocess/project.go @@ -1,29 +1,69 @@ package preprocess import ( + "encoding/json" "fmt" "strconv" "github.com/docker/libcompose/config" + "github.com/rancher/rancher-compose/utils" ) -func PreprocessServiceMap(serviceMap config.RawServiceMap) (config.RawServiceMap, error) { - newServiceMap := make(config.RawServiceMap) +type BindingProperty struct { + Services map[string]Service `json:"services"` +} - for k, v := range serviceMap { - newServiceMap[k] = make(config.RawService) +type Service struct { + Labels map[string]interface{} `json:"labels"` + Ports []interface{} `json:"ports"` +} - for k2, v2 := range v { - if k2 == "environment" || k2 == "labels" { - newServiceMap[k][k2] = Preprocess(v2, true) - } else { - newServiceMap[k][k2] = Preprocess(v2, false) +func PreprocessServiceMap(bindingsBytes []byte) func(serviceMap config.RawServiceMap) (config.RawServiceMap, error) { + return func(serviceMap config.RawServiceMap) (config.RawServiceMap, error) { + newServiceMap := make(config.RawServiceMap) + + var binding BindingProperty + var bindingsServices []string + + if bindingsBytes != nil { + err := json.Unmarshal(bindingsBytes, &binding) + if err != nil { + return nil, err } + for k := range binding.Services { + bindingsServices = append(bindingsServices, k) + } } - } - return newServiceMap, nil + for k, v := range serviceMap { + newServiceMap[k] = make(config.RawService) + if bindingsBytes != nil { + if utils.Contains(bindingsServices, k) == true { + labelMap := make(map[interface{}]interface{}) + for key, value := range binding.Services[k].Labels { + labelMap[interface{}(key)] = value + } + if len(labelMap) != 0 { + v["labels"] = labelMap + } + if len(binding.Services[k].Ports) > 0 { + v["ports"] = binding.Services[k].Ports + } + } + } + for k2, v2 := range v { + if k2 == "environment" || k2 == "labels" { + newServiceMap[k][k2] = Preprocess(v2, true) + } else { + newServiceMap[k][k2] = Preprocess(v2, false) + } + + } + } + + return newServiceMap, nil + } } func Preprocess(item interface{}, replaceTypes bool) interface{} { diff --git a/vendor/github.com/rancher/rancher-compose/rancher/configs.go b/vendor/github.com/rancher/rancher-compose/rancher/configs.go index b04415b57..2f25df549 100644 --- a/vendor/github.com/rancher/rancher-compose/rancher/configs.go +++ b/vendor/github.com/rancher/rancher-compose/rancher/configs.go @@ -53,7 +53,7 @@ func createLaunchConfig(r *RancherService, name string, serviceConfig *config.Se rancherConfig := r.context.RancherConfig[name] - schemasUrl := strings.SplitN(r.Context().Client.Schemas.Links["self"], "/schemas", 2)[0] + schemasUrl := strings.SplitN(r.Context().Client.GetSchemas().Links["self"], "/schemas", 2)[0] scriptsUrl := schemasUrl + "/scripts/transform" config, hostConfig, err := service.Convert(serviceConfig, r.context.Context) @@ -89,10 +89,7 @@ func createLaunchConfig(r *RancherService, name string, serviceConfig *config.Se result.Vcpu = int64(rancherConfig.Vcpu) result.Userdata = rancherConfig.Userdata result.MemoryMb = int64(rancherConfig.Memory) - result.Disks = []interface{}{} - for _, i := range rancherConfig.Disks { - result.Disks = append(result.Disks, i) - } + result.Disks = rancherConfig.Disks if strings.EqualFold(result.Kind, "virtual_machine") || strings.EqualFold(result.Kind, "virtualmachine") { result.Kind = "virtualMachine" diff --git a/vendor/github.com/rancher/rancher-compose/rancher/context.go b/vendor/github.com/rancher/rancher-compose/rancher/context.go index 4056d94cc..ca9f94a96 100644 --- a/vendor/github.com/rancher/rancher-compose/rancher/context.go +++ b/vendor/github.com/rancher/rancher-compose/rancher/context.go @@ -3,7 +3,6 @@ package rancher import ( "fmt" "io/ioutil" - "net/url" "os" "path" "path/filepath" @@ -33,6 +32,9 @@ type Context struct { RancherConfig map[string]RancherConfig RancherComposeFile string RancherComposeBytes []byte + BindingsFile string + Binding *client.Binding + BindingsBytes []byte Url string AccessKey string SecretKey string @@ -75,6 +77,15 @@ type RancherConfig struct { UpgradeStrategy client.InServiceUpgradeStrategy `yaml:"upgrade_strategy,omitempty"` } +type BindingProperty struct { + Services map[string]Service `json:"services"` +} + +type Service struct { + Labels map[string]interface{} `json:"labels"` + Ports []interface{} `json:"ports"` +} + func ResolveRancherCompose(composeFile, rancherComposeFile string) (string, error) { if rancherComposeFile == "" && composeFile != "" { f, err := filepath.Abs(composeFile) @@ -144,6 +155,7 @@ func (c *Context) fillInRancherConfig(rawServiceMap config.RawServiceMap) error if err := config.Interpolate(c.EnvironmentLookup, &rawServiceMap); err != nil { return err } + rawServiceMap, err := preprocess.TryConvertStringsToInts(rawServiceMap) if err != nil { return err @@ -173,18 +185,8 @@ func (c *Context) loadClient() (*client.RancherClient, error) { return nil, fmt.Errorf("RANCHER_URL is not set") } - url, err := url.Parse(c.Url) - if err != nil { - return nil, err - } - - base := path.Base(url.Path) - if base != "v2-beta" && base != "schemas" { - url.Path = path.Join(url.Path, "v2-beta") - } - if client, err := client.NewRancherClient(&client.ClientOpts{ - Url: url.String(), + Url: c.Url, AccessKey: c.AccessKey, SecretKey: c.SecretKey, }); err != nil { @@ -212,7 +214,7 @@ func (c *Context) open() error { return err } - if stackSchema, ok := c.Client.Types["stack"]; !ok || !rUtils.Contains(stackSchema.CollectionMethods, "POST") { + if stackSchema, ok := c.Client.GetTypes()["stack"]; !ok || !rUtils.Contains(stackSchema.CollectionMethods, "POST") { return fmt.Errorf("Can not create a stack, check API key [%s] for [%s]", c.AccessKey, c.Url) } diff --git a/vendor/github.com/rancher/rancher-compose/rancher/normal.go b/vendor/github.com/rancher/rancher-compose/rancher/normal.go index 303556558..98d0f4797 100644 --- a/vendor/github.com/rancher/rancher-compose/rancher/normal.go +++ b/vendor/github.com/rancher/rancher-compose/rancher/normal.go @@ -30,7 +30,6 @@ func (f *NormalFactory) configAndHash(r *RancherService) (digest.ServiceHash, *C rancherService.LaunchConfig = launchConfig rancherService.LaunchConfig.Labels[digest.ServiceHashKey] = hash.LaunchConfig - rancherService.SecondaryLaunchConfigs = []interface{}{} rancherService.Metadata[digest.ServiceHashKey] = hash.Service for _, secondaryLaunchConfig := range secondaryLaunchConfigs { @@ -171,24 +170,20 @@ func (f *NormalFactory) upgrade(r *RancherService, existingService *client.Servi }, } - serviceUpgrade.InServiceStrategy.SecondaryLaunchConfigs = []interface{}{} - if launchConfig { serviceUpgrade.InServiceStrategy.LaunchConfig = config.LaunchConfig } for _, name := range secondaryNames { - for _, v := range config.SecondaryLaunchConfigs { - if secondaryLaunchConfig, ok := v.(client.SecondaryLaunchConfig); ok { - if secondaryLaunchConfig.Name == name { - serviceUpgrade.InServiceStrategy.SecondaryLaunchConfigs = append(serviceUpgrade.InServiceStrategy.SecondaryLaunchConfigs, secondaryLaunchConfig) - } + for _, secondaryLaunchConfig := range config.SecondaryLaunchConfigs { + if secondaryLaunchConfig.Name == name { + serviceUpgrade.InServiceStrategy.SecondaryLaunchConfigs = append(serviceUpgrade.InServiceStrategy.SecondaryLaunchConfigs, secondaryLaunchConfig) } } } for _, removedSecondaryName := range removedSecondaryNames { - serviceUpgrade.InServiceStrategy.SecondaryLaunchConfigs = append(serviceUpgrade.InServiceStrategy.SecondaryLaunchConfigs, &client.SecondaryLaunchConfig{ + serviceUpgrade.InServiceStrategy.SecondaryLaunchConfigs = append(serviceUpgrade.InServiceStrategy.SecondaryLaunchConfigs, client.SecondaryLaunchConfig{ Name: removedSecondaryName, ImageUuid: "rancher/none", }) diff --git a/vendor/github.com/rancher/rancher-compose/rancher/project.go b/vendor/github.com/rancher/rancher-compose/rancher/project.go index ea768c4e6..e82edde73 100644 --- a/vendor/github.com/rancher/rancher-compose/rancher/project.go +++ b/vendor/github.com/rancher/rancher-compose/rancher/project.go @@ -1,10 +1,12 @@ package rancher import ( + "encoding/json" "github.com/Sirupsen/logrus" "github.com/docker/libcompose/config" "github.com/docker/libcompose/project" "github.com/rancher/rancher-compose/preprocess" + "io/ioutil" ) func NewProject(context *Context) (*project.Project, error) { @@ -12,10 +14,33 @@ func NewProject(context *Context) (*project.Project, error) { Context: context, } + context.VolumesFactory = &RancherVolumesFactory{ + Context: context, + } + + if context.Binding != nil { + bindingBytes, err := json.Marshal(context.Binding) + if err != nil { + return nil, err + } + context.BindingsBytes = bindingBytes + } + + if context.BindingsBytes == nil { + if context.BindingsFile != "" { + bindingsContent, err := ioutil.ReadFile(context.BindingsFile) + if err != nil { + return nil, err + } + context.BindingsBytes = bindingsContent + } + } + + preProcessServiceMap := preprocess.PreprocessServiceMap(context.BindingsBytes) p := project.NewProject(&context.Context, nil, &config.ParseOptions{ Interpolate: true, Validate: true, - Preprocess: preprocess.PreprocessServiceMap, + Preprocess: preProcessServiceMap, }) err := p.Parse() diff --git a/vendor/github.com/rancher/rancher-compose/rancher/service.go b/vendor/github.com/rancher/rancher-compose/rancher/service.go index a51481088..f73ebef86 100644 --- a/vendor/github.com/rancher/rancher-compose/rancher/service.go +++ b/vendor/github.com/rancher/rancher-compose/rancher/service.go @@ -314,9 +314,6 @@ func (r *RancherService) setupLinks(service *client.Service, update bool) error return nil } - var err error - var links []interface{} - existingLinks, err := r.context.Client.ServiceConsumeMap.List(&client.ListOpts{ Filters: map[string]interface{}{ "serviceId": service.Id, @@ -331,26 +328,32 @@ func (r *RancherService) setupLinks(service *client.Service, update bool) error } if service.Type == client.LOAD_BALANCER_SERVICE_TYPE { - links, err = r.getLbLinks() - } else { - links, err = r.getServiceLinks() - } - - if err == nil { - _, err = r.context.Client.Service.ActionSetservicelinks(service, &client.SetServiceLinksInput{ + links, err := r.getLbLinks() + if err != nil { + return err + } + _, err = r.context.Client.LoadBalancerService.ActionSetservicelinks(&client.LoadBalancerService{ + Resource: service.Resource, + }, &client.SetLoadBalancerServiceLinksInput{ ServiceLinks: links, }) + return err } + + links, err := r.getServiceLinks() + _, err = r.context.Client.Service.ActionSetservicelinks(service, &client.SetServiceLinksInput{ + ServiceLinks: links, + }) return err } -func (r *RancherService) getLbLinks() ([]interface{}, error) { +func (r *RancherService) getLbLinks() ([]client.LoadBalancerServiceLink, error) { links, err := r.getLinks() if err != nil { return nil, err } - result := []interface{}{} + result := []client.LoadBalancerServiceLink{} for link, id := range links { ports, err := r.getLbLinkPorts(link.ServiceName) if err != nil { @@ -384,13 +387,13 @@ func (r *RancherService) getLbLinkPorts(name string) ([]string, error) { return rUtils.TrimSplit(v, ",", -1), nil } -func (r *RancherService) getServiceLinks() ([]interface{}, error) { +func (r *RancherService) getServiceLinks() ([]client.ServiceLink, error) { links, err := r.getLinks() if err != nil { return nil, err } - result := []interface{}{} + result := []client.ServiceLink{} for link, id := range links { result = append(result, client.ServiceLink{ Name: link.Alias, diff --git a/vendor/github.com/rancher/rancher-compose/rancher/volume.go b/vendor/github.com/rancher/rancher-compose/rancher/volume.go new file mode 100644 index 000000000..5fca9e784 --- /dev/null +++ b/vendor/github.com/rancher/rancher-compose/rancher/volume.go @@ -0,0 +1,140 @@ +package rancher + +import ( + "fmt" + + "golang.org/x/net/context" + + "github.com/docker/libcompose/config" + "github.com/docker/libcompose/project" + "github.com/rancher/go-rancher/v2" +) + +type RancherVolumesFactory struct { + Context *Context +} + +func (f *RancherVolumesFactory) Create(projectName string, volumeConfigs map[string]*config.VolumeConfig, serviceConfigs *config.ServiceConfigs, volumeEnabled bool) (project.Volumes, error) { + volumes := make([]*Volume, 0, len(volumeConfigs)) + for name, config := range volumeConfigs { + volume := NewVolume(projectName, name, config, f.Context) + volumes = append(volumes, volume) + } + return &Volumes{ + volumes: volumes, + volumeEnabled: volumeEnabled, + Context: f.Context, + }, nil +} + +type Volumes struct { + volumes []*Volume + volumeEnabled bool + Context *Context +} + +func (v *Volumes) Initialize(ctx context.Context) error { + if !v.volumeEnabled { + return nil + } + for _, volume := range v.volumes { + if err := volume.EnsureItExists(ctx); err != nil { + return err + } + } + + return nil +} + +func (v *Volumes) Remove(ctx context.Context) error { + if !v.volumeEnabled { + return nil + } + for _, volume := range v.volumes { + if err := volume.Remove(ctx); err != nil { + return err + } + } + return nil +} + +type Volume struct { + context *Context + name string + projectName string + driver string + driverOptions map[string]string + external bool + perContainer bool +} + +func (v *Volume) Inspect(ctx context.Context) (*client.VolumeTemplate, error) { + volumes, err := v.context.Client.VolumeTemplate.List(&client.ListOpts{ + Filters: map[string]interface{}{ + "name": v.name, + "stackId": v.context.Stack.Id, + }, + }) + if err != nil { + return nil, err + } + + if len(volumes.Data) > 0 { + return &volumes.Data[0], nil + } + + return nil, nil +} + +func (v *Volume) Remove(ctx context.Context) error { + volumeResource, err := v.Inspect(ctx) + if err != nil { + return err + } + err = v.context.Client.VolumeTemplate.Delete(volumeResource) + return err +} + +func (v *Volume) EnsureItExists(ctx context.Context) error { + volumeResource, err := v.Inspect(ctx) + if err != nil { + return err + } + if v.external && volumeResource == nil { + return fmt.Errorf("Volume %s declared as external, but could not be found. Please create the volume manually and try again.", v.name) + } + if volumeResource == nil { + return v.create(ctx) + } + if v.driver != "" && volumeResource.Driver != v.driver { + return fmt.Errorf("Volume %q needs to be recreated - driver has changed", v.name) + } + return nil +} + +func (v *Volume) create(ctx context.Context) error { + driverOptions := map[string]interface{}{} + for k, v := range v.driverOptions { + driverOptions[k] = v + } + _, err := v.context.Client.VolumeTemplate.Create(&client.VolumeTemplate{ + Name: v.name, + Driver: v.driver, + DriverOpts: driverOptions, + StackId: v.context.Stack.Id, + PerContainer: v.perContainer, + }) + return err +} + +func NewVolume(projectName, name string, config *config.VolumeConfig, context *Context) *Volume { + return &Volume{ + context: context, + name: name, + projectName: projectName, + driver: config.Driver, + driverOptions: config.DriverOpts, + external: config.External.External, + perContainer: config.PerContainer, + } +} diff --git a/vendor/github.com/rancher/rancher-compose/trash.conf b/vendor/github.com/rancher/rancher-compose/trash.conf index 2038d63cb..9b6e1fee4 100644 --- a/vendor/github.com/rancher/rancher-compose/trash.conf +++ b/vendor/github.com/rancher/rancher-compose/trash.conf @@ -5,7 +5,7 @@ github.com/docker/distribution 5bbf65499960b184fe8e0f045397375e1a6722b8 github.com/docker/docker 534753663161334baba06f13b8efa4cad22b5bc5 github.com/docker/engine-api 62043eb79d581a32ea849645277023c550732e52 github.com/docker/go-connections 990a1a1a70b0da4c4cb70e117971a4f0babfbf1a -github.com/docker/libcompose 444fe501e251841740281be421449f1551cde8dd https://github.com/rancher/libcompose +github.com/docker/libcompose 777d5bb20ebfa9b5cac8f1ea1707a4c53399a07e https://github.com/rancher/libcompose github.com/flynn/go-shlex 3f9db97f856818214da2e1057f8ad84803971cff github.com/gorilla/context 14f550f51a github.com/gorilla/mux e444e69cbd @@ -13,8 +13,8 @@ github.com/gorilla/websocket 1551221275a7bd42978745a376b2531f791d88f3 github.com/hashicorp/go-version 2b9865f60ce11e527bd1255ba82036d465570aa3 github.com/opencontainers/runc cc29e3dded8e27ba8f65738f40d251c885030a28 github.com/pkg/errors 1d2e60385a13aaa66134984235061c2f9302520e -github.com/rancher/event-subscriber dc144e28875c4cb660fcba8b8bce069760a13957 -github.com/rancher/go-rancher 9ddc97606e7353d33794373ac98c05e8021bab86 +github.com/rancher/event-subscriber ddef5975d2b174e234d7232c811bd55e5e2bf22f +github.com/rancher/go-rancher f0378de1178a553cfb64666c0281486f593f0f05 github.com/rancher/rancher-catalog-service a3a8b500adceb82b3a0387b2c7b06a60e7eeee9a github.com/vaughan0/go-ini a98ad7ee00ec53921f08832bc06ecf7fd600e6a1 golang.org/x/net 3a29182c25eeabbaaf94daaeecbc7823d86261e7 From 033cce1f511a044f7a7bc0852e03b9b6056b0a75 Mon Sep 17 00:00:00 2001 From: Darren Shepherd Date: Mon, 3 Oct 2016 23:12:24 -0700 Subject: [PATCH 2/2] Random changes to support infrastructure services --- cmd/catalog.go | 304 +++++++++++++++++++++++++++++++++++---------- cmd/common.go | 5 +- cmd/config.go | 2 +- cmd/docker.go | 2 +- cmd/env.go | 102 ++++----------- cmd/host.go | 31 +++-- cmd/host_create.go | 11 +- cmd/ps.go | 2 +- cmd/questions.go | 48 +++++++ cmd/run.go | 9 +- cmd/stack.go | 118 ++++++++++++++++++ monitor/monitor.go | 2 +- 12 files changed, 462 insertions(+), 174 deletions(-) create mode 100644 cmd/questions.go diff --git a/cmd/catalog.go b/cmd/catalog.go index d387ddbaa..9053c258e 100644 --- a/cmd/catalog.go +++ b/cmd/catalog.go @@ -1,13 +1,21 @@ package cmd import ( + "encoding/json" + "errors" "fmt" + "net/http" "strings" "github.com/rancher/go-rancher/catalog" + "github.com/rancher/go-rancher/v2" "github.com/urfave/cli" ) +const ( + orchestrationSupported = "io.rancher.orchestration.supported" +) + func CatalogCommand() cli.Command { catalogLsFlags := []cli.Flag{ cli.BoolFlag{ @@ -18,6 +26,10 @@ func CatalogCommand() cli.Command { Name: "format", Usage: "'json' or Custom format: {{.Id}} {{.Name}}", }, + cli.BoolFlag{ + Name: "system,s", + Usage: "Show system templates, not user", + }, } return cli.Command{ @@ -34,13 +46,27 @@ func CatalogCommand() cli.Command { Action: catalogLs, Flags: catalogLsFlags, }, - /* cli.Command{ - Name: "install", - Usage: "Install catalog template", - Action: errorWrapper(catalogInstall), - ArgsUsage: "[ID or NAME]" - Flags: []cli.Flag{}, + cli.Command{ + Name: "install", + Usage: "Install catalog template", + Action: catalogInstall, + ArgsUsage: "[ID or NAME]...", + Flags: []cli.Flag{ + cli.StringFlag{ + Name: "answers,a", + Usage: "Answer file", + }, + cli.StringFlag{ + Name: "name", + Usage: "Name of stack to create", + }, + cli.BoolFlag{ + Name: "system,s", + Usage: "Install a system template", + }, }, + }, + /* cli.Command{ Name: "upgrade", Usage: "Upgrade catalog template", @@ -58,39 +84,83 @@ type CatalogData struct { Template catalog.Template } -func catalogLs(ctx *cli.Context) error { - config, err := lookupConfig(ctx) - if err != nil { - return err +func getEnvFilter(proj *client.Project, ctx *cli.Context) string { + envFilter := proj.Orchestration + if envFilter == "cattle" { + envFilter = "" } + if ctx.Bool("system") { + envFilter = "system" + } + return envFilter +} - c, err := GetClient(ctx) - if err != nil { - return err +func isInCSV(value, csv string) bool { + for _, part := range strings.Split(csv, ",") { + if value == part { + return true + } } + return false +} - proj, err := GetEnvironment(config.Environment, c) +func isOrchestrationSupported(ctx *cli.Context, proj *client.Project, labels map[string]interface{}) bool { + // Only check for system templates + if !ctx.Bool("system") { + return true + } + + if supported, ok := labels[orchestrationSupported]; ok { + supportedString := fmt.Sprint(supported) + if supportedString != "" && !isInCSV(proj.Orchestration, supportedString) { + return false + } + } + + return true +} + +func isSupported(ctx *cli.Context, proj *client.Project, item catalog.Template) bool { + envFilter := getEnvFilter(proj, ctx) + if item.TemplateBase != envFilter { + return false + } + return isOrchestrationSupported(ctx, proj, item.Labels) +} + +func catalogLs(ctx *cli.Context) error { + writer := NewTableWriter([][]string{ + {"NAME", "Template.Name"}, + {"CATEGORY", "Template.Category"}, + {"ID", "ID"}, + }, ctx) + defer writer.Close() + + err := forEachTemplate(ctx, func(item catalog.Template) error { + writer.Write(CatalogData{ + ID: templateID(item), + Template: item, + }) + return nil + }) if err != nil { return err } + return writer.Err() +} - cc, err := GetCatalogClient(ctx) +func forEachTemplate(ctx *cli.Context, f func(item catalog.Template) error) error { + _, c, proj, cc, err := setupCatalogContext(ctx) if err != nil { return err } - envData := NewEnvData(*proj) - envFilter := "" - switch envData.Orchestration { - case "Kubernetes": - envFilter = "kubernetes" - case "Swarm": - envFilter = "swarm" - case "Mesos": - envFilter = "mesos" + opts, err := getListTemplatesOpts(ctx, c) + if err != nil { + return err } - collection, err := cc.Template.List(nil) + collection, err := cc.Template.List(opts) if err != nil { return err } @@ -103,93 +173,193 @@ func catalogLs(ctx *cli.Context) error { defer writer.Close() for _, item := range collection.Data { - if item.TemplateBase != envFilter { + if !isSupported(ctx, proj, item) { continue } - if item.Category == "System" { - continue + if err := f(item); err != nil { + return err } - writer.Write(CatalogData{ - ID: templateID(item), - Template: item, - }) } - return writer.Err() + return err } -func catalogInstall(ctx *cli.Context) error { - /*config, err := lookupConfig(ctx) +func getListTemplatesOpts(ctx *cli.Context, c *client.RancherClient) (*catalog.ListOpts, error) { + opts := &catalog.ListOpts{ + Filters: map[string]interface{}{}, + } + setting, err := c.Setting.ById("rancher.server.version") if err != nil { - return err + return nil, err + } + + if setting != nil && setting.Value != "" { + opts.Filters["minimumRancherVersion_lte"] = setting.Value + } + + opts.Filters["category_ne"] = "system" + return opts, nil +} + +func setupCatalogContext(ctx *cli.Context) (Config, *client.RancherClient, *client.Project, *catalog.RancherClient, error) { + config, err := lookupConfig(ctx) + if err != nil { + return config, nil, nil, nil, err } c, err := GetClient(ctx) if err != nil { - return err + return config, nil, nil, nil, err } proj, err := GetEnvironment(config.Environment, c) if err != nil { - return err + return config, nil, nil, nil, err } cc, err := GetCatalogClient(ctx) if err != nil { - return err + return config, nil, nil, nil, err + } + + return config, c, proj, cc, nil +} + +func templateNameAndVersion(name string) (string, string) { + parts := strings.Split(name, ":") + if len(parts) == 2 { + return parts[0], parts[1] } + return parts[0], "" +} - envData := NewEnvData(*proj) - envFilter := "" - switch envData.Orchestration { - case "Kubernetes": - envFilter = "kubernetes" - case "Swarm": - envFilter = "swarm" - case "Mesos": - envFilter = "mesos" +func catalogInstall(ctx *cli.Context) error { + if len(ctx.Args()) != 1 { + return errors.New("Exactly one arguement is required") } - /*TODO add in how to install template */ + _, c, proj, cc, err := setupCatalogContext(ctx) + if err != nil { + return err + } - return nil -} + templateReference := ctx.Args()[0] + name, version := templateNameAndVersion(templateReference) -func catalogUpgrade(ctx *cli.Context) error { - /*config, err := lookupConfig(ctx) + template, err := getTemplate(ctx, name) if err != nil { return err } - c, err := GetClient(ctx) + templateVersion, err := getTemplateVersion(ctx, cc, template, name, version) if err != nil { return err } - proj, err := GetEnvironment(config.Environment, c) + answers, err := parseAnswers(ctx) if err != nil { return err } - cc, err := GetCatalogClient(ctx) + answers, err = askQuestions(answers, templateVersion) if err != nil { return err } - envData := NewEnvData(*proj) - envFilter := "" - switch envData.Orchestration { - case "Kubernetes": - envFilter = "kubernetes" - case "Swarm": - envFilter = "swarm" - case "Mesos": - envFilter = "mesos" + stackName := ctx.String("name") + if stackName == "" { + stackName = strings.Title(strings.Split(name, "/")[1]) + } + + externalID := fmt.Sprintf("catalog://%s", templateVersion.Id) + id := "" + switch proj.Orchestration { + case "cattle": + stack, err := c.Stack.Create(&client.Stack{ + Name: stackName, + DockerCompose: toString(templateVersion.Files["docker-compose.yml"]), + RancherCompose: toString(templateVersion.Files["rancher-compose.yml"]), + Environment: answers, + ExternalId: externalID, + System: ctx.Bool("system"), + StartOnCreate: true, + }) + if err != nil { + return err + } + id = stack.Id + case "kubernetes": + stack, err := c.KubernetesStack.Create(&client.KubernetesStack{ + Name: stackName, + Templates: templateVersion.Files, + ExternalId: externalID, + Environment: answers, + System: ctx.Bool("system"), + }) + if err != nil { + return err + } + id = stack.Id + } + + return WaitFor(ctx, id) +} + +func toString(s interface{}) string { + if s == nil { + return "" + } + return fmt.Sprint(s) +} + +func getTemplateVersion(ctx *cli.Context, cc *catalog.RancherClient, template catalog.Template, name, version string) (catalog.TemplateVersion, error) { + templateVersion := catalog.TemplateVersion{} + + if version == "" { + version = template.DefaultVersion + } + + link, ok := template.VersionLinks[version] + if !ok { + fmt.Printf("%#v\n", template) + return templateVersion, fmt.Errorf("Failed to find the version %s for template %s", version, name) + } + + resp, err := http.Get(fmt.Sprint(link)) + if err != nil { + return templateVersion, err + } + defer resp.Body.Close() + + if resp.StatusCode != 200 { + return templateVersion, fmt.Errorf("Bad response %d looking up %s", resp.StatusCode, link) + } - /*TODO add in how to upgrade template */ + err = json.NewDecoder(resp.Body).Decode(&templateVersion) + return templateVersion, err +} + +func getTemplate(ctx *cli.Context, name string) (catalog.Template, error) { + found := false + foundTemplate := catalog.Template{} + err := forEachTemplate(ctx, func(item catalog.Template) error { + if found { + return nil + } - return nil + templateName, _ := templateNameAndVersion(templateID(item)) + if templateName == name { + found = true + foundTemplate = item + } + + return nil + }) + if !found && err == nil { + err = fmt.Errorf("Failed to find template %s", name) + } + return foundTemplate, err } func templateID(template catalog.Template) string { diff --git a/cmd/common.go b/cmd/common.go index 2c4ed57b2..cd739d9ec 100644 --- a/cmd/common.go +++ b/cmd/common.go @@ -4,7 +4,6 @@ import ( "bytes" "errors" "fmt" - "github.com/rancher/go-rancher/v2" "io" "os" "os/exec" @@ -12,6 +11,8 @@ import ( "syscall" "text/template" + "github.com/rancher/go-rancher/v2" + "github.com/docker/docker/pkg/namesgenerator" "github.com/urfave/cli" ) @@ -31,7 +32,7 @@ func GetRawClient(ctx *cli.Context) (*client.RancherClient, error) { return nil, err } return client.NewRancherClient(&client.ClientOpts{ - Url: url + "/v1", + Url: url + "/v2-beta", AccessKey: config.AccessKey, SecretKey: config.SecretKey, }) diff --git a/cmd/config.go b/cmd/config.go index 11bef924f..8b9c61e7a 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -172,7 +172,7 @@ func configSetup(ctx *cli.Context) error { return err } - if schema, ok := c.Schemas.CheckSchema("schema"); ok { + if schema, ok := c.GetSchemas().CheckSchema("schema"); ok { // Normalize URL config.URL = schema.Links["collection"] } else { diff --git a/cmd/docker.go b/cmd/docker.go index efe61c82b..b097e652a 100644 --- a/cmd/docker.go +++ b/cmd/docker.go @@ -94,7 +94,7 @@ func runDockerWithOutput(hostname string, c *client.RancherClient, args []string } state := getHostState(host) - if state != "active" { + if state != "active" && state != "inactive" { return fmt.Errorf("Can not contact host %s in state %s", hostname, state) } diff --git a/cmd/env.go b/cmd/env.go index 9ed2cd60b..b5755aced 100644 --- a/cmd/env.go +++ b/cmd/env.go @@ -37,17 +37,22 @@ func EnvCommand() cli.Command { Flags: envLsFlags, }, cli.Command{ - Name: "create", - Usage: "Create an environment", - Description: "\nBy default, an environment with cattle orchestration framework will be created. This command only works for Account API keys.\n\nExample:\n\t$ rancher env create newEnv\n\t$ rancher env create -o kubernetes newK8sEnv\n\t$ rancher env create -o mesos newMesosEnv\n\t$ rancher env create -o swarm newSwarmEnv\n", - ArgsUsage: "[NEWENVNAME...]", - Action: envCreate, - Flags: []cli.Flag{ - cli.StringFlag{ - Name: "orchestration,o", - Usage: "Orchestration framework", - }, - }, + Name: "create", + Usage: "Create an environment", + Description: ` +By default, an environment with cattle orchestration framework will be created. This command only works for Account API keys. + +Example: + + $ rancher env create newEnv + +To add an orchestration framework do TODO + $ rancher env create -o kubernetes newK8sEnv + $ rancher env create -o mesos newMesosEnv + $ rancher env create -o swarm newSwarmEnv +`, + ArgsUsage: "[NEWENVNAME...]", + Action: envCreate, }, cli.Command{ Name: "rm", @@ -57,19 +62,6 @@ func EnvCommand() cli.Command { Action: envRm, Flags: []cli.Flag{}, }, - cli.Command{ - Name: "update", - Usage: "Update environment", - Description: "\nChange the orchestration framework of the environment. This command only works for Account API keys.\n\nExample:\n\t$ rancher env update -o kubernetes 1a5\n\t$ rancher env update -o cattle Default\n\t$ rancher env update -o swarm 1a5\n\t$ rancher env update -o mesos 1a5\n", - ArgsUsage: "[ENVID ENVNAME...]", - Action: envUpdate, - Flags: []cli.Flag{ - cli.StringFlag{ - Name: "orchestration,o", - Usage: "Orchestration framework", - }, - }, - }, cli.Command{ Name: "deactivate", Usage: "Deactivate environment(s)", @@ -103,27 +95,14 @@ Example: } type EnvData struct { - ID string - Environment *client.Project - Orchestration string + ID string + Environment *client.Project } func NewEnvData(project client.Project) *EnvData { - orch := "Cattle" - - switch { - case project.Swarm: - orch = "Swarm" - case project.Mesos: - orch = "Mesos" - case project.Kubernetes: - orch = "Kubernetes" - } - return &EnvData{ - ID: project.Id, - Environment: &project, - Orchestration: orch, + ID: project.Id, + Environment: &project, } } @@ -138,40 +117,6 @@ func envRm(ctx *cli.Context) error { }) } -func envUpdate(ctx *cli.Context) error { - c, err := GetRawClient(ctx) - if err != nil { - return err - } - - if ctx.NArg() < 1 { - return cli.NewExitError("Environment name/id is required as the first argument", 1) - } - - orch := ctx.String("orchestration") - if orch == "" { - return nil - } - - env, err := LookupEnvironment(c, ctx.Args()[0]) - if err != nil { - return err - } - - data := map[string]interface{}{} - setFields(ctx, data) - - var newEnv client.Project - - err = c.Update("project", &env.Resource, data, &newEnv) - if err != nil { - return err - } - - fmt.Println(env.Id) - return nil -} - func envCreate(ctx *cli.Context) error { c, err := GetRawClient(ctx) if err != nil { @@ -221,15 +166,14 @@ func envLs(ctx *cli.Context) error { writer := NewTableWriter([][]string{ {"ID", "ID"}, {"NAME", "Environment.Name"}, - {"ORCHESTRATION", "Orchestration"}, + {"ORCHESTRATION", "Environment.Orchestration"}, {"STATE", "Environment.State"}, {"CREATED", "Environment.Created"}, }, ctx) defer writer.Close() - collection := client.ProjectCollection{} - listOpts := defaultListOpts(ctx) - if err = c.List("project", listOpts, &collection); err != nil { + collection, err := c.Project.List(defaultListOpts(ctx)) + if err != nil { return err } diff --git a/cmd/host.go b/cmd/host.go index 0578d19dd..38fb897fb 100644 --- a/cmd/host.go +++ b/cmd/host.go @@ -48,11 +48,11 @@ func HostCommand() cli.Command { } type HostsData struct { - ID string - Host client.Host - State string - IPAddresses []client.IpAddress - Labels string + ID string + Host client.Host + State string + ContainerCount int + Labels string } func getHostState(host *client.Host) string { @@ -87,7 +87,9 @@ func hostLs(ctx *cli.Context) error { return err } - collection, err := c.Host.List(nil) + opts := defaultListOpts(ctx) + delete(opts.Filters, "state_ne") + collection, err := c.Host.List(opts) if err != nil { return err } @@ -125,7 +127,8 @@ func hostLs(ctx *cli.Context) error { {"ID", "Host.Id"}, {"HOSTNAME", "Host.Hostname"}, {"STATE", "State"}, - {"IP", "{{ips .IPAddresses}}"}, + {"CONTAINERS", "ContainerCount"}, + {"IP", "Host.AgentIpAddress"}, {"LABELS", "Labels"}, {"DETAIL", "Host.TransitioningMessage"}, }, ctx) @@ -133,16 +136,12 @@ func hostLs(ctx *cli.Context) error { defer writer.Close() for _, item := range collection.Data { - ips := client.IpAddressCollection{} - // ignore errors getting IPs, machines don't have them - c.GetLink(item.Resource, "ipAddresses", &ips) - writer.Write(&HostsData{ - ID: item.Id, - Host: item, - State: getHostState(&item), - Labels: getLabels(&item), - IPAddresses: ips.Data, + ID: item.Id, + Host: item, + State: getHostState(&item), + ContainerCount: len(item.InstanceIds), + Labels: getLabels(&item), }) } diff --git a/cmd/host_create.go b/cmd/host_create.go index 2915fb42f..6ded57a4a 100644 --- a/cmd/host_create.go +++ b/cmd/host_create.go @@ -117,8 +117,8 @@ func hostCreate(ctx *cli.Context) error { return err } - machineSchema := c.Schemas.Schema("machine") - flags := buildFlags("", machineSchema, c.Schemas) + machineSchema := c.GetSchemas().Schema("machine") + flags := buildFlags("", machineSchema, c.GetSchemas()) drivers := []string{} for name := range machineSchema.ResourceFields { @@ -132,11 +132,12 @@ func hostCreate(ctx *cli.Context) error { for i := range hostCommand.Subcommands { if hostCommand.Subcommands[i].Name == "create" { hostCommand.Subcommands[i].Flags = append(flags, cli.StringFlag{ - Name: "driver,d", - Usage: "Driver to use: " + strings.Join(drivers, ", "), + Name: "driver,d", + Usage: "Driver to use: " + strings.Join(drivers, ", "), + EnvVar: "MACHINE_DRIVER", }) hostCommand.Subcommands[i].Action = func(ctx *cli.Context) error { - return hostCreateRun(ctx, c, machineSchema, c.Schemas) + return hostCreateRun(ctx, c, machineSchema, c.GetSchemas()) } hostCommand.Subcommands[i].SkipFlagParsing = false } diff --git a/cmd/ps.go b/cmd/ps.go index 5900e4d7e..8454d839e 100644 --- a/cmd/ps.go +++ b/cmd/ps.go @@ -92,7 +92,7 @@ func servicePs(ctx *cli.Context) error { {"NAME", "Name"}, {"IMAGE", "LaunchConfig.ImageUuid"}, {"STATE", "CombinedState"}, - {"SCALE", "Service.Scale"}, + {"SCALE", "{{len .Service.InstanceIds}}/{{.Service.Scale}}"}, {"ENDPOINTS", "{{endpoint .Service.PublicEndpoints}}"}, {"DETAIL", "Service.TransitioningMessage"}, }, ctx) diff --git a/cmd/questions.go b/cmd/questions.go new file mode 100644 index 000000000..79f7d99ab --- /dev/null +++ b/cmd/questions.go @@ -0,0 +1,48 @@ +package cmd + +import ( + "bufio" + "fmt" + "os" + "strings" + + "github.com/mitchellh/mapstructure" + "github.com/rancher/go-rancher/catalog" +) + +func askQuestions(answers map[string]interface{}, templateVersion catalog.TemplateVersion) (map[string]interface{}, error) { + result := map[string]interface{}{} + for _, q := range templateVersion.Questions { + question := catalog.Question{} + err := mapstructure.Decode(q, &question) + if err != nil { + return nil, err + } + + if answer, ok := answers[question.Variable]; ok { + result[question.Variable] = answer + } else { + result[question.Variable] = askQuestion(question) + } + } + return result, nil +} + +func askQuestion(question catalog.Question) interface{} { + if len(question.Description) > 0 { + fmt.Println(question.Description) + } + fmt.Printf("%s %s[%s]: ", question.Label, question.Variable, question.Default) + + answer, err := bufio.NewReader(os.Stdin).ReadString('\n') + if err != nil { + return "" + } + + answer = strings.TrimSpace(answer) + if answer == "" { + answer = question.Default + } + + return answer +} diff --git a/cmd/run.go b/cmd/run.go index 0086bf70c..483c276af 100644 --- a/cmd/run.go +++ b/cmd/run.go @@ -1,9 +1,10 @@ package cmd import ( - "github.com/rancher/go-rancher/v2" "strings" + "github.com/rancher/go-rancher/v2" + "github.com/urfave/cli" ) @@ -170,6 +171,11 @@ func RunCommand() cli.Command { Usage: "Connect a container to a network: host, none, bridge, managed", Value: "managed", }, + cli.IntFlag{ + Name: "scale", + Usage: "Number of containers to run", + Value: 1, + }, }, } } @@ -270,6 +276,7 @@ func serviceRun(ctx *cli.Context) error { StackId: stack.Id, LaunchConfig: launchConfig, StartOnCreate: true, + Scale: int64(ctx.Int("scale")), } service, err = c.Service.Create(service) diff --git a/cmd/stack.go b/cmd/stack.go index 5f50689d5..f6e2753dd 100644 --- a/cmd/stack.go +++ b/cmd/stack.go @@ -1,8 +1,13 @@ package cmd import ( + "bufio" + "bytes" + "io/ioutil" + "os" "strings" + "github.com/pkg/errors" "github.com/rancher/go-rancher/v2" "github.com/urfave/cli" ) @@ -34,6 +39,42 @@ func StackCommand() cli.Command { Action: stackLs, Flags: stackLsFlags, }, + cli.Command{ + Name: "create", + Usage: "Create a stacks", + Description: "\nCreate all stack in the current $RANCHER_ENVIRONMENT. Use `--env ` or `--env ` to select a different environment.\n\nExample:\n\t$ rancher stacks create\n\t$ rancher --env 1a5 stacks ls\n", + ArgsUsage: "None", + Action: stackCreate, + Flags: []cli.Flag{ + cli.BoolTFlag{ + Name: "start", + Usage: "Start stack on create", + }, + cli.BoolFlag{ + Name: "system", + Usage: "Create a system stack", + }, + cli.BoolFlag{ + Name: "quiet,q", + Usage: "Only display IDs", + }, + cli.StringFlag{ + Name: "docker-compose,f", + Usage: "Docker Compose file", + Value: "docker-compose.yml", + }, + cli.StringFlag{ + Name: "rancher-compose,r", + Usage: "Rancher Compose file", + Value: "rancher-compose.yml", + }, + cli.StringFlag{ + Name: "answers,a", + Usage: "Answers files", + Value: "answers", + }, + }, + }, }, } } @@ -91,3 +132,80 @@ func stackLs(ctx *cli.Context) error { return writer.Err() } + +func getFile(name string) (string, error) { + if name == "" { + return "", nil + } + bytes, err := ioutil.ReadFile(name) + if err == os.ErrNotExist { + return "", nil + + } + return string(bytes), err +} + +func parseAnswers(ctx *cli.Context) (map[string]interface{}, error) { + answers := map[string]interface{}{} + answersFile, err := getFile(ctx.String("answers")) + if err != nil { + return nil, err + } + + scanner := bufio.NewScanner(bytes.NewBuffer([]byte(answersFile))) + for scanner.Scan() { + line := strings.TrimSpace(scanner.Text()) + if line == "" || strings.HasPrefix(line, "#") { + continue + } + parts := strings.SplitN(line, "=", 2) + if len(parts) == 1 { + answers[parts[0]] = "" + } else { + answers[parts[0]] = parts[1] + } + } + + return answers, scanner.Err() +} + +func stackCreate(ctx *cli.Context) error { + c, err := GetClient(ctx) + + dockerCompose, err := getFile(ctx.String("docker-compose")) + if err != nil { + return err + } + if dockerCompose == "" { + return errors.New("docker-compose.yml files is required") + } + + rancherCompose, err := getFile(ctx.String("rancher-compose")) + if err != nil { + return err + } + + answers, err := parseAnswers(ctx) + if err != nil { + return errors.Wrap(err, "reading answers") + } + + name := RandomName() + if len(ctx.Args()) > 0 { + name = ctx.Args()[0] + } + + stack, err := c.Stack.Create(&client.Stack{ + Name: name, + DockerCompose: dockerCompose, + RancherCompose: rancherCompose, + Environment: answers, + System: ctx.Bool("system"), + StartOnCreate: ctx.Bool("startOnCreate"), + }) + if err != nil { + return err + } + + return WaitFor(ctx, stack.Id) +} diff --git a/monitor/monitor.go b/monitor/monitor.go index efc4128de..9f6656e7e 100644 --- a/monitor/monitor.go +++ b/monitor/monitor.go @@ -64,7 +64,7 @@ func New(c *client.RancherClient) *Monitor { } func (m *Monitor) Start() error { - schema, ok := m.c.Schemas.CheckSchema("subscribe") + schema, ok := m.c.GetSchemas().CheckSchema("subscribe") if !ok { return fmt.Errorf("Not authorized to subscribe") }