├── .dockerignore ├── .drone.sec ├── .drone.yml ├── .gitattributes ├── .github ├── ISSUE_TEMPLATE.md ├── pull_request_template.md └── workflows │ ├── ci.yml │ ├── createtagandrelease.yml │ ├── issue_push.yml │ ├── main.yml │ └── pullrequestforrelease.yml ├── .gitignore ├── CHANGELOG.md ├── CONTRIBUTING.md ├── Dockerfile ├── HACKING.md ├── LICENSE ├── Makefile ├── Makefile.inc ├── README.md ├── build ├── .validate ├── validate-dco └── validate-gofmt ├── endpoints-support.md ├── examples ├── appliance_configuration_timeconfig.go ├── appliance_snmp_v1_trap_destinations.go ├── appliance_snmp_v3_trap_destinations.go ├── appliance_snmp_v3_user.go ├── appliance_ssh_access.go ├── appliance_time_and_local_configuration.go ├── certificates_server.go ├── config-rename.json ├── connection_templates.go ├── enclosure_groups.go ├── enclosures.go ├── ethernet_networks.go ├── fc_networks.go ├── fcoe_networks.go ├── firmware_drivers.go ├── hypervisor_cluster_profile.go ├── hypervisor_managers.go ├── id_pools.go ├── id_pools_ipv4_range.go ├── id_pools_ipv4_subnets.go ├── interconnect_types.go ├── interconnects.go ├── labels.go ├── logical_enclosures.go ├── logical_enclosures_firmware.go ├── logical_interconnect_groups.go ├── logical_interconnects.go ├── network_sets.go ├── notifications.go ├── rack_managers.go ├── scopes.go ├── server_hardware.go ├── server_hardware_types.go ├── server_profile_templates.go ├── server_profiles.go ├── storage_pools.go ├── storage_systems.go ├── storage_volume_attachment.go ├── storage_volume_templates.go ├── tasks.go ├── uplink_sets.go └── volumes.go ├── glide.lock ├── glide.yaml ├── icsp ├── api_version.go ├── auth.go ├── build_plan.go ├── deploymentjobs.go ├── icsp.go ├── jobs.go ├── jobtask.go ├── netconfig.go ├── server_customattribute.go ├── servers.go ├── types.go └── validator.go ├── liboneview ├── api_support.go ├── api_support_test.go ├── version.go └── version_test.go ├── mk ├── main.mk ├── test.mk ├── utils │ ├── dockerfile.mk │ ├── glide.mk │ └── proxy.mk └── validate.mk ├── ov ├── api_version.go ├── appliance_configuration_timeconfig.go ├── appliance_device_snmp_v3_user.go ├── appliance_snmp_v1_trap_destinations.go ├── appliance_snmp_v3_trap_destinations.go ├── appliance_ssh_access.go ├── appliance_time_and_local_configuration.go ├── auth.go ├── config.go ├── connection.go ├── connection_templates.go ├── connectionv2.go ├── enclosure.go ├── enclosure_group.go ├── ethernet_network.go ├── fc_network.go ├── fcoe_network.go ├── firmware_drivers.go ├── hypervisor_cluster_profile.go ├── hypervisor_manager.go ├── id_pools.go ├── id_pools_ipv4_range.go ├── id_pools_ipv4_subnets.go ├── interconnect.go ├── interconnect_type.go ├── labels.go ├── logical_enclosure.go ├── logical_interconnect_group.go ├── logical_interconnects.go ├── logical_switch.go ├── logical_switch_group.go ├── network_set.go ├── notifications.go ├── ov.go ├── power_state.go ├── profile_templates.go ├── profiles.go ├── profilesv2.go ├── profilesv3.go ├── rack_manager.go ├── scope.go ├── server_certificate.go ├── server_hardware.go ├── server_hardware_type.go ├── server_hardwarev2.go ├── storage.go ├── storage_pool.go ├── storage_system.go ├── storage_volume.go ├── storage_volume_attachment.go ├── storage_volume_template.go ├── storagev2.go ├── storagev3.go ├── switch_type.go ├── task.go └── uplink_set.go ├── rest ├── method.go ├── method_test.go ├── netutil.go └── netutil_test.go ├── test ├── data │ ├── config_EGSL.json │ ├── config_EGSL_houston120.json │ ├── config_EGSL_houston200.json │ └── config_EGSL_tb200.json ├── icsp │ ├── api_version_test.go │ ├── auth_test.go │ ├── build_plan_test.go │ ├── deploymentjobs_test.go │ ├── icsp_test.go │ ├── jobs_test.go │ ├── jobtask_test.go │ ├── netconfig_test.go │ ├── server_customattribute_test.go │ └── servers_test.go └── ov │ ├── api_version_test.go │ ├── appliance_snmp_v3_users_test.go │ ├── auth_test.go │ ├── connection_test.go │ ├── connectionv2_test.go │ ├── ethernet_network_test.go │ ├── fc_network_test.go │ ├── fcoe_network_test.go │ ├── id_pools_ipv4_ranges_test.go │ ├── interconnect_type_test.go │ ├── logical_interconnect_group_test.go │ ├── logical_switch_group_test.go │ ├── network_set_test.go │ ├── notifications_test.go │ ├── ov_test.go │ ├── power_state_test.go │ ├── profile_templates_test.go │ ├── profiles_test.go │ ├── profilesv2_test.go │ ├── profilesv3_test.go │ ├── server_hardware_test.go │ ├── server_hardware_type_test.go │ ├── server_hardwarev2_test.go │ ├── storage_test.go │ ├── storage_volume_test.go │ ├── storagev2_test.go │ ├── switch_type_test.go │ └── task_test.go ├── testconfig ├── pkginfo.go ├── testcases.go ├── testcases_test.go └── testconfig.go ├── utils ├── helpers.go ├── helpers_test.go ├── nstring.go ├── nstring_test.go ├── stringy.go └── stringy_test.go ├── vendor └── github.com │ ├── davecgh │ └── go-spew │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ ├── cov_report.sh │ │ ├── spew │ │ ├── bypass.go │ │ ├── bypasssafe.go │ │ ├── common.go │ │ ├── common_test.go │ │ ├── config.go │ │ ├── doc.go │ │ ├── dump.go │ │ ├── dump_test.go │ │ ├── dumpcgo_test.go │ │ ├── dumpnocgo_test.go │ │ ├── example_test.go │ │ ├── format.go │ │ ├── format_test.go │ │ ├── internal_test.go │ │ ├── internalunsafe_test.go │ │ ├── spew.go │ │ ├── spew_test.go │ │ └── testdata │ │ │ └── dumpcgo.go │ │ └── test_coverage.txt │ ├── docker │ └── machine │ │ ├── .dockerignore │ │ ├── .gitignore │ │ ├── .godir │ │ ├── .travis.yml │ │ ├── CHANGELOG.md │ │ ├── CONTRIBUTING.md │ │ ├── Dockerfile │ │ ├── Godeps │ │ ├── Godeps.json │ │ └── Readme │ │ ├── LICENSE │ │ ├── MAINTAINERS │ │ ├── Makefile │ │ ├── Makefile.inc │ │ ├── README.md │ │ ├── ROADMAP.md │ │ ├── appveyor.yml │ │ ├── circle.yml │ │ ├── cmd │ │ ├── machine.go │ │ └── machine_test.go │ │ ├── commands │ │ ├── active.go │ │ ├── active_test.go │ │ ├── commands.go │ │ ├── commands_test.go │ │ ├── commandstest │ │ │ ├── fake_command_line.go │ │ │ └── stdout_capture.go │ │ ├── config.go │ │ ├── create.go │ │ ├── create_test.go │ │ ├── env.go │ │ ├── env_test.go │ │ ├── flag_sort.go │ │ ├── inspect.go │ │ ├── inspect_test.go │ │ ├── ip.go │ │ ├── ip_test.go │ │ ├── kill.go │ │ ├── kill_test.go │ │ ├── ls.go │ │ ├── ls_test.go │ │ ├── mcndirs │ │ │ ├── utils.go │ │ │ └── utils_test.go │ │ ├── provision.go │ │ ├── provision_test.go │ │ ├── regeneratecerts.go │ │ ├── restart.go │ │ ├── rm.go │ │ ├── rm_test.go │ │ ├── scp.go │ │ ├── scp_test.go │ │ ├── ssh.go │ │ ├── ssh_test.go │ │ ├── start.go │ │ ├── status.go │ │ ├── stop.go │ │ ├── stop_test.go │ │ ├── upgrade.go │ │ ├── url.go │ │ ├── url_test.go │ │ ├── version.go │ │ └── version_test.go │ │ ├── contrib │ │ └── completion │ │ │ ├── .gitignore │ │ │ ├── bash │ │ │ ├── docker-machine-prompt.bash │ │ │ ├── docker-machine-wrapper.bash │ │ │ └── docker-machine.bash │ │ │ └── zsh │ │ │ └── _docker-machine │ │ ├── doc.go │ │ ├── docs │ │ ├── AVAILABLE_DRIVER_PLUGINS.md │ │ ├── DRIVER_SPEC.md │ │ ├── Dockerfile │ │ ├── Makefile │ │ ├── README.md │ │ ├── RELEASE.md │ │ ├── completion.md │ │ ├── concepts.md │ │ ├── drivers │ │ │ ├── aws.md │ │ │ ├── azure.md │ │ │ ├── digital-ocean.md │ │ │ ├── exoscale.md │ │ │ ├── gce.md │ │ │ ├── generic.md │ │ │ ├── hyper-v.md │ │ │ ├── index.md │ │ │ ├── openstack.md │ │ │ ├── os-base.md │ │ │ ├── rackspace.md │ │ │ ├── soft-layer.md │ │ │ ├── virtualbox.md │ │ │ ├── vm-cloud.md │ │ │ ├── vm-fusion.md │ │ │ └── vsphere.md │ │ ├── examples │ │ │ ├── aws.md │ │ │ ├── index.md │ │ │ └── ocean.md │ │ ├── get-started-cloud.md │ │ ├── get-started.md │ │ ├── img │ │ │ ├── aws-instance-east.png │ │ │ ├── aws-instance-west.png │ │ │ ├── coverage.png │ │ │ ├── docker-engine.png │ │ │ ├── engine.png │ │ │ ├── linux_docker_host.svg │ │ │ ├── logo.png │ │ │ ├── mac_docker_host.svg │ │ │ ├── machine-mac-win.png │ │ │ ├── machine.png │ │ │ ├── nginx-webserver.png │ │ │ ├── ocean_click_api.png │ │ │ ├── ocean_droplet.png │ │ │ ├── ocean_gen_token.png │ │ │ ├── ocean_save_token.png │ │ │ ├── ocean_token_create.png │ │ │ └── provision-use-case.png │ │ ├── index.md │ │ ├── install-machine.md │ │ ├── migrate-to-machine.md │ │ ├── overview.md │ │ └── reference │ │ │ ├── active.md │ │ │ ├── config.md │ │ │ ├── create.md │ │ │ ├── env.md │ │ │ ├── help.md │ │ │ ├── index.md │ │ │ ├── inspect.md │ │ │ ├── ip.md │ │ │ ├── kill.md │ │ │ ├── ls.md │ │ │ ├── provision.md │ │ │ ├── regenerate-certs.md │ │ │ ├── restart.md │ │ │ ├── rm.md │ │ │ ├── scp.md │ │ │ ├── ssh.md │ │ │ ├── start.md │ │ │ ├── status.md │ │ │ ├── stop.md │ │ │ ├── upgrade.md │ │ │ └── url.md │ │ ├── drivers │ │ ├── amazonec2 │ │ │ ├── amazonec2.go │ │ │ ├── amazonec2_test.go │ │ │ ├── awscredentials.go │ │ │ ├── ec2client.go │ │ │ ├── logger.go │ │ │ ├── region.go │ │ │ └── stub_test.go │ │ ├── azure │ │ │ ├── azure.go │ │ │ ├── azureutil │ │ │ │ ├── auth.go │ │ │ │ ├── authorizer.go │ │ │ │ ├── azureutil.go │ │ │ │ ├── cleanup.go │ │ │ │ ├── clients.go │ │ │ │ ├── context.go │ │ │ │ ├── inspector.go │ │ │ │ ├── naming.go │ │ │ │ ├── powerstate.go │ │ │ │ ├── tenantid.go │ │ │ │ └── util.go │ │ │ ├── logutil │ │ │ │ └── logfields.go │ │ │ └── util.go │ │ ├── digitalocean │ │ │ ├── digitalocean.go │ │ │ └── digitalocean_test.go │ │ ├── errdriver │ │ │ └── error.go │ │ ├── exoscale │ │ │ ├── exoscale.go │ │ │ └── exoscale_test.go │ │ ├── fakedriver │ │ │ └── fakedriver.go │ │ ├── generic │ │ │ ├── generic.go │ │ │ └── generic_test.go │ │ ├── google │ │ │ ├── compute_util.go │ │ │ ├── compute_util_test.go │ │ │ ├── google.go │ │ │ └── google_test.go │ │ ├── hyperv │ │ │ ├── hyperv.go │ │ │ ├── hyperv_test.go │ │ │ └── powershell.go │ │ ├── none │ │ │ └── driver.go │ │ ├── openstack │ │ │ ├── client.go │ │ │ ├── openstack.go │ │ │ └── openstack_test.go │ │ ├── rackspace │ │ │ ├── client.go │ │ │ ├── rackspace.go │ │ │ └── rackspace_test.go │ │ ├── softlayer │ │ │ ├── driver.go │ │ │ ├── driver_test.go │ │ │ └── softlayer.go │ │ ├── virtualbox │ │ │ ├── disk.go │ │ │ ├── disk_test.go │ │ │ ├── ip.go │ │ │ ├── misc.go │ │ │ ├── network.go │ │ │ ├── network_test.go │ │ │ ├── vbm.go │ │ │ ├── vbm_test.go │ │ │ ├── virtualbox.go │ │ │ ├── virtualbox_darwin.go │ │ │ ├── virtualbox_darwin_test.go │ │ │ ├── virtualbox_linux.go │ │ │ ├── virtualbox_linux_test.go │ │ │ ├── virtualbox_test.go │ │ │ ├── virtualbox_windows.go │ │ │ ├── vm.go │ │ │ ├── vm_test.go │ │ │ ├── vtx.go │ │ │ └── vtx_test.go │ │ ├── vmwarefusion │ │ │ ├── fusion.go │ │ │ ├── fusion_darwin.go │ │ │ ├── fusion_darwin_test.go │ │ │ ├── vmrun_darwin.go │ │ │ └── vmx_darwin.go │ │ ├── vmwarevcloudair │ │ │ ├── vcloudair.go │ │ │ └── vcloudlair_test.go │ │ └── vmwarevsphere │ │ │ ├── vsphere.go │ │ │ └── vsphere_test.go │ │ ├── experimental │ │ ├── README.md │ │ ├── b2d_migration.md │ │ └── b2d_migration_tasks.md │ │ ├── its │ │ ├── cli │ │ │ ├── create_rm_test.go │ │ │ ├── driver_help_test.go │ │ │ ├── help_test.go │ │ │ ├── inspect_test.go │ │ │ ├── ls_test.go │ │ │ ├── status_test.go │ │ │ └── url_test.go │ │ ├── tester.go │ │ └── thirdparty │ │ │ └── commands_test.go │ │ ├── libmachine │ │ ├── auth │ │ │ └── auth.go │ │ ├── cert │ │ │ ├── bootstrap.go │ │ │ ├── cert.go │ │ │ └── cert_test.go │ │ ├── check │ │ │ ├── check.go │ │ │ └── check_test.go │ │ ├── crashreport │ │ │ ├── crash_report.go │ │ │ ├── crash_report_logger.go │ │ │ ├── crash_report_test.go │ │ │ ├── os_darwin.go │ │ │ ├── os_linux.go │ │ │ ├── os_windows.go │ │ │ └── os_windows_test.go │ │ ├── drivers │ │ │ ├── base.go │ │ │ ├── base_test.go │ │ │ ├── check.go │ │ │ ├── drivers.go │ │ │ ├── notsupported.go │ │ │ ├── plugin │ │ │ │ ├── localbinary │ │ │ │ │ ├── plugin.go │ │ │ │ │ └── plugin_test.go │ │ │ │ └── register_driver.go │ │ │ ├── rpc │ │ │ │ ├── client_driver.go │ │ │ │ ├── server_driver.go │ │ │ │ └── server_driver_test.go │ │ │ ├── serial.go │ │ │ ├── serial_test.go │ │ │ └── utils.go │ │ ├── engine │ │ │ └── engine.go │ │ ├── examples │ │ │ └── main.go │ │ ├── host │ │ │ ├── host.go │ │ │ ├── host_test.go │ │ │ ├── host_v0.go │ │ │ ├── host_v2.go │ │ │ ├── migrate.go │ │ │ ├── migrate_test.go │ │ │ ├── migrate_v0_v1.go │ │ │ ├── migrate_v0_v1_test.go │ │ │ ├── migrate_v0_v3_test.go │ │ │ ├── migrate_v1_v2.go │ │ │ ├── migrate_v1_v2_test.go │ │ │ └── migrate_v2_v3.go │ │ ├── hosttest │ │ │ └── default_test_host.go │ │ ├── libmachine.go │ │ ├── libmachinetest │ │ │ └── fake_api.go │ │ ├── log │ │ │ ├── fmt_machine_logger.go │ │ │ ├── fmt_machine_logger_test.go │ │ │ ├── history_recorder.go │ │ │ ├── history_recorder_test.go │ │ │ ├── log.go │ │ │ ├── log_test.go │ │ │ └── machine_logger.go │ │ ├── mcndockerclient │ │ │ ├── docker_client.go │ │ │ ├── docker_host.go │ │ │ ├── docker_versioner.go │ │ │ └── fake_docker_versioner.go │ │ ├── mcnerror │ │ │ └── errors.go │ │ ├── mcnflag │ │ │ └── flag.go │ │ ├── mcnutils │ │ │ ├── b2d.go │ │ │ ├── b2d_test.go │ │ │ ├── utils.go │ │ │ └── utils_test.go │ │ ├── persist │ │ │ ├── filestore.go │ │ │ ├── filestore_test.go │ │ │ ├── persisttest │ │ │ │ └── fake_store.go │ │ │ └── store.go │ │ ├── provider │ │ │ └── provider.go │ │ ├── provision │ │ │ ├── arch.go │ │ │ ├── arch_test.go │ │ │ ├── boot2docker.go │ │ │ ├── centos.go │ │ │ ├── centos_test.go │ │ │ ├── configure_swarm.go │ │ │ ├── coreos.go │ │ │ ├── debian.go │ │ │ ├── debian_test.go │ │ │ ├── engine_config_context.go │ │ │ ├── errors.go │ │ │ ├── fake_provisioner.go │ │ │ ├── fedora.go │ │ │ ├── fedora_test.go │ │ │ ├── generic.go │ │ │ ├── oraclelinux.go │ │ │ ├── oraclelinux_test.go │ │ │ ├── os_release.go │ │ │ ├── os_release_test.go │ │ │ ├── pkgaction │ │ │ │ ├── pkg_action.go │ │ │ │ └── pkg_action_test.go │ │ │ ├── provisioner.go │ │ │ ├── provisiontest │ │ │ │ ├── sshcommander.go │ │ │ │ └── sshcommander_test.go │ │ │ ├── rancheros.go │ │ │ ├── redhat.go │ │ │ ├── redhat_ssh_commander.go │ │ │ ├── redhat_test.go │ │ │ ├── serviceaction │ │ │ │ ├── service_action.go │ │ │ │ └── service_action_test.go │ │ │ ├── suse.go │ │ │ ├── systemd.go │ │ │ ├── ubuntu_systemd.go │ │ │ ├── ubuntu_systemd_test.go │ │ │ ├── ubuntu_upstart.go │ │ │ ├── ubuntu_upstart_test.go │ │ │ ├── utils.go │ │ │ └── utils_test.go │ │ ├── shell │ │ │ ├── shell.go │ │ │ ├── shell_test.go │ │ │ ├── shell_unix_test.go │ │ │ ├── shell_windows.go │ │ │ └── shell_windows_test.go │ │ ├── ssh │ │ │ ├── client.go │ │ │ ├── client_test.go │ │ │ ├── keys.go │ │ │ ├── keys_test.go │ │ │ ├── ssh_test.go │ │ │ └── sshtest │ │ │ │ └── fake_client.go │ │ ├── state │ │ │ ├── state.go │ │ │ └── state_test.go │ │ ├── swarm │ │ │ └── swarm.go │ │ └── version │ │ │ └── version.go │ │ ├── mk │ │ ├── build.mk │ │ ├── coverage.mk │ │ ├── dev.mk │ │ ├── main.mk │ │ ├── test.mk │ │ └── validate.mk │ │ ├── script │ │ ├── .validate │ │ ├── build_in_container.sh │ │ ├── release.sh │ │ ├── release │ │ │ └── github-release-template.md │ │ └── validate-dco │ │ ├── test │ │ ├── integration │ │ │ ├── .gitignore │ │ │ ├── amazonec2 │ │ │ │ ├── amazon.bats │ │ │ │ ├── create-ebsinstance.bats │ │ │ │ └── createwithkeypair.bats │ │ │ ├── core │ │ │ │ ├── certs-extra-san.bats │ │ │ │ ├── core-commands.bats │ │ │ │ ├── crashreport.bats │ │ │ │ ├── engine-options.bats │ │ │ │ ├── env_shell.bats │ │ │ │ ├── inspect_format.bats │ │ │ │ ├── regenerate-certs.bats │ │ │ │ ├── scp.bats │ │ │ │ ├── ssh-backends.bats │ │ │ │ └── swarm-options.bats │ │ │ ├── helpers.bash │ │ │ ├── run-bats.sh │ │ │ └── virtualbox │ │ │ │ ├── certs-checksum.bats │ │ │ │ ├── create-with-upgrading.bats │ │ │ │ ├── custom-mem-disk.bats │ │ │ │ ├── dns.bats │ │ │ │ ├── guards.bats │ │ │ │ ├── pause-save-start.bats │ │ │ │ └── upgrade.bats │ │ └── provision │ │ │ ├── rancheros.bats │ │ │ └── redhat.bats │ │ ├── vendor │ │ ├── github.com │ │ │ ├── Azure │ │ │ │ ├── azure-sdk-for-go │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── arm │ │ │ │ │ │ ├── compute │ │ │ │ │ │ │ ├── availabilitysets.go │ │ │ │ │ │ │ ├── client.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ ├── usageoperations.go │ │ │ │ │ │ │ ├── version.go │ │ │ │ │ │ │ ├── virtualmachineextensionimages.go │ │ │ │ │ │ │ ├── virtualmachineextensions.go │ │ │ │ │ │ │ ├── virtualmachineimages.go │ │ │ │ │ │ │ ├── virtualmachines.go │ │ │ │ │ │ │ ├── virtualmachinescalesets.go │ │ │ │ │ │ │ ├── virtualmachinescalesetvms.go │ │ │ │ │ │ │ └── virtualmachinesizes.go │ │ │ │ │ │ ├── network │ │ │ │ │ │ │ ├── applicationgateways.go │ │ │ │ │ │ │ ├── client.go │ │ │ │ │ │ │ ├── expressroutecircuitauthorizations.go │ │ │ │ │ │ │ ├── expressroutecircuitpeerings.go │ │ │ │ │ │ │ ├── expressroutecircuits.go │ │ │ │ │ │ │ ├── expressrouteserviceproviders.go │ │ │ │ │ │ │ ├── interfaces.go │ │ │ │ │ │ │ ├── loadbalancers.go │ │ │ │ │ │ │ ├── localnetworkgateways.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ ├── publicipaddresses.go │ │ │ │ │ │ │ ├── routes.go │ │ │ │ │ │ │ ├── routetables.go │ │ │ │ │ │ │ ├── securitygroups.go │ │ │ │ │ │ │ ├── securityrules.go │ │ │ │ │ │ │ ├── subnets.go │ │ │ │ │ │ │ ├── usages.go │ │ │ │ │ │ │ ├── version.go │ │ │ │ │ │ │ ├── virtualnetworkgatewayconnections.go │ │ │ │ │ │ │ ├── virtualnetworkgateways.go │ │ │ │ │ │ │ └── virtualnetworks.go │ │ │ │ │ │ ├── resources │ │ │ │ │ │ │ ├── resources │ │ │ │ │ │ │ │ ├── client.go │ │ │ │ │ │ │ │ ├── deploymentoperations.go │ │ │ │ │ │ │ │ ├── deployments.go │ │ │ │ │ │ │ │ ├── groups.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ ├── policyassignments.go │ │ │ │ │ │ │ │ ├── policydefinitions.go │ │ │ │ │ │ │ │ ├── provideroperationdetails.go │ │ │ │ │ │ │ │ ├── providers.go │ │ │ │ │ │ │ │ ├── resources.go │ │ │ │ │ │ │ │ ├── tags.go │ │ │ │ │ │ │ │ └── version.go │ │ │ │ │ │ │ └── subscriptions │ │ │ │ │ │ │ │ ├── client.go │ │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ │ ├── subscriptions.go │ │ │ │ │ │ │ │ ├── tenants.go │ │ │ │ │ │ │ │ └── version.go │ │ │ │ │ │ └── storage │ │ │ │ │ │ │ ├── accounts.go │ │ │ │ │ │ │ ├── client.go │ │ │ │ │ │ │ ├── models.go │ │ │ │ │ │ │ ├── usageoperations.go │ │ │ │ │ │ │ └── version.go │ │ │ │ │ └── storage │ │ │ │ │ │ ├── blob.go │ │ │ │ │ │ ├── client.go │ │ │ │ │ │ ├── file.go │ │ │ │ │ │ ├── queue.go │ │ │ │ │ │ └── util.go │ │ │ │ └── go-autorest │ │ │ │ │ ├── LICENSE │ │ │ │ │ └── autorest │ │ │ │ │ ├── autorest.go │ │ │ │ │ ├── azure │ │ │ │ │ ├── async.go │ │ │ │ │ ├── azure.go │ │ │ │ │ ├── config.go │ │ │ │ │ ├── devicetoken.go │ │ │ │ │ ├── environments.go │ │ │ │ │ ├── persist.go │ │ │ │ │ └── token.go │ │ │ │ │ ├── client.go │ │ │ │ │ ├── date │ │ │ │ │ ├── date.go │ │ │ │ │ ├── time.go │ │ │ │ │ ├── timerfc1123.go │ │ │ │ │ └── utility.go │ │ │ │ │ ├── error.go │ │ │ │ │ ├── preparer.go │ │ │ │ │ ├── responder.go │ │ │ │ │ ├── sender.go │ │ │ │ │ ├── to │ │ │ │ │ └── convert.go │ │ │ │ │ ├── utility.go │ │ │ │ │ └── version.go │ │ │ ├── aws │ │ │ │ └── aws-sdk-go │ │ │ │ │ ├── LICENSE.txt │ │ │ │ │ ├── NOTICE.txt │ │ │ │ │ ├── aws │ │ │ │ │ ├── awserr │ │ │ │ │ │ ├── error.go │ │ │ │ │ │ └── types.go │ │ │ │ │ ├── awsutil │ │ │ │ │ │ ├── copy.go │ │ │ │ │ │ ├── equal.go │ │ │ │ │ │ ├── path_value.go │ │ │ │ │ │ ├── prettify.go │ │ │ │ │ │ └── string_value.go │ │ │ │ │ ├── client │ │ │ │ │ │ ├── client.go │ │ │ │ │ │ ├── default_retryer.go │ │ │ │ │ │ └── metadata │ │ │ │ │ │ │ └── client_info.go │ │ │ │ │ ├── config.go │ │ │ │ │ ├── convert_types.go │ │ │ │ │ ├── corehandlers │ │ │ │ │ │ ├── handlers.go │ │ │ │ │ │ └── param_validator.go │ │ │ │ │ ├── credentials │ │ │ │ │ │ ├── chain_provider.go │ │ │ │ │ │ ├── credentials.go │ │ │ │ │ │ ├── ec2rolecreds │ │ │ │ │ │ │ └── ec2_role_provider.go │ │ │ │ │ │ ├── env_provider.go │ │ │ │ │ │ ├── example.ini │ │ │ │ │ │ ├── shared_credentials_provider.go │ │ │ │ │ │ └── static_provider.go │ │ │ │ │ ├── defaults │ │ │ │ │ │ └── defaults.go │ │ │ │ │ ├── ec2metadata │ │ │ │ │ │ ├── api.go │ │ │ │ │ │ └── service.go │ │ │ │ │ ├── errors.go │ │ │ │ │ ├── logger.go │ │ │ │ │ ├── request │ │ │ │ │ │ ├── handlers.go │ │ │ │ │ │ ├── request.go │ │ │ │ │ │ ├── request_pagination.go │ │ │ │ │ │ └── retryer.go │ │ │ │ │ ├── session │ │ │ │ │ │ └── session.go │ │ │ │ │ ├── types.go │ │ │ │ │ └── version.go │ │ │ │ │ ├── private │ │ │ │ │ ├── endpoints │ │ │ │ │ │ ├── endpoints.go │ │ │ │ │ │ ├── endpoints.json │ │ │ │ │ │ └── endpoints_map.go │ │ │ │ │ ├── protocol │ │ │ │ │ │ ├── ec2query │ │ │ │ │ │ │ ├── build.go │ │ │ │ │ │ │ └── unmarshal.go │ │ │ │ │ │ ├── query │ │ │ │ │ │ │ └── queryutil │ │ │ │ │ │ │ │ └── queryutil.go │ │ │ │ │ │ ├── rest │ │ │ │ │ │ │ ├── build.go │ │ │ │ │ │ │ ├── payload.go │ │ │ │ │ │ │ └── unmarshal.go │ │ │ │ │ │ └── xml │ │ │ │ │ │ │ └── xmlutil │ │ │ │ │ │ │ ├── build.go │ │ │ │ │ │ │ ├── unmarshal.go │ │ │ │ │ │ │ └── xml_to_struct.go │ │ │ │ │ ├── signer │ │ │ │ │ │ └── v4 │ │ │ │ │ │ │ └── v4.go │ │ │ │ │ └── waiter │ │ │ │ │ │ └── waiter.go │ │ │ │ │ └── service │ │ │ │ │ └── ec2 │ │ │ │ │ ├── api.go │ │ │ │ │ ├── customizations.go │ │ │ │ │ ├── service.go │ │ │ │ │ └── waiters.go │ │ │ ├── bugsnag │ │ │ │ ├── bugsnag-go │ │ │ │ │ ├── .travis.yml │ │ │ │ │ ├── CHANGELOG.md │ │ │ │ │ ├── CONTRIBUTING.md │ │ │ │ │ ├── LICENSE.txt │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── README.md │ │ │ │ │ ├── appengine.go │ │ │ │ │ ├── bugsnag.go │ │ │ │ │ ├── configuration.go │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── errors │ │ │ │ │ │ ├── README.md │ │ │ │ │ │ ├── error.go │ │ │ │ │ │ ├── parse_panic.go │ │ │ │ │ │ └── stackframe.go │ │ │ │ │ ├── event.go │ │ │ │ │ ├── json_tags.go │ │ │ │ │ ├── metadata.go │ │ │ │ │ ├── middleware.go │ │ │ │ │ ├── notifier.go │ │ │ │ │ ├── panicwrap.go │ │ │ │ │ └── payload.go │ │ │ │ ├── osext │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── osext.go │ │ │ │ │ ├── osext_plan9.go │ │ │ │ │ ├── osext_procfs.go │ │ │ │ │ ├── osext_sysctl.go │ │ │ │ │ └── osext_windows.go │ │ │ │ └── panicwrap │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── monitor.go │ │ │ │ │ ├── monitor_windows.go │ │ │ │ │ └── panicwrap.go │ │ │ ├── cenkalti │ │ │ │ └── backoff │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── .travis.yml │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── backoff.go │ │ │ │ │ ├── exponential.go │ │ │ │ │ ├── retry.go │ │ │ │ │ └── ticker.go │ │ │ ├── codegangsta │ │ │ │ └── cli │ │ │ │ │ ├── .travis.yml │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── app.go │ │ │ │ │ ├── cli.go │ │ │ │ │ ├── command.go │ │ │ │ │ ├── context.go │ │ │ │ │ ├── flag.go │ │ │ │ │ └── help.go │ │ │ ├── davecgh │ │ │ │ └── go-spew │ │ │ │ │ ├── LICENSE │ │ │ │ │ └── spew │ │ │ │ │ ├── bypass.go │ │ │ │ │ ├── bypasssafe.go │ │ │ │ │ ├── common.go │ │ │ │ │ ├── config.go │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── dump.go │ │ │ │ │ ├── format.go │ │ │ │ │ └── spew.go │ │ │ ├── dgrijalva │ │ │ │ └── jwt-go │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── .travis.yml │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── VERSION_HISTORY.md │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── ecdsa.go │ │ │ │ │ ├── ecdsa_utils.go │ │ │ │ │ ├── errors.go │ │ │ │ │ ├── hmac.go │ │ │ │ │ ├── parser.go │ │ │ │ │ ├── rsa.go │ │ │ │ │ ├── rsa_pss.go │ │ │ │ │ ├── rsa_utils.go │ │ │ │ │ ├── signing_method.go │ │ │ │ │ └── token.go │ │ │ ├── digitalocean │ │ │ │ └── godo │ │ │ │ │ ├── .travis.yml │ │ │ │ │ ├── CONTRIBUTING.md │ │ │ │ │ ├── LICENSE.txt │ │ │ │ │ ├── README.md │ │ │ │ │ ├── account.go │ │ │ │ │ ├── action.go │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── domains.go │ │ │ │ │ ├── droplet_actions.go │ │ │ │ │ ├── droplets.go │ │ │ │ │ ├── errors.go │ │ │ │ │ ├── floating_ips.go │ │ │ │ │ ├── floating_ips_actions.go │ │ │ │ │ ├── godo.go │ │ │ │ │ ├── image_actions.go │ │ │ │ │ ├── images.go │ │ │ │ │ ├── keys.go │ │ │ │ │ ├── links.go │ │ │ │ │ ├── regions.go │ │ │ │ │ ├── sizes.go │ │ │ │ │ ├── strings.go │ │ │ │ │ └── timestamp.go │ │ │ ├── docker │ │ │ │ ├── docker │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── NOTICE │ │ │ │ │ ├── contrib │ │ │ │ │ │ └── syntax │ │ │ │ │ │ │ └── vim │ │ │ │ │ │ │ └── LICENSE │ │ │ │ │ └── pkg │ │ │ │ │ │ ├── mflag │ │ │ │ │ │ └── LICENSE │ │ │ │ │ │ ├── symlink │ │ │ │ │ │ ├── LICENSE.APACHE │ │ │ │ │ │ └── LICENSE.BSD │ │ │ │ │ │ └── term │ │ │ │ │ │ ├── MAINTAINERS │ │ │ │ │ │ ├── console_windows.go │ │ │ │ │ │ ├── tc_linux_cgo.go │ │ │ │ │ │ ├── tc_other.go │ │ │ │ │ │ ├── term.go │ │ │ │ │ │ ├── term_windows.go │ │ │ │ │ │ ├── termios_darwin.go │ │ │ │ │ │ ├── termios_freebsd.go │ │ │ │ │ │ └── termios_linux.go │ │ │ │ └── go-units │ │ │ │ │ ├── CONTRIBUTING.md │ │ │ │ │ ├── LICENSE.code │ │ │ │ │ ├── LICENSE.docs │ │ │ │ │ ├── MAINTAINERS │ │ │ │ │ ├── README.md │ │ │ │ │ ├── circle.yml │ │ │ │ │ ├── duration.go │ │ │ │ │ ├── size.go │ │ │ │ │ └── ulimit.go │ │ │ ├── go-ini │ │ │ │ └── ini │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── README_ZH.md │ │ │ │ │ ├── ini.go │ │ │ │ │ └── struct.go │ │ │ ├── golang │ │ │ │ └── protobuf │ │ │ │ │ ├── LICENSE │ │ │ │ │ └── proto │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── clone.go │ │ │ │ │ ├── decode.go │ │ │ │ │ ├── encode.go │ │ │ │ │ ├── equal.go │ │ │ │ │ ├── extensions.go │ │ │ │ │ ├── lib.go │ │ │ │ │ ├── message_set.go │ │ │ │ │ ├── pointer_reflect.go │ │ │ │ │ ├── pointer_unsafe.go │ │ │ │ │ ├── properties.go │ │ │ │ │ ├── text.go │ │ │ │ │ └── text_parser.go │ │ │ ├── google │ │ │ │ └── go-querystring │ │ │ │ │ ├── LICENSE │ │ │ │ │ └── query │ │ │ │ │ └── encode.go │ │ │ ├── jmespath │ │ │ │ └── go-jmespath │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── .travis.yml │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── Makefile │ │ │ │ │ ├── README.md │ │ │ │ │ ├── api.go │ │ │ │ │ ├── astnodetype_string.go │ │ │ │ │ ├── functions.go │ │ │ │ │ ├── interpreter.go │ │ │ │ │ ├── lexer.go │ │ │ │ │ ├── parser.go │ │ │ │ │ ├── toktype_string.go │ │ │ │ │ └── util.go │ │ │ ├── mitchellh │ │ │ │ └── mapstructure │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── decode_hooks.go │ │ │ │ │ ├── error.go │ │ │ │ │ └── mapstructure.go │ │ │ ├── pmezard │ │ │ │ └── go-difflib │ │ │ │ │ ├── LICENSE │ │ │ │ │ └── difflib │ │ │ │ │ └── difflib.go │ │ │ ├── pyr │ │ │ │ └── egoscale │ │ │ │ │ ├── LICENSE │ │ │ │ │ └── src │ │ │ │ │ └── egoscale │ │ │ │ │ ├── async.go │ │ │ │ │ ├── error.go │ │ │ │ │ ├── groups.go │ │ │ │ │ ├── init.go │ │ │ │ │ ├── keypair.go │ │ │ │ │ ├── request.go │ │ │ │ │ ├── topology.go │ │ │ │ │ ├── types.go │ │ │ │ │ └── vm.go │ │ │ ├── rackspace │ │ │ │ └── gophercloud │ │ │ │ │ ├── .travis.yml │ │ │ │ │ ├── CONTRIBUTING.md │ │ │ │ │ ├── CONTRIBUTORS.md │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── UPGRADING.md │ │ │ │ │ ├── auth_options.go │ │ │ │ │ ├── auth_results.go │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── endpoint_search.go │ │ │ │ │ ├── openstack │ │ │ │ │ ├── auth_env.go │ │ │ │ │ ├── client.go │ │ │ │ │ ├── compute │ │ │ │ │ │ └── v2 │ │ │ │ │ │ │ ├── extensions │ │ │ │ │ │ │ ├── floatingip │ │ │ │ │ │ │ │ ├── doc.go │ │ │ │ │ │ │ │ ├── fixtures.go │ │ │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ │ │ └── urls.go │ │ │ │ │ │ │ ├── keypairs │ │ │ │ │ │ │ │ ├── doc.go │ │ │ │ │ │ │ │ ├── fixtures.go │ │ │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ │ │ └── urls.go │ │ │ │ │ │ │ └── startstop │ │ │ │ │ │ │ │ ├── doc.go │ │ │ │ │ │ │ │ ├── fixtures.go │ │ │ │ │ │ │ │ └── requests.go │ │ │ │ │ │ │ ├── flavors │ │ │ │ │ │ │ ├── doc.go │ │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ │ └── urls.go │ │ │ │ │ │ │ ├── images │ │ │ │ │ │ │ ├── doc.go │ │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ │ └── urls.go │ │ │ │ │ │ │ └── servers │ │ │ │ │ │ │ ├── doc.go │ │ │ │ │ │ │ ├── fixtures.go │ │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ │ ├── urls.go │ │ │ │ │ │ │ └── util.go │ │ │ │ │ ├── endpoint_location.go │ │ │ │ │ ├── identity │ │ │ │ │ │ ├── v2 │ │ │ │ │ │ │ ├── tenants │ │ │ │ │ │ │ │ ├── doc.go │ │ │ │ │ │ │ │ ├── fixtures.go │ │ │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ │ │ └── urls.go │ │ │ │ │ │ │ └── tokens │ │ │ │ │ │ │ │ ├── doc.go │ │ │ │ │ │ │ │ ├── errors.go │ │ │ │ │ │ │ │ ├── fixtures.go │ │ │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ │ │ └── urls.go │ │ │ │ │ │ └── v3 │ │ │ │ │ │ │ └── tokens │ │ │ │ │ │ │ ├── doc.go │ │ │ │ │ │ │ ├── errors.go │ │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ │ └── urls.go │ │ │ │ │ ├── networking │ │ │ │ │ │ └── v2 │ │ │ │ │ │ │ ├── extensions │ │ │ │ │ │ │ └── layer3 │ │ │ │ │ │ │ │ └── floatingips │ │ │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ │ │ └── urls.go │ │ │ │ │ │ │ ├── networks │ │ │ │ │ │ │ ├── doc.go │ │ │ │ │ │ │ ├── errors.go │ │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ │ └── urls.go │ │ │ │ │ │ │ └── ports │ │ │ │ │ │ │ ├── doc.go │ │ │ │ │ │ │ ├── errors.go │ │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ │ └── urls.go │ │ │ │ │ └── utils │ │ │ │ │ │ └── choose_version.go │ │ │ │ │ ├── pagination │ │ │ │ │ ├── http.go │ │ │ │ │ ├── linked.go │ │ │ │ │ ├── marker.go │ │ │ │ │ ├── null.go │ │ │ │ │ ├── pager.go │ │ │ │ │ ├── pkg.go │ │ │ │ │ └── single.go │ │ │ │ │ ├── params.go │ │ │ │ │ ├── provider_client.go │ │ │ │ │ ├── rackspace │ │ │ │ │ ├── auth_env.go │ │ │ │ │ ├── client.go │ │ │ │ │ └── identity │ │ │ │ │ │ └── v2 │ │ │ │ │ │ └── tokens │ │ │ │ │ │ ├── delegate.go │ │ │ │ │ │ └── doc.go │ │ │ │ │ ├── results.go │ │ │ │ │ ├── service_client.go │ │ │ │ │ ├── testhelper │ │ │ │ │ ├── client │ │ │ │ │ │ └── fake.go │ │ │ │ │ ├── convenience.go │ │ │ │ │ ├── doc.go │ │ │ │ │ └── http_responses.go │ │ │ │ │ └── util.go │ │ │ ├── samalba │ │ │ │ └── dockerclient │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ ├── auth.go │ │ │ │ │ ├── dockerclient.go │ │ │ │ │ ├── example_responses.go │ │ │ │ │ ├── interface.go │ │ │ │ │ ├── types.go │ │ │ │ │ └── utils.go │ │ │ ├── skarademir │ │ │ │ └── naturalsort │ │ │ │ │ ├── LICENSE.md │ │ │ │ │ ├── README.md │ │ │ │ │ └── naturalsort.go │ │ │ ├── stretchr │ │ │ │ ├── objx │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── LICENSE.md │ │ │ │ │ ├── README.md │ │ │ │ │ ├── accessors.go │ │ │ │ │ ├── constants.go │ │ │ │ │ ├── conversions.go │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── map.go │ │ │ │ │ ├── mutations.go │ │ │ │ │ ├── security.go │ │ │ │ │ ├── tests.go │ │ │ │ │ ├── type_specific_codegen.go │ │ │ │ │ └── value.go │ │ │ │ └── testify │ │ │ │ │ ├── LICENCE.txt │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── assert │ │ │ │ │ ├── assertion_forward.go │ │ │ │ │ ├── assertion_forward.go.tmpl │ │ │ │ │ ├── assertions.go │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── errors.go │ │ │ │ │ ├── forward_assertions.go │ │ │ │ │ └── http_assertions.go │ │ │ │ │ └── mock │ │ │ │ │ ├── doc.go │ │ │ │ │ └── mock.go │ │ │ ├── tent │ │ │ │ └── http-link-go │ │ │ │ │ ├── .gitignore │ │ │ │ │ ├── .travis.yml │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── README.md │ │ │ │ │ └── link.go │ │ │ └── vmware │ │ │ │ ├── govcloudair │ │ │ │ ├── .gitignore │ │ │ │ ├── .travis.yml │ │ │ │ ├── LICENSE │ │ │ │ ├── Readme.md │ │ │ │ ├── api.go │ │ │ │ ├── catalog.go │ │ │ │ ├── catalogitem.go │ │ │ │ ├── edgegateway.go │ │ │ │ ├── org.go │ │ │ │ ├── orgvdcnetwork.go │ │ │ │ ├── task.go │ │ │ │ ├── types │ │ │ │ │ └── v56 │ │ │ │ │ │ └── types.go │ │ │ │ ├── vapp.go │ │ │ │ ├── vapptemplate.go │ │ │ │ └── vdc.go │ │ │ │ └── govmomi │ │ │ │ ├── .drone.sec │ │ │ │ ├── .drone.yml │ │ │ │ ├── .gitignore │ │ │ │ ├── .travis.yml │ │ │ │ ├── CHANGELOG.md │ │ │ │ ├── CONTRIBUTING.md │ │ │ │ ├── CONTRIBUTORS │ │ │ │ ├── LICENSE.txt │ │ │ │ ├── Makefile │ │ │ │ ├── README.md │ │ │ │ ├── client.go │ │ │ │ ├── find │ │ │ │ ├── error.go │ │ │ │ └── finder.go │ │ │ │ ├── guest │ │ │ │ ├── auth_manager.go │ │ │ │ ├── file_manager.go │ │ │ │ ├── operations_manager.go │ │ │ │ └── process_manager.go │ │ │ │ ├── list │ │ │ │ ├── lister.go │ │ │ │ ├── path.go │ │ │ │ └── recurser.go │ │ │ │ ├── object │ │ │ │ ├── authorization_manager.go │ │ │ │ ├── cluster_compute_resource.go │ │ │ │ ├── common.go │ │ │ │ ├── compute_resource.go │ │ │ │ ├── custom_fields_manager.go │ │ │ │ ├── customization_spec_manager.go │ │ │ │ ├── datacenter.go │ │ │ │ ├── datastore.go │ │ │ │ ├── diagnostic_manager.go │ │ │ │ ├── distributed_virtual_portgroup.go │ │ │ │ ├── distributed_virtual_switch.go │ │ │ │ ├── extension_manager.go │ │ │ │ ├── file_manager.go │ │ │ │ ├── folder.go │ │ │ │ ├── history_collector.go │ │ │ │ ├── host_account_manager.go │ │ │ │ ├── host_config_manager.go │ │ │ │ ├── host_datastore_browser.go │ │ │ │ ├── host_datastore_system.go │ │ │ │ ├── host_firewall_system.go │ │ │ │ ├── host_network_system.go │ │ │ │ ├── host_storage_system.go │ │ │ │ ├── host_system.go │ │ │ │ ├── host_virtual_nic_manager.go │ │ │ │ ├── host_vsan_system.go │ │ │ │ ├── http_nfc_lease.go │ │ │ │ ├── list_view.go │ │ │ │ ├── network.go │ │ │ │ ├── network_reference.go │ │ │ │ ├── option_manager.go │ │ │ │ ├── ovf_manager.go │ │ │ │ ├── resource_pool.go │ │ │ │ ├── search_index.go │ │ │ │ ├── storage_pod.go │ │ │ │ ├── storage_resource_manager.go │ │ │ │ ├── task.go │ │ │ │ ├── types.go │ │ │ │ ├── virtual_app.go │ │ │ │ ├── virtual_device_list.go │ │ │ │ ├── virtual_disk_manager.go │ │ │ │ ├── virtual_machine.go │ │ │ │ └── vmware_distributed_virtual_switch.go │ │ │ │ ├── property │ │ │ │ ├── collector.go │ │ │ │ └── wait.go │ │ │ │ ├── session │ │ │ │ ├── keep_alive.go │ │ │ │ └── manager.go │ │ │ │ ├── task │ │ │ │ ├── error.go │ │ │ │ └── wait.go │ │ │ │ └── vim25 │ │ │ │ ├── client.go │ │ │ │ ├── debug │ │ │ │ └── debug.go │ │ │ │ ├── doc.go │ │ │ │ ├── methods │ │ │ │ ├── internal.go │ │ │ │ ├── methods.go │ │ │ │ └── service_content.go │ │ │ │ ├── mo │ │ │ │ ├── ancestors.go │ │ │ │ ├── entity.go │ │ │ │ ├── extra.go │ │ │ │ ├── mo.go │ │ │ │ ├── reference.go │ │ │ │ ├── registry.go │ │ │ │ ├── retrieve.go │ │ │ │ └── type_info.go │ │ │ │ ├── progress │ │ │ │ ├── aggregator.go │ │ │ │ ├── doc.go │ │ │ │ ├── prefix.go │ │ │ │ ├── reader.go │ │ │ │ ├── report.go │ │ │ │ ├── scale.go │ │ │ │ ├── sinker.go │ │ │ │ └── tee.go │ │ │ │ ├── retry.go │ │ │ │ ├── soap │ │ │ │ ├── client.go │ │ │ │ ├── debug.go │ │ │ │ ├── error.go │ │ │ │ └── soap.go │ │ │ │ ├── types │ │ │ │ ├── base.go │ │ │ │ ├── enum.go │ │ │ │ ├── fault.go │ │ │ │ ├── helpers.go │ │ │ │ ├── if.go │ │ │ │ ├── internal.go │ │ │ │ ├── registry.go │ │ │ │ └── types.go │ │ │ │ └── xml │ │ │ │ ├── LICENSE │ │ │ │ ├── extras.go │ │ │ │ ├── marshal.go │ │ │ │ ├── read.go │ │ │ │ ├── typeinfo.go │ │ │ │ └── xml.go │ │ ├── golang.org │ │ │ └── x │ │ │ │ ├── crypto │ │ │ │ ├── LICENSE │ │ │ │ ├── PATENTS │ │ │ │ ├── curve25519 │ │ │ │ │ ├── const_amd64.s │ │ │ │ │ ├── cswap_amd64.s │ │ │ │ │ ├── curve25519.go │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── freeze_amd64.s │ │ │ │ │ ├── ladderstep_amd64.s │ │ │ │ │ ├── mont25519_amd64.go │ │ │ │ │ ├── mul_amd64.s │ │ │ │ │ └── square_amd64.s │ │ │ │ └── ssh │ │ │ │ │ ├── buffer.go │ │ │ │ │ ├── certs.go │ │ │ │ │ ├── channel.go │ │ │ │ │ ├── cipher.go │ │ │ │ │ ├── client.go │ │ │ │ │ ├── client_auth.go │ │ │ │ │ ├── common.go │ │ │ │ │ ├── connection.go │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── handshake.go │ │ │ │ │ ├── kex.go │ │ │ │ │ ├── keys.go │ │ │ │ │ ├── mac.go │ │ │ │ │ ├── messages.go │ │ │ │ │ ├── mux.go │ │ │ │ │ ├── server.go │ │ │ │ │ ├── session.go │ │ │ │ │ ├── tcpip.go │ │ │ │ │ ├── terminal │ │ │ │ │ ├── terminal.go │ │ │ │ │ ├── util.go │ │ │ │ │ ├── util_bsd.go │ │ │ │ │ ├── util_linux.go │ │ │ │ │ └── util_windows.go │ │ │ │ │ └── transport.go │ │ │ │ ├── net │ │ │ │ ├── LICENSE │ │ │ │ ├── PATENTS │ │ │ │ └── context │ │ │ │ │ ├── context.go │ │ │ │ │ └── ctxhttp │ │ │ │ │ ├── cancelreq.go │ │ │ │ │ ├── cancelreq_go14.go │ │ │ │ │ └── ctxhttp.go │ │ │ │ ├── oauth2 │ │ │ │ ├── .travis.yml │ │ │ │ ├── AUTHORS │ │ │ │ ├── CONTRIBUTING.md │ │ │ │ ├── CONTRIBUTORS │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── client_appengine.go │ │ │ │ ├── google │ │ │ │ │ ├── appengine.go │ │ │ │ │ ├── appengine_hook.go │ │ │ │ │ ├── appenginevm_hook.go │ │ │ │ │ ├── default.go │ │ │ │ │ ├── google.go │ │ │ │ │ ├── jwt.go │ │ │ │ │ └── sdk.go │ │ │ │ ├── internal │ │ │ │ │ ├── oauth2.go │ │ │ │ │ ├── token.go │ │ │ │ │ └── transport.go │ │ │ │ ├── jws │ │ │ │ │ └── jws.go │ │ │ │ ├── jwt │ │ │ │ │ └── jwt.go │ │ │ │ ├── oauth2.go │ │ │ │ ├── token.go │ │ │ │ └── transport.go │ │ │ │ └── sys │ │ │ │ ├── LICENSE │ │ │ │ ├── PATENTS │ │ │ │ └── windows │ │ │ │ └── registry │ │ │ │ ├── key.go │ │ │ │ ├── syscall.go │ │ │ │ ├── value.go │ │ │ │ └── zsyscall_windows.go │ │ └── google.golang.org │ │ │ ├── api │ │ │ ├── LICENSE │ │ │ ├── compute │ │ │ │ └── v1 │ │ │ │ │ ├── compute-api.json │ │ │ │ │ └── compute-gen.go │ │ │ ├── gensupport │ │ │ │ ├── json.go │ │ │ │ └── params.go │ │ │ └── googleapi │ │ │ │ ├── googleapi.go │ │ │ │ ├── internal │ │ │ │ └── uritemplates │ │ │ │ │ ├── LICENSE │ │ │ │ │ ├── uritemplates.go │ │ │ │ │ └── utils.go │ │ │ │ └── types.go │ │ │ ├── appengine │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── appengine.go │ │ │ ├── appengine_vm.go │ │ │ ├── errors.go │ │ │ ├── identity.go │ │ │ ├── internal │ │ │ │ ├── api.go │ │ │ │ ├── api_classic.go │ │ │ │ ├── api_common.go │ │ │ │ ├── app_id.go │ │ │ │ ├── app_identity │ │ │ │ │ ├── app_identity_service.pb.go │ │ │ │ │ └── app_identity_service.proto │ │ │ │ ├── base │ │ │ │ │ ├── api_base.pb.go │ │ │ │ │ └── api_base.proto │ │ │ │ ├── datastore │ │ │ │ │ ├── datastore_v3.pb.go │ │ │ │ │ └── datastore_v3.proto │ │ │ │ ├── identity.go │ │ │ │ ├── identity_classic.go │ │ │ │ ├── identity_vm.go │ │ │ │ ├── internal.go │ │ │ │ ├── log │ │ │ │ │ ├── log_service.pb.go │ │ │ │ │ └── log_service.proto │ │ │ │ ├── metadata.go │ │ │ │ ├── modules │ │ │ │ │ ├── modules_service.pb.go │ │ │ │ │ └── modules_service.proto │ │ │ │ ├── net.go │ │ │ │ ├── regen.sh │ │ │ │ ├── remote_api │ │ │ │ │ ├── remote_api.pb.go │ │ │ │ │ └── remote_api.proto │ │ │ │ └── transaction.go │ │ │ ├── namespace.go │ │ │ └── timeout.go │ │ │ └── cloud │ │ │ ├── LICENSE │ │ │ ├── compute │ │ │ └── metadata │ │ │ │ └── metadata.go │ │ │ └── internal │ │ │ └── cloud.go │ │ └── version │ │ └── version.go │ ├── pmezard │ └── go-difflib │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── README.md │ │ └── difflib │ │ ├── difflib.go │ │ └── difflib_test.go │ └── stretchr │ └── testify │ ├── .gitignore │ ├── .travis.yml │ ├── Godeps │ ├── Godeps.json │ └── Readme │ ├── LICENCE.txt │ ├── LICENSE │ ├── README.md │ ├── _codegen │ └── main.go │ ├── assert │ ├── assertion_forward.go │ ├── assertion_forward.go.tmpl │ ├── assertions.go │ ├── assertions_test.go │ ├── doc.go │ ├── errors.go │ ├── forward_assertions.go │ ├── forward_assertions_test.go │ ├── http_assertions.go │ └── http_assertions_test.go │ ├── doc.go │ ├── http │ ├── doc.go │ ├── test_response_writer.go │ └── test_round_tripper.go │ ├── mock │ ├── doc.go │ ├── mock.go │ └── mock_test.go │ ├── package_test.go │ ├── require │ ├── doc.go │ ├── forward_requirements.go │ ├── forward_requirements_test.go │ ├── require.go │ ├── require.go.tmpl │ ├── require_forward.go │ ├── require_forward.go.tmpl │ ├── requirements.go │ └── requirements_test.go │ ├── suite │ ├── doc.go │ ├── interfaces.go │ ├── suite.go │ └── suite_test.go │ └── vendor │ └── github.com │ ├── davecgh │ └── go-spew │ │ ├── LICENSE │ │ └── spew │ │ ├── bypass.go │ │ ├── bypasssafe.go │ │ ├── common.go │ │ ├── config.go │ │ ├── doc.go │ │ ├── dump.go │ │ ├── format.go │ │ └── spew.go │ ├── pmezard │ └── go-difflib │ │ ├── LICENSE │ │ └── difflib │ │ └── difflib.go │ └── stretchr │ └── objx │ ├── .gitignore │ ├── LICENSE.md │ ├── README.md │ ├── accessors.go │ ├── codegen │ ├── array-access.txt │ ├── index.html │ ├── template.txt │ └── types_list.txt │ ├── constants.go │ ├── conversions.go │ ├── doc.go │ ├── map.go │ ├── mutations.go │ ├── security.go │ ├── tests.go │ ├── type_specific_codegen.go │ └── value.go └── version.go /.dockerignore: -------------------------------------------------------------------------------- 1 | .proxy*.env 2 | *.log 3 | cover 4 | .dockerfile* 5 | -------------------------------------------------------------------------------- /.drone.sec: -------------------------------------------------------------------------------- 1 | eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkExMjhHQ00ifQ.i_PYN52FVYg2ZLSNG70_Jep0oKArzWTrmzDLev__yAuE8hPXQf217R-LmjI8wbB66LaV1sprl52hsmKXOuFbPljSvRfeyqgiWHCpwhJ-c3CBhZqqxXizBIe9tuTufcqemkZq_2Mh1wzhdvgbMB05hiUjw37uvMguKpmSRbTdmRzkpy0Tg4tI9vdunCmEfSVy9s5BlExbIpI5PeRunoK5q1wE_EqKbGCQspyymWqSc2_Qlesmew8RvTndr4iQWobTP1US7-4Pf_8QQbsdFPvRWCNP51xlLmxwYNnxStq7J0CfTIzHsP3ngGk9sQQxTCedgx_PLaVHwju0Aump7R5lyw.WEe7q6vm0Vcod6JK.qt99Ywf36d5nia2-etFVBM4DbMgyGDzkoj02Vx1VFEV2gwC951UPqvIQXw8HfBlXOpKpeNV3QBlh5MGedy37KQXrSczmoCrK4acOw8fdV8hgscLuW_YKWdE2zLXqaMJhgoE2EKmWqOkWzGgKq-3giUz5E_9iOg6U15L-XnEpntP2wZm3RTLk8Puyi-d_EQ9a82XlBN1c3iouMh5aNHpJ8rsK6rhmyTpmL2Mo0kh1GIsmWqfNslTRD-rnjU5ADtymxcw_Ea4uSn7E-4jWJfUmfAQOVC3Wu6jIte7Yck_dyNj1Q6rtuGUWhdRsNTdf-pciiojGrmY1R77MzlFSeYLFGTEZZorsQF_7aIni9d_JsUtXmZA5ahVprezY72cxITY1S5_7rT3naiA7-4My0NgG3n2nl3uNQ2f1Qe8onUtxAALaR5SZ8f_cWpvCkpli1sgdw-Y2kndo01R7pjIBm-IxGUexc2_K3_tCw2KXZuQj_XCsc0NBqj7CIKEz9Zoh2luL77npq0kSy_dItQI2bgXY2v4QgBAQ0oOCDf1pEQDz14qiBNhMASgb4ERY2qEq_ZNCtmWEIgGSPhBySaEm1bbvzEiLMloWx-6Z8Os.iF9ibt5i09UKs_HKxjSE3A 2 | -------------------------------------------------------------------------------- /.drone.yml: -------------------------------------------------------------------------------- 1 | # 2 | # ci-cd using drone 3 | # we use secrets project for variables, see http://readme.drone.io/build/secrets.html 4 | # 5 | build: 6 | image: golang:1.6 7 | environment: 8 | - HTTP_PROXY=$$HTTP_PROXY 9 | - HTTPS_PROXY=$$HTTPS_PROXY 10 | - http_proxy=$$http_proxy 11 | - https_proxy=$$https_proxy 12 | - no_proxy=$$no_proxy 13 | - NO_PROXY=$$NO_PROXY 14 | commands: 15 | - go get github.com/golang/lint/golint 16 | - go get github.com/mattn/goveralls 17 | - go get golang.org/x/tools/cover 18 | - go get github.com/tools/godep 19 | - go get github.com/aktau/github-release 20 | - make test 21 | - make build 22 | # notify: 23 | # flowdock: 24 | # source: DroneOneView 25 | # token: {{FLOWDOCK_TOKEN}} 26 | # tags: oneview-golang 27 | # on_started: true 28 | # on_success: true 29 | # on_failure: true 30 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Set the default behavior, in case people don't have core.autocrlf set. 2 | * text eol=lf 3 | 4 | # Explicitly declare text files you want to always be normalized and converted 5 | # to native line endings on checkout. 6 | *.go text 7 | *.mk text 8 | *.json 9 | 10 | *.png binary 11 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ### Scenario/Intent 2 | [What are you trying to achieve but can't?] 3 | 4 | ### Environment Details 5 | - **Golang binding for HPE OneView Version:** [Version of this module for which you are encountering the issue] 6 | - **OneView SDK Version:** [Version of the Oneview SDK for which you are encountering the issue] 7 | - **OneView Appliance Version:** [Version of the OneView appliance you're interacting with] 8 | - **OneView Client API Version:** [API version of your client object] 9 | - **Golang Version:** [Version of Golang in your environment] 10 | - **Platform:** [OS distribution and release version] 11 | 12 | ### Steps to Reproduce 13 | [What are the complete steps needed to do in order to reproduce your problem?] 14 | 15 | ### Expected Result 16 | [What do you *expect* to happen after taking the steps above?] 17 | 18 | ### Actual Result 19 | [What *actually* happens after the steps above? Include error output or a link to a gist.] 20 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ### Description 2 | [Describe what this change achieves] 3 | 4 | ### Issues Resolved 5 | [List any issues this PR will resolve. e.g., Fixes #01] 6 | 7 | ### Check List 8 | - [ ] New functionality includes testing. 9 | - [ ] All tests pass for go 1.11 + gofmt checks. 10 | - [ ] New functionality has been documented in the README if applicable. 11 | - [ ] New functionality has been thoroughly documented in the examples (please include helpful comments). 12 | - [ ] Changes are documented in the CHANGELOG. 13 | -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- 1 | name: Go 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | pull_request: 7 | branches: [ master ] 8 | 9 | jobs: 10 | 11 | build: 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v2 15 | 16 | - name: Set up Go 17 | uses: actions/setup-go@v1 18 | with: 19 | go-version: 1.18 20 | 21 | - name: Install Go Overalls 22 | run: go install github.com/mattn/goveralls@latest 23 | 24 | - name: Install Go Lint 25 | run: go install golang.org/x/lint/golint@latest 26 | 27 | - name: Running Test Script 28 | run: make test 29 | -------------------------------------------------------------------------------- /.github/workflows/issue_push.yml: -------------------------------------------------------------------------------- 1 | name: Notify issues 2 | 3 | on: 4 | issues: 5 | types: [opened] 6 | 7 | jobs: 8 | push: 9 | 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - name: Send Push Notification 14 | uses: techulus/push-github-action@v0.0.2 15 | env: 16 | API_KEY: ${{ secrets.PUSH_API_KEY }} 17 | MESSAGE: "There is a new issue 😅" 18 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | # This workflows will upload a Docker Image when a release is created 2 | 3 | name: Upload Docker Image 4 | 5 | on: 6 | release: 7 | types: [created] 8 | 9 | jobs: 10 | deploy: 11 | 12 | runs-on: ubuntu-latest 13 | 14 | steps: 15 | - uses: actions/checkout@v2 16 | - name: Setup environment for Docker image publish 17 | run: | 18 | echo "RELEASE_VERSION=$(echo ${GITHUB_REF:10})" >> $GITHUB_ENV 19 | - name: Login to Docker Hub 20 | run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin 21 | - name: Build the tagged Docker image 22 | run: docker build . --file Dockerfile --tag hewlettpackardenterprise/hpe-oneview-sdk-for-golang:${{ env.RELEASE_VERSION }}-OV10.0 23 | - name: Push the tagged Docker image 24 | run: docker push hewlettpackardenterprise/hpe-oneview-sdk-for-golang:${{ env.RELEASE_VERSION }}-OV10.0 25 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .oneview*.env 2 | .proxy*.env 3 | .dockerfile* 4 | vendor/* 5 | *.png 6 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.11 2 | 3 | ENV USER root 4 | WORKDIR /go/src/github.com/HewlettPackard/oneview-golang 5 | 6 | COPY . /go/src/github.com/HewlettPackard/oneview-golang 7 | RUN go build github.com/HewlettPackard/oneview-golang 8 | -------------------------------------------------------------------------------- /Makefile.inc: -------------------------------------------------------------------------------- 1 | # Project name, used to name the binaries 2 | PKG_NAME := oneview-golang 3 | # Github infos 4 | GH_USER ?= HewlettPackard 5 | GH_REPO ?= oneview-golang 6 | 7 | # If true, disable optimizations and does NOT strip the binary 8 | DEBUG ?= 9 | # If true, "build" will produce a static binary (cross compile always produce static build regardless) 10 | STATIC ?= 11 | # If true, turn on verbose output for build 12 | VERBOSE ?= 13 | # Build tags 14 | BUILDTAGS ?= 15 | # Adjust number of parallel builds (XXX not used) 16 | PARALLEL ?= -1 17 | # Coverage default directory 18 | COVERAGE_DIR ?= cover 19 | # Whether to perform targets inside a docker container, or natively on the host 20 | USE_CONTAINER ?= 21 | 22 | # List of cross compilation targets 23 | ifeq ($(TARGET_OS),) 24 | TARGET_OS := darwin linux windows 25 | endif 26 | 27 | ifeq ($(TARGET_ARCH),) 28 | TARGET_ARCH := amd64 386 29 | endif 30 | 31 | # Output prefix, defaults to local directory if not specified 32 | ifeq ($(PREFIX),) 33 | PREFIX := $(shell pwd) 34 | endif 35 | -------------------------------------------------------------------------------- /build/validate-gofmt: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | source "$(dirname "$BASH_SOURCE")/.validate" 4 | 5 | IFS=$'\n' 6 | files=( $(validate_diff --diff-filter=ACMR --name-only -- '*.go' | grep -v '^Vendor/' || true) ) 7 | unset IFS 8 | 9 | badFiles=() 10 | for f in "${files[@]}"; do 11 | # we use "git show" here to validate that what's committed is formatted 12 | if [ "$(git show "$VALIDATE_HEAD:$f" | gofmt -s -l)" ]; then 13 | badFiles+=( "$f" ) 14 | fi 15 | done 16 | 17 | if [ ${#badFiles[@]} -eq 0 ]; then 18 | echo 'Congratulations! All Go source files are properly formatted.' 19 | else 20 | { 21 | echo "These files are not properly gofmt'd:" 22 | for f in "${badFiles[@]}"; do 23 | echo " - $f" 24 | done 25 | echo 26 | echo 'Please reformat the above files using "gofmt -s -w" and commit the result.' 27 | echo 28 | } >&2 29 | false 30 | fi 31 | -------------------------------------------------------------------------------- /glide.lock: -------------------------------------------------------------------------------- 1 | hash: eca4568652d71f46fa831f45bb0e456b0114f27a3cdd02eef8b3d87cca9efe7e 2 | updated: 2016-09-13T22:28:10.708194985Z 3 | imports: 4 | - name: github.com/docker/machine 5 | version: 41b3b253352b8b355d668f5e12b5f329f88c3482 6 | subpackages: 7 | - libmachine/log 8 | - name: github.com/stretchr/testify 9 | version: f390dcf405f7b83c997eac1b06768bb9f44dec18 10 | subpackages: 11 | - assert 12 | testImports: 13 | - name: github.com/davecgh/go-spew 14 | version: 5215b55f46b2b919f50a1df0eaa5886afe4e3b3d 15 | subpackages: 16 | - spew 17 | - name: github.com/pmezard/go-difflib 18 | version: 792786c7400a136282c1664665ae0a8db921c6c2 19 | subpackages: 20 | - difflib 21 | -------------------------------------------------------------------------------- /glide.yaml: -------------------------------------------------------------------------------- 1 | package: github.com/HewlettPackard/oneview-golang 2 | homepage: https://github.com/HewlettPackard/oneview-golang 3 | import: 4 | - package: github.com/docker/machine 5 | version: "~0.8" 6 | subpackages: 7 | - libmachine/log 8 | - package: github.com/stretchr/testify 9 | version: v1.1.3 10 | subpackages: 11 | - assert 12 | excludeDirs: 13 | - icsp 14 | - ov 15 | - liboneview 16 | - utils 17 | - rest 18 | - testconfig 19 | -------------------------------------------------------------------------------- /icsp/types.go: -------------------------------------------------------------------------------- 1 | /* 2 | (c) Copyright [2015] Hewlett Packard Enterprise Development LP 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | // Package icsp - 18 | package icsp 19 | 20 | // URLEndPoint ... 21 | type URLEndPoint string 22 | -------------------------------------------------------------------------------- /mk/utils/dockerfile.mk: -------------------------------------------------------------------------------- 1 | # goal for this make file is to generate dockerfile from an upstream project 2 | 3 | DOCKER_FILE ?= 4 | DOCKER_FILE_URL ?= 5 | 6 | PROXY_CONFIG_CONTENT ?= $(shell cat $(PROXY_DOCKER_ENV_FILE)) 7 | 8 | include mk/utils/proxy.mk 9 | 10 | define dockerfile-clean 11 | [ -z "$(DOCKER_FILE)" ] || rm -f $(DOCKER_FILE); 12 | endef 13 | 14 | get-upstream-dockerfile: 15 | # get the dockerfile.machine from github.com/docker/machine 16 | curl -s $(DOCKER_FILE_URL) > $(DOCKER_FILE) 17 | 18 | gen-dockerfile: proxy-config get-upstream-dockerfile 19 | echo 'setup proxy for $(DOCKER_FILE)' 20 | sed "/FROM.*/ r $(PROXY_DOCKER_ENV_FILE)" $(DOCKER_FILE) > $(DOCKER_FILE).t && mv $(DOCKER_FILE).t $(DOCKER_FILE) 21 | 22 | dockerfile-clean: 23 | $(call dockerfile-clean) 24 | -------------------------------------------------------------------------------- /mk/utils/glide.mk: -------------------------------------------------------------------------------- 1 | # Cross builder helper 2 | define glide-install 3 | glide install -s --update-vendored 4 | endef 5 | 6 | define glide-update 7 | glide update -s --update-vendored 8 | endef 9 | 10 | 11 | vendor-clean: 12 | @rm -rf $(PREFIX)/vendor/* 13 | @echo cleaning up in $(PREFIX)/vendor/* 14 | 15 | # for fresh setup so we can get clean repo 16 | glide-clean: vendor-clean 17 | @echo "Removing all glide data" 18 | rm -f $(PREFIX)/glide.lock 19 | @glide cache-clear 20 | 21 | # setup the vendor folder with required packages that have been committed 22 | glide-vendor: 23 | @$(call glide-install) 24 | @echo "Done placing packages into $(PREFIX)/vendor" 25 | 26 | glide: glide-clean glide-vendor 27 | @echo "All done! run git status and commit to save any changes." 28 | 29 | -------------------------------------------------------------------------------- /rest/method.go: -------------------------------------------------------------------------------- 1 | package rest 2 | 3 | // Create a Method type 4 | type Method int 5 | 6 | const ( 7 | GET Method = 1 + iota 8 | POST 9 | PUT 10 | DELETE 11 | PATCH 12 | ) 13 | 14 | var method = [...]string{ 15 | "GET", 16 | "POST", 17 | "PUT", 18 | "DELETE", 19 | "PATCH", 20 | } 21 | 22 | func (m Method) String() string { return method[m-1] } 23 | -------------------------------------------------------------------------------- /rest/method_test.go: -------------------------------------------------------------------------------- 1 | package rest 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/stretchr/testify/assert" 7 | ) 8 | 9 | func TestMethod(t *testing.T) { 10 | var m Method 11 | m = GET 12 | assert.Equal(t, "GET", m.String(), "GET should be string") 13 | assert.Equal(t, "POST", POST.String(), "POST should be string") 14 | assert.Equal(t, "PUT", PUT.String(), "PUT should be string") 15 | assert.Equal(t, "DELETE", DELETE.String(), "DELETE should be string") 16 | assert.Equal(t, "PATCH", PATCH.String(), "PATCH should be string") 17 | } 18 | -------------------------------------------------------------------------------- /test/icsp/jobtask_test.go: -------------------------------------------------------------------------------- 1 | package icsp 2 | 3 | import ( 4 | "encoding/json" 5 | "testing" 6 | 7 | "github.com/HewlettPackard/oneview-golang/icsp" 8 | "github.com/docker/machine/libmachine/log" 9 | "github.com/stretchr/testify/assert" 10 | ) 11 | 12 | // TestGetProfiles 13 | func TestODSUri(t *testing.T) { 14 | var ( 15 | d *ICSPTest 16 | u icsp.ODSUri 17 | ) 18 | d, _ = getTestDriverU() 19 | jsonJobURI := d.Tc.GetTestData(d.Env, "JobURIJSONString").(string) 20 | log.Debugf("jsonJobURI => %s", jsonJobURI) 21 | err := json.Unmarshal([]byte(jsonJobURI), &u) 22 | assert.NoError(t, err, "Unmarshal ODSUri for Job threw error -> %s, %+v\n", err, jsonJobURI) 23 | } 24 | -------------------------------------------------------------------------------- /test/ov/connection_test.go: -------------------------------------------------------------------------------- 1 | package ov 2 | 3 | /* 4 | import ( 5 | "os" 6 | "testing" 7 | 8 | "github.com/docker/machine/libmachine/log" 9 | "github.com/stretchr/testify/assert" 10 | "github.com/HewlettPackard/oneview-golang/ov" 11 | ) 12 | 13 | // test working with connections 14 | // Acceptance test -> 15 | // /rest/server-profiles 16 | // ?filter=serialNumber matches '2M25090RMW'&sort=name:asc 17 | func TestConnections(t *testing.T) { 18 | var ( 19 | d *OVTest 20 | c *ov.OVClient 21 | ) 22 | if os.Getenv("ONEVIEW_TEST_ACCEPTANCE") == "true" { 23 | d, c = getTestDriverA("dev") 24 | if c == nil { 25 | t.Fatalf("Failed to execute getTestDriver() ") 26 | } 27 | data, err := c.GetProfileBySN(d.Tc.GetTestData(d.Env, "SerialNumber").(string)) 28 | assert.NoError(t, err, "GetProfileBySN threw error -> %s", err) 29 | log.Debugf("data.Connections -> %+v\n", data.Connections) 30 | assert.Equal(t, d.Tc.GetExpectsData(d.Env, "MACAddress").(string), data.Connections[0].MAC.String()) 31 | 32 | } 33 | } 34 | */ 35 | -------------------------------------------------------------------------------- /test/ov/connectionv2_test.go: -------------------------------------------------------------------------------- 1 | package ov 2 | -------------------------------------------------------------------------------- /test/ov/profilesv2_test.go: -------------------------------------------------------------------------------- 1 | package ov 2 | -------------------------------------------------------------------------------- /test/ov/profilesv3_test.go: -------------------------------------------------------------------------------- 1 | package ov 2 | -------------------------------------------------------------------------------- /test/ov/server_hardwarev2_test.go: -------------------------------------------------------------------------------- 1 | package ov 2 | -------------------------------------------------------------------------------- /test/ov/storagev2_test.go: -------------------------------------------------------------------------------- 1 | package ov 2 | -------------------------------------------------------------------------------- /testconfig/testcases_test.go: -------------------------------------------------------------------------------- 1 | package testconfig 2 | -------------------------------------------------------------------------------- /utils/helpers.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import "strings" 4 | 5 | // Sanatize ... 6 | func Sanatize(s string) string { 7 | return strings.TrimRight(s, "/") 8 | } 9 | 10 | // IsEmpty ... 11 | // see http://golang.org/ref/spec#Assignability 12 | func IsEmpty(s string) bool { 13 | if s == "" || len(strings.TrimSpace(s)) == 0 { 14 | return true 15 | } 16 | return false 17 | } 18 | 19 | // GetBoolPointer returns pointer value 20 | func GetBoolPointer(value bool) *bool { 21 | return &value 22 | } 23 | -------------------------------------------------------------------------------- /utils/helpers_test.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import ( 4 | "fmt" 5 | "testing" 6 | ) 7 | 8 | var trimtests = map[string]string{ 9 | "///string///": "///string", 10 | "http://www.example.com/test/": "http://www.example.com/test", 11 | "string": "string", 12 | } 13 | 14 | var emptytests = map[string]bool{ 15 | "": true, 16 | "abc123": false, 17 | "🤘🏻": false, 18 | } 19 | 20 | func TestStringTrimming(t *testing.T) { 21 | for original, expected := range trimtests { 22 | if result := Sanatize(original); result != expected { 23 | t.Logf("Expected %q but received %q instead.", expected, result) 24 | t.Fail() 25 | } 26 | } 27 | } 28 | 29 | func TestEmpties(t *testing.T) { 30 | for value, expected := range emptytests { 31 | if empty := IsEmpty(value); empty != expected { 32 | t.Logf( 33 | "String %q expected empty to be %q, got %q instead", 34 | value, fmt.Sprintf("%v", expected), fmt.Sprintf("%v", empty), 35 | ) 36 | t.Fail() 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /utils/nstring.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import ( 4 | "encoding/json" 5 | ) 6 | 7 | type Nstring string 8 | 9 | // NewNstring - create a new Nstring type 10 | func NewNstring(s string) Nstring { 11 | return Nstring(s) 12 | } 13 | 14 | // UnmarshalJSON - convert byte stream to string 15 | func (n *Nstring) UnmarshalJSON(b []byte) (err error) { 16 | if string(b) == "null" { 17 | return nil 18 | } 19 | return json.Unmarshal(b, (*string)(n)) 20 | } 21 | 22 | func (n *Nstring) String() string { 23 | if n.IsNil() { 24 | return "null" 25 | } else { 26 | return string(*n) 27 | } 28 | } 29 | 30 | func (n *Nstring) Nil() { 31 | n = nil 32 | } 33 | 34 | func (n *Nstring) IsNil() bool { 35 | if len(*n) > 0 { 36 | return false 37 | } else { 38 | return true 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /utils/nstring_test.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/stretchr/testify/assert" 7 | ) 8 | 9 | func TestNewNstring(t *testing.T) { 10 | assert.Equal(t, Nstring("foo"), NewNstring("foo"), "create Nstring should be equal") 11 | var n Nstring 12 | n.Nil() 13 | assert.Equal(t, "null", n.String(), "should create an empty null string") 14 | n = NewNstring("null") 15 | assert.Equal(t, "null", n.String(), "should create an empty null string") 16 | n = "foobar" 17 | assert.Equal(t, "foobar", n.String(), "should container foobar") 18 | } 19 | 20 | func TestIsNil(t *testing.T) { 21 | var n Nstring 22 | assert.True(t, n.IsNil(), "should be a nil string") 23 | } 24 | -------------------------------------------------------------------------------- /utils/stringy.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import "regexp" 4 | 5 | // some general string function helpers 6 | var ( 7 | reRemoveJSON = regexp.MustCompile("(.*)({.*}).*") 8 | reGetJSON = regexp.MustCompile("(.*)({.*}).*") 9 | ) 10 | 11 | // StringRemoveJSON - remove a json string from regular strings 12 | func StringRemoveJSON(s string) string { 13 | a := reRemoveJSON.FindStringSubmatch(s) 14 | if len(a) > 2 { 15 | return StringRemoveJSON(a[1]) // keep trying to remove json till there is no more left 16 | } 17 | return s 18 | } 19 | 20 | // StringGetJSON - just get the JSON from the string 21 | // should only find the first json 22 | func StringGetJSON(s string) string { 23 | a := reGetJSON.FindStringSubmatch(s) 24 | if len(a) > 2 { 25 | return a[2] 26 | } 27 | return "" 28 | } 29 | -------------------------------------------------------------------------------- /utils/stringy_test.go: -------------------------------------------------------------------------------- 1 | package utils 2 | -------------------------------------------------------------------------------- /vendor/github.com/davecgh/go-spew/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | -------------------------------------------------------------------------------- /vendor/github.com/davecgh/go-spew/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 1.2 3 | install: 4 | - go get -v code.google.com/p/go.tools/cmd/cover 5 | script: 6 | - go test -v -tags=disableunsafe ./spew 7 | - go test -v -tags=testcgo ./spew -covermode=count -coverprofile=profile.cov 8 | after_success: 9 | - go get -v github.com/mattn/goveralls 10 | - export PATH=$PATH:$HOME/gopath/bin 11 | - goveralls -coverprofile=profile.cov -service=travis-ci 12 | -------------------------------------------------------------------------------- /vendor/github.com/davecgh/go-spew/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012-2013 Dave Collins 2 | 3 | Permission to use, copy, modify, and distribute this software for any 4 | purpose with or without fee is hereby granted, provided that the above 5 | copyright notice and this permission notice appear in all copies. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 8 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 9 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 10 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 11 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 12 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 13 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14 | -------------------------------------------------------------------------------- /vendor/github.com/davecgh/go-spew/cov_report.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # This script uses gocov to generate a test coverage report. 4 | # The gocov tool my be obtained with the following command: 5 | # go get github.com/axw/gocov/gocov 6 | # 7 | # It will be installed to $GOPATH/bin, so ensure that location is in your $PATH. 8 | 9 | # Check for gocov. 10 | if ! type gocov >/dev/null 2>&1; then 11 | echo >&2 "This script requires the gocov tool." 12 | echo >&2 "You may obtain it with the following command:" 13 | echo >&2 "go get github.com/axw/gocov/gocov" 14 | exit 1 15 | fi 16 | 17 | # Only run the cgo tests if gcc is installed. 18 | if type gcc >/dev/null 2>&1; then 19 | (cd spew && gocov test -tags testcgo | gocov report) 20 | else 21 | (cd spew && gocov test | gocov report) 22 | fi 23 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/.dockerignore: -------------------------------------------------------------------------------- 1 | docker-machine* 2 | *.log 3 | bin 4 | cover -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/.gitignore: -------------------------------------------------------------------------------- 1 | docker-machine* 2 | *.log 3 | *.iml 4 | .idea/ 5 | ./bin 6 | cover 7 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/.godir: -------------------------------------------------------------------------------- 1 | github.com/docker/machine 2 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: required 2 | dist: trusty 3 | language: bash 4 | services: docker 5 | env: 6 | matrix: 7 | - TARGET_OS=linux TARGET_ARCH=amd64 TARGETS="build validate" 8 | - TARGET_OS=darwin TARGET_ARCH=amd64 TARGETS="build-x" 9 | - TARGET_OS=windows TARGET_ARCH=amd64 TARGETS="build-x" 10 | script: 11 | - USE_CONTAINER=true make "$TARGETS" 12 | - "[[ \"$(find bin -type f -name docker-machine*)\" != \"\" ]]" 13 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.6.2 2 | 3 | RUN go get github.com/golang/lint/golint \ 4 | github.com/mattn/goveralls \ 5 | golang.org/x/tools/cover 6 | 7 | ENV USER root 8 | WORKDIR /go/src/github.com/docker/machine 9 | 10 | COPY . ./ 11 | RUN mkdir bin 12 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/Godeps/Readme: -------------------------------------------------------------------------------- 1 | This directory tree is generated automatically by godep. 2 | 3 | Please do not edit. 4 | 5 | See https://github.com/tools/godep for more information. 6 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/Makefile: -------------------------------------------------------------------------------- 1 | # Plain make targets if not requested inside a container 2 | ifneq (,$(findstring test-integration,$(MAKECMDGOALS))) 3 | include Makefile.inc 4 | include mk/main.mk 5 | else ifneq ($(USE_CONTAINER), true) 6 | include Makefile.inc 7 | include mk/main.mk 8 | else 9 | # Otherwise, with docker, swallow all targets and forward into a container 10 | DOCKER_BUILD_DONE := "" 11 | 12 | test: .DEFAULT 13 | 14 | .DEFAULT: 15 | @test ! -z "$(DOCKER_BUILD_DONE)" || ./script/build_in_container.sh $(MAKECMDGOALS) 16 | $(eval DOCKER_BUILD_DONE := "done") 17 | 18 | endif 19 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/Makefile.inc: -------------------------------------------------------------------------------- 1 | # Project name, used to name the binaries 2 | PKG_NAME := docker-machine 3 | 4 | # If true, disable optimizations and does NOT strip the binary 5 | DEBUG ?= 6 | # If true, "build" will produce a static binary (cross compile always produce static build regardless) 7 | STATIC ?= 8 | # If true, turn on verbose output for build 9 | VERBOSE ?= 10 | # Build tags 11 | BUILDTAGS ?= 12 | # Adjust number of parallel builds (XXX not used) 13 | PARALLEL ?= -1 14 | # Coverage default directory 15 | COVERAGE_DIR ?= cover 16 | # Whether to perform targets inside a docker container, or natively on the host 17 | USE_CONTAINER ?= 18 | 19 | # List of cross compilation targets 20 | ifeq ($(TARGET_OS),) 21 | TARGET_OS := darwin linux windows 22 | endif 23 | 24 | ifeq ($(TARGET_ARCH),) 25 | TARGET_ARCH := amd64 386 26 | endif 27 | 28 | # Output prefix, defaults to local directory if not specified 29 | ifeq ($(PREFIX),) 30 | PREFIX := $(shell pwd) 31 | endif 32 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: "{build}" 2 | 3 | skip_tags: true 4 | 5 | os: Windows Server 2012 R2 6 | 7 | environment: 8 | GOPATH: c:\gopath 9 | 10 | clone_folder: c:\gopath\src\github.com\docker\machine 11 | 12 | build_script: 13 | - go build -i -o ./bin/docker-machine.exe ./cmd/machine.go 14 | 15 | test_script: 16 | - powershell -Command go test -v ./libmachine/shell 17 | 18 | deploy: off 19 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/circle.yml: -------------------------------------------------------------------------------- 1 | machine: 2 | pre: 3 | - bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/1.0.22/binscripts/gvm-installer) 4 | 5 | post: 6 | - gvm install go1.6 -B --name=stable 7 | 8 | environment: 9 | CHECKOUT: /home/ubuntu/$CIRCLE_PROJECT_REPONAME 10 | BASE_DIR: src/github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME 11 | BASE_STABLE: ../../../$HOME/.gvm/pkgsets/stable/global/$BASE_DIR 12 | GO15VENDOREXPERIMENT: 1 13 | 14 | dependencies: 15 | override: 16 | - > 17 | gvm use stable && 18 | mkdir -p "$(dirname $BASE_STABLE)" && 19 | cp -R "$CHECKOUT" "$BASE_STABLE" 20 | 21 | test: 22 | pre: 23 | - gvm use stable && make build: 24 | pwd: $BASE_STABLE 25 | - gvm use stable && go get github.com/docker/docker-machine-driver-ci-test 26 | 27 | override: 28 | - gvm use stable && PATH=../../../../bin:$PATH DRIVER=ci-test go test -v github.com/docker/machine/its/...: 29 | pwd: $BASE_STABLE 30 | timeout: 600 31 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/cmd/machine_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "os" 5 | "testing" 6 | 7 | "github.com/docker/machine/commands/mcndirs" 8 | ) 9 | 10 | func TestStorePathSetCorrectly(t *testing.T) { 11 | mcndirs.BaseDir = "" 12 | os.Args = []string{"docker-machine", "--storage-path", "/tmp/foo"} 13 | main() 14 | if mcndirs.BaseDir != "/tmp/foo" { 15 | t.Fatal("Expected MACHINE_STORAGE_PATH environment variable to be /tmp/foo but was ", os.Getenv("MACHINE_STORAGE_PATH")) 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/commands/commandstest/stdout_capture.go: -------------------------------------------------------------------------------- 1 | package commandstest 2 | 3 | import ( 4 | "bytes" 5 | "io" 6 | 7 | "os" 8 | ) 9 | 10 | var ( 11 | stdout *os.File 12 | ) 13 | 14 | func init() { 15 | stdout = os.Stdout 16 | } 17 | 18 | type StdoutGetter interface { 19 | Output() string 20 | Stop() 21 | } 22 | 23 | type stdoutCapturer struct { 24 | stdout *os.File 25 | output chan string 26 | } 27 | 28 | func NewStdoutGetter() StdoutGetter { 29 | r, w, _ := os.Pipe() 30 | os.Stdout = w 31 | 32 | output := make(chan string) 33 | go func() { 34 | var testOutput bytes.Buffer 35 | io.Copy(&testOutput, r) 36 | output <- testOutput.String() 37 | }() 38 | 39 | return &stdoutCapturer{ 40 | stdout: w, 41 | output: output, 42 | } 43 | } 44 | 45 | func (c *stdoutCapturer) Output() string { 46 | c.stdout.Close() 47 | text := <-c.output 48 | close(c.output) 49 | return text 50 | } 51 | 52 | func (c *stdoutCapturer) Stop() { 53 | os.Stdout = stdout 54 | } 55 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/commands/flag_sort.go: -------------------------------------------------------------------------------- 1 | package commands 2 | 3 | import "github.com/codegangsta/cli" 4 | 5 | type ByFlagName []cli.Flag 6 | 7 | func (flags ByFlagName) Len() int { 8 | return len(flags) 9 | } 10 | 11 | func (flags ByFlagName) Swap(i, j int) { 12 | flags[i], flags[j] = flags[j], flags[i] 13 | } 14 | 15 | func (flags ByFlagName) Less(i, j int) bool { 16 | return flags[i].String() < flags[j].String() 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/commands/inspect_test.go: -------------------------------------------------------------------------------- 1 | package commands 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/docker/machine/commands/commandstest" 7 | "github.com/docker/machine/libmachine" 8 | "github.com/docker/machine/libmachine/libmachinetest" 9 | "github.com/stretchr/testify/assert" 10 | ) 11 | 12 | func TestCmdInspect(t *testing.T) { 13 | testCases := []struct { 14 | commandLine CommandLine 15 | api libmachine.API 16 | expectedErr error 17 | }{ 18 | { 19 | commandLine: &commandstest.FakeCommandLine{ 20 | CliArgs: []string{"foo", "bar"}, 21 | }, 22 | api: &libmachinetest.FakeAPI{}, 23 | expectedErr: ErrExpectedOneMachine, 24 | }, 25 | } 26 | 27 | for _, tc := range testCases { 28 | err := cmdInspect(tc.commandLine, tc.api) 29 | assert.Equal(t, tc.expectedErr, err) 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/commands/ip.go: -------------------------------------------------------------------------------- 1 | package commands 2 | 3 | import "github.com/docker/machine/libmachine" 4 | 5 | func cmdIP(c CommandLine, api libmachine.API) error { 6 | return runAction("ip", c, api) 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/commands/kill.go: -------------------------------------------------------------------------------- 1 | package commands 2 | 3 | import "github.com/docker/machine/libmachine" 4 | 5 | func cmdKill(c CommandLine, api libmachine.API) error { 6 | return runAction("kill", c, api) 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/commands/mcndirs/utils.go: -------------------------------------------------------------------------------- 1 | package mcndirs 2 | 3 | import ( 4 | "os" 5 | "path/filepath" 6 | 7 | "github.com/docker/machine/libmachine/mcnutils" 8 | ) 9 | 10 | var ( 11 | BaseDir = os.Getenv("MACHINE_STORAGE_PATH") 12 | ) 13 | 14 | func GetBaseDir() string { 15 | if BaseDir == "" { 16 | BaseDir = filepath.Join(mcnutils.GetHomeDir(), ".docker", "machine") 17 | } 18 | return BaseDir 19 | } 20 | 21 | func GetMachineDir() string { 22 | return filepath.Join(GetBaseDir(), "machines") 23 | } 24 | 25 | func GetMachineCertDir() string { 26 | return filepath.Join(GetBaseDir(), "certs") 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/commands/provision.go: -------------------------------------------------------------------------------- 1 | package commands 2 | 3 | import "github.com/docker/machine/libmachine" 4 | 5 | func cmdProvision(c CommandLine, api libmachine.API) error { 6 | return runAction("provision", c, api) 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/commands/regeneratecerts.go: -------------------------------------------------------------------------------- 1 | package commands 2 | 3 | import ( 4 | "github.com/docker/machine/libmachine" 5 | "github.com/docker/machine/libmachine/log" 6 | ) 7 | 8 | func cmdRegenerateCerts(c CommandLine, api libmachine.API) error { 9 | if !c.Bool("force") { 10 | ok, err := confirmInput("Regenerate TLS machine certs? Warning: this is irreversible.") 11 | if err != nil { 12 | return err 13 | } 14 | 15 | if !ok { 16 | return nil 17 | } 18 | } 19 | 20 | log.Infof("Regenerating TLS certificates") 21 | 22 | return runAction("configureAuth", c, api) 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/commands/restart.go: -------------------------------------------------------------------------------- 1 | package commands 2 | 3 | import ( 4 | "github.com/docker/machine/libmachine" 5 | "github.com/docker/machine/libmachine/log" 6 | ) 7 | 8 | func cmdRestart(c CommandLine, api libmachine.API) error { 9 | if err := runAction("restart", c, api); err != nil { 10 | return err 11 | } 12 | 13 | log.Info("Restarted machines may have new IP addresses. You may need to re-run the `docker-machine env` command.") 14 | 15 | return nil 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/commands/start.go: -------------------------------------------------------------------------------- 1 | package commands 2 | 3 | import ( 4 | "github.com/docker/machine/libmachine" 5 | "github.com/docker/machine/libmachine/log" 6 | ) 7 | 8 | func cmdStart(c CommandLine, api libmachine.API) error { 9 | if err := runAction("start", c, api); err != nil { 10 | return err 11 | } 12 | 13 | log.Info("Started machines may have new IP addresses. You may need to re-run the `docker-machine env` command.") 14 | 15 | return nil 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/commands/status.go: -------------------------------------------------------------------------------- 1 | package commands 2 | 3 | import ( 4 | "github.com/docker/machine/libmachine" 5 | "github.com/docker/machine/libmachine/log" 6 | ) 7 | 8 | func cmdStatus(c CommandLine, api libmachine.API) error { 9 | if len(c.Args()) > 1 { 10 | return ErrExpectedOneMachine 11 | } 12 | 13 | target, err := targetHost(c, api) 14 | if err != nil { 15 | return err 16 | } 17 | 18 | host, err := api.Load(target) 19 | if err != nil { 20 | return err 21 | } 22 | 23 | currentState, err := host.Driver.GetState() 24 | if err != nil { 25 | log.Errorf("error getting state for host %s: %s", host.Name, err) 26 | } 27 | 28 | log.Info(currentState) 29 | 30 | return nil 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/commands/stop.go: -------------------------------------------------------------------------------- 1 | package commands 2 | 3 | import "github.com/docker/machine/libmachine" 4 | 5 | func cmdStop(c CommandLine, api libmachine.API) error { 6 | return runAction("stop", c, api) 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/commands/upgrade.go: -------------------------------------------------------------------------------- 1 | package commands 2 | 3 | import "github.com/docker/machine/libmachine" 4 | 5 | func cmdUpgrade(c CommandLine, api libmachine.API) error { 6 | return runAction("upgrade", c, api) 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/commands/url.go: -------------------------------------------------------------------------------- 1 | package commands 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/docker/machine/libmachine" 7 | ) 8 | 9 | func cmdURL(c CommandLine, api libmachine.API) error { 10 | if len(c.Args()) > 1 { 11 | return ErrExpectedOneMachine 12 | } 13 | 14 | target, err := targetHost(c, api) 15 | if err != nil { 16 | return err 17 | } 18 | 19 | host, err := api.Load(target) 20 | if err != nil { 21 | return err 22 | } 23 | 24 | url, err := host.URL() 25 | if err != nil { 26 | return err 27 | } 28 | 29 | fmt.Println(url) 30 | 31 | return nil 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/commands/version.go: -------------------------------------------------------------------------------- 1 | package commands 2 | 3 | import ( 4 | "fmt" 5 | 6 | "io" 7 | "os" 8 | 9 | "github.com/docker/machine/libmachine" 10 | "github.com/docker/machine/libmachine/mcndockerclient" 11 | ) 12 | 13 | func cmdVersion(c CommandLine, api libmachine.API) error { 14 | return printVersion(c, api, os.Stdout) 15 | } 16 | 17 | func printVersion(c CommandLine, api libmachine.API, out io.Writer) error { 18 | if len(c.Args()) == 0 { 19 | c.ShowVersion() 20 | return nil 21 | } 22 | 23 | if len(c.Args()) != 1 { 24 | return ErrExpectedOneMachine 25 | } 26 | 27 | host, err := api.Load(c.Args().First()) 28 | if err != nil { 29 | return err 30 | } 31 | 32 | version, err := mcndockerclient.DockerVersion(host) 33 | if err != nil { 34 | return err 35 | } 36 | 37 | fmt.Fprintln(out, version) 38 | 39 | return nil 40 | } 41 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/contrib/completion/.gitignore: -------------------------------------------------------------------------------- 1 | !docker-machine* 2 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/doc.go: -------------------------------------------------------------------------------- 1 | // Package machine defines interfaces to manage a variety of docker instances 2 | // deployed on different backends (VMs, baremetal). 3 | // The goal is to allow users get from zero to docker as fast as possible. 4 | package machine 5 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/docs/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM docs/base:oss 2 | MAINTAINER Docker Docs 3 | 4 | env PROJECT=machine 5 | 6 | # To get the git info for this repo 7 | COPY . /src 8 | RUN rm -rf /docs/content/$PROJECT/ 9 | COPY . /docs/content/$PROJECT/ 10 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/docs/drivers/index.md: -------------------------------------------------------------------------------- 1 | 12 | 13 | # Supported Drivers 14 | 15 | - [Amazon Web Services](aws.md) 16 | - [Microsoft Azure](azure.md) 17 | - [Digital Ocean](digital-ocean.md) 18 | - [Exoscale](exoscale.md) 19 | - [Google Compute Engine](gce.md) 20 | - [Generic](generic.md) 21 | - [Microsoft Hyper-V](hyper-v.md) 22 | - [OpenStack](openstack.md) 23 | - [Rackspace](rackspace.md) 24 | - [IBM Softlayer](soft-layer.md) 25 | - [Oracle VirtualBox](virtualbox.md) 26 | - [VMware vCloud Air](vm-cloud.md) 27 | - [VMware Fusion](vm-fusion.md) 28 | - [VMware vSphere](vsphere.md) 29 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/docs/examples/index.md: -------------------------------------------------------------------------------- 1 | 12 | 13 | 14 | # Learn by example 15 | 16 | - [Digital Ocean Example](ocean.md) 17 | - [AWS Example](aws.md) 18 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/docs/img/aws-instance-east.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/oneview-golang/42c53f64342ba25520c347ab189a00852dc9aef9/vendor/github.com/docker/machine/docs/img/aws-instance-east.png -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/docs/img/aws-instance-west.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/oneview-golang/42c53f64342ba25520c347ab189a00852dc9aef9/vendor/github.com/docker/machine/docs/img/aws-instance-west.png -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/docs/img/coverage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/oneview-golang/42c53f64342ba25520c347ab189a00852dc9aef9/vendor/github.com/docker/machine/docs/img/coverage.png -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/docs/img/docker-engine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/oneview-golang/42c53f64342ba25520c347ab189a00852dc9aef9/vendor/github.com/docker/machine/docs/img/docker-engine.png -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/docs/img/engine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/oneview-golang/42c53f64342ba25520c347ab189a00852dc9aef9/vendor/github.com/docker/machine/docs/img/engine.png -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/docs/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/oneview-golang/42c53f64342ba25520c347ab189a00852dc9aef9/vendor/github.com/docker/machine/docs/img/logo.png -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/docs/img/machine-mac-win.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/oneview-golang/42c53f64342ba25520c347ab189a00852dc9aef9/vendor/github.com/docker/machine/docs/img/machine-mac-win.png -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/docs/img/machine.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/oneview-golang/42c53f64342ba25520c347ab189a00852dc9aef9/vendor/github.com/docker/machine/docs/img/machine.png -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/docs/img/nginx-webserver.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/oneview-golang/42c53f64342ba25520c347ab189a00852dc9aef9/vendor/github.com/docker/machine/docs/img/nginx-webserver.png -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/docs/img/ocean_click_api.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/oneview-golang/42c53f64342ba25520c347ab189a00852dc9aef9/vendor/github.com/docker/machine/docs/img/ocean_click_api.png -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/docs/img/ocean_droplet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/oneview-golang/42c53f64342ba25520c347ab189a00852dc9aef9/vendor/github.com/docker/machine/docs/img/ocean_droplet.png -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/docs/img/ocean_gen_token.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/oneview-golang/42c53f64342ba25520c347ab189a00852dc9aef9/vendor/github.com/docker/machine/docs/img/ocean_gen_token.png -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/docs/img/ocean_save_token.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/oneview-golang/42c53f64342ba25520c347ab189a00852dc9aef9/vendor/github.com/docker/machine/docs/img/ocean_save_token.png -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/docs/img/ocean_token_create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/oneview-golang/42c53f64342ba25520c347ab189a00852dc9aef9/vendor/github.com/docker/machine/docs/img/ocean_token_create.png -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/docs/img/provision-use-case.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HewlettPackard/oneview-golang/42c53f64342ba25520c347ab189a00852dc9aef9/vendor/github.com/docker/machine/docs/img/provision-use-case.png -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/docs/index.md: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | # Docker Machine 13 | 14 | - [Docker Machine overview](overview.md) 15 | - [Install Docker Machine](install-machine.md) 16 | - Install a machine on your [local system using VirtualBox](get-started.md) 17 | - Install multiple machines [on your cloud provider](get-started-cloud.md) 18 | - [Digital Ocean Example](examples/ocean.md) 19 | - [AWS Example](examples/aws.md) 20 | - [Machine concepts and help](concepts.md) 21 | - [Migrate from Boot2Docker to Docker Machine](migrate-to-machine.md) 22 | - [Docker Machine driver reference](drivers/index.md) 23 | - [Docker Machine subcommand reference](reference/index.md) 24 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/docs/reference/active.md: -------------------------------------------------------------------------------- 1 | 10 | 11 | # active 12 | 13 | See which machine is "active" (a machine is considered active if the 14 | `DOCKER_HOST` environment variable points to it). 15 | 16 | $ docker-machine ls 17 | NAME ACTIVE DRIVER STATE URL 18 | dev - virtualbox Running tcp://192.168.99.103:2376 19 | staging * digitalocean Running tcp://203.0.113.81:2376 20 | $ echo $DOCKER_HOST 21 | tcp://203.0.113.81:2376 22 | $ docker-machine active 23 | staging 24 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/docs/reference/config.md: -------------------------------------------------------------------------------- 1 | 10 | 11 | # config 12 | 13 | Usage: docker-machine config [OPTIONS] [arg...] 14 | 15 | Print the connection config for machine 16 | 17 | Description: 18 | Argument is a machine name. 19 | 20 | Options: 21 | 22 | --swarm Display the Swarm config instead of the Docker daemon 23 | 24 | 25 | For example: 26 | 27 | $ docker-machine config dev 28 | --tlsverify 29 | --tlscacert="/Users/ehazlett/.docker/machines/dev/ca.pem" 30 | --tlscert="/Users/ehazlett/.docker/machines/dev/cert.pem" 31 | --tlskey="/Users/ehazlett/.docker/machines/dev/key.pem" 32 | -H tcp://192.168.99.103:2376 33 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/docs/reference/help.md: -------------------------------------------------------------------------------- 1 | 10 | 11 | # help 12 | 13 | Usage: docker-machine help [arg...] 14 | 15 | Shows a list of commands or help for one command 16 | 17 | Usage: docker-machine help _subcommand_ 18 | 19 | For example: 20 | 21 | $ docker-machine help config 22 | Usage: docker-machine config [OPTIONS] [arg...] 23 | 24 | Print the connection config for machine 25 | 26 | Description: 27 | Argument is a machine name. 28 | 29 | Options: 30 | 31 | --swarm Display the Swarm config instead of the Docker daemon 32 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/docs/reference/index.md: -------------------------------------------------------------------------------- 1 | 12 | 13 | # Docker Machine command line reference 14 | 15 | - [active](active.md) 16 | - [config](config.md) 17 | - [create](create.md) 18 | - [env](env.md) 19 | - [help](help.md) 20 | - [inspect](inspect.md) 21 | - [ip](ip.md) 22 | - [kill](kill.md) 23 | - [ls](ls.md) 24 | - [regenerate-certs](regenerate-certs.md) 25 | - [restart](restart.md) 26 | - [rm](rm.md) 27 | - [scp](scp.md) 28 | - [ssh](ssh.md) 29 | - [start](start.md) 30 | - [status](status.md) 31 | - [stop](stop.md) 32 | - [upgrade](upgrade.md) 33 | - [url](url.md) 34 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/docs/reference/ip.md: -------------------------------------------------------------------------------- 1 | 10 | 11 | # ip 12 | 13 | Get the IP address of one or more machines. 14 | 15 | $ docker-machine ip dev 16 | 192.168.99.104 17 | $ docker-machine ip dev dev2 18 | 192.168.99.104 19 | 192.168.99.105 20 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/docs/reference/kill.md: -------------------------------------------------------------------------------- 1 | 11 | 12 | # kill 13 | 14 | Usage: docker-machine kill [arg...] 15 | 16 | Kill (abruptly force stop) a machine 17 | 18 | Description: 19 | Argument(s) are one or more machine names. 20 | 21 | For example: 22 | 23 | $ docker-machine ls 24 | NAME ACTIVE DRIVER STATE URL 25 | dev * virtualbox Running tcp://192.168.99.104:2376 26 | $ docker-machine kill dev 27 | $ docker-machine ls 28 | NAME ACTIVE DRIVER STATE URL 29 | dev * virtualbox Stopped 30 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/docs/reference/regenerate-certs.md: -------------------------------------------------------------------------------- 1 | 10 | 11 | # regenerate-certs 12 | 13 | Usage: docker-machine regenerate-certs [OPTIONS] [arg...] 14 | 15 | Regenerate TLS Certificates for a machine 16 | 17 | Description: 18 | Argument(s) are one or more machine names. 19 | 20 | Options: 21 | 22 | --force, -f Force rebuild and do not prompt 23 | 24 | Regenerate TLS certificates and update the machine with new certs. 25 | 26 | For example: 27 | 28 | $ docker-machine regenerate-certs dev 29 | Regenerate TLS machine certs? Warning: this is irreversible. (y/n): y 30 | Regenerating TLS certificates 31 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/docs/reference/restart.md: -------------------------------------------------------------------------------- 1 | 11 | 12 | # restart 13 | 14 | Usage: docker-machine restart [arg...] 15 | 16 | Restart a machine 17 | 18 | Description: 19 | Argument(s) are one or more machine names. 20 | 21 | Restart a machine. Oftentimes this is equivalent to 22 | `docker-machine stop; docker-machine start`. But some cloud driver try to implement a clever restart which keeps the same 23 | ip address. 24 | 25 | $ docker-machine restart dev 26 | Waiting for VM to start... 27 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/docs/reference/start.md: -------------------------------------------------------------------------------- 1 | 11 | 12 | # start 13 | 14 | Usage: docker-machine start [arg...] 15 | 16 | Start a machine 17 | 18 | Description: 19 | Argument(s) are one or more machine names. 20 | 21 | For example: 22 | 23 | $ docker-machine start dev 24 | Starting VM... 25 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/docs/reference/status.md: -------------------------------------------------------------------------------- 1 | 10 | 11 | # status 12 | 13 | Usage: docker-machine status [arg...] 14 | 15 | Get the status of a machine 16 | 17 | Description: 18 | Argument is a machine name. 19 | 20 | For example: 21 | 22 | $ docker-machine status dev 23 | Running 24 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/docs/reference/stop.md: -------------------------------------------------------------------------------- 1 | 11 | 12 | # stop 13 | 14 | Usage: docker-machine stop [arg...] 15 | 16 | Gracefully Stop a machine 17 | 18 | Description: 19 | Argument(s) are one or more machine names. 20 | 21 | For example: 22 | 23 | $ docker-machine ls 24 | NAME ACTIVE DRIVER STATE URL 25 | dev * virtualbox Running tcp://192.168.99.104:2376 26 | $ docker-machine stop dev 27 | $ docker-machine ls 28 | NAME ACTIVE DRIVER STATE URL 29 | dev * virtualbox Stopped 30 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/docs/reference/url.md: -------------------------------------------------------------------------------- 1 | 10 | 11 | # url 12 | 13 | Get the URL of a host 14 | 15 | $ docker-machine url dev 16 | tcp://192.168.99.109:2376 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/drivers/amazonec2/awscredentials.go: -------------------------------------------------------------------------------- 1 | package amazonec2 2 | 3 | import "github.com/aws/aws-sdk-go/aws/credentials" 4 | 5 | type awsCredentials interface { 6 | NewStaticCredentials(id, secret, token string) *credentials.Credentials 7 | 8 | NewSharedCredentials(filename, profile string) *credentials.Credentials 9 | } 10 | 11 | type defaultAWSCredentials struct{} 12 | 13 | func (c *defaultAWSCredentials) NewStaticCredentials(id, secret, token string) *credentials.Credentials { 14 | return credentials.NewStaticCredentials(id, secret, token) 15 | } 16 | 17 | func (c *defaultAWSCredentials) NewSharedCredentials(filename, profile string) *credentials.Credentials { 18 | return credentials.NewSharedCredentials(filename, profile) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/drivers/amazonec2/logger.go: -------------------------------------------------------------------------------- 1 | package amazonec2 2 | 3 | import ( 4 | "github.com/aws/aws-sdk-go/aws" 5 | "log" 6 | "os" 7 | ) 8 | 9 | type awslogger struct { 10 | logger *log.Logger 11 | } 12 | 13 | func AwsLogger() aws.Logger { 14 | return &awslogger{ 15 | logger: log.New(os.Stderr, "", log.LstdFlags), 16 | } 17 | } 18 | 19 | func (l awslogger) Log(args ...interface{}) { 20 | l.logger.Println(args...) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/drivers/azure/azureutil/authorizer.go: -------------------------------------------------------------------------------- 1 | package azureutil 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/Azure/go-autorest/autorest" 7 | ) 8 | 9 | // accessToken is interim autorest.Authorizer until we figure out oauth token 10 | // handling. It holds the access token. 11 | type accessToken string 12 | 13 | func (a accessToken) WithAuthorization() autorest.PrepareDecorator { 14 | return autorest.WithHeader("Authorization", fmt.Sprintf("Bearer %s", string(a))) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/drivers/azure/azureutil/context.go: -------------------------------------------------------------------------------- 1 | package azureutil 2 | 3 | import ( 4 | "github.com/Azure/azure-sdk-for-go/arm/network" 5 | "github.com/Azure/azure-sdk-for-go/arm/storage" 6 | ) 7 | 8 | // DeploymentContext contains references to various sources created and then 9 | // used in creating other resources. 10 | type DeploymentContext struct { 11 | VirtualNetworkExists bool 12 | StorageAccount *storage.AccountProperties 13 | PublicIPAddressID string 14 | NetworkSecurityGroupID string 15 | SubnetID string 16 | NetworkInterfaceID string 17 | SSHPublicKey string 18 | AvailabilitySetID string 19 | FirewallRules *[]network.SecurityRule 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/drivers/azure/azureutil/naming.go: -------------------------------------------------------------------------------- 1 | package azureutil 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | const ( 8 | fmtNIC = "%s-nic" 9 | fmtIP = "%s-ip" 10 | fmtNSG = "%s-firewall" 11 | fmtVM = "%s" 12 | ) 13 | 14 | // ResourceNaming provides methods to construct Azure resource names for a given 15 | // machine name. 16 | type ResourceNaming string 17 | 18 | func (r ResourceNaming) IP() string { return fmt.Sprintf(fmtIP, r) } 19 | func (r ResourceNaming) NIC() string { return fmt.Sprintf(fmtNIC, r) } 20 | func (r ResourceNaming) NSG() string { return fmt.Sprintf(fmtNSG, r) } 21 | func (r ResourceNaming) VM() string { return fmt.Sprintf(fmtVM, r) } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/drivers/azure/logutil/logfields.go: -------------------------------------------------------------------------------- 1 | package logutil 2 | 3 | import "fmt" 4 | 5 | type Fields map[string]interface{} 6 | 7 | func (f Fields) String() string { 8 | var s string 9 | for k, v := range f { 10 | if sv, ok := v.(string); ok { 11 | v = fmt.Sprintf("%q", sv) 12 | } 13 | s += fmt.Sprintf(" %s=%v", k, v) 14 | } 15 | return s 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/drivers/exoscale/exoscale_test.go: -------------------------------------------------------------------------------- 1 | package exoscale 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/docker/machine/libmachine/drivers" 7 | "github.com/stretchr/testify/assert" 8 | ) 9 | 10 | func TestSetConfigFromFlags(t *testing.T) { 11 | driver := NewDriver("default", "path") 12 | 13 | checkFlags := &drivers.CheckDriverOptions{ 14 | FlagsValues: map[string]interface{}{ 15 | "exoscale-api-key": "API_KEY", 16 | "exoscale-api-secret-key": "API_SECRET_KEY", 17 | }, 18 | CreateFlags: driver.GetCreateFlags(), 19 | } 20 | 21 | err := driver.SetConfigFromFlags(checkFlags) 22 | 23 | assert.NoError(t, err) 24 | assert.Empty(t, checkFlags.InvalidFlags) 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/drivers/generic/generic_test.go: -------------------------------------------------------------------------------- 1 | package generic 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/docker/machine/libmachine/drivers" 7 | "github.com/stretchr/testify/assert" 8 | ) 9 | 10 | func TestSetConfigFromFlags(t *testing.T) { 11 | driver := NewDriver("default", "path") 12 | 13 | checkFlags := &drivers.CheckDriverOptions{ 14 | FlagsValues: map[string]interface{}{ 15 | "generic-engine-port": "3000", 16 | "generic-ip-address": "localhost", 17 | "generic-ssh-key": "path", 18 | }, 19 | CreateFlags: driver.GetCreateFlags(), 20 | } 21 | 22 | err := driver.SetConfigFromFlags(checkFlags) 23 | 24 | assert.NoError(t, err) 25 | assert.Empty(t, checkFlags.InvalidFlags) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/drivers/google/google_test.go: -------------------------------------------------------------------------------- 1 | package google 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/docker/machine/libmachine/drivers" 7 | "github.com/stretchr/testify/assert" 8 | ) 9 | 10 | func TestSetConfigFromFlags(t *testing.T) { 11 | driver := NewDriver("", "") 12 | 13 | checkFlags := &drivers.CheckDriverOptions{ 14 | FlagsValues: map[string]interface{}{ 15 | "google-project": "PROJECT", 16 | }, 17 | CreateFlags: driver.GetCreateFlags(), 18 | } 19 | 20 | err := driver.SetConfigFromFlags(checkFlags) 21 | 22 | assert.NoError(t, err) 23 | assert.Empty(t, checkFlags.InvalidFlags) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/drivers/openstack/openstack_test.go: -------------------------------------------------------------------------------- 1 | package openstack 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/docker/machine/libmachine/drivers" 7 | "github.com/stretchr/testify/assert" 8 | ) 9 | 10 | func TestSetConfigFromFlags(t *testing.T) { 11 | driver := NewDriver("default", "path") 12 | 13 | checkFlags := &drivers.CheckDriverOptions{ 14 | FlagsValues: map[string]interface{}{ 15 | "openstack-auth-url": "http://url", 16 | "openstack-username": "user", 17 | "openstack-password": "pwd", 18 | "openstack-tenant-id": "ID", 19 | "openstack-flavor-id": "ID", 20 | "openstack-image-id": "ID", 21 | }, 22 | CreateFlags: driver.GetCreateFlags(), 23 | } 24 | 25 | err := driver.SetConfigFromFlags(checkFlags) 26 | 27 | assert.NoError(t, err) 28 | assert.Empty(t, checkFlags.InvalidFlags) 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/drivers/rackspace/rackspace_test.go: -------------------------------------------------------------------------------- 1 | package rackspace 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/docker/machine/libmachine/drivers" 7 | "github.com/stretchr/testify/assert" 8 | ) 9 | 10 | func TestSetConfigFromFlags(t *testing.T) { 11 | driver := NewDriver("default", "path") 12 | 13 | checkFlags := &drivers.CheckDriverOptions{ 14 | FlagsValues: map[string]interface{}{ 15 | "rackspace-region": "REGION", 16 | "rackspace-username": "user", 17 | "rackspace-api-key": "KEY", 18 | "rackspace-endpoint-type": "publicURL", 19 | }, 20 | CreateFlags: driver.GetCreateFlags(), 21 | } 22 | 23 | err := driver.SetConfigFromFlags(checkFlags) 24 | 25 | assert.NoError(t, err) 26 | assert.Empty(t, checkFlags.InvalidFlags) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/drivers/virtualbox/ip.go: -------------------------------------------------------------------------------- 1 | package virtualbox 2 | 3 | import ( 4 | "time" 5 | 6 | "github.com/docker/machine/libmachine/drivers" 7 | "github.com/docker/machine/libmachine/mcnutils" 8 | ) 9 | 10 | // IPWaiter waits for an IP to be configured. 11 | type IPWaiter interface { 12 | Wait(d *Driver) error 13 | } 14 | 15 | func NewIPWaiter() IPWaiter { 16 | return &sshIPWaiter{} 17 | } 18 | 19 | type sshIPWaiter struct{} 20 | 21 | func (w *sshIPWaiter) Wait(d *Driver) error { 22 | // Wait for SSH over NAT to be available before returning to user 23 | if err := drivers.WaitForSSH(d); err != nil { 24 | return err 25 | } 26 | 27 | // Bail if we don't get an IP from DHCP after a given number of seconds. 28 | if err := mcnutils.WaitForSpecific(d.hostOnlyIPAvailable, 5, 4*time.Second); err != nil { 29 | return err 30 | } 31 | 32 | var err error 33 | d.IPAddress, err = d.GetIP() 34 | 35 | return err 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/drivers/virtualbox/virtualbox_darwin_test.go: -------------------------------------------------------------------------------- 1 | package virtualbox 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/stretchr/testify/assert" 7 | ) 8 | 9 | const ( 10 | featuresWithVMX = "FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 VMX PBE SSE3 PCLMULQDQ DTES64 AVX1.0 RDRAND F16C" 11 | featuresNoVMX = "FPU VME DE PSE TSC MSR PAE MCE CX8 APIC SEP MTRR PGE MCA CMOV PAT PSE36 PBE SSE3 PCLMULQDQ DTES64 AVX1.0 RDRAND F16C" 12 | ) 13 | 14 | func TestShareName(t *testing.T) { 15 | name, dir := getShareDriveAndName() 16 | 17 | assert.Equal(t, name, "Users") 18 | assert.Equal(t, dir, "/Users") 19 | 20 | } 21 | 22 | func TestIsVTXEnabled(t *testing.T) { 23 | assert.False(t, isVTXDisabled(featuresWithVMX)) 24 | assert.True(t, isVTXDisabled(featuresNoVMX)) 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/drivers/virtualbox/vm.go: -------------------------------------------------------------------------------- 1 | package virtualbox 2 | 3 | import "strconv" 4 | 5 | type VM struct { 6 | CPUs int 7 | Memory int 8 | } 9 | 10 | func getVMInfo(name string, vbox VBoxManager) (*VM, error) { 11 | out, err := vbox.vbmOut("showvminfo", name, "--machinereadable") 12 | if err != nil { 13 | return nil, err 14 | } 15 | 16 | vm := &VM{} 17 | 18 | err = parseKeyValues(out, reEqualLine, func(key, val string) error { 19 | switch key { 20 | case "cpus": 21 | v, err := strconv.Atoi(val) 22 | if err != nil { 23 | return err 24 | } 25 | vm.CPUs = v 26 | case "memory": 27 | v, err := strconv.Atoi(val) 28 | if err != nil { 29 | return err 30 | } 31 | vm.Memory = v 32 | } 33 | 34 | return nil 35 | }) 36 | if err != nil { 37 | return nil, err 38 | } 39 | 40 | return vm, nil 41 | } 42 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/drivers/virtualbox/vtx.go: -------------------------------------------------------------------------------- 1 | package virtualbox 2 | 3 | import "strings" 4 | 5 | // IsVTXDisabledInTheVM checks if VT-X is disabled in the started vm. 6 | func (d *Driver) IsVTXDisabledInTheVM() (bool, error) { 7 | lines, err := d.readVBoxLog() 8 | if err != nil { 9 | return true, err 10 | } 11 | 12 | for _, line := range lines { 13 | if strings.Contains(line, "VT-x is disabled") && !strings.Contains(line, "Falling back to raw-mode: VT-x is disabled in the BIOS for all CPU modes") { 14 | return true, nil 15 | } 16 | if strings.Contains(line, "the host CPU does NOT support HW virtualization") { 17 | return true, nil 18 | } 19 | if strings.Contains(line, "VERR_VMX_UNABLE_TO_START_VM") { 20 | return true, nil 21 | } 22 | if strings.Contains(line, "Power up failed") && strings.Contains(line, "VERR_VMX_NO_VMX") { 23 | return true, nil 24 | } 25 | } 26 | 27 | return false, nil 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/drivers/vmwarefusion/fusion.go: -------------------------------------------------------------------------------- 1 | // +build !darwin 2 | 3 | package vmwarefusion 4 | 5 | import "github.com/docker/machine/libmachine/drivers" 6 | 7 | func NewDriver(hostName, storePath string) drivers.Driver { 8 | return drivers.NewDriverNotSupported("vmwarefusion", hostName, storePath) 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/drivers/vmwarefusion/fusion_darwin_test.go: -------------------------------------------------------------------------------- 1 | package vmwarefusion 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/docker/machine/libmachine/drivers" 7 | "github.com/stretchr/testify/assert" 8 | ) 9 | 10 | func TestSetConfigFromFlags(t *testing.T) { 11 | driver := NewDriver("default", "path") 12 | 13 | checkFlags := &drivers.CheckDriverOptions{ 14 | FlagsValues: map[string]interface{}{}, 15 | CreateFlags: driver.GetCreateFlags(), 16 | } 17 | 18 | err := driver.SetConfigFromFlags(checkFlags) 19 | 20 | assert.NoError(t, err) 21 | assert.Empty(t, checkFlags.InvalidFlags) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/drivers/vmwarevcloudair/vcloudlair_test.go: -------------------------------------------------------------------------------- 1 | package vmwarevcloudair 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/docker/machine/libmachine/drivers" 7 | "github.com/stretchr/testify/assert" 8 | ) 9 | 10 | func TestSetConfigFromFlags(t *testing.T) { 11 | driver := NewDriver("default", "path") 12 | 13 | checkFlags := &drivers.CheckDriverOptions{ 14 | FlagsValues: map[string]interface{}{ 15 | "vmwarevcloudair-username": "root", 16 | "vmwarevcloudair-password": "pwd", 17 | "vmwarevcloudair-vdcid": "ID", 18 | "vmwarevcloudair-publicip": "IP", 19 | }, 20 | CreateFlags: driver.GetCreateFlags(), 21 | } 22 | 23 | err := driver.SetConfigFromFlags(checkFlags) 24 | 25 | assert.NoError(t, err) 26 | assert.Empty(t, checkFlags.InvalidFlags) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/drivers/vmwarevsphere/vsphere_test.go: -------------------------------------------------------------------------------- 1 | package vmwarevsphere 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/docker/machine/libmachine/drivers" 7 | "github.com/stretchr/testify/assert" 8 | ) 9 | 10 | func TestSetConfigFromFlags(t *testing.T) { 11 | driver := NewDriver("default", "path") 12 | 13 | checkFlags := &drivers.CheckDriverOptions{ 14 | FlagsValues: map[string]interface{}{}, 15 | CreateFlags: driver.GetCreateFlags(), 16 | } 17 | 18 | err := driver.SetConfigFromFlags(checkFlags) 19 | 20 | assert.NoError(t, err) 21 | assert.Empty(t, checkFlags.InvalidFlags) 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/its/cli/driver_help_test.go: -------------------------------------------------------------------------------- 1 | package cli 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/docker/machine/its" 7 | ) 8 | 9 | func TestDriverHelp(t *testing.T) { 10 | test := its.NewTest(t) 11 | defer test.TearDown() 12 | 13 | test.SkipDriver("ci-test") 14 | 15 | test.Run("no --help flag or command specified", func() { 16 | test.Machine("create -d $DRIVER").Should().Fail("Error: No machine name specified") 17 | }) 18 | 19 | test.Run("-h flag specified", func() { 20 | test.Machine("create -d $DRIVER -h").Should().Succeed(test.DriverName()) 21 | }) 22 | 23 | test.Run("--help flag specified", func() { 24 | test.Machine("create -d $DRIVER --help").Should().Succeed(test.DriverName()) 25 | }) 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/its/cli/inspect_test.go: -------------------------------------------------------------------------------- 1 | package cli 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/docker/machine/its" 7 | ) 8 | 9 | func TestInspect(t *testing.T) { 10 | test := its.NewTest(t) 11 | defer test.TearDown() 12 | 13 | test.Run("inspect: show error in case of no args", func() { 14 | test.Machine("inspect").Should().Fail(`Error: No machine name(s) specified and no "default" machine exists.`) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/its/cli/status_test.go: -------------------------------------------------------------------------------- 1 | package cli 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/docker/machine/its" 7 | ) 8 | 9 | func TestStatus(t *testing.T) { 10 | test := its.NewTest(t) 11 | defer test.TearDown() 12 | 13 | test.Run("status: show error in case of no args", func() { 14 | test.Machine("status").Should().Fail(`Error: No machine name(s) specified and no "default" machine exists.`) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/its/cli/url_test.go: -------------------------------------------------------------------------------- 1 | package cli 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/docker/machine/its" 7 | ) 8 | 9 | func TestUrl(t *testing.T) { 10 | test := its.NewTest(t) 11 | defer test.TearDown() 12 | 13 | test.Run("url: show error in case of no args", func() { 14 | test.Machine("url").Should().Fail(`Error: No machine name(s) specified and no "default" machine exists.`) 15 | }) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/its/thirdparty/commands_test.go: -------------------------------------------------------------------------------- 1 | package thirdparty 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/docker/machine/its" 7 | ) 8 | 9 | func TestThirdPartyCompatibility(t *testing.T) { 10 | test := its.NewTest(t) 11 | defer test.TearDown() 12 | 13 | test.RequireDriver("ci-test") 14 | 15 | test.Run("create", func() { 16 | test.Machine("create -d $DRIVER --url url default").Should().Succeed() 17 | }) 18 | 19 | test.Run("ls", func() { 20 | test.Machine("ls -q").Should().Succeed().ContainLines(1).EqualLine(0, "default") 21 | }) 22 | 23 | test.Run("url", func() { 24 | test.Machine("url default").Should().Succeed("url") 25 | }) 26 | 27 | test.Run("status", func() { 28 | test.Machine("status default").Should().Succeed("Running") 29 | }) 30 | 31 | test.Run("rm", func() { 32 | test.Machine("rm -y default").Should().Succeed() 33 | }) 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/auth/auth.go: -------------------------------------------------------------------------------- 1 | package auth 2 | 3 | type Options struct { 4 | CertDir string 5 | CaCertPath string 6 | CaPrivateKeyPath string 7 | CaCertRemotePath string 8 | ServerCertPath string 9 | ServerKeyPath string 10 | ClientKeyPath string 11 | ServerCertRemotePath string 12 | ServerKeyRemotePath string 13 | ClientCertPath string 14 | ServerCertSANs []string 15 | // StorePath is left in for historical reasons, but not really meant to 16 | // be used directly. 17 | StorePath string 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/crashreport/crash_report_logger.go: -------------------------------------------------------------------------------- 1 | package crashreport 2 | 3 | import "github.com/docker/machine/libmachine/log" 4 | 5 | type logger struct{} 6 | 7 | func (d *logger) Printf(fmtString string, args ...interface{}) { 8 | log.Debugf(fmtString, args) 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/crashreport/os_darwin.go: -------------------------------------------------------------------------------- 1 | package crashreport 2 | 3 | import "os/exec" 4 | 5 | func localOSVersion() string { 6 | command := exec.Command("bash", "-c", `sw_vers | grep ProductVersion | cut -d$'\t' -f2`) 7 | output, err := command.Output() 8 | if err != nil { 9 | return "" 10 | } 11 | return string(output) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/crashreport/os_linux.go: -------------------------------------------------------------------------------- 1 | package crashreport 2 | 3 | import "os/exec" 4 | 5 | func localOSVersion() string { 6 | command := exec.Command("bash", "-c", `cat /etc/os-release | grep 'VERSION=' | cut -d'=' -f2`) 7 | output, err := command.Output() 8 | if err != nil { 9 | return "" 10 | } 11 | return string(output) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/engine/engine.go: -------------------------------------------------------------------------------- 1 | package engine 2 | 3 | const ( 4 | DefaultPort = 2376 5 | ) 6 | 7 | type Options struct { 8 | ArbitraryFlags []string 9 | DNS []string `json:"Dns"` 10 | GraphDir string 11 | Env []string 12 | Ipv6 bool 13 | InsecureRegistry []string 14 | Labels []string 15 | LogLevel string 16 | StorageDriver string 17 | SelinuxEnabled bool 18 | TLSVerify bool `json:"TlsVerify"` 19 | RegistryMirror []string 20 | InstallURL string 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/host/host_v0.go: -------------------------------------------------------------------------------- 1 | package host 2 | 3 | import "github.com/docker/machine/libmachine/drivers" 4 | 5 | type V0 struct { 6 | Name string `json:"-"` 7 | Driver drivers.Driver 8 | DriverName string 9 | ConfigVersion int 10 | HostOptions *Options 11 | 12 | StorePath string 13 | CaCertPath string 14 | PrivateKeyPath string 15 | ServerCertPath string 16 | ServerKeyPath string 17 | ClientCertPath string 18 | SwarmHost string 19 | SwarmMaster bool 20 | SwarmDiscovery string 21 | ClientKeyPath string 22 | } 23 | 24 | type MetadataV0 struct { 25 | HostOptions Options 26 | DriverName string 27 | 28 | ConfigVersion int 29 | StorePath string 30 | CaCertPath string 31 | PrivateKeyPath string 32 | ServerCertPath string 33 | ServerKeyPath string 34 | ClientCertPath string 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/host/host_v2.go: -------------------------------------------------------------------------------- 1 | package host 2 | 3 | import "github.com/docker/machine/libmachine/drivers" 4 | 5 | type V2 struct { 6 | ConfigVersion int 7 | Driver drivers.Driver 8 | DriverName string 9 | HostOptions *Options 10 | Name string 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/log/history_recorder.go: -------------------------------------------------------------------------------- 1 | package log 2 | 3 | import ( 4 | "fmt" 5 | "sync" 6 | ) 7 | 8 | type HistoryRecorder struct { 9 | lock *sync.Mutex 10 | records []string 11 | } 12 | 13 | func NewHistoryRecorder() *HistoryRecorder { 14 | return &HistoryRecorder{ 15 | lock: &sync.Mutex{}, 16 | records: []string{}, 17 | } 18 | } 19 | 20 | func (ml *HistoryRecorder) History() []string { 21 | return ml.records 22 | } 23 | 24 | func (ml *HistoryRecorder) Record(args ...interface{}) { 25 | ml.lock.Lock() 26 | defer ml.lock.Unlock() 27 | ml.records = append(ml.records, fmt.Sprint(args...)) 28 | } 29 | 30 | func (ml *HistoryRecorder) Recordf(fmtString string, args ...interface{}) { 31 | ml.lock.Lock() 32 | defer ml.lock.Unlock() 33 | ml.records = append(ml.records, fmt.Sprintf(fmtString, args...)) 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/log/history_recorder_test.go: -------------------------------------------------------------------------------- 1 | package log 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/stretchr/testify/assert" 7 | ) 8 | 9 | func TestRecording(t *testing.T) { 10 | recorder := NewHistoryRecorder() 11 | recorder.Record("foo") 12 | recorder.Record("bar") 13 | recorder.Record("qix") 14 | assert.Equal(t, recorder.History(), []string{"foo", "bar", "qix"}) 15 | } 16 | 17 | func TestFormattedRecording(t *testing.T) { 18 | recorder := NewHistoryRecorder() 19 | recorder.Recordf("%s, %s and %s", "foo", "bar", "qix") 20 | assert.Equal(t, recorder.History()[0], "foo, bar and qix") 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/log/machine_logger.go: -------------------------------------------------------------------------------- 1 | package log 2 | 3 | import "io" 4 | 5 | type MachineLogger interface { 6 | SetDebug(debug bool) 7 | 8 | SetOutWriter(io.Writer) 9 | SetErrWriter(io.Writer) 10 | 11 | Debug(args ...interface{}) 12 | Debugf(fmtString string, args ...interface{}) 13 | 14 | Error(args ...interface{}) 15 | Errorf(fmtString string, args ...interface{}) 16 | 17 | Info(args ...interface{}) 18 | Infof(fmtString string, args ...interface{}) 19 | 20 | Warn(args ...interface{}) 21 | Warnf(fmtString string, args ...interface{}) 22 | 23 | History() []string 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/mcndockerclient/docker_host.go: -------------------------------------------------------------------------------- 1 | package mcndockerclient 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/docker/machine/libmachine/auth" 7 | ) 8 | 9 | type URLer interface { 10 | // URL returns the Docker host URL 11 | URL() (string, error) 12 | } 13 | 14 | type AuthOptionser interface { 15 | // AuthOptions returns the authOptions 16 | AuthOptions() *auth.Options 17 | } 18 | 19 | type DockerHost interface { 20 | URLer 21 | AuthOptionser 22 | } 23 | 24 | type RemoteDocker struct { 25 | HostURL string 26 | AuthOption *auth.Options 27 | } 28 | 29 | // URL returns the Docker host URL 30 | func (rd *RemoteDocker) URL() (string, error) { 31 | if rd.HostURL == "" { 32 | return "", fmt.Errorf("Docker Host URL not set") 33 | } 34 | 35 | return rd.HostURL, nil 36 | } 37 | 38 | // AuthOptions returns the authOptions 39 | func (rd *RemoteDocker) AuthOptions() *auth.Options { 40 | return rd.AuthOption 41 | } 42 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/mcndockerclient/docker_versioner.go: -------------------------------------------------------------------------------- 1 | package mcndockerclient 2 | 3 | import "fmt" 4 | 5 | var CurrentDockerVersioner DockerVersioner = &defaultDockerVersioner{} 6 | 7 | type DockerVersioner interface { 8 | DockerVersion(host DockerHost) (string, error) 9 | } 10 | 11 | func DockerVersion(host DockerHost) (string, error) { 12 | return CurrentDockerVersioner.DockerVersion(host) 13 | } 14 | 15 | type defaultDockerVersioner struct{} 16 | 17 | func (dv *defaultDockerVersioner) DockerVersion(host DockerHost) (string, error) { 18 | client, err := DockerClient(host) 19 | if err != nil { 20 | return "", fmt.Errorf("Unable to query docker version: %s", err) 21 | } 22 | 23 | version, err := client.Version() 24 | if err != nil { 25 | return "", fmt.Errorf("Unable to query docker version: %s", err) 26 | } 27 | 28 | return version.Version, nil 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/mcndockerclient/fake_docker_versioner.go: -------------------------------------------------------------------------------- 1 | package mcndockerclient 2 | 3 | type FakeDockerVersioner struct { 4 | Version string 5 | Err error 6 | } 7 | 8 | func (dv *FakeDockerVersioner) DockerVersion(host DockerHost) (string, error) { 9 | if dv.Err != nil { 10 | return "", dv.Err 11 | } 12 | 13 | return dv.Version, nil 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/provider/provider.go: -------------------------------------------------------------------------------- 1 | package provider 2 | 3 | import "github.com/docker/machine/libmachine/host" 4 | 5 | type Provider interface { 6 | // IsValid checks whether or not the Provider can successfully create 7 | // machines. If the check does not pass, the provider is no good. 8 | IsValid() bool 9 | 10 | // Create calls out to the driver this provider is associated with, to 11 | // actually create the resource. 12 | Create() (host.Host, error) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/provision/arch_test.go: -------------------------------------------------------------------------------- 1 | package provision 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/docker/machine/drivers/fakedriver" 7 | "github.com/docker/machine/libmachine/auth" 8 | "github.com/docker/machine/libmachine/engine" 9 | "github.com/docker/machine/libmachine/provision/provisiontest" 10 | "github.com/docker/machine/libmachine/swarm" 11 | ) 12 | 13 | func TestArchDefaultStorageDriver(t *testing.T) { 14 | p := NewArchProvisioner(&fakedriver.Driver{}).(*ArchProvisioner) 15 | p.SSHCommander = provisiontest.NewFakeSSHCommander(provisiontest.FakeSSHCommanderOptions{}) 16 | p.Provision(swarm.Options{}, auth.Options{}, engine.Options{}) 17 | if p.EngineOptions.StorageDriver != "overlay" { 18 | t.Fatal("Default storage driver should be overlay") 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/provision/centos.go: -------------------------------------------------------------------------------- 1 | package provision 2 | 3 | import ( 4 | "github.com/docker/machine/libmachine/drivers" 5 | ) 6 | 7 | func init() { 8 | Register("Centos", &RegisteredProvisioner{ 9 | New: NewCentosProvisioner, 10 | }) 11 | } 12 | 13 | func NewCentosProvisioner(d drivers.Driver) Provisioner { 14 | return &CentosProvisioner{ 15 | NewRedHatProvisioner("centos", d), 16 | } 17 | } 18 | 19 | type CentosProvisioner struct { 20 | *RedHatProvisioner 21 | } 22 | 23 | func (provisioner *CentosProvisioner) String() string { 24 | return "centos" 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/provision/centos_test.go: -------------------------------------------------------------------------------- 1 | package provision 2 | 3 | import ( 4 | "regexp" 5 | "testing" 6 | ) 7 | 8 | func TestCentosGenerateYumRepoList(t *testing.T) { 9 | info := &OsRelease{ 10 | ID: "centos", 11 | } 12 | p := NewCentosProvisioner(nil) 13 | p.SetOsReleaseInfo(info) 14 | 15 | buf, err := generateYumRepoList(p) 16 | if err != nil { 17 | t.Fatal(err) 18 | } 19 | 20 | m, err := regexp.MatchString(".*centos/7.*", buf.String()) 21 | if err != nil { 22 | t.Fatal(err) 23 | } 24 | 25 | if !m { 26 | t.Fatalf("expected match for centos/7") 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/provision/debian_test.go: -------------------------------------------------------------------------------- 1 | package provision 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/docker/machine/drivers/fakedriver" 7 | "github.com/docker/machine/libmachine/auth" 8 | "github.com/docker/machine/libmachine/engine" 9 | "github.com/docker/machine/libmachine/provision/provisiontest" 10 | "github.com/docker/machine/libmachine/swarm" 11 | ) 12 | 13 | func TestDebianDefaultStorageDriver(t *testing.T) { 14 | p := NewDebianProvisioner(&fakedriver.Driver{}).(*DebianProvisioner) 15 | p.SSHCommander = provisiontest.NewFakeSSHCommander(provisiontest.FakeSSHCommanderOptions{}) 16 | p.Provision(swarm.Options{}, auth.Options{}, engine.Options{}) 17 | if p.EngineOptions.StorageDriver != "aufs" { 18 | t.Fatal("Default storage driver should be aufs") 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/provision/engine_config_context.go: -------------------------------------------------------------------------------- 1 | package provision 2 | 3 | import ( 4 | "github.com/docker/machine/libmachine/auth" 5 | "github.com/docker/machine/libmachine/engine" 6 | ) 7 | 8 | type EngineConfigContext struct { 9 | DockerPort int 10 | AuthOptions auth.Options 11 | EngineOptions engine.Options 12 | DockerOptionsDir string 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/provision/errors.go: -------------------------------------------------------------------------------- 1 | package provision 2 | 3 | import ( 4 | "errors" 5 | "fmt" 6 | ) 7 | 8 | var ( 9 | ErrDetectionFailed = errors.New("OS type not recognized") 10 | ) 11 | 12 | type ErrDaemonAvailable struct { 13 | wrappedErr error 14 | } 15 | 16 | func (e ErrDaemonAvailable) Error() string { 17 | return fmt.Sprintf("Unable to verify the Docker daemon is listening: %s", e.wrappedErr) 18 | } 19 | 20 | func NewErrDaemonAvailable(err error) ErrDaemonAvailable { 21 | return ErrDaemonAvailable{ 22 | wrappedErr: err, 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/provision/fedora.go: -------------------------------------------------------------------------------- 1 | package provision 2 | 3 | import ( 4 | "github.com/docker/machine/libmachine/drivers" 5 | ) 6 | 7 | func init() { 8 | Register("Fedora", &RegisteredProvisioner{ 9 | New: NewFedoraProvisioner, 10 | }) 11 | } 12 | 13 | func NewFedoraProvisioner(d drivers.Driver) Provisioner { 14 | return &FedoraProvisioner{ 15 | NewRedHatProvisioner("fedora", d), 16 | } 17 | } 18 | 19 | type FedoraProvisioner struct { 20 | *RedHatProvisioner 21 | } 22 | 23 | func (provisioner *FedoraProvisioner) String() string { 24 | return "fedora" 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/provision/fedora_test.go: -------------------------------------------------------------------------------- 1 | package provision 2 | 3 | import ( 4 | "regexp" 5 | "testing" 6 | ) 7 | 8 | func TestFedoraGenerateYumRepoList(t *testing.T) { 9 | info := &OsRelease{ 10 | ID: "fedora", 11 | } 12 | p := NewFedoraProvisioner(nil) 13 | p.SetOsReleaseInfo(info) 14 | 15 | buf, err := generateYumRepoList(p) 16 | if err != nil { 17 | t.Fatal(err) 18 | } 19 | 20 | m, err := regexp.MatchString(".*fedora/23.*", buf.String()) 21 | if err != nil { 22 | t.Fatal(err) 23 | } 24 | 25 | if !m { 26 | t.Fatalf("expected match for fedora/23") 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/provision/oraclelinux.go: -------------------------------------------------------------------------------- 1 | package provision 2 | 3 | import ( 4 | "github.com/docker/machine/libmachine/drivers" 5 | ) 6 | 7 | func init() { 8 | Register("OracleLinux", &RegisteredProvisioner{ 9 | New: NewOracleLinuxProvisioner, 10 | }) 11 | } 12 | 13 | func NewOracleLinuxProvisioner(d drivers.Driver) Provisioner { 14 | return &OracleLinuxProvisioner{ 15 | NewRedHatProvisioner("ol", d), 16 | } 17 | } 18 | 19 | type OracleLinuxProvisioner struct { 20 | *RedHatProvisioner 21 | } 22 | 23 | func (provisioner *OracleLinuxProvisioner) String() string { 24 | return "ol" 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/provision/oraclelinux_test.go: -------------------------------------------------------------------------------- 1 | package provision 2 | 3 | import ( 4 | "regexp" 5 | "testing" 6 | ) 7 | 8 | func TestOracleLinuxGenerateYumRepoList(t *testing.T) { 9 | info := &OsRelease{ 10 | ID: "ol", 11 | Version: "7.2", 12 | } 13 | p := NewOracleLinuxProvisioner(nil) 14 | p.SetOsReleaseInfo(info) 15 | 16 | buf, err := generateYumRepoList(p) 17 | if err != nil { 18 | t.Fatal(err) 19 | } 20 | 21 | m, err := regexp.MatchString(".*oraclelinux/7.*", buf.String()) 22 | if err != nil { 23 | t.Fatal(err) 24 | } 25 | 26 | if !m { 27 | t.Fatalf("expected match for oraclelinux/7") 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/provision/pkgaction/pkg_action.go: -------------------------------------------------------------------------------- 1 | package pkgaction 2 | 3 | type PackageAction int 4 | 5 | const ( 6 | Install PackageAction = iota 7 | Remove 8 | Upgrade 9 | ) 10 | 11 | var packageActions = []string{ 12 | "install", 13 | "remove", 14 | "upgrade", 15 | } 16 | 17 | func (s PackageAction) String() string { 18 | if int(s) >= 0 && int(s) < len(packageActions) { 19 | return packageActions[s] 20 | } 21 | 22 | return "" 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/provision/pkgaction/pkg_action_test.go: -------------------------------------------------------------------------------- 1 | package pkgaction 2 | 3 | import "testing" 4 | 5 | func TestActionValue(t *testing.T) { 6 | if Install.String() != "install" { 7 | t.Fatalf("Expected %q but got %q", "install", Install.String()) 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/provision/provisiontest/sshcommander_test.go: -------------------------------------------------------------------------------- 1 | package provisiontest 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/stretchr/testify/assert" 7 | ) 8 | 9 | func TestCreateFakeSSHCommander(t *testing.T) { 10 | sshCmder := NewFakeSSHCommander(FakeSSHCommanderOptions{FilesystemType: "btrfs"}) 11 | output, err := sshCmder.SSHCommand("stat -f -c %T /var/lib") 12 | if err != nil || output != "btrfs\n" { 13 | t.Fatal("FakeSSHCommander should have returned btrfs and no error but returned '", output, "' and error", err) 14 | } 15 | } 16 | 17 | func TestStatSSHCommand(t *testing.T) { 18 | sshCmder := FakeSSHCommander{ 19 | Responses: map[string]string{"sshcommand": "sshcommandresponse"}, 20 | } 21 | 22 | output, err := sshCmder.SSHCommand("sshcommand") 23 | assert.NoError(t, err) 24 | assert.Equal(t, "sshcommandresponse", output) 25 | 26 | output, err = sshCmder.SSHCommand("errorcommand") 27 | assert.Error(t, err) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/provision/serviceaction/service_action.go: -------------------------------------------------------------------------------- 1 | package serviceaction 2 | 3 | type ServiceAction int 4 | 5 | const ( 6 | Restart ServiceAction = iota 7 | Start 8 | Stop 9 | Enable 10 | Disable 11 | DaemonReload 12 | ) 13 | 14 | var serviceActions = []string{ 15 | "restart", 16 | "start", 17 | "stop", 18 | "enable", 19 | "disable", 20 | "daemon-reload", 21 | } 22 | 23 | func (s ServiceAction) String() string { 24 | if int(s) >= 0 && int(s) < len(serviceActions) { 25 | return serviceActions[s] 26 | } 27 | 28 | return "" 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/provision/serviceaction/service_action_test.go: -------------------------------------------------------------------------------- 1 | package serviceaction 2 | 3 | import "testing" 4 | 5 | func TestActionValue(t *testing.T) { 6 | if Restart.String() != "restart" { 7 | t.Fatalf("Expected %s but got %s", "install", Restart.String()) 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/shell/shell.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package shell 4 | 5 | import ( 6 | "errors" 7 | "fmt" 8 | "os" 9 | "path/filepath" 10 | ) 11 | 12 | var ( 13 | ErrUnknownShell = errors.New("Error: Unknown shell") 14 | ) 15 | 16 | // Detect detects user's current shell. 17 | func Detect() (string, error) { 18 | shell := os.Getenv("SHELL") 19 | 20 | if shell == "" { 21 | fmt.Printf("The default lines below are for a sh/bash shell, you can specify the shell you're using, with the --shell flag.\n\n") 22 | return "", ErrUnknownShell 23 | } 24 | 25 | if os.Getenv("__fish_bin_dir") != "" { 26 | return "fish", nil 27 | } 28 | 29 | return filepath.Base(shell), nil 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/shell/shell_test.go: -------------------------------------------------------------------------------- 1 | package shell 2 | 3 | import ( 4 | "os" 5 | "testing" 6 | 7 | "github.com/stretchr/testify/assert" 8 | ) 9 | 10 | func TestDetectBash(t *testing.T) { 11 | defer func(shell string) { os.Setenv("SHELL", shell) }(os.Getenv("SHELL")) 12 | os.Setenv("SHELL", "/bin/bash") 13 | 14 | shell, err := Detect() 15 | 16 | assert.Equal(t, "bash", shell) 17 | assert.NoError(t, err) 18 | } 19 | 20 | func TestDetectFish(t *testing.T) { 21 | defer func(shell string) { os.Setenv("SHELL", shell) }(os.Getenv("SHELL")) 22 | os.Setenv("SHELL", "/bin/bash") 23 | 24 | defer func(fishDir string) { os.Setenv("__fish_bin_dir", fishDir) }(os.Getenv("__fish_bin_dir")) 25 | os.Setenv("__fish_bin_dir", "/usr/local/Cellar/fish/2.2.0/bin") 26 | 27 | shell, err := Detect() 28 | 29 | assert.Equal(t, "fish", shell) 30 | assert.NoError(t, err) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/shell/shell_unix_test.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package shell 4 | 5 | import ( 6 | "os" 7 | "testing" 8 | 9 | "github.com/stretchr/testify/assert" 10 | ) 11 | 12 | func TestUnknownShell(t *testing.T) { 13 | defer func(shell string) { os.Setenv("SHELL", shell) }(os.Getenv("SHELL")) 14 | os.Setenv("SHELL", "") 15 | 16 | shell, err := Detect() 17 | 18 | assert.Equal(t, err, ErrUnknownShell) 19 | assert.Empty(t, shell) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/ssh/keys_test.go: -------------------------------------------------------------------------------- 1 | package ssh 2 | 3 | import ( 4 | "encoding/pem" 5 | "testing" 6 | ) 7 | 8 | func TestNewKeyPair(t *testing.T) { 9 | pair, err := NewKeyPair() 10 | if err != nil { 11 | t.Fatal(err) 12 | } 13 | 14 | if privPem := pem.EncodeToMemory(&pem.Block{Type: "RSA PRIVATE KEY", Headers: nil, Bytes: pair.PrivateKey}); len(privPem) == 0 { 15 | t.Fatal("No PEM returned") 16 | } 17 | 18 | if fingerprint := pair.Fingerprint(); len(fingerprint) == 0 { 19 | t.Fatal("Unable to generate fingerprint") 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/ssh/ssh_test.go: -------------------------------------------------------------------------------- 1 | package ssh 2 | 3 | import ( 4 | "io/ioutil" 5 | "os" 6 | "path/filepath" 7 | "testing" 8 | ) 9 | 10 | func TestGenerateSSHKey(t *testing.T) { 11 | tmpDir, err := ioutil.TempDir("", "machine-test-") 12 | if err != nil { 13 | t.Fatal(err) 14 | } 15 | 16 | filename := filepath.Join(tmpDir, "sshkey") 17 | 18 | if err := GenerateSSHKey(filename); err != nil { 19 | t.Fatal(err) 20 | } 21 | 22 | if _, err := os.Stat(filename); err != nil { 23 | t.Fatalf("expected ssh key at %s", filename) 24 | } 25 | 26 | // cleanup 27 | _ = os.RemoveAll(tmpDir) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/ssh/sshtest/fake_client.go: -------------------------------------------------------------------------------- 1 | package sshtest 2 | 3 | import "io" 4 | 5 | type CmdResult struct { 6 | Out string 7 | Err error 8 | } 9 | 10 | type FakeClient struct { 11 | ActivatedShell []string 12 | Outputs map[string]CmdResult 13 | } 14 | 15 | func (fsc *FakeClient) Output(command string) (string, error) { 16 | outerr := fsc.Outputs[command] 17 | return outerr.Out, outerr.Err 18 | } 19 | 20 | func (fsc *FakeClient) Shell(args ...string) error { 21 | fsc.ActivatedShell = args 22 | return nil 23 | } 24 | 25 | func (fsc *FakeClient) Start(command string) (io.ReadCloser, io.ReadCloser, error) { 26 | return nil, nil, nil 27 | } 28 | 29 | func (fsc *FakeClient) Wait() error { 30 | return nil 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/state/state.go: -------------------------------------------------------------------------------- 1 | package state 2 | 3 | // State represents the state of a host 4 | type State int 5 | 6 | const ( 7 | None State = iota 8 | Running 9 | Paused 10 | Saved 11 | Stopped 12 | Stopping 13 | Starting 14 | Error 15 | Timeout 16 | ) 17 | 18 | var states = []string{ 19 | "", 20 | "Running", 21 | "Paused", 22 | "Saved", 23 | "Stopped", 24 | "Stopping", 25 | "Starting", 26 | "Error", 27 | "Timeout", 28 | } 29 | 30 | // Given a State type, returns its string representation 31 | func (s State) String() string { 32 | if int(s) >= 0 && int(s) < len(states) { 33 | return states[s] 34 | } 35 | return "" 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/state/state_test.go: -------------------------------------------------------------------------------- 1 | package state 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestDaemonCreate(t *testing.T) { 8 | if None.String() != "" { 9 | t.Fatal("None state should be empty string") 10 | } 11 | if Running.String() != "Running" { 12 | t.Fatal("Running state should be 'Running'") 13 | } 14 | if Error.String() != "Error" { 15 | t.Fatal("Error state should be 'Error'") 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/swarm/swarm.go: -------------------------------------------------------------------------------- 1 | package swarm 2 | 3 | const ( 4 | DiscoveryServiceEndpoint = "https://discovery-stage.hub.docker.com/v1" 5 | ) 6 | 7 | type Options struct { 8 | IsSwarm bool 9 | Address string 10 | Discovery string 11 | Agent bool 12 | Master bool 13 | Host string 14 | Image string 15 | Strategy string 16 | Heartbeat int 17 | Overcommit float64 18 | ArbitraryFlags []string 19 | ArbitraryJoinFlags []string 20 | Env []string 21 | IsExperimental bool 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/libmachine/version/version.go: -------------------------------------------------------------------------------- 1 | package version 2 | 3 | var ( 4 | // APIVersion dictates which version of the libmachine API this is. 5 | APIVersion = 1 6 | 7 | // ConfigVersion dictates which version of the config.json format is 8 | // used. It needs to be bumped if there is a breaking change, and 9 | // therefore migration, introduced to the config file format. 10 | ConfigVersion = 3 11 | ) 12 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/mk/dev.mk: -------------------------------------------------------------------------------- 1 | dep-save: 2 | $(if $(GODEP), , \ 3 | $(error Please install godep: go get github.com/tools/godep)) 4 | $(GODEP) save $(shell go list ./... | grep -v vendor/) 5 | 6 | dep-restore: 7 | $(if $(GODEP), , \ 8 | $(error Please install godep: go get github.com/tools/godep)) 9 | $(GODEP) restore -v 10 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/mk/test.mk: -------------------------------------------------------------------------------- 1 | # Quick test. You can bypass long tests using: `if testing.Short() { t.Skip("Skipping in short mode.") }` 2 | test-short: 3 | $(GO) test $(VERBOSE_GO) -test.short -tags "$(BUILDTAGS)" $(PKGS) 4 | 5 | # Runs long tests also, plus race detection 6 | test-long: 7 | $(GO) test $(VERBOSE_GO) -race -tags "$(BUILDTAGS)" $(PKGS) 8 | 9 | test-integration: build 10 | $(eval TESTSUITE=$(filter-out $@,$(MAKECMDGOALS))) 11 | test/integration/run-bats.sh $(TESTSUITE) 12 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/mk/validate.mk: -------------------------------------------------------------------------------- 1 | # Validate DCO on all history 2 | mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST))) 3 | current_dir := $(notdir $(patsubst %/,%,$(dir $(mkfile_path)))) 4 | 5 | # XXX vendorized script miss exec bit, hence the gymnastic 6 | # plus the path resolution... 7 | # TODO migrate away from the shell script and have a make equivalent instead 8 | dco: 9 | @echo `bash $(current_dir)/../script/validate-dco` 10 | 11 | fmt: 12 | @test -z "$$(gofmt -s -l . 2>&1 | grep -v vendor/ | tee /dev/stderr)" 13 | 14 | vet: 15 | @test -z "$$(go vet $(PKGS) 2>&1 | tee /dev/stderr)" 16 | 17 | lint: 18 | $(if $(GOLINT), , \ 19 | $(error Please install golint: go get -u github.com/golang/lint/golint)) 20 | @test -z "$$($(GOLINT) ./... 2>&1 | grep -v vendor/ | grep -v "cli/" | grep -v "amazonec2/" |grep -v "openstack/" |grep -v "softlayer/" | grep -v "should have comment" | tee /dev/stderr)" 21 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/script/build_in_container.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | DOCKER_IMAGE_NAME="docker-machine-build" 6 | DOCKER_CONTAINER_NAME="docker-machine-build-container" 7 | 8 | if [[ $(docker ps -a | grep $DOCKER_CONTAINER_NAME) != "" ]]; then 9 | docker rm -f $DOCKER_CONTAINER_NAME 2>/dev/null 10 | fi 11 | 12 | docker build -t $DOCKER_IMAGE_NAME . 13 | 14 | docker run --name $DOCKER_CONTAINER_NAME \ 15 | -e DEBUG \ 16 | -e STATIC \ 17 | -e VERBOSE \ 18 | -e BUILDTAGS \ 19 | -e PARALLEL \ 20 | -e COVERAGE_DIR \ 21 | -e TARGET_OS \ 22 | -e TARGET_ARCH \ 23 | -e PREFIX \ 24 | -e TRAVIS_JOB_ID \ 25 | -e TRAVIS_PULL_REQUEST \ 26 | $DOCKER_IMAGE_NAME \ 27 | make "$@" 28 | 29 | if [[ "$@" == *"clean"* ]] && [[ -d bin ]]; then 30 | rm -Rf bin 31 | fi 32 | 33 | docker cp $DOCKER_CONTAINER_NAME:/go/src/github.com/docker/machine/bin . 34 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/test/integration/.gitignore: -------------------------------------------------------------------------------- 1 | env-* 2 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/test/integration/amazonec2/amazon.bats: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bats 2 | 3 | load ${BASE_TEST_DIR}/helpers.bash 4 | 5 | only_if_env DRIVER amazonec2 6 | 7 | use_disposable_machine 8 | 9 | require_env AWS_ACCESS_KEY_ID 10 | require_env AWS_SECRET_ACCESS_KEY 11 | 12 | @test "$DRIVER: Should Create a default host" { 13 | run machine create -d amazonec2 $NAME 14 | echo ${output} 15 | [ "$status" -eq 0 ] 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/test/integration/amazonec2/createwithkeypair.bats: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bats 2 | 3 | load ${BASE_TEST_DIR}/helpers.bash 4 | 5 | only_if_env DRIVER amazonec2 6 | 7 | use_disposable_machine 8 | 9 | require_env AWS_ACCESS_KEY_ID 10 | 11 | require_env AWS_SECRET_ACCESS_KEY 12 | 13 | export AWS_SSH_DIR="$MACHINE_STORAGE_PATH/mcnkeys" 14 | 15 | export AWS_SSH_KEYPATH=$AWS_SSH_DIR/id_rsa 16 | 17 | @test "$DRIVER: Should Create Instance with Pre existing SSH Key" { 18 | 19 | mkdir -p $AWS_SSH_DIR 20 | 21 | run ssh-keygen -f $AWS_SSH_KEYPATH -t rsa -N '' 22 | 23 | machine create -d amazonec2 $NAME 24 | 25 | run diff $AWS_SSH_KEYPATH $MACHINE_STORAGE_PATH/machines/$NAME/id_rsa 26 | [[ $output == "" ]] 27 | 28 | run diff $AWS_SSH_KEYPATH.pub $MACHINE_STORAGE_PATH/machines/$NAME/id_rsa.pub 29 | [[ $output == "" ]] 30 | 31 | 32 | } -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/test/integration/core/certs-extra-san.bats: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bats 2 | 3 | load ${BASE_TEST_DIR}/helpers.bash 4 | 5 | use_disposable_machine 6 | 7 | @test "$DRIVER: create" { 8 | run machine create --tls-san foo.bar.tld --tls-san 10.42.42.42 -d $DRIVER $NAME 9 | echo ${output} 10 | [ "$status" -eq 0 ] 11 | } 12 | 13 | @test "$DRIVER: verify that server cert contains the extra SANs" { 14 | machine ssh $NAME -- openssl x509 -in /var/lib/boot2docker/server.pem -text | grep 'DNS:foo.bar.tld' 15 | machine ssh $NAME -- openssl x509 -in /var/lib/boot2docker/server.pem -text | grep 'IP Address:10.42.42.42' 16 | } 17 | 18 | @test "$DRIVER: verify that server cert SANs are still there after 'regenerate-certs'" { 19 | machine regenerate-certs -f $NAME 20 | machine ssh $NAME -- openssl x509 -in /var/lib/boot2docker/server.pem -text | grep 'DNS:foo.bar.tld' 21 | machine ssh $NAME -- openssl x509 -in /var/lib/boot2docker/server.pem -text | grep 'IP Address:10.42.42.42' 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/test/integration/core/crashreport.bats: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bats 2 | 3 | load ${BASE_TEST_DIR}/helpers.bash 4 | 5 | only_if_env DRIVER virtualbox 6 | 7 | use_disposable_machine 8 | 9 | @test "$DRIVER: should send bugsnag report" { 10 | # we exploit a 'bug' where vboxmanage wont allow a machine created with 1mb of RAM 11 | run machine --bugsnag-api-token nonexisting -D create -d virtualbox --virtualbox-memory 1 $NAME 12 | echo ${output} 13 | [ "$status" -eq 1 ] 14 | [[ ${output} == *"notifying bugsnag"* ]] 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/test/integration/core/inspect_format.bats: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bats 2 | 3 | load ${BASE_TEST_DIR}/helpers.bash 4 | 5 | use_shared_machine 6 | 7 | @test "$DRIVER: inspect format template" { 8 | run machine inspect -f '{{.DriverName}}' $NAME 9 | [[ "$output" == "$DRIVER" ]] 10 | } 11 | 12 | @test "$DRIVER: inspect format template json directive" { 13 | run machine inspect -f '{{json .DriverName}}' $NAME 14 | [[ "$output" == "\"$DRIVER\"" ]] 15 | } 16 | 17 | @test "$DRIVER: inspect format template pretty json directive" { 18 | linecount=$(machine inspect -f '{{prettyjson .Driver}}' $NAME | wc -l) 19 | [[ "$linecount" -gt 1 ]] 20 | } 21 | 22 | @test "$DRIVER: check .Driver output is not flawed" { 23 | only_if_env DRIVER virtualbox 24 | run machine inspect -f '{{.Driver.SSHUser}}' $NAME 25 | [ "$status" -eq 0 ] 26 | [[ ${output} == "docker" ]] 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/test/integration/core/regenerate-certs.bats: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bats 2 | 3 | load ${BASE_TEST_DIR}/helpers.bash 4 | 5 | use_shared_machine 6 | 7 | @test "$DRIVER: regenerate the certs" { 8 | run machine regenerate-certs -f $NAME 9 | [[ ${status} -eq 0 ]] 10 | } 11 | 12 | @test "$DRIVER: make sure docker still works" { 13 | run docker $(machine config $NAME) version 14 | [[ ${status} -eq 0 ]] 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/test/integration/virtualbox/certs-checksum.bats: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bats 2 | 3 | load ${BASE_TEST_DIR}/helpers.bash 4 | 5 | only_if_env DRIVER virtualbox 6 | 7 | use_shared_machine 8 | 9 | @test "$DRIVER: verify that server cert checksum matches local checksum" { 10 | # TODO: This test is tightly coupled to VirtualBox right now, but should be 11 | # available for all providers ideally. 12 | # 13 | # TODO: Does this test work OK on Linux? cc @ehazlett 14 | # 15 | # Have to create this directory and file or else the OpenSSL checksum will barf. 16 | machine ssh $NAME -- sudo mkdir -p /usr/local/ssl 17 | machine ssh $NAME -- sudo touch /usr/local/ssl/openssl.cnf 18 | 19 | SERVER_CHECKSUM=$(machine ssh $NAME -- openssl dgst -sha256 /var/lib/boot2docker/ca.pem | awk '{ print $2 }') 20 | LOCAL_CHECKSUM=$(openssl dgst -sha256 $MACHINE_STORAGE_PATH/certs/ca.pem | awk '{ print $2 }') 21 | echo ${SERVER_CHECKSUM} 22 | echo ${LOCAL_CHECKSUM} 23 | [[ ${SERVER_CHECKSUM} == ${LOCAL_CHECKSUM} ]] 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/test/integration/virtualbox/create-with-upgrading.bats: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bats 2 | 3 | load ${BASE_TEST_DIR}/helpers.bash 4 | 5 | only_if_env DRIVER virtualbox 6 | 7 | use_disposable_machine 8 | 9 | export CACHE_DIR="$MACHINE_STORAGE_PATH/cache" 10 | export ISO_PATH="$CACHE_DIR/boot2docker.iso" 11 | export OLD_ISO_URL="https://github.com/boot2docker/boot2docker/releases/download/v1.4.1/boot2docker.iso" 12 | 13 | @test "$DRIVER: download the old version iso" { 14 | run mkdir -p $CACHE_DIR 15 | run curl $OLD_ISO_URL -L -o $ISO_PATH 16 | echo ${output} 17 | [ "$status" -eq 0 ] 18 | } 19 | 20 | @test "$DRIVER: create with upgrading" { 21 | run machine create -d $DRIVER $NAME 22 | echo ${output} 23 | [ "$status" -eq 0 ] 24 | } 25 | 26 | @test "$DRIVER: create is correct version" { 27 | SERVER_VERSION=$(docker $(machine config $NAME) version | grep 'Server version' | awk '{ print $3; }') 28 | [[ "$SERVER_VERSION" != "1.4.1" ]] 29 | } 30 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/test/integration/virtualbox/dns.bats: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bats 2 | 3 | load ${BASE_TEST_DIR}/helpers.bash 4 | 5 | only_if_env DRIVER virtualbox 6 | 7 | use_disposable_machine 8 | 9 | @test "$DRIVER: Create a vm with a dns proxy set" { 10 | run machine create -d $DRIVER --virtualbox-dns-proxy=true $NAME 11 | [[ ${status} -eq 0 ]] 12 | } 13 | 14 | @test "$DRIVER: Check DNSProxy flag is properly set during machine creation" { 15 | run bash -c "cat ${MACHINE_STORAGE_PATH}/machines/$NAME/$NAME/Logs/VBox.log | grep DNSProxy | grep '(1)'" 16 | [[ ${status} -eq 0 ]] 17 | } -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/test/integration/virtualbox/guards.bats: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bats 2 | 3 | load ${BASE_TEST_DIR}/helpers.bash 4 | 5 | only_if_env DRIVER virtualbox 6 | 7 | use_disposable_machine 8 | 9 | @test "$DRIVER: Should not allow machine creation with bad ISO" { 10 | run machine create -d virtualbox --virtualbox-boot2docker-url http://dev.null:9111/bad.iso $NAME 11 | [[ ${status} -eq 1 ]] 12 | } 13 | 14 | @test "$DRIVER: Should not allow machine creation with engine-install-url" { 15 | run machine create --engine-install-url https://test.docker.com -d virtualbox $NAME 16 | [[ ${output} == *"--engine-install-url cannot be used"* ]] 17 | } -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/test/provision/rancheros.bats: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bats 2 | 3 | load ${BASE_TEST_DIR}/helpers.bash 4 | 5 | 6 | # this should move to the makefile 7 | 8 | if [[ "$DRIVER" != "virtualbox" ]]; then 9 | exit 0 10 | fi 11 | 12 | export RANCHEROS_VERSION="v0.3.1" 13 | export RANCHEROS_ISO="https://github.com/rancherio/os/releases/download/$RANCHEROS_VERSION/machine-rancheros.iso" 14 | 15 | @test "$DRIVER: create with RancherOS ISO" { 16 | VIRTUALBOX_BOOT2DOCKER_URL="$RANCHEROS_ISO" run ${BASE_TEST_DIR}/run-bats.sh ${BASE_TEST_DIR}/core 17 | echo ${output} 18 | [ ${status} -eq 0 ] 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/test/provision/redhat.bats: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bats 2 | 3 | load ${BASE_TEST_DIR}/helpers.bash 4 | 5 | # this should move to the makefile 6 | 7 | if [[ "$DRIVER" != "amazonec2" ]]; then 8 | exit 0 9 | fi 10 | 11 | require_env AWS_VPC_ID 12 | require_env AWS_ACCESS_KEY_ID 13 | require_env AWS_SECRET_ACCESS_KEY 14 | 15 | @test "$DRIVER: create using RedHat AMI" { 16 | # Oh snap, recursive stuff!! 17 | AWS_AMI=ami-12663b7a AWS_SSH_USER=ec2-user run ${BASE_TEST_DIR}/run-bats.sh ${BASE_TEST_DIR}/core 18 | echo ${output} 19 | [ ${status} -eq 0 ] 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/Azure/go-autorest/autorest/azure/config.go: -------------------------------------------------------------------------------- 1 | package azure 2 | 3 | import ( 4 | "net/url" 5 | ) 6 | 7 | // OAuthConfig represents the endpoints needed 8 | // in OAuth operations 9 | type OAuthConfig struct { 10 | AuthorizeEndpoint url.URL 11 | TokenEndpoint url.URL 12 | DeviceCodeEndpoint url.URL 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/Azure/go-autorest/autorest/date/utility.go: -------------------------------------------------------------------------------- 1 | package date 2 | 3 | import ( 4 | "strings" 5 | "time" 6 | ) 7 | 8 | // ParseTime to parse Time string to specified format. 9 | func ParseTime(format string, t string) (d time.Time, err error) { 10 | return time.Parse(format, strings.ToUpper(t)) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/Azure/go-autorest/autorest/version.go: -------------------------------------------------------------------------------- 1 | package autorest 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | const ( 8 | major = "7" 9 | minor = "0" 10 | patch = "0" 11 | tag = "" 12 | semVerFormat = "%s.%s.%s%s" 13 | ) 14 | 15 | // Version returns the semantic version (see http://semver.org). 16 | func Version() string { 17 | return fmt.Sprintf(semVerFormat, major, minor, patch, tag) 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/aws/aws-sdk-go/NOTICE.txt: -------------------------------------------------------------------------------- 1 | AWS SDK for Go 2 | Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 | Copyright 2014-2015 Stripe, Inc. 4 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/aws/aws-sdk-go/aws/client/metadata/client_info.go: -------------------------------------------------------------------------------- 1 | package metadata 2 | 3 | // ClientInfo wraps immutable data from the client.Client structure. 4 | type ClientInfo struct { 5 | ServiceName string 6 | APIVersion string 7 | Endpoint string 8 | SigningName string 9 | SigningRegion string 10 | JSONVersion string 11 | TargetPrefix string 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/aws/aws-sdk-go/aws/credentials/example.ini: -------------------------------------------------------------------------------- 1 | [default] 2 | aws_access_key_id = accessKey 3 | aws_secret_access_key = secret 4 | aws_session_token = token 5 | 6 | [no_token] 7 | aws_access_key_id = accessKey 8 | aws_secret_access_key = secret 9 | 10 | [with_colon] 11 | aws_access_key_id: accessKey 12 | aws_secret_access_key: secret 13 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/aws/aws-sdk-go/aws/errors.go: -------------------------------------------------------------------------------- 1 | package aws 2 | 3 | import "github.com/aws/aws-sdk-go/aws/awserr" 4 | 5 | var ( 6 | // ErrMissingRegion is an error that is returned if region configuration is 7 | // not found. 8 | // 9 | // @readonly 10 | ErrMissingRegion = awserr.New("MissingRegion", "could not find region configuration", nil) 11 | 12 | // ErrMissingEndpoint is an error that is returned if an endpoint cannot be 13 | // resolved for a service. 14 | // 15 | // @readonly 16 | ErrMissingEndpoint = awserr.New("MissingEndpoint", "'Endpoint' configuration is required for this service", nil) 17 | ) 18 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/aws/aws-sdk-go/aws/version.go: -------------------------------------------------------------------------------- 1 | // Package aws provides core functionality for making requests to AWS services. 2 | package aws 3 | 4 | // SDKName is the name of this AWS SDK 5 | const SDKName = "aws-sdk-go" 6 | 7 | // SDKVersion is the version of this SDK 8 | const SDKVersion = "1.0.2" 9 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/bugsnag/bugsnag-go/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: go 3 | 4 | go: 5 | - 1.3 6 | - 1.4 7 | - 1.5 8 | - tip 9 | 10 | script: 11 | - make ci 12 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/bugsnag/bugsnag-go/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | 1.0.4 2 | ----- 3 | 4 | - Fix appengine integration broken by 1.0.3 5 | 6 | 1.0.3 7 | ----- 8 | 9 | - Allow any Logger with a Printf method. 10 | 11 | 1.0.2 12 | ----- 13 | 14 | - Use bugsnag copies of dependencies to avoid potential link rot 15 | 16 | 1.0.1 17 | ----- 18 | 19 | - gofmt/golint/govet docs improvements. 20 | 21 | 1.0.0 22 | ----- 23 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/bugsnag/bugsnag-go/Makefile: -------------------------------------------------------------------------------- 1 | TEST?=./... 2 | 3 | default: alldeps test 4 | 5 | deps: 6 | go get -v -d ./... 7 | 8 | alldeps: 9 | go get -v -d -t ./... 10 | 11 | updatedeps: 12 | go get -v -d -u ./... 13 | 14 | test: alldeps 15 | go test 16 | @go vet 2>/dev/null ; if [ $$? -eq 3 ]; then \ 17 | go get golang.org/x/tools/cmd/vet; \ 18 | fi 19 | @go vet $(TEST) ; if [ $$? -eq 1 ]; then \ 20 | echo "go-vet: Issues running go vet ./..."; \ 21 | exit 1; \ 22 | fi 23 | 24 | ci: alldeps test 25 | 26 | bench: 27 | go test --bench=.* 28 | 29 | 30 | .PHONY: bin checkversion ci default deps generate releasebin test testacc testrace updatedeps 31 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/bugsnag/bugsnag-go/errors/README.md: -------------------------------------------------------------------------------- 1 | Adds stacktraces to errors in golang. 2 | 3 | This was made to help build the Bugsnag notifier but can be used standalone if 4 | you like to have stacktraces on errors. 5 | 6 | See [Godoc](https://godoc.org/github.com/bugsnag/bugsnag-go/errors) for the API docs. 7 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/bugsnag/bugsnag-go/panicwrap.go: -------------------------------------------------------------------------------- 1 | // +build !appengine 2 | 3 | package bugsnag 4 | 5 | import ( 6 | "github.com/bugsnag/bugsnag-go/errors" 7 | "github.com/bugsnag/panicwrap" 8 | ) 9 | 10 | // NOTE: this function does not return when you call it, instead it 11 | // re-exec()s the current process with panic monitoring. 12 | func defaultPanicHandler() { 13 | defer defaultNotifier.dontPanic() 14 | 15 | err := panicwrap.BasicMonitor(func(output string) { 16 | toNotify, err := errors.ParsePanic(output) 17 | 18 | if err != nil { 19 | defaultNotifier.Config.logf("bugsnag.handleUncaughtPanic: %v", err) 20 | } 21 | Notify(toNotify, SeverityError, Configuration{Synchronous: true}) 22 | }) 23 | 24 | if err != nil { 25 | defaultNotifier.Config.logf("bugsnag.handleUncaughtPanic: %v", err) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/bugsnag/osext/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012 Daniel Theophanes 2 | 3 | This software is provided 'as-is', without any express or implied 4 | warranty. In no event will the authors be held liable for any damages 5 | arising from the use of this software. 6 | 7 | Permission is granted to anyone to use this software for any purpose, 8 | including commercial applications, and to alter it and redistribute it 9 | freely, subject to the following restrictions: 10 | 11 | 1. The origin of this software must not be misrepresented; you must not 12 | claim that you wrote the original software. If you use this software 13 | in a product, an acknowledgment in the product documentation would be 14 | appreciated but is not required. 15 | 16 | 2. Altered source versions must be plainly marked as such, and must not be 17 | misrepresented as being the original software. 18 | 19 | 3. This notice may not be removed or altered from any source 20 | distribution. 21 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/bugsnag/osext/osext.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Extensions to the standard "os" package. 6 | package osext 7 | 8 | import "path/filepath" 9 | 10 | // Executable returns an absolute path that can be used to 11 | // re-invoke the current program. 12 | // It may not be valid after the current program exits. 13 | func Executable() (string, error) { 14 | p, err := executable() 15 | return filepath.Clean(p), err 16 | } 17 | 18 | // Returns same path as Executable, returns just the folder 19 | // path. Excludes the executable name. 20 | func ExecutableFolder() (string, error) { 21 | p, err := Executable() 22 | if err != nil { 23 | return "", err 24 | } 25 | folder, _ := filepath.Split(p) 26 | return folder, nil 27 | } 28 | 29 | // Depricated. Same as Executable(). 30 | func GetExePath() (exePath string, err error) { 31 | return Executable() 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/bugsnag/osext/osext_plan9.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package osext 6 | 7 | import "syscall" 8 | 9 | func executable() (string, error) { 10 | f, err := Open("/proc/" + itoa(Getpid()) + "/text") 11 | if err != nil { 12 | return "", err 13 | } 14 | defer f.Close() 15 | return syscall.Fd2path(int(f.Fd())) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/bugsnag/osext/osext_procfs.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build linux netbsd openbsd 6 | 7 | package osext 8 | 9 | import ( 10 | "errors" 11 | "os" 12 | "runtime" 13 | ) 14 | 15 | func executable() (string, error) { 16 | switch runtime.GOOS { 17 | case "linux": 18 | return os.Readlink("/proc/self/exe") 19 | case "netbsd": 20 | return os.Readlink("/proc/curproc/exe") 21 | case "openbsd": 22 | return os.Readlink("/proc/curproc/file") 23 | } 24 | return "", errors.New("ExecPath not implemented for " + runtime.GOOS) 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/bugsnag/osext/osext_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package osext 6 | 7 | import ( 8 | "syscall" 9 | "unicode/utf16" 10 | "unsafe" 11 | ) 12 | 13 | var ( 14 | kernel = syscall.MustLoadDLL("kernel32.dll") 15 | getModuleFileNameProc = kernel.MustFindProc("GetModuleFileNameW") 16 | ) 17 | 18 | // GetModuleFileName() with hModule = NULL 19 | func executable() (exePath string, err error) { 20 | return getModuleFileName() 21 | } 22 | 23 | func getModuleFileName() (string, error) { 24 | var n uint32 25 | b := make([]uint16, syscall.MAX_PATH) 26 | size := uint32(len(b)) 27 | 28 | r0, _, e1 := getModuleFileNameProc.Call(0, uintptr(unsafe.Pointer(&b[0])), uintptr(size)) 29 | n = uint32(r0) 30 | if n == 0 { 31 | return "", e1 32 | } 33 | return string(utf16.Decode(b[0:n])), nil 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/bugsnag/panicwrap/monitor_windows.go: -------------------------------------------------------------------------------- 1 | package panicwrap 2 | 3 | import "fmt" 4 | 5 | func monitor(c *WrapConfig) (int, error) { 6 | return -1, fmt.Errorf("Monitor is not supported on windows") 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/cenkalti/backoff/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/cenkalti/backoff/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 1.3.3 3 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/codegangsta/cli/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | 4 | go: 5 | - 1.0.3 6 | - 1.1.2 7 | - 1.2.2 8 | - 1.3.3 9 | - 1.4.2 10 | - 1.5.1 11 | - tip 12 | 13 | matrix: 14 | allow_failures: 15 | - go: tip 16 | 17 | script: 18 | - go vet ./... 19 | - go test -v ./... 20 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/davecgh/go-spew/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012-2013 Dave Collins 2 | 3 | Permission to use, copy, modify, and distribute this software for any 4 | purpose with or without fee is hereby granted, provided that the above 5 | copyright notice and this permission notice appear in all copies. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 8 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 9 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 10 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 11 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 12 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 13 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/dgrijalva/jwt-go/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | bin 3 | 4 | 5 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/dgrijalva/jwt-go/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.3.3 5 | - 1.4.2 6 | - 1.5 7 | - tip 8 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/dgrijalva/jwt-go/doc.go: -------------------------------------------------------------------------------- 1 | // Package jwt is a Go implementation of JSON Web Tokens: http://self-issued.info/docs/draft-jones-json-web-token.html 2 | // 3 | // See README.md for more info. 4 | package jwt 5 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/digitalocean/godo/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.3 5 | - 1.4 6 | - tip 7 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/digitalocean/godo/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | If you submit a pull request, please keep the following guidelines in mind: 4 | 5 | 1. Code should be `go fmt` compliant. 6 | 2. Types, structs and funcs should be documented. 7 | 3. Tests pass. 8 | 9 | ## Getting set up 10 | 11 | Assuming your `$GOPATH` is set up according to your desires, run: 12 | 13 | ```sh 14 | go get github.com/digitalocean/godo 15 | ``` 16 | 17 | ## Running tests 18 | 19 | When working on code in this repository, tests can be run via: 20 | 21 | ```sh 22 | go test . 23 | ``` 24 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/digitalocean/godo/doc.go: -------------------------------------------------------------------------------- 1 | // Package godo is the DigtalOcean API v2 client for Go 2 | package godo 3 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/digitalocean/godo/errors.go: -------------------------------------------------------------------------------- 1 | package godo 2 | 3 | import "fmt" 4 | 5 | // ArgError is an error that represents an error with an input to godo. It 6 | // identifies the argument and the cause (if possible). 7 | type ArgError struct { 8 | arg string 9 | reason string 10 | } 11 | 12 | var _ error = &ArgError{} 13 | 14 | // NewArgError creates an InputError. 15 | func NewArgError(arg, reason string) *ArgError { 16 | return &ArgError{ 17 | arg: arg, 18 | reason: reason, 19 | } 20 | } 21 | 22 | func (e *ArgError) Error() string { 23 | return fmt.Sprintf("%s is invalid because %s", e.arg, e.reason) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/digitalocean/godo/timestamp.go: -------------------------------------------------------------------------------- 1 | package godo 2 | 3 | import ( 4 | "strconv" 5 | "time" 6 | ) 7 | 8 | // Timestamp represents a time that can be unmarshalled from a JSON string 9 | // formatted as either an RFC3339 or Unix timestamp. All 10 | // exported methods of time.Time can be called on Timestamp. 11 | type Timestamp struct { 12 | time.Time 13 | } 14 | 15 | func (t Timestamp) String() string { 16 | return t.Time.String() 17 | } 18 | 19 | // UnmarshalJSON implements the json.Unmarshaler interface. 20 | // Time is expected in RFC3339 or Unix format. 21 | func (t *Timestamp) UnmarshalJSON(data []byte) error { 22 | str := string(data) 23 | i, err := strconv.ParseInt(str, 10, 64) 24 | if err == nil { 25 | t.Time = time.Unix(i, 0) 26 | } else { 27 | t.Time, err = time.Parse(`"`+time.RFC3339+`"`, str) 28 | } 29 | return err 30 | } 31 | 32 | // Equal reports whether t and u are equal based on time.Equal 33 | func (t Timestamp) Equal(u Timestamp) bool { 34 | return t.Time.Equal(u.Time) 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/docker/docker/NOTICE: -------------------------------------------------------------------------------- 1 | Docker 2 | Copyright 2012-2014 Docker, Inc. 3 | 4 | This product includes software developed at Docker, Inc. (http://www.docker.com). 5 | 6 | This product contains software (https://github.com/kr/pty) developed 7 | by Keith Rarick, licensed under the MIT License. 8 | 9 | The following is courtesy of our legal counsel: 10 | 11 | 12 | Use and transfer of Docker may be subject to certain restrictions by the 13 | United States and other governments. 14 | It is your responsibility to ensure that your use and/or transfer does not 15 | violate applicable laws. 16 | 17 | For more information, please see http://www.bis.doc.gov 18 | 19 | See also http://www.apache.org/dev/crypto.html and/or seek legal counsel. 20 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/docker/docker/pkg/term/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Solomon Hykes (@shykes) 2 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/docker/docker/pkg/term/tc_other.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | // +build !linux !cgo 3 | 4 | package term 5 | 6 | import ( 7 | "syscall" 8 | "unsafe" 9 | ) 10 | 11 | func tcget(fd uintptr, p *Termios) syscall.Errno { 12 | _, _, err := syscall.Syscall(syscall.SYS_IOCTL, fd, uintptr(getTermios), uintptr(unsafe.Pointer(p))) 13 | return err 14 | } 15 | 16 | func tcset(fd uintptr, p *Termios) syscall.Errno { 17 | _, _, err := syscall.Syscall(syscall.SYS_IOCTL, fd, setTermios, uintptr(unsafe.Pointer(p))) 18 | return err 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/docker/go-units/MAINTAINERS: -------------------------------------------------------------------------------- 1 | # go-connections maintainers file 2 | # 3 | # This file describes who runs the docker/go-connections project and how. 4 | # This is a living document - if you see something out of date or missing, speak up! 5 | # 6 | # It is structured to be consumable by both humans and programs. 7 | # To extract its contents programmatically, use any TOML-compliant parser. 8 | # 9 | # This file is compiled into the MAINTAINERS file in docker/opensource. 10 | # 11 | [Org] 12 | [Org."Core maintainers"] 13 | people = [ 14 | "calavera", 15 | ] 16 | 17 | [people] 18 | 19 | # A reference list of all people associated with the project. 20 | # All other sections should refer to people by their canonical key 21 | # in the people section. 22 | 23 | # ADD YOURSELF HERE IN ALPHABETICAL ORDER 24 | [people.calavera] 25 | Name = "David Calavera" 26 | Email = "david.calavera@gmail.com" 27 | GitHub = "calavera" 28 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/docker/go-units/README.md: -------------------------------------------------------------------------------- 1 | [![GoDoc](https://godoc.org/github.com/docker/go-units?status.svg)](https://godoc.org/github.com/docker/go-units) 2 | 3 | # Introduction 4 | 5 | go-units is a library to transform human friendly measurements into machine friendly values. 6 | 7 | ## Usage 8 | 9 | See the [docs in godoc](https://godoc.org/github.com/docker/go-units) for examples and documentation. 10 | 11 | ## Copyright and license 12 | 13 | Copyright © 2015 Docker, Inc. All rights reserved, except as follows. Code 14 | is released under the Apache 2.0 license. The README.md file, and files in the 15 | "docs" folder are licensed under the Creative Commons Attribution 4.0 16 | International License under the terms and conditions set forth in the file 17 | "LICENSE.docs". You may obtain a duplicate copy of the same license, titled 18 | CC-BY-SA-4.0, at http://creativecommons.org/licenses/by/4.0/. 19 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/docker/go-units/circle.yml: -------------------------------------------------------------------------------- 1 | dependencies: 2 | post: 3 | # install golint 4 | - go get github.com/golang/lint/golint 5 | 6 | test: 7 | pre: 8 | # run analysis before tests 9 | - go vet ./... 10 | - test -z "$(golint ./... | tee /dev/stderr)" 11 | - test -z "$(gofmt -s -l . | tee /dev/stderr)" 12 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/go-ini/ini/.gitignore: -------------------------------------------------------------------------------- 1 | testdata/conf_out.ini 2 | ini.sublime-project 3 | ini.sublime-workspace 4 | testdata/conf_reflect.ini 5 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/jmespath/go-jmespath/.gitignore: -------------------------------------------------------------------------------- 1 | jpgo 2 | jmespath-fuzz.zip 3 | cpu.out 4 | go-jmespath.test 5 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/jmespath/go-jmespath/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | sudo: false 4 | 5 | go: 6 | - 1.4 7 | 8 | install: go get -v -t ./... 9 | script: make test 10 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/jmespath/go-jmespath/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2015 James Saryerwinnie 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/jmespath/go-jmespath/README.md: -------------------------------------------------------------------------------- 1 | # go-jmespath - A JMESPath implementation in Go 2 | 3 | [![Build Status](https://img.shields.io/travis/jmespath/go-jmespath.svg)](https://travis-ci.org/jmespath/go-jmespath) 4 | 5 | 6 | 7 | See http://jmespath.org for more info. 8 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/jmespath/go-jmespath/api.go: -------------------------------------------------------------------------------- 1 | package jmespath 2 | 3 | // Search evaluates a JMESPath expression against input data and returns the result. 4 | func Search(expression string, data interface{}) (interface{}, error) { 5 | intr := newInterpreter() 6 | parser := NewParser() 7 | ast, err := parser.Parse(expression) 8 | if err != nil { 9 | return nil, err 10 | } 11 | return intr.Execute(ast, data) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/jmespath/go-jmespath/astnodetype_string.go: -------------------------------------------------------------------------------- 1 | // generated by stringer -type astNodeType; DO NOT EDIT 2 | 3 | package jmespath 4 | 5 | import "fmt" 6 | 7 | const _astNodeType_name = "ASTEmptyASTComparatorASTCurrentNodeASTExpRefASTFunctionExpressionASTFieldASTFilterProjectionASTFlattenASTIdentityASTIndexASTIndexExpressionASTKeyValPairASTLiteralASTMultiSelectHashASTMultiSelectListASTOrExpressionASTAndExpressionASTNotExpressionASTPipeASTProjectionASTSubexpressionASTSliceASTValueProjection" 8 | 9 | var _astNodeType_index = [...]uint16{0, 8, 21, 35, 44, 65, 73, 92, 102, 113, 121, 139, 152, 162, 180, 198, 213, 229, 245, 252, 265, 281, 289, 307} 10 | 11 | func (i astNodeType) String() string { 12 | if i < 0 || i >= astNodeType(len(_astNodeType_index)-1) { 13 | return fmt.Sprintf("astNodeType(%d)", i) 14 | } 15 | return _astNodeType_name[_astNodeType_index[i]:_astNodeType_index[i+1]] 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/jmespath/go-jmespath/toktype_string.go: -------------------------------------------------------------------------------- 1 | // generated by stringer -type=tokType; DO NOT EDIT 2 | 3 | package jmespath 4 | 5 | import "fmt" 6 | 7 | const _tokType_name = "tUnknowntStartDottFiltertFlattentLparentRparentLbrackettRbrackettLbracetRbracetOrtPipetNumbertUnquotedIdentifiertQuotedIdentifiertCommatColontLTtLTEtGTtGTEtEQtNEtJSONLiteraltStringLiteraltCurrenttExpreftAndtNottEOF" 8 | 9 | var _tokType_index = [...]uint8{0, 8, 13, 17, 24, 32, 39, 46, 55, 64, 71, 78, 81, 86, 93, 112, 129, 135, 141, 144, 148, 151, 155, 158, 161, 173, 187, 195, 202, 206, 210, 214} 10 | 11 | func (i tokType) String() string { 12 | if i < 0 || i >= tokType(len(_tokType_index)-1) { 13 | return fmt.Sprintf("tokType(%d)", i) 14 | } 15 | return _tokType_name[_tokType_index[i]:_tokType_index[i+1]] 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/mitchellh/mapstructure/error.go: -------------------------------------------------------------------------------- 1 | package mapstructure 2 | 3 | import ( 4 | "fmt" 5 | "strings" 6 | ) 7 | 8 | // Error implements the error interface and can represents multiple 9 | // errors that occur in the course of a single decode. 10 | type Error struct { 11 | Errors []string 12 | } 13 | 14 | func (e *Error) Error() string { 15 | points := make([]string, len(e.Errors)) 16 | for i, err := range e.Errors { 17 | points[i] = fmt.Sprintf("* %s", err) 18 | } 19 | 20 | return fmt.Sprintf( 21 | "%d error(s) decoding:\n\n%s", 22 | len(e.Errors), strings.Join(points, "\n")) 23 | } 24 | 25 | func appendErrors(errors []string, err error) []string { 26 | switch e := err.(type) { 27 | case *Error: 28 | return append(errors, e.Errors...) 29 | default: 30 | return append(errors, e.Error()) 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/pyr/egoscale/src/egoscale/async.go: -------------------------------------------------------------------------------- 1 | package egoscale 2 | 3 | import ( 4 | "encoding/json" 5 | "net/url" 6 | ) 7 | 8 | func (exo *Client) PollAsyncJob(jobid string) (*QueryAsyncJobResultResponse, error) { 9 | params := url.Values{} 10 | 11 | params.Set("jobid", jobid) 12 | 13 | resp, err := exo.Request("queryAsyncJobResult", params) 14 | 15 | if err != nil { 16 | return nil, err 17 | } 18 | 19 | var r QueryAsyncJobResultResponse 20 | 21 | if err := json.Unmarshal(resp, &r); err != nil { 22 | return nil, err 23 | } 24 | 25 | return &r, nil 26 | } 27 | 28 | func (exo *Client) AsyncToVirtualMachine(resp QueryAsyncJobResultResponse) (*DeployVirtualMachineResponse, error) { 29 | var r DeployVirtualMachineWrappedResponse 30 | 31 | if err := json.Unmarshal(resp.Jobresult, &r); err != nil { 32 | return nil, err 33 | } 34 | 35 | return &r.Wrapped, nil 36 | } 37 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/pyr/egoscale/src/egoscale/error.go: -------------------------------------------------------------------------------- 1 | package egoscale 2 | 3 | import ( 4 | "fmt" 5 | ) 6 | 7 | func (e *Error) Error() error { 8 | return fmt.Errorf("exoscale API error %d (internal code: %d): %s", e.ErrorCode, e.CSErrorCode, e.ErrorText) 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/pyr/egoscale/src/egoscale/init.go: -------------------------------------------------------------------------------- 1 | package egoscale 2 | 3 | import ( 4 | "crypto/tls" 5 | "net/http" 6 | ) 7 | 8 | func NewClient(endpoint string, apiKey string, apiSecret string) *Client { 9 | cs := &Client{ 10 | client: &http.Client{ 11 | Transport: &http.Transport{ 12 | Proxy: http.ProxyFromEnvironment, 13 | TLSClientConfig: &tls.Config{InsecureSkipVerify: false}, 14 | }, 15 | }, 16 | endpoint: endpoint, 17 | apiKey: apiKey, 18 | apiSecret: apiSecret, 19 | } 20 | return cs 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/pyr/egoscale/src/egoscale/keypair.go: -------------------------------------------------------------------------------- 1 | package egoscale 2 | 3 | import ( 4 | "encoding/json" 5 | "net/url" 6 | ) 7 | 8 | func (exo *Client) CreateKeypair(name string) (*CreateSSHKeyPairResponse, error) { 9 | params := url.Values{} 10 | params.Set("name", name) 11 | 12 | resp, err := exo.Request("createSSHKeyPair", params) 13 | if err != nil { 14 | return nil, err 15 | } 16 | 17 | var r CreateSSHKeyPairWrappedResponse 18 | if err := json.Unmarshal(resp, &r); err != nil { 19 | return nil, err 20 | } 21 | 22 | return &r.Wrapped, nil 23 | } 24 | 25 | func (exo *Client) DeleteKeypair(name string) (*StandardResponse, error) { 26 | params := url.Values{} 27 | params.Set("name", name) 28 | 29 | resp, err := exo.Request("deleteSSHKeyPair", params) 30 | if err != nil { 31 | return nil, err 32 | } 33 | 34 | var r StandardResponse 35 | if err := json.Unmarshal(resp, &r); err != nil { 36 | return nil, err 37 | } 38 | 39 | return &r, nil 40 | 41 | } 42 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/rackspace/gophercloud/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | install: 3 | - go get -v -tags 'fixtures acceptance' ./... 4 | go: 5 | - 1.1 6 | - 1.2 7 | - 1.3 8 | - 1.4 9 | - tip 10 | script: script/cibuild 11 | after_success: 12 | - go get code.google.com/p/go.tools/cmd/cover 13 | - go get github.com/axw/gocov/gocov 14 | - go get github.com/mattn/goveralls 15 | - export PATH=$PATH:$HOME/gopath/bin/ 16 | - goveralls 2k7PTU3xa474Hymwgdj6XjqenNfGTNkO8 17 | sudo: false 18 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/rackspace/gophercloud/CONTRIBUTORS.md: -------------------------------------------------------------------------------- 1 | Contributors 2 | ============ 3 | 4 | | Name | Email | 5 | | ---- | ----- | 6 | | Samuel A. Falvo II | 7 | | Glen Campbell | 8 | | Jesse Noller | 9 | | Jon Perritt | 10 | | Ash Wilson | 11 | | Jamie Hannaford | 12 | | Don Schenck | don.schenck@rackspace.com> 13 | | Joe Topjian | 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/rackspace/gophercloud/auth_results.go: -------------------------------------------------------------------------------- 1 | package gophercloud 2 | 3 | import "time" 4 | 5 | // AuthResults [deprecated] is a leftover type from the v0.x days. It was 6 | // intended to describe common functionality among identity service results, but 7 | // is not actually used anywhere. 8 | type AuthResults interface { 9 | // TokenID returns the token's ID value from the authentication response. 10 | TokenID() (string, error) 11 | 12 | // ExpiresAt retrieves the token's expiration time. 13 | ExpiresAt() (time.Time, error) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/rackspace/gophercloud/openstack/compute/v2/extensions/floatingip/doc.go: -------------------------------------------------------------------------------- 1 | // Package floatingip provides the ability to manage floating ips through 2 | // nova-network 3 | package floatingip 4 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/rackspace/gophercloud/openstack/compute/v2/extensions/keypairs/doc.go: -------------------------------------------------------------------------------- 1 | // Package keypairs provides information and interaction with the Keypairs 2 | // extension for the OpenStack Compute service. 3 | package keypairs 4 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/rackspace/gophercloud/openstack/compute/v2/extensions/keypairs/urls.go: -------------------------------------------------------------------------------- 1 | package keypairs 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | const resourcePath = "os-keypairs" 6 | 7 | func resourceURL(c *gophercloud.ServiceClient) string { 8 | return c.ServiceURL(resourcePath) 9 | } 10 | 11 | func listURL(c *gophercloud.ServiceClient) string { 12 | return resourceURL(c) 13 | } 14 | 15 | func createURL(c *gophercloud.ServiceClient) string { 16 | return resourceURL(c) 17 | } 18 | 19 | func getURL(c *gophercloud.ServiceClient, name string) string { 20 | return c.ServiceURL(resourcePath, name) 21 | } 22 | 23 | func deleteURL(c *gophercloud.ServiceClient, name string) string { 24 | return getURL(c, name) 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/rackspace/gophercloud/openstack/compute/v2/extensions/startstop/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package startstop provides functionality to start and stop servers that have 3 | been provisioned by the OpenStack Compute service. 4 | */ 5 | package startstop 6 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/rackspace/gophercloud/openstack/compute/v2/extensions/startstop/fixtures.go: -------------------------------------------------------------------------------- 1 | package startstop 2 | 3 | import ( 4 | "net/http" 5 | "testing" 6 | 7 | th "github.com/rackspace/gophercloud/testhelper" 8 | "github.com/rackspace/gophercloud/testhelper/client" 9 | ) 10 | 11 | func mockStartServerResponse(t *testing.T, id string) { 12 | th.Mux.HandleFunc("/servers/"+id+"/action", func(w http.ResponseWriter, r *http.Request) { 13 | th.TestMethod(t, r, "POST") 14 | th.TestHeader(t, r, "X-Auth-Token", client.TokenID) 15 | th.TestJSONRequest(t, r, `{"os-start": null}`) 16 | w.WriteHeader(http.StatusAccepted) 17 | }) 18 | } 19 | 20 | func mockStopServerResponse(t *testing.T, id string) { 21 | th.Mux.HandleFunc("/servers/"+id+"/action", func(w http.ResponseWriter, r *http.Request) { 22 | th.TestMethod(t, r, "POST") 23 | th.TestHeader(t, r, "X-Auth-Token", client.TokenID) 24 | th.TestJSONRequest(t, r, `{"os-stop": null}`) 25 | w.WriteHeader(http.StatusAccepted) 26 | }) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/rackspace/gophercloud/openstack/compute/v2/extensions/startstop/requests.go: -------------------------------------------------------------------------------- 1 | package startstop 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | func actionURL(client *gophercloud.ServiceClient, id string) string { 6 | return client.ServiceURL("servers", id, "action") 7 | } 8 | 9 | // Start is the operation responsible for starting a Compute server. 10 | func Start(client *gophercloud.ServiceClient, id string) gophercloud.ErrResult { 11 | var res gophercloud.ErrResult 12 | reqBody := map[string]interface{}{"os-start": nil} 13 | _, res.Err = client.Post(actionURL(client, id), reqBody, nil, nil) 14 | return res 15 | } 16 | 17 | // Stop is the operation responsible for stopping a Compute server. 18 | func Stop(client *gophercloud.ServiceClient, id string) gophercloud.ErrResult { 19 | var res gophercloud.ErrResult 20 | reqBody := map[string]interface{}{"os-stop": nil} 21 | _, res.Err = client.Post(actionURL(client, id), reqBody, nil, nil) 22 | return res 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/rackspace/gophercloud/openstack/compute/v2/flavors/doc.go: -------------------------------------------------------------------------------- 1 | // Package flavors provides information and interaction with the flavor API 2 | // resource in the OpenStack Compute service. 3 | // 4 | // A flavor is an available hardware configuration for a server. Each flavor 5 | // has a unique combination of disk space, memory capacity and priority for CPU 6 | // time. 7 | package flavors 8 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/rackspace/gophercloud/openstack/compute/v2/flavors/urls.go: -------------------------------------------------------------------------------- 1 | package flavors 2 | 3 | import ( 4 | "github.com/rackspace/gophercloud" 5 | ) 6 | 7 | func getURL(client *gophercloud.ServiceClient, id string) string { 8 | return client.ServiceURL("flavors", id) 9 | } 10 | 11 | func listURL(client *gophercloud.ServiceClient) string { 12 | return client.ServiceURL("flavors", "detail") 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/rackspace/gophercloud/openstack/compute/v2/images/doc.go: -------------------------------------------------------------------------------- 1 | // Package images provides information and interaction with the image API 2 | // resource in the OpenStack Compute service. 3 | // 4 | // An image is a collection of files used to create or rebuild a server. 5 | // Operators provide a number of pre-built OS images by default. You may also 6 | // create custom images from cloud servers you have launched. 7 | package images 8 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/rackspace/gophercloud/openstack/compute/v2/images/urls.go: -------------------------------------------------------------------------------- 1 | package images 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | func listDetailURL(client *gophercloud.ServiceClient) string { 6 | return client.ServiceURL("images", "detail") 7 | } 8 | 9 | func getURL(client *gophercloud.ServiceClient, id string) string { 10 | return client.ServiceURL("images", id) 11 | } 12 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/rackspace/gophercloud/openstack/compute/v2/servers/doc.go: -------------------------------------------------------------------------------- 1 | // Package servers provides information and interaction with the server API 2 | // resource in the OpenStack Compute service. 3 | // 4 | // A server is a virtual machine instance in the compute system. In order for 5 | // one to be provisioned, a valid flavor and image are required. 6 | package servers 7 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/rackspace/gophercloud/openstack/compute/v2/servers/util.go: -------------------------------------------------------------------------------- 1 | package servers 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | // WaitForStatus will continually poll a server until it successfully transitions to a specified 6 | // status. It will do this for at most the number of seconds specified. 7 | func WaitForStatus(c *gophercloud.ServiceClient, id, status string, secs int) error { 8 | return gophercloud.WaitFor(secs, func() (bool, error) { 9 | current, err := Get(c, id).Extract() 10 | if err != nil { 11 | return false, err 12 | } 13 | 14 | if current.Status == status { 15 | return true, nil 16 | } 17 | 18 | return false, nil 19 | }) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/rackspace/gophercloud/openstack/identity/v2/tenants/doc.go: -------------------------------------------------------------------------------- 1 | // Package tenants provides information and interaction with the 2 | // tenants API resource for the OpenStack Identity service. 3 | // 4 | // See http://developer.openstack.org/api-ref-identity-v2.html#identity-auth-v2 5 | // and http://developer.openstack.org/api-ref-identity-v2.html#admin-tenants 6 | // for more information. 7 | package tenants 8 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/rackspace/gophercloud/openstack/identity/v2/tenants/urls.go: -------------------------------------------------------------------------------- 1 | package tenants 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | func listURL(client *gophercloud.ServiceClient) string { 6 | return client.ServiceURL("tenants") 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/rackspace/gophercloud/openstack/identity/v2/tokens/doc.go: -------------------------------------------------------------------------------- 1 | // Package tokens provides information and interaction with the token API 2 | // resource for the OpenStack Identity service. 3 | // For more information, see: 4 | // http://developer.openstack.org/api-ref-identity-v2.html#identity-auth-v2 5 | package tokens 6 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/rackspace/gophercloud/openstack/identity/v2/tokens/urls.go: -------------------------------------------------------------------------------- 1 | package tokens 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | // CreateURL generates the URL used to create new Tokens. 6 | func CreateURL(client *gophercloud.ServiceClient) string { 7 | return client.ServiceURL("tokens") 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/rackspace/gophercloud/openstack/identity/v3/tokens/doc.go: -------------------------------------------------------------------------------- 1 | // Package tokens provides information and interaction with the token API 2 | // resource for the OpenStack Identity service. 3 | // 4 | // For more information, see: 5 | // http://developer.openstack.org/api-ref-identity-v3.html#tokens-v3 6 | package tokens 7 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/rackspace/gophercloud/openstack/identity/v3/tokens/urls.go: -------------------------------------------------------------------------------- 1 | package tokens 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | func tokenURL(c *gophercloud.ServiceClient) string { 6 | return c.ServiceURL("auth", "tokens") 7 | } 8 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/rackspace/gophercloud/openstack/networking/v2/extensions/layer3/floatingips/urls.go: -------------------------------------------------------------------------------- 1 | package floatingips 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | const resourcePath = "floatingips" 6 | 7 | func rootURL(c *gophercloud.ServiceClient) string { 8 | return c.ServiceURL(resourcePath) 9 | } 10 | 11 | func resourceURL(c *gophercloud.ServiceClient, id string) string { 12 | return c.ServiceURL(resourcePath, id) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/rackspace/gophercloud/openstack/networking/v2/networks/doc.go: -------------------------------------------------------------------------------- 1 | // Package networks contains functionality for working with Neutron network 2 | // resources. A network is an isolated virtual layer-2 broadcast domain that is 3 | // typically reserved for the tenant who created it (unless you configure the 4 | // network to be shared). Tenants can create multiple networks until the 5 | // thresholds per-tenant quota is reached. 6 | // 7 | // In the v2.0 Networking API, the network is the main entity. Ports and subnets 8 | // are always associated with a network. 9 | package networks 10 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/rackspace/gophercloud/openstack/networking/v2/networks/errors.go: -------------------------------------------------------------------------------- 1 | package networks 2 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/rackspace/gophercloud/openstack/networking/v2/networks/urls.go: -------------------------------------------------------------------------------- 1 | package networks 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | func resourceURL(c *gophercloud.ServiceClient, id string) string { 6 | return c.ServiceURL("networks", id) 7 | } 8 | 9 | func rootURL(c *gophercloud.ServiceClient) string { 10 | return c.ServiceURL("networks") 11 | } 12 | 13 | func getURL(c *gophercloud.ServiceClient, id string) string { 14 | return resourceURL(c, id) 15 | } 16 | 17 | func listURL(c *gophercloud.ServiceClient) string { 18 | return rootURL(c) 19 | } 20 | 21 | func createURL(c *gophercloud.ServiceClient) string { 22 | return rootURL(c) 23 | } 24 | 25 | func updateURL(c *gophercloud.ServiceClient, id string) string { 26 | return resourceURL(c, id) 27 | } 28 | 29 | func deleteURL(c *gophercloud.ServiceClient, id string) string { 30 | return resourceURL(c, id) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/rackspace/gophercloud/openstack/networking/v2/ports/doc.go: -------------------------------------------------------------------------------- 1 | // Package ports contains functionality for working with Neutron port resources. 2 | // A port represents a virtual switch port on a logical network switch. Virtual 3 | // instances attach their interfaces into ports. The logical port also defines 4 | // the MAC address and the IP address(es) to be assigned to the interfaces 5 | // plugged into them. When IP addresses are associated to a port, this also 6 | // implies the port is associated with a subnet, as the IP address was taken 7 | // from the allocation pool for a specific subnet. 8 | package ports 9 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/rackspace/gophercloud/openstack/networking/v2/ports/errors.go: -------------------------------------------------------------------------------- 1 | package ports 2 | 3 | import "fmt" 4 | 5 | func err(str string) error { 6 | return fmt.Errorf("%s", str) 7 | } 8 | 9 | var ( 10 | errNetworkIDRequired = err("A Network ID is required") 11 | ) 12 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/rackspace/gophercloud/openstack/networking/v2/ports/urls.go: -------------------------------------------------------------------------------- 1 | package ports 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | func resourceURL(c *gophercloud.ServiceClient, id string) string { 6 | return c.ServiceURL("ports", id) 7 | } 8 | 9 | func rootURL(c *gophercloud.ServiceClient) string { 10 | return c.ServiceURL("ports") 11 | } 12 | 13 | func listURL(c *gophercloud.ServiceClient) string { 14 | return rootURL(c) 15 | } 16 | 17 | func getURL(c *gophercloud.ServiceClient, id string) string { 18 | return resourceURL(c, id) 19 | } 20 | 21 | func createURL(c *gophercloud.ServiceClient) string { 22 | return rootURL(c) 23 | } 24 | 25 | func updateURL(c *gophercloud.ServiceClient, id string) string { 26 | return resourceURL(c, id) 27 | } 28 | 29 | func deleteURL(c *gophercloud.ServiceClient, id string) string { 30 | return resourceURL(c, id) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/rackspace/gophercloud/pagination/null.go: -------------------------------------------------------------------------------- 1 | package pagination 2 | 3 | // nullPage is an always-empty page that trivially satisfies all Page interfacts. 4 | // It's useful to be returned along with an error. 5 | type nullPage struct{} 6 | 7 | // NextPageURL always returns "" to indicate that there are no more pages to return. 8 | func (p nullPage) NextPageURL() (string, error) { 9 | return "", nil 10 | } 11 | 12 | // IsEmpty always returns true to prevent iteration over nullPages. 13 | func (p nullPage) IsEmpty() (bool, error) { 14 | return true, nil 15 | } 16 | 17 | // LastMark always returns "" because the nullPage contains no items to have a mark. 18 | func (p nullPage) LastMark() (string, error) { 19 | return "", nil 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/rackspace/gophercloud/pagination/pkg.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package pagination contains utilities and convenience structs that implement common pagination idioms within OpenStack APIs. 3 | */ 4 | package pagination 5 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/rackspace/gophercloud/pagination/single.go: -------------------------------------------------------------------------------- 1 | package pagination 2 | 3 | // SinglePageBase may be embedded in a Page that contains all of the results from an operation at once. 4 | type SinglePageBase PageResult 5 | 6 | // NextPageURL always returns "" to indicate that there are no more pages to return. 7 | func (current SinglePageBase) NextPageURL() (string, error) { 8 | return "", nil 9 | } 10 | 11 | // GetBody returns the single page's body. This method is needed to satisfy the 12 | // Page interface. 13 | func (current SinglePageBase) GetBody() interface{} { 14 | return current.Body 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/rackspace/gophercloud/rackspace/identity/v2/tokens/doc.go: -------------------------------------------------------------------------------- 1 | // Package tokens provides information and interaction with the token 2 | // API resource for the Rackspace Identity service. 3 | package tokens 4 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/rackspace/gophercloud/testhelper/client/fake.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "github.com/rackspace/gophercloud" 5 | "github.com/rackspace/gophercloud/testhelper" 6 | ) 7 | 8 | // Fake token to use. 9 | const TokenID = "cbc36478b0bd8e67e89469c7749d4127" 10 | 11 | // ServiceClient returns a generic service client for use in tests. 12 | func ServiceClient() *gophercloud.ServiceClient { 13 | return &gophercloud.ServiceClient{ 14 | ProviderClient: &gophercloud.ProviderClient{TokenID: TokenID}, 15 | Endpoint: testhelper.Endpoint(), 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/rackspace/gophercloud/testhelper/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package testhelper container methods that are useful for writing unit tests. 3 | */ 4 | package testhelper 5 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/samalba/dockerclient/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/samalba/dockerclient/utils.go: -------------------------------------------------------------------------------- 1 | package dockerclient 2 | 3 | import ( 4 | "crypto/tls" 5 | "net" 6 | "net/http" 7 | "net/url" 8 | "time" 9 | ) 10 | 11 | func newHTTPClient(u *url.URL, tlsConfig *tls.Config, timeout time.Duration) *http.Client { 12 | httpTransport := &http.Transport{ 13 | TLSClientConfig: tlsConfig, 14 | } 15 | 16 | switch u.Scheme { 17 | default: 18 | httpTransport.Dial = func(proto, addr string) (net.Conn, error) { 19 | return net.DialTimeout(proto, addr, timeout) 20 | } 21 | case "unix": 22 | socketPath := u.Path 23 | unixDial := func(proto, addr string) (net.Conn, error) { 24 | return net.DialTimeout("unix", socketPath, timeout) 25 | } 26 | httpTransport.Dial = unixDial 27 | // Override the main URL object so the HTTP lib won't complain 28 | u.Scheme = "http" 29 | u.Host = "unix.sock" 30 | u.Path = "" 31 | } 32 | return &http.Client{Transport: httpTransport} 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/stretchr/objx/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/stretchr/objx/README.md: -------------------------------------------------------------------------------- 1 | # objx 2 | 3 | * Jump into the [API Documentation](http://godoc.org/github.com/stretchr/objx) 4 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/stretchr/objx/constants.go: -------------------------------------------------------------------------------- 1 | package objx 2 | 3 | const ( 4 | // PathSeparator is the character used to separate the elements 5 | // of the keypath. 6 | // 7 | // For example, `location.address.city` 8 | PathSeparator string = "." 9 | 10 | // SignatureSeparator is the character that is used to 11 | // separate the Base64 string from the security signature. 12 | SignatureSeparator = "_" 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/stretchr/objx/security.go: -------------------------------------------------------------------------------- 1 | package objx 2 | 3 | import ( 4 | "crypto/sha1" 5 | "encoding/hex" 6 | ) 7 | 8 | // HashWithKey hashes the specified string using the security 9 | // key. 10 | func HashWithKey(data, key string) string { 11 | hash := sha1.New() 12 | hash.Write([]byte(data + ":" + key)) 13 | return hex.EncodeToString(hash.Sum(nil)) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/stretchr/objx/tests.go: -------------------------------------------------------------------------------- 1 | package objx 2 | 3 | // Has gets whether there is something at the specified selector 4 | // or not. 5 | // 6 | // If m is nil, Has will always return false. 7 | func (m Map) Has(selector string) bool { 8 | if m == nil { 9 | return false 10 | } 11 | return !m.Get(selector).IsNil() 12 | } 13 | 14 | // IsNil gets whether the data is nil or not. 15 | func (v *Value) IsNil() bool { 16 | return v == nil || v.data == nil 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl: -------------------------------------------------------------------------------- 1 | {{.CommentWithoutT "a"}} 2 | func (a *Assertions) {{.DocInfo.Name}}({{.Params}}) bool { 3 | return {{.DocInfo.Name}}(a.t, {{.ForwardedParams}}) 4 | } 5 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/stretchr/testify/assert/errors.go: -------------------------------------------------------------------------------- 1 | package assert 2 | 3 | import ( 4 | "errors" 5 | ) 6 | 7 | // AnError is an error instance useful for testing. If the code does not care 8 | // about error specifics, and only needs to return the error for example, this 9 | // error should be used to make the test code more readable. 10 | var AnError = errors.New("assert.AnError general error for testing") 11 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/stretchr/testify/assert/forward_assertions.go: -------------------------------------------------------------------------------- 1 | package assert 2 | 3 | // Assertions provides assertion methods around the 4 | // TestingT interface. 5 | type Assertions struct { 6 | t TestingT 7 | } 8 | 9 | // New makes a new Assertions object for the specified TestingT. 10 | func New(t TestingT) *Assertions { 11 | return &Assertions{ 12 | t: t, 13 | } 14 | } 15 | 16 | //go:generate go run ../_codegen/main.go -output-package=assert -template=assertion_forward.go.tmpl 17 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/tent/http-link-go/.gitignore: -------------------------------------------------------------------------------- 1 | *.test 2 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/tent/http-link-go/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.1 4 | - tip 5 | before_install: 6 | - go get launchpad.net/gocheck 7 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/tent/http-link-go/README.md: -------------------------------------------------------------------------------- 1 | # http-link-go [![Build Status](https://travis-ci.org/tent/http-link-go.png?branch=master)](https://travis-ci.org/tent/http-link-go) 2 | 3 | http-link-go implements parsing and serialization of Link header values as 4 | defined in [RFC 5988](https://tools.ietf.org/html/rfc5988). 5 | 6 | [**Documentation**](http://godoc.org/github.com/tent/http-link-go) 7 | 8 | ## Installation 9 | 10 | ```text 11 | go get github.com/tent/http-link-go 12 | ``` 13 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/vmware/govcloudair/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | .cover 10 | 11 | # Architecture specific extensions/prefixes 12 | *.[568vq] 13 | [568vq].out 14 | 15 | *.cgo1.go 16 | *.cgo2.c 17 | _cgo_defun.c 18 | _cgo_gotypes.go 19 | _cgo_export.* 20 | 21 | _testmain.go 22 | 23 | *.exe 24 | *.test 25 | *.prof -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/vmware/govcloudair/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | install: 4 | - go get -t ./... 5 | - go get golang.org/x/tools/cmd/cover 6 | - go get github.com/mattn/goveralls 7 | 8 | script: 9 | - PATH="$HOME/gopath/bin:$PATH" 10 | - script/coverage --coveralls -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/vmware/govcloudair/Readme.md: -------------------------------------------------------------------------------- 1 | ## govcloudair [![Build Status](https://travis-ci.org/vmware/govcloudair.svg?branch=master)](https://travis-ci.org/frapposelli/govcloudair) [![Coverage Status](https://img.shields.io/coveralls/vmware/govcloudair.svg)](https://coveralls.io/r/vmware/govcloudair) [![GoDoc](https://godoc.org/github.com/vmware/govcloudair?status.svg)](http://godoc.org/github.com/vmware/govcloudair) 2 | 3 | This package provides the `govcloudair` package which offers an interface to the vCloud Air 5.6 API. 4 | 5 | It serves as a foundation for a project currently in development, there are plans to make it a general purpose API in the future. 6 | 7 | The API is currently under heavy development, its coverage is extremely limited at the moment. -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/vmware/govcloudair/orgvdcnetwork.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014 VMware, Inc. All rights reserved. Licensed under the Apache v2 License. 3 | */ 4 | 5 | package govcloudair 6 | 7 | import ( 8 | types "github.com/vmware/govcloudair/types/v56" 9 | ) 10 | 11 | type OrgVDCNetwork struct { 12 | OrgVDCNetwork *types.OrgVDCNetwork 13 | c *Client 14 | } 15 | 16 | func NewOrgVDCNetwork(c *Client) *OrgVDCNetwork { 17 | return &OrgVDCNetwork{ 18 | OrgVDCNetwork: new(types.OrgVDCNetwork), 19 | c: c, 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/vmware/govcloudair/vapptemplate.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014 VMware, Inc. All rights reserved. Licensed under the Apache v2 License. 3 | */ 4 | 5 | package govcloudair 6 | 7 | import ( 8 | types "github.com/vmware/govcloudair/types/v56" 9 | ) 10 | 11 | type VAppTemplate struct { 12 | VAppTemplate *types.VAppTemplate 13 | c *Client 14 | } 15 | 16 | func NewVAppTemplate(c *Client) *VAppTemplate { 17 | return &VAppTemplate{ 18 | VAppTemplate: new(types.VAppTemplate), 19 | c: c, 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/vmware/govmomi/.drone.sec: -------------------------------------------------------------------------------- 1 | eyJhbGciOiJSU0EtT0FFUCIsImVuYyI6IkExMjhHQ00ifQ.kK6pryC8R-O1R0Gj9ydLvQuIZlcYLGze23WdW7xbpiEEKdz6nweJrMm7ysy8lgu1tM47JVo19p2_b26bNKSQshCUOETvd7Hb2UMZOjnyUnqdyAAyoi6UkIquXfUUbHTNS0iMxwSxxW9KMp2GXNq8-o6T8xQZTDirBJFKKd8ZNUasTaoa5j8U9IfdR1aCavTBuOhvk8IVs-jSbY5TVJMJiE0IOPXois7aRJ6uAiANQBk9VKLegEcZD_qAewecXHDsHi-u0jbmg3o3PPaJaK_Qv5dsPlR2M-E2kE3AGUn0-zn5zYRngoAZ8WZr2O4GvLdltJKq9i2z7jOrdOzzRcDRow.96qvwl_E1Hj15u7Q.hWs-jQ8FsqQFD7pE9N-UEP1BWQ9rsJIcCaPvQRIp8Fukm_vvlw9YEaEq0ERLrsUWsJWpd1ca8_h8x7xD6f_d5YppwRqRHIeGIsdBOTMhNs0lG8ikkQXLat-UroCpy8EC17nuUtDE2E2Kdxrk4Cdd6Bk-dKk0Ta4w3Ud0YBKa.P8zrO7xizgv0i98eVWWzEg -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/vmware/govmomi/.drone.yml: -------------------------------------------------------------------------------- 1 | clone: 2 | tags: true 3 | path: github.com/vmware/govmomi 4 | build: 5 | image: golang:1.6 6 | pull: true 7 | environment: 8 | - GOVC_TEST_URL=$$GOVC_TEST_URL 9 | - GOVC_INSECURE=1 10 | - VCA=1 11 | commands: 12 | - make all install 13 | - git clone https://github.com/sstephenson/bats.git /tmp/bats 14 | - /tmp/bats/install.sh /usr/local 15 | - apt-get -qq update && apt-get install -yqq uuid-runtime bsdmainutils jq 16 | - govc/test/images/update.sh 17 | - bats govc/test 18 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/vmware/govmomi/.gitignore: -------------------------------------------------------------------------------- 1 | secrets.yml 2 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/vmware/govmomi/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: go 4 | 5 | go: 6 | - 1.6 7 | 8 | before_install: 9 | - make vendor 10 | 11 | script: 12 | - make check test 13 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/vmware/govmomi/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: test 2 | 3 | all: check test 4 | 5 | check: goimports govet 6 | 7 | vendor: 8 | go get golang.org/x/tools/cmd/goimports 9 | go get github.com/davecgh/go-spew/spew 10 | go get golang.org/x/net/context 11 | 12 | goimports: vendor 13 | @echo checking go imports... 14 | @! goimports -d . 2>&1 | egrep -v '^$$' 15 | 16 | govet: 17 | @echo checking go vet... 18 | @go tool vet -structtags=false -methods=false . 19 | 20 | test: vendor 21 | go test -v $(TEST_OPTS) ./... 22 | 23 | install: vendor 24 | go install github.com/vmware/govmomi/govc 25 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/vmware/govmomi/object/vmware_distributed_virtual_switch.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package object 18 | 19 | type VmwareDistributedVirtualSwitch struct { 20 | DistributedVirtualSwitch 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/vmware/govmomi/vim25/mo/entity.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2016 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package mo 18 | 19 | // Entity is the interface that is implemented by all managed objects 20 | // that extend ManagedEntity. 21 | type Entity interface { 22 | Reference 23 | Entity() *ManagedEntity 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/vmware/govmomi/vim25/mo/registry.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package mo 18 | 19 | import "reflect" 20 | 21 | var t = map[string]reflect.Type{} 22 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/vmware/govmomi/vim25/progress/report.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package progress 18 | 19 | // Report defines the interface for types that can deliver progress reports. 20 | // Examples include uploads/downloads in the http client and the task info 21 | // field in the task managed object. 22 | type Report interface { 23 | Percentage() float32 24 | Detail() string 25 | Error() error 26 | } 27 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/vmware/govmomi/vim25/types/base.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package types 18 | 19 | type AnyType interface{} 20 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/vmware/govmomi/vim25/types/fault.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package types 18 | 19 | type HasFault interface { 20 | Fault() BaseMethodFault 21 | } 22 | 23 | func IsFileNotFound(err error) bool { 24 | if f, ok := err.(HasFault); ok { 25 | switch f.Fault().(type) { 26 | case *FileNotFound: 27 | return true 28 | } 29 | } 30 | 31 | return false 32 | } 33 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/vmware/govmomi/vim25/types/helpers.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2015 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package types 18 | 19 | func NewBool(v bool) *bool { 20 | return &v 21 | } 22 | 23 | func NewReference(r ManagedObjectReference) *ManagedObjectReference { 24 | return &r 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/github.com/vmware/govmomi/vim25/types/registry.go: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2014 VMware, Inc. All Rights Reserved. 3 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); 5 | you may not use this file except in compliance with the License. 6 | You may obtain a copy of the License at 7 | 8 | http://www.apache.org/licenses/LICENSE-2.0 9 | 10 | Unless required by applicable law or agreed to in writing, software 11 | distributed under the License is distributed on an "AS IS" BASIS, 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | See the License for the specific language governing permissions and 14 | limitations under the License. 15 | */ 16 | 17 | package types 18 | 19 | import "reflect" 20 | 21 | var t = map[string]reflect.Type{} 22 | 23 | type Func func(string) (reflect.Type, bool) 24 | 25 | func TypeFunc() Func { 26 | return func(name string) (reflect.Type, bool) { 27 | typ, ok := t[name] 28 | return typ, ok 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/golang.org/x/crypto/curve25519/const_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // This code was translated into a form compatible with 6a from the public 6 | // domain sources in SUPERCOP: http://bench.cr.yp.to/supercop.html 7 | 8 | // +build amd64,!gccgo,!appengine 9 | 10 | DATA ·REDMASK51(SB)/8, $0x0007FFFFFFFFFFFF 11 | GLOBL ·REDMASK51(SB), 8, $8 12 | 13 | DATA ·_121666_213(SB)/8, $996687872 14 | GLOBL ·_121666_213(SB), 8, $8 15 | 16 | DATA ·_2P0(SB)/8, $0xFFFFFFFFFFFDA 17 | GLOBL ·_2P0(SB), 8, $8 18 | 19 | DATA ·_2P1234(SB)/8, $0xFFFFFFFFFFFFE 20 | GLOBL ·_2P1234(SB), 8, $8 21 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/golang.org/x/crypto/ssh/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | /* 6 | Package ssh implements an SSH client and server. 7 | 8 | SSH is a transport security protocol, an authentication protocol and a 9 | family of application protocols. The most typical application level 10 | protocol is a remote shell and this is specifically implemented. However, 11 | the multiplexed nature of SSH is exposed to users that wish to support 12 | others. 13 | 14 | References: 15 | [PROTOCOL.certkeys]: http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/ssh/PROTOCOL.certkeys?rev=HEAD 16 | [SSH-PARAMETERS]: http://www.iana.org/assignments/ssh-parameters/ssh-parameters.xml#ssh-parameters-1 17 | */ 18 | package ssh 19 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/golang.org/x/crypto/ssh/terminal/util_bsd.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build darwin dragonfly freebsd netbsd openbsd 6 | 7 | package terminal 8 | 9 | import "syscall" 10 | 11 | const ioctlReadTermios = syscall.TIOCGETA 12 | const ioctlWriteTermios = syscall.TIOCSETA 13 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/golang.org/x/crypto/ssh/terminal/util_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package terminal 6 | 7 | // These constants are declared here, rather than importing 8 | // them from the syscall package as some syscall packages, even 9 | // on linux, for example gccgo, do not declare them. 10 | const ioctlReadTermios = 0x5401 // syscall.TCGETS 11 | const ioctlWriteTermios = 0x5402 // syscall.TCSETS 12 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/golang.org/x/net/context/ctxhttp/cancelreq.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.5 6 | 7 | package ctxhttp 8 | 9 | import "net/http" 10 | 11 | func canceler(client *http.Client, req *http.Request) func() { 12 | ch := make(chan struct{}) 13 | req.Cancel = ch 14 | 15 | return func() { 16 | close(ch) 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/golang.org/x/net/context/ctxhttp/cancelreq_go14.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !go1.5 6 | 7 | package ctxhttp 8 | 9 | import "net/http" 10 | 11 | type requestCanceler interface { 12 | CancelRequest(*http.Request) 13 | } 14 | 15 | func canceler(client *http.Client, req *http.Request) func() { 16 | rc, ok := client.Transport.(requestCanceler) 17 | if !ok { 18 | return func() {} 19 | } 20 | return func() { 21 | rc.CancelRequest(req) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/golang.org/x/oauth2/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.3 5 | - 1.4 6 | 7 | install: 8 | - export GOPATH="$HOME/gopath" 9 | - mkdir -p "$GOPATH/src/golang.org/x" 10 | - mv "$TRAVIS_BUILD_DIR" "$GOPATH/src/golang.org/x/oauth2" 11 | - go get -v -t -d golang.org/x/oauth2/... 12 | 13 | script: 14 | - go test -v golang.org/x/oauth2/... 15 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/golang.org/x/oauth2/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/golang.org/x/oauth2/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/golang.org/x/oauth2/client_appengine.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build appengine 6 | 7 | // App Engine hooks. 8 | 9 | package oauth2 10 | 11 | import ( 12 | "net/http" 13 | 14 | "golang.org/x/net/context" 15 | "golang.org/x/oauth2/internal" 16 | "google.golang.org/appengine/urlfetch" 17 | ) 18 | 19 | func init() { 20 | internal.RegisterContextClientFunc(contextClientAppEngine) 21 | } 22 | 23 | func contextClientAppEngine(ctx context.Context) (*http.Client, error) { 24 | return urlfetch.Client(ctx), nil 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/golang.org/x/oauth2/google/appengine_hook.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build appengine 6 | 7 | package google 8 | 9 | import "google.golang.org/appengine" 10 | 11 | func init() { 12 | appengineTokenFunc = appengine.AccessToken 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/golang.org/x/oauth2/google/appenginevm_hook.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The oauth2 Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build appenginevm 6 | 7 | package google 8 | 9 | import "google.golang.org/appengine" 10 | 11 | func init() { 12 | appengineVM = true 13 | appengineTokenFunc = appengine.AccessToken 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/google.golang.org/api/googleapi/internal/uritemplates/utils.go: -------------------------------------------------------------------------------- 1 | package uritemplates 2 | 3 | func Expand(path string, expansions map[string]string) (string, error) { 4 | template, err := Parse(path) 5 | if err != nil { 6 | return "", err 7 | } 8 | values := make(map[string]interface{}) 9 | for k, v := range expansions { 10 | values[k] = v 11 | } 12 | return template.Expand(values) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/google.golang.org/appengine/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | 4 | go: 5 | - 1.4 6 | 7 | install: 8 | - go get -v -t -d google.golang.org/appengine/... 9 | - mkdir sdk 10 | - curl -o sdk.zip "https://storage.googleapis.com/appengine-sdks/featured/go_appengine_sdk_linux_amd64-1.9.24.zip" 11 | - unzip sdk.zip -d sdk 12 | - export APPENGINE_DEV_APPSERVER=$(pwd)/sdk/go_appengine/dev_appserver.py 13 | 14 | script: 15 | - go version 16 | - go test -v google.golang.org/appengine/... 17 | - go test -v -race google.golang.org/appengine/... 18 | - sdk/go_appengine/goapp test -v google.golang.org/appengine/... 19 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/google.golang.org/appengine/internal/app_id.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 Google Inc. All rights reserved. 2 | // Use of this source code is governed by the Apache 2.0 3 | // license that can be found in the LICENSE file. 4 | 5 | package internal 6 | 7 | import ( 8 | "strings" 9 | ) 10 | 11 | func parseFullAppID(appid string) (partition, domain, displayID string) { 12 | if i := strings.Index(appid, "~"); i != -1 { 13 | partition, appid = appid[:i], appid[i+1:] 14 | } 15 | if i := strings.Index(appid, ":"); i != -1 { 16 | domain, appid = appid[:i], appid[i+1:] 17 | } 18 | return partition, domain, appid 19 | } 20 | 21 | // appID returns "appid" or "domain.com:appid". 22 | func appID(fullAppID string) string { 23 | _, dom, dis := parseFullAppID(fullAppID) 24 | if dom != "" { 25 | return dom + ":" + dis 26 | } 27 | return dis 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/google.golang.org/appengine/internal/base/api_base.proto: -------------------------------------------------------------------------------- 1 | // Built-in base types for API calls. Primarily useful as return types. 2 | 3 | syntax = "proto2"; 4 | option go_package = "base"; 5 | 6 | package appengine.base; 7 | 8 | message StringProto { 9 | required string value = 1; 10 | } 11 | 12 | message Integer32Proto { 13 | required int32 value = 1; 14 | } 15 | 16 | message Integer64Proto { 17 | required int64 value = 1; 18 | } 19 | 20 | message BoolProto { 21 | required bool value = 1; 22 | } 23 | 24 | message DoubleProto { 25 | required double value = 1; 26 | } 27 | 28 | message BytesProto { 29 | required bytes value = 1 [ctype=CORD]; 30 | } 31 | 32 | message VoidProto { 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/google.golang.org/appengine/internal/identity.go: -------------------------------------------------------------------------------- 1 | // Copyright 2011 Google Inc. All rights reserved. 2 | // Use of this source code is governed by the Apache 2.0 3 | // license that can be found in the LICENSE file. 4 | 5 | package internal 6 | 7 | import netcontext "golang.org/x/net/context" 8 | 9 | // These functions are implementations of the wrapper functions 10 | // in ../appengine/identity.go. See that file for commentary. 11 | 12 | func AppID(c netcontext.Context) string { 13 | return appID(FullyQualifiedAppID(c)) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/google.golang.org/appengine/namespace.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 Google Inc. All rights reserved. 2 | // Use of this source code is governed by the Apache 2.0 3 | // license that can be found in the LICENSE file. 4 | 5 | package appengine 6 | 7 | import ( 8 | "fmt" 9 | "regexp" 10 | 11 | "golang.org/x/net/context" 12 | 13 | "google.golang.org/appengine/internal" 14 | ) 15 | 16 | // Namespace returns a replacement context that operates within the given namespace. 17 | func Namespace(c context.Context, namespace string) (context.Context, error) { 18 | if !validNamespace.MatchString(namespace) { 19 | return nil, fmt.Errorf("appengine: namespace %q does not match /%s/", namespace, validNamespace) 20 | } 21 | return internal.NamespacedContext(c, namespace), nil 22 | } 23 | 24 | // validNamespace matches valid namespace names. 25 | var validNamespace = regexp.MustCompile(`^[0-9A-Za-z._-]{0,100}$`) 26 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/vendor/google.golang.org/appengine/timeout.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 Google Inc. All rights reserved. 2 | // Use of this source code is governed by the Apache 2.0 3 | // license that can be found in the LICENSE file. 4 | 5 | package appengine 6 | 7 | import "golang.org/x/net/context" 8 | 9 | // IsTimeoutError reports whether err is a timeout error. 10 | func IsTimeoutError(err error) bool { 11 | if err == context.DeadlineExceeded { 12 | return true 13 | } 14 | if t, ok := err.(interface { 15 | IsTimeout() bool 16 | }); ok { 17 | return t.IsTimeout() 18 | } 19 | return false 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/docker/machine/version/version.go: -------------------------------------------------------------------------------- 1 | package version 2 | 3 | import ( 4 | "fmt" 5 | "strings" 6 | ) 7 | 8 | var ( 9 | // Version should be updated by hand at each release 10 | Version = "0.8.1" 11 | 12 | // GitCommit will be overwritten automatically by the build system 13 | GitCommit = "HEAD" 14 | ) 15 | 16 | // FullVersion formats the version to be printed 17 | func FullVersion() string { 18 | return fmt.Sprintf("%s, build %s", Version, GitCommit) 19 | } 20 | 21 | // RC checks if the Machine version is a release candidate or not 22 | func RC() bool { 23 | return strings.Contains(Version, "rc") 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/pmezard/go-difflib/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.5 4 | - tip 5 | 6 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | 24 | .DS_Store 25 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.1 5 | - 1.2 6 | - 1.3 7 | - 1.4 8 | - 1.5 9 | - tip 10 | 11 | script: 12 | - go test -v ./... 13 | 14 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/Godeps/Godeps.json: -------------------------------------------------------------------------------- 1 | { 2 | "ImportPath": "github.com/stretchr/testify", 3 | "GoVersion": "go1.5", 4 | "Packages": [ 5 | "./..." 6 | ], 7 | "Deps": [ 8 | { 9 | "ImportPath": "github.com/davecgh/go-spew/spew", 10 | "Rev": "2df174808ee097f90d259e432cc04442cf60be21" 11 | }, 12 | { 13 | "ImportPath": "github.com/pmezard/go-difflib/difflib", 14 | "Rev": "d8ed2627bdf02c080bf22230dbb337003b7aba2d" 15 | }, 16 | { 17 | "ImportPath": "github.com/stretchr/objx", 18 | "Rev": "cbeaeb16a013161a98496fad62933b1d21786672" 19 | } 20 | ] 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/Godeps/Readme: -------------------------------------------------------------------------------- 1 | This directory tree is generated automatically by godep. 2 | 3 | Please do not edit. 4 | 5 | See https://github.com/tools/godep for more information. 6 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/assertion_forward.go.tmpl: -------------------------------------------------------------------------------- 1 | {{.CommentWithoutT "a"}} 2 | func (a *Assertions) {{.DocInfo.Name}}({{.Params}}) bool { 3 | return {{.DocInfo.Name}}(a.t, {{.ForwardedParams}}) 4 | } 5 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/errors.go: -------------------------------------------------------------------------------- 1 | package assert 2 | 3 | import ( 4 | "errors" 5 | ) 6 | 7 | // AnError is an error instance useful for testing. If the code does not care 8 | // about error specifics, and only needs to return the error for example, this 9 | // error should be used to make the test code more readable. 10 | var AnError = errors.New("assert.AnError general error for testing") 11 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/assert/forward_assertions.go: -------------------------------------------------------------------------------- 1 | package assert 2 | 3 | // Assertions provides assertion methods around the 4 | // TestingT interface. 5 | type Assertions struct { 6 | t TestingT 7 | } 8 | 9 | // New makes a new Assertions object for the specified TestingT. 10 | func New(t TestingT) *Assertions { 11 | return &Assertions{ 12 | t: t, 13 | } 14 | } 15 | 16 | //go:generate go run ../_codegen/main.go -output-package=assert -template=assertion_forward.go.tmpl 17 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/http/doc.go: -------------------------------------------------------------------------------- 1 | // Package http DEPRECATED USE net/http/httptest 2 | package http 3 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/http/test_round_tripper.go: -------------------------------------------------------------------------------- 1 | package http 2 | 3 | import ( 4 | "github.com/stretchr/testify/mock" 5 | "net/http" 6 | ) 7 | 8 | // TestRoundTripper DEPRECATED USE net/http/httptest 9 | type TestRoundTripper struct { 10 | mock.Mock 11 | } 12 | 13 | // RoundTrip DEPRECATED USE net/http/httptest 14 | func (t *TestRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) { 15 | args := t.Called(req) 16 | return args.Get(0).(*http.Response), args.Error(1) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/package_test.go: -------------------------------------------------------------------------------- 1 | package testify 2 | 3 | import ( 4 | "github.com/stretchr/testify/assert" 5 | "testing" 6 | ) 7 | 8 | func TestImports(t *testing.T) { 9 | if assert.Equal(t, 1, 1) != true { 10 | t.Error("Something is wrong.") 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/require/doc.go: -------------------------------------------------------------------------------- 1 | // Package require implements the same assertions as the `assert` package but 2 | // stops test execution when a test fails. 3 | // 4 | // Example Usage 5 | // 6 | // The following is a complete example using require in a standard test function: 7 | // import ( 8 | // "testing" 9 | // "github.com/stretchr/testify/require" 10 | // ) 11 | // 12 | // func TestSomething(t *testing.T) { 13 | // 14 | // var a string = "Hello" 15 | // var b string = "Hello" 16 | // 17 | // require.Equal(t, a, b, "The two words should be the same.") 18 | // 19 | // } 20 | // 21 | // Assertions 22 | // 23 | // The `require` package have same global functions as in the `assert` package, 24 | // but instead of returning a boolean result they call `t.FailNow()`. 25 | // 26 | // Every assertion function also takes an optional string message as the final argument, 27 | // allowing custom error messages to be appended to the message the assertion method outputs. 28 | package require 29 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/require/forward_requirements.go: -------------------------------------------------------------------------------- 1 | package require 2 | 3 | // Assertions provides assertion methods around the 4 | // TestingT interface. 5 | type Assertions struct { 6 | t TestingT 7 | } 8 | 9 | // New makes a new Assertions object for the specified TestingT. 10 | func New(t TestingT) *Assertions { 11 | return &Assertions{ 12 | t: t, 13 | } 14 | } 15 | 16 | //go:generate go run ../_codegen/main.go -output-package=require -template=require_forward.go.tmpl 17 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/require/require.go.tmpl: -------------------------------------------------------------------------------- 1 | {{.Comment}} 2 | func {{.DocInfo.Name}}(t TestingT, {{.Params}}) { 3 | if !assert.{{.DocInfo.Name}}(t, {{.ForwardedParams}}) { 4 | t.FailNow() 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/require/require_forward.go.tmpl: -------------------------------------------------------------------------------- 1 | {{.CommentWithoutT "a"}} 2 | func (a *Assertions) {{.DocInfo.Name}}({{.Params}}) { 3 | {{.DocInfo.Name}}(a.t, {{.ForwardedParams}}) 4 | } 5 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/require/requirements.go: -------------------------------------------------------------------------------- 1 | package require 2 | 3 | // TestingT is an interface wrapper around *testing.T 4 | type TestingT interface { 5 | Errorf(format string, args ...interface{}) 6 | FailNow() 7 | } 8 | 9 | //go:generate go run ../_codegen/main.go -output-package=require -template=require.go.tmpl 10 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/suite/interfaces.go: -------------------------------------------------------------------------------- 1 | package suite 2 | 3 | import "testing" 4 | 5 | // TestingSuite can store and return the current *testing.T context 6 | // generated by 'go test'. 7 | type TestingSuite interface { 8 | T() *testing.T 9 | SetT(*testing.T) 10 | } 11 | 12 | // SetupAllSuite has a SetupSuite method, which will run before the 13 | // tests in the suite are run. 14 | type SetupAllSuite interface { 15 | SetupSuite() 16 | } 17 | 18 | // SetupTestSuite has a SetupTest method, which will run before each 19 | // test in the suite. 20 | type SetupTestSuite interface { 21 | SetupTest() 22 | } 23 | 24 | // TearDownAllSuite has a TearDownSuite method, which will run after 25 | // all the tests in the suite have been run. 26 | type TearDownAllSuite interface { 27 | TearDownSuite() 28 | } 29 | 30 | // TearDownTestSuite has a TearDownTest method, which will run after 31 | // each test in the suite. 32 | type TearDownTestSuite interface { 33 | TearDownTest() 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/vendor/github.com/davecgh/go-spew/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2012-2013 Dave Collins 2 | 3 | Permission to use, copy, modify, and distribute this software for any 4 | purpose with or without fee is hereby granted, provided that the above 5 | copyright notice and this permission notice appear in all copies. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 8 | WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 9 | MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR 10 | ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 11 | WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 12 | ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 13 | OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 14 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/README.md: -------------------------------------------------------------------------------- 1 | # objx 2 | 3 | * Jump into the [API Documentation](http://godoc.org/github.com/stretchr/objx) 4 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/codegen/array-access.txt: -------------------------------------------------------------------------------- 1 | case []{1}: 2 | a := object.([]{1}) 3 | if isSet { 4 | a[index] = value.({1}) 5 | } else { 6 | if index >= len(a) { 7 | if panics { 8 | panic(fmt.Sprintf("objx: Index %d is out of range because the []{1} only contains %d items.", index, len(a))) 9 | } 10 | return nil 11 | } else { 12 | return a[index] 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/codegen/types_list.txt: -------------------------------------------------------------------------------- 1 | Interface,interface{},"something",nil,Inter 2 | Map,map[string]interface{},map[string]interface{}{"name":"Tyler"},nil,MSI 3 | ObjxMap,(Map),New(1),New(nil),ObjxMap 4 | Bool,bool,true,false,Bool 5 | String,string,"hello","",Str 6 | Int,int,1,0,Int 7 | Int8,int8,1,0,Int8 8 | Int16,int16,1,0,Int16 9 | Int32,int32,1,0,Int32 10 | Int64,int64,1,0,Int64 11 | Uint,uint,1,0,Uint 12 | Uint8,uint8,1,0,Uint8 13 | Uint16,uint16,1,0,Uint16 14 | Uint32,uint32,1,0,Uint32 15 | Uint64,uint64,1,0,Uint64 16 | Uintptr,uintptr,1,0,Uintptr 17 | Float32,float32,1,0,Float32 18 | Float64,float64,1,0,Float64 19 | Complex64,complex64,1,0,Complex64 20 | Complex128,complex128,1,0,Complex128 21 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/constants.go: -------------------------------------------------------------------------------- 1 | package objx 2 | 3 | const ( 4 | // PathSeparator is the character used to separate the elements 5 | // of the keypath. 6 | // 7 | // For example, `location.address.city` 8 | PathSeparator string = "." 9 | 10 | // SignatureSeparator is the character that is used to 11 | // separate the Base64 string from the security signature. 12 | SignatureSeparator = "_" 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/security.go: -------------------------------------------------------------------------------- 1 | package objx 2 | 3 | import ( 4 | "crypto/sha1" 5 | "encoding/hex" 6 | ) 7 | 8 | // HashWithKey hashes the specified string using the security 9 | // key. 10 | func HashWithKey(data, key string) string { 11 | hash := sha1.New() 12 | hash.Write([]byte(data + ":" + key)) 13 | return hex.EncodeToString(hash.Sum(nil)) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/tests.go: -------------------------------------------------------------------------------- 1 | package objx 2 | 3 | // Has gets whether there is something at the specified selector 4 | // or not. 5 | // 6 | // If m is nil, Has will always return false. 7 | func (m Map) Has(selector string) bool { 8 | if m == nil { 9 | return false 10 | } 11 | return !m.Get(selector).IsNil() 12 | } 13 | 14 | // IsNil gets whether the data is nil or not. 15 | func (v *Value) IsNil() bool { 16 | return v == nil || v.data == nil 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/stretchr/testify/vendor/github.com/stretchr/objx/value.go: -------------------------------------------------------------------------------- 1 | package objx 2 | 3 | // Value provides methods for extracting interface{} data in various 4 | // types. 5 | type Value struct { 6 | // data contains the raw data being managed by this Value 7 | data interface{} 8 | } 9 | 10 | // Data returns the raw data contained by this Value 11 | func (v *Value) Data() interface{} { 12 | return v.data 13 | } 14 | -------------------------------------------------------------------------------- /version.go: -------------------------------------------------------------------------------- 1 | // Package oneviewgolang This package should be used when working with api's for HP OneView and HP ICsp 2 | // Stub package for version 3 | package oneviewgolang 4 | 5 | var ( 6 | // ConfigVersion dictates which version of the config.json format is 7 | // used. It needs to be bumped if there is a breaking change, and 8 | // therefore migration, introduced to the config file format. 9 | ConfigVersion = 1 10 | 11 | // Version should be updated by hand at each release 12 | Version = "1.0.0" 13 | 14 | // GitCommit will be overwritten automatically by the build system 15 | GitCommit = "HEAD" 16 | ) 17 | --------------------------------------------------------------------------------