├── Godeps ├── Godeps.json ├── Readme └── _workspace │ ├── .gitignore │ └── src │ ├── code.google.com │ └── p │ │ └── goauth2 │ │ └── oauth │ │ ├── example │ │ └── oauthreq.go │ │ ├── jwt │ │ ├── example │ │ │ ├── example.client_secrets.json │ │ │ ├── example.pem │ │ │ └── main.go │ │ ├── jwt.go │ │ └── jwt_test.go │ │ ├── oauth.go │ │ └── oauth_test.go │ ├── github.com │ ├── MSOpenTech │ │ └── azure-sdk-for-go │ │ │ ├── LICENSE-2.0.txt │ │ │ ├── README.md │ │ │ ├── clients │ │ │ ├── imageClient │ │ │ │ ├── entities.go │ │ │ │ └── imageClient.go │ │ │ ├── locationClient │ │ │ │ ├── entities.go │ │ │ │ └── locationClient.go │ │ │ ├── storageServiceClient │ │ │ │ ├── entities.go │ │ │ │ └── storageServiceClient.go │ │ │ ├── vmClient │ │ │ │ ├── entities.go │ │ │ │ └── vmClient.go │ │ │ └── vmDiskClient │ │ │ │ └── vmDiskClient.go │ │ │ ├── common.go │ │ │ ├── core │ │ │ ├── http │ │ │ │ ├── cgi │ │ │ │ │ ├── child.go │ │ │ │ │ ├── child_test.go │ │ │ │ │ ├── host.go │ │ │ │ │ ├── host_test.go │ │ │ │ │ ├── matryoshka_test.go │ │ │ │ │ ├── plan9_test.go │ │ │ │ │ ├── posix_test.go │ │ │ │ │ └── testdata │ │ │ │ │ │ └── test.cgi │ │ │ │ ├── chunked.go │ │ │ │ ├── chunked_test.go │ │ │ │ ├── client.go │ │ │ │ ├── client_test.go │ │ │ │ ├── cookie.go │ │ │ │ ├── cookie_test.go │ │ │ │ ├── cookiejar │ │ │ │ │ ├── jar.go │ │ │ │ │ ├── jar_test.go │ │ │ │ │ ├── punycode.go │ │ │ │ │ └── punycode_test.go │ │ │ │ ├── doc.go │ │ │ │ ├── example_test.go │ │ │ │ ├── export_test.go │ │ │ │ ├── fcgi │ │ │ │ │ ├── child.go │ │ │ │ │ ├── fcgi.go │ │ │ │ │ └── fcgi_test.go │ │ │ │ ├── filetransport.go │ │ │ │ ├── filetransport_test.go │ │ │ │ ├── fs.go │ │ │ │ ├── fs_test.go │ │ │ │ ├── header.go │ │ │ │ ├── header_test.go │ │ │ │ ├── httptest │ │ │ │ │ ├── example_test.go │ │ │ │ │ ├── recorder.go │ │ │ │ │ ├── recorder_test.go │ │ │ │ │ ├── server.go │ │ │ │ │ └── server_test.go │ │ │ │ ├── httputil │ │ │ │ │ ├── chunked.go │ │ │ │ │ ├── chunked_test.go │ │ │ │ │ ├── dump.go │ │ │ │ │ ├── dump_test.go │ │ │ │ │ ├── httputil.go │ │ │ │ │ ├── persist.go │ │ │ │ │ ├── reverseproxy.go │ │ │ │ │ └── reverseproxy_test.go │ │ │ │ ├── jar.go │ │ │ │ ├── lex.go │ │ │ │ ├── lex_test.go │ │ │ │ ├── npn_test.go │ │ │ │ ├── pprof │ │ │ │ │ └── pprof.go │ │ │ │ ├── proxy_test.go │ │ │ │ ├── race.go │ │ │ │ ├── range_test.go │ │ │ │ ├── readrequest_test.go │ │ │ │ ├── request.go │ │ │ │ ├── request_test.go │ │ │ │ ├── requestwrite_test.go │ │ │ │ ├── response.go │ │ │ │ ├── response_test.go │ │ │ │ ├── responsewrite_test.go │ │ │ │ ├── serve_test.go │ │ │ │ ├── server.go │ │ │ │ ├── sniff.go │ │ │ │ ├── sniff_test.go │ │ │ │ ├── status.go │ │ │ │ ├── testdata │ │ │ │ │ ├── file │ │ │ │ │ ├── index.html │ │ │ │ │ └── style.css │ │ │ │ ├── transfer.go │ │ │ │ ├── transfer_test.go │ │ │ │ ├── transport.go │ │ │ │ ├── transport_test.go │ │ │ │ ├── triv.go │ │ │ │ └── z_last_test.go │ │ │ └── tls │ │ │ │ ├── alert.go │ │ │ │ ├── cipher_suites.go │ │ │ │ ├── common.go │ │ │ │ ├── conn.go │ │ │ │ ├── conn_test.go │ │ │ │ ├── generate_cert.go │ │ │ │ ├── handshake_client.go │ │ │ │ ├── handshake_client_test.go │ │ │ │ ├── handshake_messages.go │ │ │ │ ├── handshake_messages_test.go │ │ │ │ ├── handshake_server.go │ │ │ │ ├── handshake_server_test.go │ │ │ │ ├── key_agreement.go │ │ │ │ ├── prf.go │ │ │ │ ├── prf_test.go │ │ │ │ ├── ticket.go │ │ │ │ ├── tls.go │ │ │ │ └── tls_test.go │ │ │ └── publishSettings.go │ ├── Sirupsen │ │ └── logrus │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── entry.go │ │ │ ├── entry_test.go │ │ │ ├── examples │ │ │ ├── basic │ │ │ │ └── basic.go │ │ │ └── hook │ │ │ │ └── hook.go │ │ │ ├── exported.go │ │ │ ├── formatter.go │ │ │ ├── formatter_bench_test.go │ │ │ ├── formatters │ │ │ └── logstash │ │ │ │ ├── logstash.go │ │ │ │ └── logstash_test.go │ │ │ ├── hook_test.go │ │ │ ├── hooks.go │ │ │ ├── hooks │ │ │ ├── airbrake │ │ │ │ ├── airbrake.go │ │ │ │ └── airbrake_test.go │ │ │ ├── bugsnag │ │ │ │ ├── bugsnag.go │ │ │ │ └── bugsnag_test.go │ │ │ ├── papertrail │ │ │ │ ├── README.md │ │ │ │ ├── papertrail.go │ │ │ │ └── papertrail_test.go │ │ │ ├── sentry │ │ │ │ ├── README.md │ │ │ │ ├── sentry.go │ │ │ │ └── sentry_test.go │ │ │ └── syslog │ │ │ │ ├── README.md │ │ │ │ ├── syslog.go │ │ │ │ └── syslog_test.go │ │ │ ├── json_formatter.go │ │ │ ├── json_formatter_test.go │ │ │ ├── logger.go │ │ │ ├── logrus.go │ │ │ ├── logrus_test.go │ │ │ ├── terminal_bsd.go │ │ │ ├── terminal_linux.go │ │ │ ├── terminal_notwindows.go │ │ │ ├── terminal_windows.go │ │ │ ├── text_formatter.go │ │ │ ├── text_formatter_test.go │ │ │ └── writer.go │ ├── cenkalti │ │ └── backoff │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── backoff.go │ │ │ ├── backoff_test.go │ │ │ ├── exponential.go │ │ │ ├── exponential_test.go │ │ │ ├── retry.go │ │ │ ├── retry_test.go │ │ │ ├── ticker.go │ │ │ └── ticker_test.go │ ├── codegangsta │ │ └── cli │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── app.go │ │ │ ├── app_test.go │ │ │ ├── autocomplete │ │ │ ├── bash_autocomplete │ │ │ └── zsh_autocomplete │ │ │ ├── cli.go │ │ │ ├── cli_test.go │ │ │ ├── command.go │ │ │ ├── command_test.go │ │ │ ├── context.go │ │ │ ├── context_test.go │ │ │ ├── flag.go │ │ │ ├── flag_test.go │ │ │ ├── help.go │ │ │ ├── help_test.go │ │ │ └── helpers_test.go │ ├── digitalocean │ │ └── godo │ │ │ ├── LICENSE.txt │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── action.go │ │ │ ├── action_request.go │ │ │ ├── action_request_test.go │ │ │ ├── action_test.go │ │ │ ├── doc.go │ │ │ ├── domains.go │ │ │ ├── domains_test.go │ │ │ ├── droplet_actions.go │ │ │ ├── droplet_actions_test.go │ │ │ ├── droplets.go │ │ │ ├── droplets_test.go │ │ │ ├── godo.go │ │ │ ├── godo_test.go │ │ │ ├── image_actions.go │ │ │ ├── image_actions_test.go │ │ │ ├── images.go │ │ │ ├── images_test.go │ │ │ ├── keys.go │ │ │ ├── keys_test.go │ │ │ ├── links.go │ │ │ ├── links_test.go │ │ │ ├── regions.go │ │ │ ├── regions_test.go │ │ │ ├── sizes.go │ │ │ ├── sizes_test.go │ │ │ ├── strings.go │ │ │ ├── timestamp.go │ │ │ ├── timestamp_test.go │ │ │ └── util │ │ │ └── droplet.go │ ├── docker │ │ ├── docker │ │ │ └── pkg │ │ │ │ ├── homedir │ │ │ │ ├── homedir.go │ │ │ │ └── homedir_test.go │ │ │ │ ├── mflag │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── example │ │ │ │ │ └── example.go │ │ │ │ ├── flag.go │ │ │ │ └── flag_test.go │ │ │ │ ├── term │ │ │ │ ├── tc_linux_cgo.go │ │ │ │ ├── tc_other.go │ │ │ │ ├── term.go │ │ │ │ ├── term_windows.go │ │ │ │ ├── termios_darwin.go │ │ │ │ ├── termios_freebsd.go │ │ │ │ ├── termios_linux.go │ │ │ │ └── windows │ │ │ │ │ ├── ansi_reader.go │ │ │ │ │ ├── ansi_writer.go │ │ │ │ │ ├── console.go │ │ │ │ │ ├── windows.go │ │ │ │ │ └── windows_test.go │ │ │ │ └── units │ │ │ │ ├── duration.go │ │ │ │ ├── duration_test.go │ │ │ │ ├── size.go │ │ │ │ └── size_test.go │ │ └── machine │ │ │ ├── commands │ │ │ ├── active.go │ │ │ ├── active_test.go │ │ │ ├── commands.go │ │ │ ├── commands_test.go │ │ │ ├── config.go │ │ │ ├── config_test.go │ │ │ ├── create.go │ │ │ ├── create_test.go │ │ │ ├── env.go │ │ │ ├── env_test.go │ │ │ ├── inspect.go │ │ │ ├── inspect_test.go │ │ │ ├── ip.go │ │ │ ├── ip_test.go │ │ │ ├── kill.go │ │ │ ├── kill_test.go │ │ │ ├── ls.go │ │ │ ├── ls_test.go │ │ │ ├── regeneratecerts.go │ │ │ ├── regeneratecerts_test.go │ │ │ ├── restart.go │ │ │ ├── restart_test.go │ │ │ ├── rm.go │ │ │ ├── rm_test.go │ │ │ ├── scp.go │ │ │ ├── scp_test.go │ │ │ ├── ssh.go │ │ │ ├── ssh_test.go │ │ │ ├── start.go │ │ │ ├── start_test.go │ │ │ ├── status.go │ │ │ ├── status_test.go │ │ │ ├── stop.go │ │ │ ├── stop_test.go │ │ │ ├── upgrade.go │ │ │ ├── upgrade_test.go │ │ │ ├── url.go │ │ │ └── url_test.go │ │ │ ├── drivers │ │ │ ├── amazonec2 │ │ │ │ ├── amazonec2.go │ │ │ │ ├── amazonec2_test.go │ │ │ │ ├── amz │ │ │ │ │ ├── auth.go │ │ │ │ │ ├── auth_test.go │ │ │ │ │ ├── block_device_mapping.go │ │ │ │ │ ├── block_device_mapping_test.go │ │ │ │ │ ├── describe_instances.go │ │ │ │ │ ├── describe_instances_test.go │ │ │ │ │ ├── describe_keypairs.go │ │ │ │ │ ├── describe_keypairs_test.go │ │ │ │ │ ├── describe_security_groups.go │ │ │ │ │ ├── describe_security_groups_test.go │ │ │ │ │ ├── describe_spot_instance_requests.go │ │ │ │ │ ├── describe_subnets.go │ │ │ │ │ ├── describe_subnets_test.go │ │ │ │ │ ├── ec2.go │ │ │ │ │ ├── ec2_test.go │ │ │ │ │ ├── error.go │ │ │ │ │ ├── error_codes.go │ │ │ │ │ ├── error_codes_test.go │ │ │ │ │ ├── error_test.go │ │ │ │ │ ├── filter.go │ │ │ │ │ ├── ip_permission.go │ │ │ │ │ ├── ip_permission_test.go │ │ │ │ │ ├── keypair.go │ │ │ │ │ ├── keypair_test.go │ │ │ │ │ ├── security_group.go │ │ │ │ │ ├── security_group_test.go │ │ │ │ │ ├── tags.go │ │ │ │ │ └── tags_test.go │ │ │ │ └── utils.go │ │ │ ├── azure │ │ │ │ ├── azure.go │ │ │ │ └── azure_test.go │ │ │ ├── base.go │ │ │ ├── digitalocean │ │ │ │ ├── digitalocean.go │ │ │ │ └── digitalocean_test.go │ │ │ ├── drivers.go │ │ │ ├── drivers_test.go │ │ │ ├── exoscale │ │ │ │ ├── exoscale.go │ │ │ │ └── exoscale_test.go │ │ │ ├── fakedriver │ │ │ │ ├── fakedriver.go │ │ │ │ └── fakedriver_test.go │ │ │ ├── flag_sort.go │ │ │ ├── generic │ │ │ │ ├── generic.go │ │ │ │ └── generic_test.go │ │ │ ├── google │ │ │ │ ├── auth_util.go │ │ │ │ ├── auth_util_test.go │ │ │ │ ├── compute_util.go │ │ │ │ ├── compute_util_test.go │ │ │ │ ├── google.go │ │ │ │ └── google_test.go │ │ │ ├── hyperv │ │ │ │ ├── hyperv.go │ │ │ │ ├── hyperv_test.go │ │ │ │ ├── hyperv_windows.go │ │ │ │ └── powershell_windows.go │ │ │ ├── none │ │ │ │ ├── none.go │ │ │ │ └── none_test.go │ │ │ ├── openstack │ │ │ │ ├── client.go │ │ │ │ ├── client_test.go │ │ │ │ ├── openstack.go │ │ │ │ └── openstack_test.go │ │ │ ├── rackspace │ │ │ │ ├── client.go │ │ │ │ ├── client_test.go │ │ │ │ ├── rackspace.go │ │ │ │ └── rackspace_test.go │ │ │ ├── softlayer │ │ │ │ ├── driver.go │ │ │ │ ├── driver_test.go │ │ │ │ ├── softlayer.go │ │ │ │ └── softlayer_test.go │ │ │ ├── utils.go │ │ │ ├── virtualbox │ │ │ │ ├── disk.go │ │ │ │ ├── disk_test.go │ │ │ │ ├── network.go │ │ │ │ ├── network_test.go │ │ │ │ ├── vbm.go │ │ │ │ ├── vbm_test.go │ │ │ │ ├── virtualbox.go │ │ │ │ ├── virtualbox_test.go │ │ │ │ ├── vm.go │ │ │ │ └── vm_test.go │ │ │ ├── vmwarefusion │ │ │ │ ├── fusion_darwin.go │ │ │ │ ├── fusion_test.go │ │ │ │ ├── vmrun_darwin.go │ │ │ │ ├── vmrun_test.go │ │ │ │ ├── vmwarefusion.go │ │ │ │ ├── vmx_darwin.go │ │ │ │ └── vmx_test.go │ │ │ ├── vmwarevcloudair │ │ │ │ ├── vcloudair.go │ │ │ │ └── vcloudair_test.go │ │ │ └── vmwarevsphere │ │ │ │ ├── errors │ │ │ │ ├── config_error.go │ │ │ │ ├── config_error_test.go │ │ │ │ ├── datastore_error.go │ │ │ │ ├── datastore_error_test.go │ │ │ │ ├── errors.go │ │ │ │ ├── errors_test.go │ │ │ │ ├── govc_error.go │ │ │ │ ├── govc_error_test.go │ │ │ │ ├── guest_error.go │ │ │ │ ├── guest_error_test.go │ │ │ │ ├── login_error.go │ │ │ │ ├── login_error_test.go │ │ │ │ ├── state_error.go │ │ │ │ ├── state_error_test.go │ │ │ │ ├── vm_error.go │ │ │ │ └── vm_error_test.go │ │ │ │ ├── govc.go │ │ │ │ ├── govc_test.go │ │ │ │ ├── vc_conn.go │ │ │ │ ├── vc_conn_test.go │ │ │ │ ├── vsphere.go │ │ │ │ └── vsphere_test.go │ │ │ ├── libmachine │ │ │ ├── auth │ │ │ │ ├── auth.go │ │ │ │ └── auth_test.go │ │ │ ├── certs.go │ │ │ ├── engine │ │ │ │ ├── engine.go │ │ │ │ └── engine_test.go │ │ │ ├── errors.go │ │ │ ├── filestore.go │ │ │ ├── filestore_test.go │ │ │ ├── host.go │ │ │ ├── host_test.go │ │ │ ├── host_v0.go │ │ │ ├── migrate.go │ │ │ ├── migrate_v0_v1.go │ │ │ ├── migrate_v0_v1_test.go │ │ │ ├── provider.go │ │ │ ├── provider_test.go │ │ │ ├── provision │ │ │ │ ├── boot2docker.go │ │ │ │ ├── centos.go │ │ │ │ ├── centos_test.go │ │ │ │ ├── configure_swarm.go │ │ │ │ ├── debian.go │ │ │ │ ├── engine_config_context.go │ │ │ │ ├── errors.go │ │ │ │ ├── fedora.go │ │ │ │ ├── fedora_test.go │ │ │ │ ├── generic.go │ │ │ │ ├── os_release.go │ │ │ │ ├── os_release_test.go │ │ │ │ ├── pkgaction │ │ │ │ │ ├── action.go │ │ │ │ │ └── action_test.go │ │ │ │ ├── provisioner.go │ │ │ │ ├── rancheros.go │ │ │ │ ├── redhat.go │ │ │ │ ├── redhat_test.go │ │ │ │ ├── ubuntu.go │ │ │ │ ├── utils.go │ │ │ │ └── utils_test.go │ │ │ ├── store.go │ │ │ └── swarm │ │ │ │ ├── swarm.go │ │ │ │ └── swarm_test.go │ │ │ ├── log │ │ │ ├── log.go │ │ │ ├── log_test.go │ │ │ └── terminal.go │ │ │ ├── ssh │ │ │ ├── client.go │ │ │ ├── keys.go │ │ │ ├── keys_test.go │ │ │ ├── ssh.go │ │ │ └── ssh_test.go │ │ │ ├── state │ │ │ ├── state.go │ │ │ └── state_test.go │ │ │ ├── utils │ │ │ ├── b2d.go │ │ │ ├── b2d_test.go │ │ │ ├── certs.go │ │ │ ├── certs_test.go │ │ │ ├── utils.go │ │ │ └── utils_test.go │ │ │ └── version │ │ │ ├── version.go │ │ │ └── version_test.go │ ├── google │ │ └── go-querystring │ │ │ └── query │ │ │ ├── encode.go │ │ │ └── encode_test.go │ ├── ivpusic │ │ ├── go-clicolor │ │ │ └── clicolor │ │ │ │ ├── clicolor.go │ │ │ │ └── clicolor_test.go │ │ └── golog │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── appender.go │ │ │ ├── appenders │ │ │ ├── file.go │ │ │ ├── file_test.go │ │ │ ├── mongo.go │ │ │ └── mongo_test.go │ │ │ ├── examples │ │ │ ├── advanced.go │ │ │ ├── appenders.go │ │ │ ├── customappender.go │ │ │ ├── formatting.go │ │ │ └── simple.go │ │ │ ├── golog.go │ │ │ ├── golog_test.go │ │ │ ├── logger.go │ │ │ └── logger_test.go │ ├── mitchellh │ │ └── mapstructure │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── decode_hooks.go │ │ │ ├── decode_hooks_test.go │ │ │ ├── error.go │ │ │ ├── mapstructure.go │ │ │ ├── mapstructure_benchmark_test.go │ │ │ ├── mapstructure_bugs_test.go │ │ │ ├── mapstructure_examples_test.go │ │ │ └── mapstructure_test.go │ ├── opencontainers │ │ └── runc │ │ │ └── libcontainer │ │ │ └── user │ │ │ ├── MAINTAINERS │ │ │ ├── lookup.go │ │ │ ├── lookup_unix.go │ │ │ ├── lookup_unsupported.go │ │ │ ├── user.go │ │ │ └── user_test.go │ ├── pyr │ │ └── egoscale │ │ │ └── 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 │ │ │ ├── acceptance │ │ │ ├── README.md │ │ │ ├── openstack │ │ │ │ ├── blockstorage │ │ │ │ │ └── v1 │ │ │ │ │ │ ├── snapshots_test.go │ │ │ │ │ │ ├── volumes_test.go │ │ │ │ │ │ └── volumetypes_test.go │ │ │ │ ├── client_test.go │ │ │ │ ├── compute │ │ │ │ │ └── v2 │ │ │ │ │ │ ├── bootfromvolume_test.go │ │ │ │ │ │ ├── compute_test.go │ │ │ │ │ │ ├── extension_test.go │ │ │ │ │ │ ├── flavors_test.go │ │ │ │ │ │ ├── floatingip_test.go │ │ │ │ │ │ ├── images_test.go │ │ │ │ │ │ ├── keypairs_test.go │ │ │ │ │ │ ├── pkg.go │ │ │ │ │ │ ├── secdefrules_test.go │ │ │ │ │ │ ├── secgroup_test.go │ │ │ │ │ │ ├── servergroup_test.go │ │ │ │ │ │ ├── servers_test.go │ │ │ │ │ │ ├── tenantnetworks_test.go │ │ │ │ │ │ └── volumeattach_test.go │ │ │ │ ├── identity │ │ │ │ │ ├── v2 │ │ │ │ │ │ ├── extension_test.go │ │ │ │ │ │ ├── identity_test.go │ │ │ │ │ │ ├── pkg.go │ │ │ │ │ │ ├── role_test.go │ │ │ │ │ │ ├── tenant_test.go │ │ │ │ │ │ ├── token_test.go │ │ │ │ │ │ └── user_test.go │ │ │ │ │ └── v3 │ │ │ │ │ │ ├── endpoint_test.go │ │ │ │ │ │ ├── identity_test.go │ │ │ │ │ │ ├── pkg.go │ │ │ │ │ │ ├── service_test.go │ │ │ │ │ │ └── token_test.go │ │ │ │ ├── networking │ │ │ │ │ └── v2 │ │ │ │ │ │ ├── apiversion_test.go │ │ │ │ │ │ ├── common.go │ │ │ │ │ │ ├── extension_test.go │ │ │ │ │ │ ├── extensions │ │ │ │ │ │ ├── fwaas │ │ │ │ │ │ │ ├── firewall_test.go │ │ │ │ │ │ │ ├── pkg.go │ │ │ │ │ │ │ ├── policy_test.go │ │ │ │ │ │ │ └── rule_test.go │ │ │ │ │ │ ├── layer3_test.go │ │ │ │ │ │ ├── lbaas │ │ │ │ │ │ │ ├── common.go │ │ │ │ │ │ │ ├── member_test.go │ │ │ │ │ │ │ ├── monitor_test.go │ │ │ │ │ │ │ ├── pkg.go │ │ │ │ │ │ │ ├── pool_test.go │ │ │ │ │ │ │ └── vip_test.go │ │ │ │ │ │ ├── pkg.go │ │ │ │ │ │ ├── provider_test.go │ │ │ │ │ │ └── security_test.go │ │ │ │ │ │ ├── network_test.go │ │ │ │ │ │ ├── pkg.go │ │ │ │ │ │ ├── port_test.go │ │ │ │ │ │ └── subnet_test.go │ │ │ │ ├── objectstorage │ │ │ │ │ └── v1 │ │ │ │ │ │ ├── accounts_test.go │ │ │ │ │ │ ├── common.go │ │ │ │ │ │ ├── containers_test.go │ │ │ │ │ │ └── objects_test.go │ │ │ │ ├── orchestration │ │ │ │ │ └── v1 │ │ │ │ │ │ ├── buildinfo_test.go │ │ │ │ │ │ ├── common.go │ │ │ │ │ │ ├── hello-compute.json │ │ │ │ │ │ ├── stackevents_test.go │ │ │ │ │ │ ├── stackresources_test.go │ │ │ │ │ │ ├── stacks_test.go │ │ │ │ │ │ └── stacktemplates_test.go │ │ │ │ └── pkg.go │ │ │ ├── rackspace │ │ │ │ ├── blockstorage │ │ │ │ │ └── v1 │ │ │ │ │ │ ├── common.go │ │ │ │ │ │ ├── snapshot_test.go │ │ │ │ │ │ ├── volume_test.go │ │ │ │ │ │ └── volume_type_test.go │ │ │ │ ├── cdn │ │ │ │ │ └── v1 │ │ │ │ │ │ ├── base_test.go │ │ │ │ │ │ ├── common.go │ │ │ │ │ │ ├── flavor_test.go │ │ │ │ │ │ ├── service_test.go │ │ │ │ │ │ └── serviceasset_test.go │ │ │ │ ├── client_test.go │ │ │ │ ├── compute │ │ │ │ │ └── v2 │ │ │ │ │ │ ├── bootfromvolume_test.go │ │ │ │ │ │ ├── compute_test.go │ │ │ │ │ │ ├── flavors_test.go │ │ │ │ │ │ ├── images_test.go │ │ │ │ │ │ ├── keypairs_test.go │ │ │ │ │ │ ├── networks_test.go │ │ │ │ │ │ ├── pkg.go │ │ │ │ │ │ ├── servers_test.go │ │ │ │ │ │ ├── virtualinterfaces_test.go │ │ │ │ │ │ └── volumeattach_test.go │ │ │ │ ├── identity │ │ │ │ │ └── v2 │ │ │ │ │ │ ├── extension_test.go │ │ │ │ │ │ ├── identity_test.go │ │ │ │ │ │ ├── pkg.go │ │ │ │ │ │ ├── role_test.go │ │ │ │ │ │ ├── tenant_test.go │ │ │ │ │ │ └── user_test.go │ │ │ │ ├── lb │ │ │ │ │ └── v1 │ │ │ │ │ │ ├── acl_test.go │ │ │ │ │ │ ├── common.go │ │ │ │ │ │ ├── lb_test.go │ │ │ │ │ │ ├── monitor_test.go │ │ │ │ │ │ ├── node_test.go │ │ │ │ │ │ ├── session_test.go │ │ │ │ │ │ ├── throttle_test.go │ │ │ │ │ │ └── vip_test.go │ │ │ │ ├── networking │ │ │ │ │ └── v2 │ │ │ │ │ │ ├── common.go │ │ │ │ │ │ ├── network_test.go │ │ │ │ │ │ ├── port_test.go │ │ │ │ │ │ ├── security_test.go │ │ │ │ │ │ └── subnet_test.go │ │ │ │ ├── objectstorage │ │ │ │ │ └── v1 │ │ │ │ │ │ ├── accounts_test.go │ │ │ │ │ │ ├── bulk_test.go │ │ │ │ │ │ ├── cdncontainers_test.go │ │ │ │ │ │ ├── cdnobjects_test.go │ │ │ │ │ │ ├── common.go │ │ │ │ │ │ ├── containers_test.go │ │ │ │ │ │ └── objects_test.go │ │ │ │ ├── orchestration │ │ │ │ │ └── v1 │ │ │ │ │ │ ├── buildinfo_test.go │ │ │ │ │ │ ├── common.go │ │ │ │ │ │ ├── stackevents_test.go │ │ │ │ │ │ ├── stackresources_test.go │ │ │ │ │ │ ├── stacks_test.go │ │ │ │ │ │ └── stacktemplates_test.go │ │ │ │ ├── pkg.go │ │ │ │ └── rackconnect │ │ │ │ │ └── v3 │ │ │ │ │ ├── cloudnetworks_test.go │ │ │ │ │ ├── common.go │ │ │ │ │ ├── lbpools_test.go │ │ │ │ │ └── publicips_test.go │ │ │ └── tools │ │ │ │ ├── pkg.go │ │ │ │ └── tools.go │ │ │ ├── auth_options.go │ │ │ ├── auth_results.go │ │ │ ├── doc.go │ │ │ ├── endpoint_search.go │ │ │ ├── endpoint_search_test.go │ │ │ ├── openstack │ │ │ ├── auth_env.go │ │ │ ├── blockstorage │ │ │ │ └── v1 │ │ │ │ │ ├── apiversions │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ ├── urls.go │ │ │ │ │ └── urls_test.go │ │ │ │ │ ├── snapshots │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── fixtures.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ ├── urls.go │ │ │ │ │ ├── urls_test.go │ │ │ │ │ └── util.go │ │ │ │ │ ├── volumes │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── fixtures.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ ├── urls.go │ │ │ │ │ ├── urls_test.go │ │ │ │ │ └── util.go │ │ │ │ │ └── volumetypes │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── fixtures.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ ├── urls.go │ │ │ │ │ └── urls_test.go │ │ │ ├── cdn │ │ │ │ └── v1 │ │ │ │ │ ├── base │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── fixtures.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ └── urls.go │ │ │ │ │ ├── flavors │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── fixtures.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ └── urls.go │ │ │ │ │ ├── serviceassets │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── fixtures.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ └── urls.go │ │ │ │ │ └── services │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── errors.go │ │ │ │ │ ├── fixtures.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ └── urls.go │ │ │ ├── client.go │ │ │ ├── client_test.go │ │ │ ├── common │ │ │ │ ├── README.md │ │ │ │ └── extensions │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── errors.go │ │ │ │ │ ├── fixtures.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ ├── urls.go │ │ │ │ │ └── urls_test.go │ │ │ ├── compute │ │ │ │ └── v2 │ │ │ │ │ ├── extensions │ │ │ │ │ ├── bootfromvolume │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ ├── requests_test.go │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ ├── urls.go │ │ │ │ │ │ └── urls_test.go │ │ │ │ │ ├── defsecrules │ │ │ │ │ │ ├── doc.go │ │ │ │ │ │ ├── fixtures.go │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ ├── requests_test.go │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ └── urls.go │ │ │ │ │ ├── delegate.go │ │ │ │ │ ├── delegate_test.go │ │ │ │ │ ├── diskconfig │ │ │ │ │ │ ├── doc.go │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ ├── requests_test.go │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ └── results_test.go │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── floatingip │ │ │ │ │ │ ├── doc.go │ │ │ │ │ │ ├── fixtures.go │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ ├── requests_test.go │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ ├── urls.go │ │ │ │ │ │ └── urls_test.go │ │ │ │ │ ├── keypairs │ │ │ │ │ │ ├── doc.go │ │ │ │ │ │ ├── fixtures.go │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ ├── requests_test.go │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ ├── urls.go │ │ │ │ │ │ └── urls_test.go │ │ │ │ │ ├── schedulerhints │ │ │ │ │ │ ├── doc.go │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ └── requests_test.go │ │ │ │ │ ├── secgroups │ │ │ │ │ │ ├── doc.go │ │ │ │ │ │ ├── fixtures.go │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ ├── requests_test.go │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ └── urls.go │ │ │ │ │ ├── servergroups │ │ │ │ │ │ ├── doc.go │ │ │ │ │ │ ├── fixtures.go │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ ├── requests_test.go │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ ├── urls.go │ │ │ │ │ │ └── urls_test.go │ │ │ │ │ ├── startstop │ │ │ │ │ │ ├── doc.go │ │ │ │ │ │ ├── fixtures.go │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ └── requests_test.go │ │ │ │ │ ├── tenantnetworks │ │ │ │ │ │ ├── doc.go │ │ │ │ │ │ ├── fixtures.go │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ ├── requests_test.go │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ ├── urls.go │ │ │ │ │ │ └── urls_test.go │ │ │ │ │ └── volumeattach │ │ │ │ │ │ ├── doc.go │ │ │ │ │ │ ├── fixtures.go │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ ├── requests_test.go │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ ├── urls.go │ │ │ │ │ │ └── urls_test.go │ │ │ │ │ ├── flavors │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ ├── urls.go │ │ │ │ │ └── urls_test.go │ │ │ │ │ ├── images │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ ├── urls.go │ │ │ │ │ └── urls_test.go │ │ │ │ │ └── servers │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── fixtures.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ ├── urls.go │ │ │ │ │ ├── urls_test.go │ │ │ │ │ └── util.go │ │ │ ├── endpoint_location.go │ │ │ ├── endpoint_location_test.go │ │ │ ├── identity │ │ │ │ ├── v2 │ │ │ │ │ ├── extensions │ │ │ │ │ │ ├── admin │ │ │ │ │ │ │ └── roles │ │ │ │ │ │ │ │ ├── docs.go │ │ │ │ │ │ │ │ ├── fixtures.go │ │ │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ │ │ ├── requests_test.go │ │ │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ │ │ └── urls.go │ │ │ │ │ │ ├── delegate.go │ │ │ │ │ │ ├── delegate_test.go │ │ │ │ │ │ ├── doc.go │ │ │ │ │ │ └── fixtures.go │ │ │ │ │ ├── tenants │ │ │ │ │ │ ├── doc.go │ │ │ │ │ │ ├── fixtures.go │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ ├── requests_test.go │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ └── urls.go │ │ │ │ │ ├── tokens │ │ │ │ │ │ ├── doc.go │ │ │ │ │ │ ├── errors.go │ │ │ │ │ │ ├── fixtures.go │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ ├── requests_test.go │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ └── urls.go │ │ │ │ │ └── users │ │ │ │ │ │ ├── doc.go │ │ │ │ │ │ ├── fixtures.go │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ ├── requests_test.go │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ └── urls.go │ │ │ │ └── v3 │ │ │ │ │ ├── endpoints │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── errors.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ ├── urls.go │ │ │ │ │ └── urls_test.go │ │ │ │ │ ├── services │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ ├── urls.go │ │ │ │ │ └── urls_test.go │ │ │ │ │ └── tokens │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── errors.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ ├── urls.go │ │ │ │ │ └── urls_test.go │ │ │ ├── networking │ │ │ │ └── v2 │ │ │ │ │ ├── apiversions │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── errors.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ ├── urls.go │ │ │ │ │ └── urls_test.go │ │ │ │ │ ├── common │ │ │ │ │ └── common_tests.go │ │ │ │ │ ├── extensions │ │ │ │ │ ├── delegate.go │ │ │ │ │ ├── delegate_test.go │ │ │ │ │ ├── external │ │ │ │ │ │ ├── doc.go │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ └── results_test.go │ │ │ │ │ ├── fwaas │ │ │ │ │ │ ├── doc.go │ │ │ │ │ │ ├── firewalls │ │ │ │ │ │ │ ├── errors.go │ │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ │ ├── requests_test.go │ │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ │ └── urls.go │ │ │ │ │ │ ├── policies │ │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ │ ├── requests_test.go │ │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ │ └── urls.go │ │ │ │ │ │ └── rules │ │ │ │ │ │ │ ├── errors.go │ │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ │ ├── requests_test.go │ │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ │ └── urls.go │ │ │ │ │ ├── layer3 │ │ │ │ │ │ ├── doc.go │ │ │ │ │ │ ├── floatingips │ │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ │ ├── requests_test.go │ │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ │ └── urls.go │ │ │ │ │ │ └── routers │ │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ │ ├── requests_test.go │ │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ │ └── urls.go │ │ │ │ │ ├── lbaas │ │ │ │ │ │ ├── doc.go │ │ │ │ │ │ ├── members │ │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ │ ├── requests_test.go │ │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ │ └── urls.go │ │ │ │ │ │ ├── monitors │ │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ │ ├── requests_test.go │ │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ │ └── urls.go │ │ │ │ │ │ ├── pools │ │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ │ ├── requests_test.go │ │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ │ └── urls.go │ │ │ │ │ │ └── vips │ │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ │ ├── requests_test.go │ │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ │ └── urls.go │ │ │ │ │ ├── provider │ │ │ │ │ │ ├── doc.go │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ └── results_test.go │ │ │ │ │ └── security │ │ │ │ │ │ ├── doc.go │ │ │ │ │ │ ├── groups │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ ├── requests_test.go │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ └── urls.go │ │ │ │ │ │ └── rules │ │ │ │ │ │ ├── requests.go │ │ │ │ │ │ ├── requests_test.go │ │ │ │ │ │ ├── results.go │ │ │ │ │ │ └── urls.go │ │ │ │ │ ├── networks │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── errors.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ ├── urls.go │ │ │ │ │ └── urls_test.go │ │ │ │ │ ├── ports │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── errors.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ ├── urls.go │ │ │ │ │ └── urls_test.go │ │ │ │ │ └── subnets │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── errors.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ ├── urls.go │ │ │ │ │ └── urls_test.go │ │ │ ├── objectstorage │ │ │ │ └── v1 │ │ │ │ │ ├── accounts │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── fixtures.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ ├── urls.go │ │ │ │ │ └── urls_test.go │ │ │ │ │ ├── containers │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── fixtures.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ ├── urls.go │ │ │ │ │ └── urls_test.go │ │ │ │ │ └── objects │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── fixtures.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ ├── urls.go │ │ │ │ │ └── urls_test.go │ │ │ ├── orchestration │ │ │ │ └── v1 │ │ │ │ │ ├── apiversions │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ └── urls.go │ │ │ │ │ ├── buildinfo │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── fixtures.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ └── urls.go │ │ │ │ │ ├── stackevents │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── fixtures.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ └── urls.go │ │ │ │ │ ├── stackresources │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── fixtures.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ └── urls.go │ │ │ │ │ ├── stacks │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── fixtures.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ └── urls.go │ │ │ │ │ └── stacktemplates │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── fixtures.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ └── urls.go │ │ │ └── utils │ │ │ │ ├── choose_version.go │ │ │ │ └── choose_version_test.go │ │ │ ├── pagination │ │ │ ├── http.go │ │ │ ├── linked.go │ │ │ ├── linked_test.go │ │ │ ├── marker.go │ │ │ ├── marker_test.go │ │ │ ├── null.go │ │ │ ├── pager.go │ │ │ ├── pagination_test.go │ │ │ ├── pkg.go │ │ │ ├── single.go │ │ │ └── single_test.go │ │ │ ├── params.go │ │ │ ├── params_test.go │ │ │ ├── provider_client.go │ │ │ ├── provider_client_test.go │ │ │ ├── rackspace │ │ │ ├── auth_env.go │ │ │ ├── blockstorage │ │ │ │ └── v1 │ │ │ │ │ ├── snapshots │ │ │ │ │ ├── delegate.go │ │ │ │ │ ├── delegate_test.go │ │ │ │ │ ├── doc.go │ │ │ │ │ └── results.go │ │ │ │ │ ├── volumes │ │ │ │ │ ├── delegate.go │ │ │ │ │ ├── delegate_test.go │ │ │ │ │ ├── doc.go │ │ │ │ │ └── results.go │ │ │ │ │ └── volumetypes │ │ │ │ │ ├── delegate.go │ │ │ │ │ ├── delegate_test.go │ │ │ │ │ ├── doc.go │ │ │ │ │ └── results.go │ │ │ ├── cdn │ │ │ │ └── v1 │ │ │ │ │ ├── base │ │ │ │ │ ├── delegate.go │ │ │ │ │ ├── delegate_test.go │ │ │ │ │ └── doc.go │ │ │ │ │ ├── flavors │ │ │ │ │ ├── delegate.go │ │ │ │ │ ├── delegate_test.go │ │ │ │ │ └── doc.go │ │ │ │ │ ├── serviceassets │ │ │ │ │ ├── delegate.go │ │ │ │ │ ├── delegate_test.go │ │ │ │ │ └── doc.go │ │ │ │ │ └── services │ │ │ │ │ ├── delegate.go │ │ │ │ │ ├── delegate_test.go │ │ │ │ │ └── doc.go │ │ │ ├── client.go │ │ │ ├── client_test.go │ │ │ ├── compute │ │ │ │ └── v2 │ │ │ │ │ ├── bootfromvolume │ │ │ │ │ ├── delegate.go │ │ │ │ │ └── delegate_test.go │ │ │ │ │ ├── flavors │ │ │ │ │ ├── delegate.go │ │ │ │ │ ├── delegate_test.go │ │ │ │ │ ├── doc.go │ │ │ │ │ └── fixtures.go │ │ │ │ │ ├── images │ │ │ │ │ ├── delegate.go │ │ │ │ │ ├── delegate_test.go │ │ │ │ │ ├── doc.go │ │ │ │ │ └── fixtures.go │ │ │ │ │ ├── keypairs │ │ │ │ │ ├── delegate.go │ │ │ │ │ ├── delegate_test.go │ │ │ │ │ └── doc.go │ │ │ │ │ ├── networks │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ ├── urls.go │ │ │ │ │ └── urls_test.go │ │ │ │ │ ├── servers │ │ │ │ │ ├── delegate.go │ │ │ │ │ ├── delegate_test.go │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── fixtures.go │ │ │ │ │ ├── requests.go │ │ │ │ │ └── requests_test.go │ │ │ │ │ ├── virtualinterfaces │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ ├── urls.go │ │ │ │ │ └── urls_test.go │ │ │ │ │ └── volumeattach │ │ │ │ │ ├── delegate.go │ │ │ │ │ ├── delegate_test.go │ │ │ │ │ └── doc.go │ │ │ ├── identity │ │ │ │ └── v2 │ │ │ │ │ ├── extensions │ │ │ │ │ ├── delegate.go │ │ │ │ │ ├── delegate_test.go │ │ │ │ │ └── doc.go │ │ │ │ │ ├── roles │ │ │ │ │ ├── delegate.go │ │ │ │ │ ├── delegate_test.go │ │ │ │ │ └── fixtures.go │ │ │ │ │ ├── tenants │ │ │ │ │ ├── delegate.go │ │ │ │ │ ├── delegate_test.go │ │ │ │ │ └── doc.go │ │ │ │ │ ├── tokens │ │ │ │ │ ├── delegate.go │ │ │ │ │ ├── delegate_test.go │ │ │ │ │ └── doc.go │ │ │ │ │ └── users │ │ │ │ │ ├── delegate.go │ │ │ │ │ ├── delegate_test.go │ │ │ │ │ ├── fixtures.go │ │ │ │ │ ├── results.go │ │ │ │ │ └── urls.go │ │ │ ├── lb │ │ │ │ └── v1 │ │ │ │ │ ├── acl │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── fixtures.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ └── urls.go │ │ │ │ │ ├── lbs │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── fixtures.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ └── urls.go │ │ │ │ │ ├── monitors │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── fixtures.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ └── urls.go │ │ │ │ │ ├── nodes │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── fixtures.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ └── urls.go │ │ │ │ │ ├── sessions │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── fixtures.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ └── urls.go │ │ │ │ │ ├── ssl │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── fixtures.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ └── urls.go │ │ │ │ │ ├── throttle │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── fixtures.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ └── urls.go │ │ │ │ │ └── vips │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── fixtures.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ └── urls.go │ │ │ ├── networking │ │ │ │ └── v2 │ │ │ │ │ ├── common │ │ │ │ │ └── common_tests.go │ │ │ │ │ ├── networks │ │ │ │ │ ├── delegate.go │ │ │ │ │ └── delegate_test.go │ │ │ │ │ ├── ports │ │ │ │ │ ├── delegate.go │ │ │ │ │ └── delegate_test.go │ │ │ │ │ ├── security │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── groups │ │ │ │ │ │ ├── delegate.go │ │ │ │ │ │ └── delegate_test.go │ │ │ │ │ └── rules │ │ │ │ │ │ ├── delegate.go │ │ │ │ │ │ └── delegate_test.go │ │ │ │ │ └── subnets │ │ │ │ │ ├── delegate.go │ │ │ │ │ └── delegate_test.go │ │ │ ├── objectstorage │ │ │ │ └── v1 │ │ │ │ │ ├── accounts │ │ │ │ │ ├── delegate.go │ │ │ │ │ ├── delegate_test.go │ │ │ │ │ └── doc.go │ │ │ │ │ ├── bulk │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ ├── urls.go │ │ │ │ │ └── urls_test.go │ │ │ │ │ ├── cdncontainers │ │ │ │ │ ├── delegate.go │ │ │ │ │ ├── delegate_test.go │ │ │ │ │ ├── doc.go │ │ │ │ │ ├── requests.go │ │ │ │ │ ├── requests_test.go │ │ │ │ │ ├── results.go │ │ │ │ │ ├── urls.go │ │ │ │ │ └── urls_test.go │ │ │ │ │ ├── cdnobjects │ │ │ │ │ ├── delegate.go │ │ │ │ │ ├── delegate_test.go │ │ │ │ │ ├── doc.go │ │ │ │ │ └── request.go │ │ │ │ │ ├── containers │ │ │ │ │ ├── delegate.go │ │ │ │ │ ├── delegate_test.go │ │ │ │ │ └── doc.go │ │ │ │ │ └── objects │ │ │ │ │ ├── delegate.go │ │ │ │ │ ├── delegate_test.go │ │ │ │ │ └── doc.go │ │ │ ├── orchestration │ │ │ │ └── v1 │ │ │ │ │ ├── buildinfo │ │ │ │ │ ├── delegate.go │ │ │ │ │ ├── delegate_test.go │ │ │ │ │ └── doc.go │ │ │ │ │ ├── stackevents │ │ │ │ │ ├── delegate.go │ │ │ │ │ ├── delegate_test.go │ │ │ │ │ └── doc.go │ │ │ │ │ ├── stackresources │ │ │ │ │ ├── delegate.go │ │ │ │ │ ├── delegate_test.go │ │ │ │ │ └── doc.go │ │ │ │ │ ├── stacks │ │ │ │ │ ├── delegate.go │ │ │ │ │ ├── delegate_test.go │ │ │ │ │ ├── doc.go │ │ │ │ │ └── fixtures.go │ │ │ │ │ └── stacktemplates │ │ │ │ │ ├── delegate.go │ │ │ │ │ ├── delegate_test.go │ │ │ │ │ └── doc.go │ │ │ └── rackconnect │ │ │ │ └── v3 │ │ │ │ ├── cloudnetworks │ │ │ │ ├── requests.go │ │ │ │ ├── requests_test.go │ │ │ │ ├── results.go │ │ │ │ └── urls.go │ │ │ │ ├── doc.go │ │ │ │ ├── lbpools │ │ │ │ ├── doc.go │ │ │ │ ├── requests.go │ │ │ │ ├── requests_test.go │ │ │ │ ├── results.go │ │ │ │ └── urls.go │ │ │ │ └── publicips │ │ │ │ ├── requests.go │ │ │ │ ├── requests_test.go │ │ │ │ ├── results.go │ │ │ │ └── urls.go │ │ │ ├── results.go │ │ │ ├── script │ │ │ ├── acceptancetest │ │ │ ├── bootstrap │ │ │ ├── cibuild │ │ │ ├── test │ │ │ └── unittest │ │ │ ├── service_client.go │ │ │ ├── service_client_test.go │ │ │ ├── testhelper │ │ │ ├── client │ │ │ │ └── fake.go │ │ │ ├── convenience.go │ │ │ ├── doc.go │ │ │ └── http_responses.go │ │ │ ├── util.go │ │ │ └── util_test.go │ ├── samalba │ │ └── dockerclient │ │ │ ├── .gitignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── auth.go │ │ │ ├── auth_test.go │ │ │ ├── dockerclient.go │ │ │ ├── dockerclient_test.go │ │ │ ├── engine_mock_test.go │ │ │ ├── example_responses.go │ │ │ ├── examples │ │ │ ├── events.go │ │ │ └── stats │ │ │ │ └── stats.go │ │ │ ├── interface.go │ │ │ ├── mockclient │ │ │ ├── mock.go │ │ │ └── mock_test.go │ │ │ ├── nopclient │ │ │ └── nop.go │ │ │ ├── types.go │ │ │ └── utils.go │ ├── shiena │ │ └── ansicolor │ │ │ ├── .gitignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── ansicolor.go │ │ │ ├── ansicolor │ │ │ └── main.go │ │ │ ├── ansicolor_ansi.go │ │ │ ├── ansicolor_test.go │ │ │ ├── ansicolor_windows.go │ │ │ ├── ansicolor_windows_test.go │ │ │ ├── example_test.go │ │ │ └── export_test.go │ ├── skarademir │ │ └── naturalsort │ │ │ ├── LICENSE.md │ │ │ ├── README.md │ │ │ ├── naturalsort.go │ │ │ └── naturalsort_test.go │ ├── smartystreets │ │ └── go-aws-auth │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── awsauth.go │ │ │ ├── awsauth_test.go │ │ │ ├── common.go │ │ │ ├── common_test.go │ │ │ ├── s3.go │ │ │ ├── s3_test.go │ │ │ ├── sign2.go │ │ │ ├── sign2_test.go │ │ │ ├── sign3.go │ │ │ ├── sign3_test.go │ │ │ ├── sign4.go │ │ │ └── sign4_test.go │ ├── tent │ │ └── http-link-go │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── link.go │ │ │ └── link_test.go │ └── vmware │ │ └── govcloudair │ │ ├── .gitignore │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── Readme.md │ │ ├── api.go │ │ ├── api_test.go │ │ ├── catalog.go │ │ ├── catalog_test.go │ │ ├── catalogitem.go │ │ ├── catalogitem_test.go │ │ ├── edgegateway.go │ │ ├── edgegateway_test.go │ │ ├── org.go │ │ ├── org_test.go │ │ ├── orgvdcnetwork.go │ │ ├── orgvdcnetwork_test.go │ │ ├── script │ │ └── coverage │ │ ├── task.go │ │ ├── task_test.go │ │ ├── testutil │ │ └── http.go │ │ ├── types │ │ └── v56 │ │ │ └── types.go │ │ ├── vapp.go │ │ ├── vapp_test.go │ │ ├── vapptemplate.go │ │ ├── vapptemplate_test.go │ │ ├── vdc.go │ │ └── vdc_test.go │ ├── golang.org │ └── x │ │ ├── crypto │ │ └── ssh │ │ │ ├── agent │ │ │ ├── client.go │ │ │ ├── client_test.go │ │ │ ├── forward.go │ │ │ ├── keyring.go │ │ │ ├── server.go │ │ │ ├── server_test.go │ │ │ └── testdata_test.go │ │ │ ├── benchmark_test.go │ │ │ ├── buffer.go │ │ │ ├── buffer_test.go │ │ │ ├── certs.go │ │ │ ├── certs_test.go │ │ │ ├── channel.go │ │ │ ├── cipher.go │ │ │ ├── cipher_test.go │ │ │ ├── client.go │ │ │ ├── client_auth.go │ │ │ ├── client_auth_test.go │ │ │ ├── client_test.go │ │ │ ├── common.go │ │ │ ├── connection.go │ │ │ ├── doc.go │ │ │ ├── example_test.go │ │ │ ├── handshake.go │ │ │ ├── handshake_test.go │ │ │ ├── kex.go │ │ │ ├── kex_test.go │ │ │ ├── keys.go │ │ │ ├── keys_test.go │ │ │ ├── mac.go │ │ │ ├── mempipe_test.go │ │ │ ├── messages.go │ │ │ ├── messages_test.go │ │ │ ├── mux.go │ │ │ ├── mux_test.go │ │ │ ├── server.go │ │ │ ├── session.go │ │ │ ├── session_test.go │ │ │ ├── tcpip.go │ │ │ ├── tcpip_test.go │ │ │ ├── terminal │ │ │ ├── terminal.go │ │ │ ├── terminal_test.go │ │ │ ├── util.go │ │ │ ├── util_bsd.go │ │ │ ├── util_linux.go │ │ │ └── util_windows.go │ │ │ ├── test │ │ │ ├── agent_unix_test.go │ │ │ ├── cert_test.go │ │ │ ├── doc.go │ │ │ ├── forward_unix_test.go │ │ │ ├── session_test.go │ │ │ ├── tcpip_test.go │ │ │ ├── test_unix_test.go │ │ │ └── testdata_test.go │ │ │ ├── testdata │ │ │ ├── doc.go │ │ │ └── keys.go │ │ │ ├── testdata_test.go │ │ │ ├── transport.go │ │ │ └── transport_test.go │ │ └── net │ │ └── context │ │ ├── context.go │ │ ├── context_test.go │ │ └── withtimeout_test.go │ ├── google.golang.org │ └── api │ │ ├── compute │ │ └── v1 │ │ │ ├── compute-api.json │ │ │ └── compute-gen.go │ │ └── googleapi │ │ ├── googleapi.go │ │ ├── googleapi_test.go │ │ ├── internal │ │ └── uritemplates │ │ │ ├── LICENSE │ │ │ ├── uritemplates.go │ │ │ └── utils.go │ │ ├── transport │ │ └── apikey.go │ │ ├── types.go │ │ └── types_test.go │ └── gopkg.in │ ├── mgo.v2 │ ├── LICENSE │ ├── Makefile │ ├── README.md │ ├── auth.go │ ├── auth_test.go │ ├── bson │ │ ├── LICENSE │ │ ├── bson.go │ │ ├── bson_test.go │ │ ├── decode.go │ │ └── encode.go │ ├── bulk.go │ ├── bulk_test.go │ ├── cluster.go │ ├── cluster_test.go │ ├── dbtest │ │ ├── dbserver.go │ │ ├── dbserver_test.go │ │ └── export_test.go │ ├── doc.go │ ├── export_test.go │ ├── gridfs.go │ ├── gridfs_test.go │ ├── internal │ │ ├── sasl │ │ │ ├── sasl.c │ │ │ ├── sasl.go │ │ │ ├── sasl_windows.c │ │ │ ├── sasl_windows.go │ │ │ ├── sasl_windows.h │ │ │ ├── sspi_windows.c │ │ │ └── sspi_windows.h │ │ └── scram │ │ │ ├── scram.go │ │ │ └── scram_test.go │ ├── log.go │ ├── queue.go │ ├── queue_test.go │ ├── raceoff.go │ ├── raceon.go │ ├── saslimpl.go │ ├── saslstub.go │ ├── server.go │ ├── session.go │ ├── session_test.go │ ├── socket.go │ ├── stats.go │ ├── suite_test.go │ ├── syscall_test.go │ ├── syscall_windows_test.go │ ├── testdb │ │ ├── client.pem │ │ ├── dropall.js │ │ ├── init.js │ │ ├── server.pem │ │ ├── setup.sh │ │ ├── supervisord.conf │ │ └── wait.js │ ├── testserver │ │ ├── export_test.go │ │ ├── testserver.go │ │ └── testserver_test.go │ └── txn │ │ ├── chaos.go │ │ ├── debug.go │ │ ├── dockey_test.go │ │ ├── flusher.go │ │ ├── mgo_test.go │ │ ├── sim_test.go │ │ ├── tarjan.go │ │ ├── tarjan_test.go │ │ ├── txn.go │ │ └── txn_test.go │ └── yaml.v2 │ ├── LICENSE │ ├── LICENSE.libyaml │ ├── README.md │ ├── apic.go │ ├── decode.go │ ├── decode_test.go │ ├── emitterc.go │ ├── encode.go │ ├── encode_test.go │ ├── parserc.go │ ├── readerc.go │ ├── resolve.go │ ├── scannerc.go │ ├── sorter.go │ ├── suite_test.go │ ├── writerc.go │ ├── yaml.go │ ├── yamlh.go │ └── yamlprivateh.go ├── Makefile ├── README.md ├── api └── client │ ├── README.md │ ├── cli.go │ ├── cluster_flags.go │ ├── cmd_cluster.go │ └── help.go ├── cluster.aliyun.usertag.multiprofile.yml ├── cluster.aliyun.usertag.yml ├── cluster ├── cluster.go ├── cluster_test.go ├── context │ └── context.go └── portbindings.go ├── container ├── cluster │ ├── add.go │ ├── clusters.go │ ├── drivers │ │ ├── drivers.go │ │ └── swarm │ │ │ ├── callback.go │ │ │ ├── options.go │ │ │ └── swarm.go │ ├── events.go │ ├── impl.go │ └── run.go ├── container.go ├── dependancy.go ├── description.go ├── docker_client.go ├── docker_proxy.go ├── filter │ ├── filter.go │ ├── group_filter.go │ ├── ip_filter.go │ ├── machinename_filter.go │ └── percent_filter.go ├── name.go ├── name_test.go └── tls.go ├── dflag └── flag.go ├── discovery ├── discovery.go └── drivers │ ├── dns.go │ ├── etcd.go │ ├── haproxy-consul.go │ ├── nginx-consul.go │ └── nginx-push.go ├── dlog └── log.go ├── events └── events.go ├── flags.go ├── log.go ├── machine ├── app.go ├── auth.go ├── cluster.go ├── create.go ├── delete.go ├── description.go ├── engine.go ├── list.go ├── machine.go ├── machine_cluster_proxy.go ├── machine_proxy.go ├── name.go ├── options │ ├── .DS_Store │ ├── aliyun.go │ ├── options.go │ └── virtualbox.go ├── opts │ └── options.go ├── start.go └── states.go ├── main.go ├── maintest.go ├── options └── options.go ├── profile.yml ├── resources └── resources.go ├── sequence └── sequence.go ├── topology ├── cmd_machine.go ├── deploy.go ├── descriptions │ ├── container.go │ ├── descriptions.go │ └── machine.go ├── events.go ├── name.go ├── numbers.go ├── scalecontainer.go ├── scalemachine.go └── topologies.go └── utils ├── capacity.go ├── httpclient.go ├── random.go ├── strings.go └── utils.go /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 | -------------------------------------------------------------------------------- /Godeps/_workspace/.gitignore: -------------------------------------------------------------------------------- 1 | /pkg 2 | /bin 3 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/code.google.com/p/goauth2/oauth/jwt/example/example.client_secrets.json: -------------------------------------------------------------------------------- 1 | {"web":{"auth_uri":"https://accounts.google.com/o/oauth2/auth","token_uri":"https://accounts.google.com/o/oauth2/token","client_email":"XXXXXXXXXXXX@developer.gserviceaccount.com","client_x509_cert_url":"https://www.googleapis.com/robot/v1/metadata/x509/XXXXXXXXXXXX@developer.gserviceaccount.com","client_id":"XXXXXXXXXXXX.apps.googleusercontent.com","auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs"}} 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/clients/imageClient/entities.go: -------------------------------------------------------------------------------- 1 | package imageClient 2 | 3 | import ( 4 | "encoding/xml" 5 | ) 6 | 7 | type ImageList struct { 8 | XMLName xml.Name `xml:"Images"` 9 | Xmlns string `xml:"xmlns,attr"` 10 | OSImages []OSImage `xml:"OSImage"` 11 | } 12 | 13 | type OSImage struct { 14 | Category string 15 | Label string 16 | LogicalSizeInGB string 17 | Name string 18 | OS string 19 | Eula string 20 | Description string 21 | Location string 22 | } 23 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/clients/locationClient/entities.go: -------------------------------------------------------------------------------- 1 | package locationClient 2 | 3 | import ( 4 | "encoding/xml" 5 | ) 6 | 7 | type LocationList struct { 8 | XMLName xml.Name `xml:"Locations"` 9 | Xmlns string `xml:"xmlns,attr"` 10 | Locations []Location `xml:"Location"` 11 | } 12 | 13 | type Location struct { 14 | Name string 15 | DisplayName string 16 | AvailableServices []string `xml:"AvailableServices>AvailableService"` 17 | } 18 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/clients/vmDiskClient/vmDiskClient.go: -------------------------------------------------------------------------------- 1 | package vmDiskClient 2 | 3 | import ( 4 | "fmt" 5 | azure "github.com/MSOpenTech/azure-sdk-for-go" 6 | ) 7 | 8 | const ( 9 | azureVMDiskURL = "services/disks/%s" 10 | ) 11 | 12 | //Region public methods starts 13 | 14 | func DeleteDisk(diskName string) error { 15 | if len(diskName) == 0 { 16 | return fmt.Errorf(azure.ParamNotSpecifiedError, "diskName") 17 | } 18 | 19 | requestURL := fmt.Sprintf(azureVMDiskURL, diskName) 20 | requestId, err := azure.SendAzureDeleteRequest(requestURL) 21 | if err != nil { 22 | return err 23 | } 24 | 25 | azure.WaitAsyncOperation(requestId) 26 | return nil 27 | } 28 | 29 | //Region public methods ends 30 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/core/http/cgi/plan9_test.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 plan9 6 | 7 | package cgi 8 | 9 | import ( 10 | "os" 11 | "strconv" 12 | "testing" 13 | ) 14 | 15 | func isProcessRunning(t *testing.T, pid int) bool { 16 | _, err := os.Stat("/proc/" + strconv.Itoa(pid)) 17 | return err == nil 18 | } 19 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/core/http/cgi/posix_test.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 !plan9 6 | 7 | package cgi 8 | 9 | import ( 10 | "os" 11 | "syscall" 12 | "testing" 13 | ) 14 | 15 | func isProcessRunning(t *testing.T, pid int) bool { 16 | p, err := os.FindProcess(pid) 17 | if err != nil { 18 | return false 19 | } 20 | return p.Signal(syscall.Signal(0)) == nil 21 | } 22 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/core/http/race.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 race 6 | 7 | package http 8 | 9 | func init() { 10 | raceEnabled = true 11 | } 12 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/core/http/testdata/file: -------------------------------------------------------------------------------- 1 | 0123456789 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/core/http/testdata/index.html: -------------------------------------------------------------------------------- 1 | index.html says hello 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/MSOpenTech/azure-sdk-for-go/core/http/testdata/style.css: -------------------------------------------------------------------------------- 1 | body {} 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/.gitignore: -------------------------------------------------------------------------------- 1 | logrus 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.2 4 | - 1.3 5 | - 1.4 6 | - tip 7 | install: 8 | - go get -t ./... 9 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/papertrail/papertrail_test.go: -------------------------------------------------------------------------------- 1 | package logrus_papertrail 2 | 3 | import ( 4 | "fmt" 5 | "testing" 6 | 7 | "github.com/Sirupsen/logrus" 8 | "github.com/stvp/go-udp-testing" 9 | ) 10 | 11 | func TestWritingToUDP(t *testing.T) { 12 | port := 16661 13 | udp.SetAddr(fmt.Sprintf(":%d", port)) 14 | 15 | hook, err := NewPapertrailHook("localhost", port, "test") 16 | if err != nil { 17 | t.Errorf("Unable to connect to local UDP server.") 18 | } 19 | 20 | log := logrus.New() 21 | log.Hooks.Add(hook) 22 | 23 | udp.ShouldReceive(t, "foo", func() { 24 | log.Info("foo") 25 | }) 26 | } 27 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/syslog/README.md: -------------------------------------------------------------------------------- 1 | # Syslog Hooks for Logrus :walrus: 2 | 3 | ## Usage 4 | 5 | ```go 6 | import ( 7 | "log/syslog" 8 | "github.com/Sirupsen/logrus" 9 | logrus_syslog "github.com/Sirupsen/logrus/hooks/syslog" 10 | ) 11 | 12 | func main() { 13 | log := logrus.New() 14 | hook, err := logrus_syslog.NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "") 15 | 16 | if err == nil { 17 | log.Hooks.Add(hook) 18 | } 19 | } 20 | ``` 21 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/hooks/syslog/syslog_test.go: -------------------------------------------------------------------------------- 1 | package logrus_syslog 2 | 3 | import ( 4 | "github.com/Sirupsen/logrus" 5 | "log/syslog" 6 | "testing" 7 | ) 8 | 9 | func TestLocalhostAddAndPrint(t *testing.T) { 10 | log := logrus.New() 11 | hook, err := NewSyslogHook("udp", "localhost:514", syslog.LOG_INFO, "") 12 | 13 | if err != nil { 14 | t.Errorf("Unable to connect to local syslog.") 15 | } 16 | 17 | log.Hooks.Add(hook) 18 | 19 | for _, level := range hook.Levels() { 20 | if len(log.Hooks[level]) != 1 { 21 | t.Errorf("SyslogHook was not added. The length of log.Hooks[%v]: %v", level, len(log.Hooks[level])) 22 | } 23 | } 24 | 25 | log.Info("Congratulations!") 26 | } 27 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/terminal_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin freebsd openbsd netbsd dragonfly 2 | 3 | package logrus 4 | 5 | import "syscall" 6 | 7 | const ioctlReadTermios = syscall.TIOCGETA 8 | 9 | type Termios syscall.Termios 10 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/terminal_linux.go: -------------------------------------------------------------------------------- 1 | // Based on ssh/terminal: 2 | // Copyright 2013 The Go Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style 4 | // license that can be found in the LICENSE file. 5 | 6 | package logrus 7 | 8 | import "syscall" 9 | 10 | const ioctlReadTermios = syscall.TCGETS 11 | 12 | type Termios syscall.Termios 13 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/terminal_notwindows.go: -------------------------------------------------------------------------------- 1 | // Based on ssh/terminal: 2 | // Copyright 2011 The Go Authors. All rights reserved. 3 | // Use of this source code is governed by a BSD-style 4 | // license that can be found in the LICENSE file. 5 | 6 | // +build linux darwin freebsd openbsd netbsd dragonfly 7 | 8 | package logrus 9 | 10 | import ( 11 | "syscall" 12 | "unsafe" 13 | ) 14 | 15 | // IsTerminal returns true if the given file descriptor is a terminal. 16 | func IsTerminal() bool { 17 | fd := syscall.Stdout 18 | var termios Termios 19 | _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, uintptr(fd), ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0) 20 | return err == 0 21 | } 22 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/Sirupsen/logrus/writer.go: -------------------------------------------------------------------------------- 1 | package logrus 2 | 3 | import ( 4 | "bufio" 5 | "io" 6 | "runtime" 7 | ) 8 | 9 | func (logger *Logger) Writer() *io.PipeWriter { 10 | reader, writer := io.Pipe() 11 | 12 | go logger.writerScanner(reader) 13 | runtime.SetFinalizer(writer, writerFinalizer) 14 | 15 | return writer 16 | } 17 | 18 | func (logger *Logger) writerScanner(reader *io.PipeReader) { 19 | scanner := bufio.NewScanner(reader) 20 | for scanner.Scan() { 21 | logger.Print(scanner.Text()) 22 | } 23 | if err := scanner.Err(); err != nil { 24 | logger.Errorf("Error while reading from Writer: %s", err) 25 | } 26 | reader.Close() 27 | } 28 | 29 | func writerFinalizer(writer *io.PipeWriter) { 30 | writer.Close() 31 | } 32 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cenkalti/backoff/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 1.3.3 3 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cenkalti/backoff/backoff_test.go: -------------------------------------------------------------------------------- 1 | package backoff 2 | 3 | import ( 4 | "time" 5 | 6 | "testing" 7 | ) 8 | 9 | func TestNextBackOffMillis(t *testing.T) { 10 | subtestNextBackOff(t, 0, new(ZeroBackOff)) 11 | subtestNextBackOff(t, Stop, new(StopBackOff)) 12 | } 13 | 14 | func subtestNextBackOff(t *testing.T, expectedValue time.Duration, backOffPolicy BackOff) { 15 | for i := 0; i < 10; i++ { 16 | next := backOffPolicy.NextBackOff() 17 | if next != expectedValue { 18 | t.Errorf("got: %d expected: %d", next, expectedValue) 19 | } 20 | } 21 | } 22 | 23 | func TestConstantBackOff(t *testing.T) { 24 | backoff := NewConstantBackOff(time.Second) 25 | if backoff.NextBackOff() != time.Second { 26 | t.Error("invalid interval") 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/cenkalti/backoff/retry_test.go: -------------------------------------------------------------------------------- 1 | package backoff 2 | 3 | import ( 4 | "errors" 5 | "log" 6 | "testing" 7 | ) 8 | 9 | func TestRetry(t *testing.T) { 10 | const successOn = 3 11 | var i = 0 12 | 13 | // This function is successfull on "successOn" calls. 14 | f := func() error { 15 | i++ 16 | log.Printf("function is called %d. time\n", i) 17 | 18 | if i == successOn { 19 | log.Println("OK") 20 | return nil 21 | } 22 | 23 | log.Println("error") 24 | return errors.New("error") 25 | } 26 | 27 | err := Retry(f, NewExponentialBackOff()) 28 | if err != nil { 29 | t.Errorf("unexpected error: %s", err.Error()) 30 | } 31 | if i != successOn { 32 | t.Errorf("invalid number of retries: %d", i) 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | 11 | script: 12 | - go vet ./... 13 | - go test -v ./... 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/codegangsta/cli/autocomplete/bash_autocomplete: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | 3 | : ${PROG:=$(basename ${BASH_SOURCE})} 4 | 5 | _cli_bash_autocomplete() { 6 | local cur prev opts base 7 | COMPREPLY=() 8 | cur="${COMP_WORDS[COMP_CWORD]}" 9 | prev="${COMP_WORDS[COMP_CWORD-1]}" 10 | opts=$( ${COMP_WORDS[@]:0:$COMP_CWORD} --generate-bash-completion ) 11 | COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) 12 | return 0 13 | } 14 | 15 | complete -F _cli_bash_autocomplete $PROG -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/codegangsta/cli/autocomplete/zsh_autocomplete: -------------------------------------------------------------------------------- 1 | autoload -U compinit && compinit 2 | autoload -U bashcompinit && bashcompinit 3 | 4 | script_dir=$(dirname $0) 5 | source ${script_dir}/bash_autocomplete 6 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/codegangsta/cli/helpers_test.go: -------------------------------------------------------------------------------- 1 | package cli 2 | 3 | import ( 4 | "reflect" 5 | "testing" 6 | ) 7 | 8 | /* Test Helpers */ 9 | func expect(t *testing.T, a interface{}, b interface{}) { 10 | if a != b { 11 | t.Errorf("Expected %v (type %v) - Got %v (type %v)", b, reflect.TypeOf(b), a, reflect.TypeOf(a)) 12 | } 13 | } 14 | 15 | func refute(t *testing.T, a interface{}, b interface{}) { 16 | if a == b { 17 | t.Errorf("Did not expect %v (type %v) - Got %v (type %v)", b, reflect.TypeOf(b), a, reflect.TypeOf(a)) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/digitalocean/godo/Makefile: -------------------------------------------------------------------------------- 1 | OPEN = $(shell which xdg-open || which gnome-open || which open) 2 | 3 | cov: 4 | @@gocov test | gocov-html > /tmp/coverage.html 5 | @@${OPEN} /tmp/coverage.html 6 | 7 | ci: 8 | go get -d -v -t ./... 9 | go build ./... 10 | go test -v ./... 11 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/digitalocean/godo/action_request.go: -------------------------------------------------------------------------------- 1 | package godo 2 | 3 | // ActionRequest reprents DigitalOcean Action Request 4 | type ActionRequest struct { 5 | Type string `json:"type"` 6 | Params map[string]interface{} `json:"params,omitempty"` 7 | } 8 | 9 | // Converts an ActionRequest to a string. 10 | func (d ActionRequest) String() string { 11 | return Stringify(d) 12 | } 13 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/digitalocean/godo/action_request_test.go: -------------------------------------------------------------------------------- 1 | package godo 2 | 3 | import "testing" 4 | 5 | func TestActionRequest_String(t *testing.T) { 6 | action := &ActionRequest{ 7 | Type: "transfer", 8 | Params: map[string]interface{}{"key-1": "value-1"}, 9 | } 10 | 11 | stringified := action.String() 12 | expected := `godo.ActionRequest{Type:"transfer", Params:map[key-1:value-1]}` 13 | if expected != stringified { 14 | t.Errorf("Action.Stringify returned %+v, expected %+v", stringified, expected) 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/digitalocean/godo/doc.go: -------------------------------------------------------------------------------- 1 | // Package godo is the DigtalOcean API v2 client for Go 2 | package godo 3 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/homedir/homedir_test.go: -------------------------------------------------------------------------------- 1 | package homedir 2 | 3 | import ( 4 | "path/filepath" 5 | "testing" 6 | ) 7 | 8 | func TestGet(t *testing.T) { 9 | home := Get() 10 | if home == "" { 11 | t.Fatal("returned home directory is empty") 12 | } 13 | 14 | if !filepath.IsAbs(home) { 15 | t.Fatalf("returned path is not absolute: %s", home) 16 | } 17 | } 18 | 19 | func TestGetShortcutString(t *testing.T) { 20 | shortcut := GetShortcutString() 21 | if shortcut == "" { 22 | t.Fatal("returned shortcut string is empty") 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/term/windows/windows.go: -------------------------------------------------------------------------------- 1 | // These files implement ANSI-aware input and output streams for use by the Docker Windows client. 2 | // When asked for the set of standard streams (e.g., stdin, stdout, stderr), the code will create 3 | // and return pseudo-streams that convert ANSI sequences to / from Windows Console API calls. 4 | 5 | package windows 6 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/docker/pkg/term/windows/windows_test.go: -------------------------------------------------------------------------------- 1 | // This file is necessary to pass the Docker tests. 2 | 3 | package windows 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/commands/active_test.go: -------------------------------------------------------------------------------- 1 | package commands 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/commands/create_test.go: -------------------------------------------------------------------------------- 1 | package commands 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/stretchr/testify/assert" 7 | ) 8 | 9 | func TestValidateSwarmDiscoveryErrorsGivenInvalidURL(t *testing.T) { 10 | err := validateSwarmDiscovery("foo") 11 | assert.Error(t, err) 12 | } 13 | 14 | func TestValidateSwarmDiscoveryAcceptsEmptyString(t *testing.T) { 15 | err := validateSwarmDiscovery("") 16 | assert.NoError(t, err) 17 | } 18 | 19 | func TestValidateSwarmDiscoveryAcceptsValidFormat(t *testing.T) { 20 | err := validateSwarmDiscovery("token://deadbeefcafe") 21 | assert.NoError(t, err) 22 | } 23 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/commands/ip.go: -------------------------------------------------------------------------------- 1 | package commands 2 | 3 | import ( 4 | "github.com/codegangsta/cli" 5 | "github.com/docker/machine/log" 6 | ) 7 | 8 | func cmdIp(c *cli.Context) { 9 | if err := runActionWithContext("ip", c); err != nil { 10 | log.Fatal(err) 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/commands/ip_test.go: -------------------------------------------------------------------------------- 1 | package commands 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/commands/kill.go: -------------------------------------------------------------------------------- 1 | package commands 2 | 3 | import ( 4 | "github.com/docker/machine/log" 5 | 6 | "github.com/codegangsta/cli" 7 | ) 8 | 9 | func cmdKill(c *cli.Context) { 10 | if err := runActionWithContext("kill", c); err != nil { 11 | log.Fatal(err) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/commands/kill_test.go: -------------------------------------------------------------------------------- 1 | package commands 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/commands/regeneratecerts.go: -------------------------------------------------------------------------------- 1 | package commands 2 | 3 | import ( 4 | "github.com/codegangsta/cli" 5 | "github.com/docker/machine/log" 6 | ) 7 | 8 | func cmdRegenerateCerts(c *cli.Context) { 9 | force := c.Bool("force") 10 | if force || confirmInput("Regenerate TLS machine certs? Warning: this is irreversible.") { 11 | log.Infof("Regenerating TLS certificates") 12 | if err := runActionWithContext("configureAuth", c); err != nil { 13 | log.Fatal(err) 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/commands/regeneratecerts_test.go: -------------------------------------------------------------------------------- 1 | package commands 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/commands/restart.go: -------------------------------------------------------------------------------- 1 | package commands 2 | 3 | import ( 4 | "github.com/docker/machine/log" 5 | 6 | "github.com/codegangsta/cli" 7 | ) 8 | 9 | func cmdRestart(c *cli.Context) { 10 | if err := runActionWithContext("restart", c); err != nil { 11 | log.Fatal(err) 12 | } 13 | log.Info("Restarted machines may have new IP addresses. You may need to re-run the `docker-machine env` command.") 14 | } 15 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/commands/restart_test.go: -------------------------------------------------------------------------------- 1 | package commands 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/commands/rm_test.go: -------------------------------------------------------------------------------- 1 | package commands 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/commands/ssh_test.go: -------------------------------------------------------------------------------- 1 | package commands 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/commands/start.go: -------------------------------------------------------------------------------- 1 | package commands 2 | 3 | import ( 4 | "github.com/docker/machine/log" 5 | 6 | "github.com/codegangsta/cli" 7 | ) 8 | 9 | func cmdStart(c *cli.Context) { 10 | if err := runActionWithContext("start", c); err != nil { 11 | log.Fatal(err) 12 | } 13 | log.Info("Started machines may have new IP addresses. You may need to re-run the `docker-machine env` command.") 14 | } 15 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/commands/start_test.go: -------------------------------------------------------------------------------- 1 | package commands 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/commands/status.go: -------------------------------------------------------------------------------- 1 | package commands 2 | 3 | import ( 4 | "github.com/docker/machine/log" 5 | 6 | "github.com/codegangsta/cli" 7 | ) 8 | 9 | func cmdStatus(c *cli.Context) { 10 | host := getHost(c) 11 | currentState, err := host.Driver.GetState() 12 | if err != nil { 13 | log.Errorf("error getting state for host %s: %s", host.Name, err) 14 | } 15 | log.Info(currentState) 16 | } 17 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/commands/status_test.go: -------------------------------------------------------------------------------- 1 | package commands 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/commands/stop.go: -------------------------------------------------------------------------------- 1 | package commands 2 | 3 | import ( 4 | "github.com/docker/machine/log" 5 | 6 | "github.com/codegangsta/cli" 7 | ) 8 | 9 | func cmdStop(c *cli.Context) { 10 | if err := runActionWithContext("stop", c); err != nil { 11 | log.Fatal(err) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/commands/stop_test.go: -------------------------------------------------------------------------------- 1 | package commands 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/commands/upgrade.go: -------------------------------------------------------------------------------- 1 | package commands 2 | 3 | import ( 4 | "github.com/docker/machine/log" 5 | 6 | "github.com/codegangsta/cli" 7 | ) 8 | 9 | func cmdUpgrade(c *cli.Context) { 10 | if err := runActionWithContext("upgrade", c); err != nil { 11 | log.Fatal(err) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/commands/upgrade_test.go: -------------------------------------------------------------------------------- 1 | package commands 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/commands/url.go: -------------------------------------------------------------------------------- 1 | package commands 2 | 3 | import ( 4 | "fmt" 5 | 6 | "github.com/docker/machine/log" 7 | 8 | "github.com/codegangsta/cli" 9 | ) 10 | 11 | func cmdUrl(c *cli.Context) { 12 | url, err := getHost(c).GetURL() 13 | if err != nil { 14 | log.Fatal(err) 15 | } 16 | 17 | fmt.Println(url) 18 | } 19 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/commands/url_test.go: -------------------------------------------------------------------------------- 1 | package commands 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/amazonec2/amz/auth.go: -------------------------------------------------------------------------------- 1 | package amz 2 | 3 | type Auth struct { 4 | AccessKey, SecretKey, SessionToken string 5 | } 6 | 7 | func GetAuth(accessKey, secretKey, sessionToken string) Auth { 8 | return Auth{accessKey, secretKey, sessionToken} 9 | } 10 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/amazonec2/amz/auth_test.go: -------------------------------------------------------------------------------- 1 | package amz 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/amazonec2/amz/block_device_mapping.go: -------------------------------------------------------------------------------- 1 | package amz 2 | 3 | type BlockDeviceMapping struct { 4 | DeviceName string 5 | VirtualName string 6 | VolumeSize int64 7 | DeleteOnTermination bool 8 | VolumeType string 9 | } 10 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/amazonec2/amz/block_device_mapping_test.go: -------------------------------------------------------------------------------- 1 | package amz 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/amazonec2/amz/describe_instances.go: -------------------------------------------------------------------------------- 1 | package amz 2 | 3 | type DescribeInstancesResponse struct { 4 | RequestId string `xml:"requestId"` 5 | ReservationSet []struct { 6 | InstancesSet []EC2Instance `xml:"instancesSet>item"` 7 | } `xml:"reservationSet>item"` 8 | } 9 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/amazonec2/amz/describe_instances_test.go: -------------------------------------------------------------------------------- 1 | package amz 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/amazonec2/amz/describe_keypairs.go: -------------------------------------------------------------------------------- 1 | package amz 2 | 3 | type DescribeKeyPairsResponse struct { 4 | RequestId string `xml:"requestId"` 5 | KeySet []KeyPair `xml:"keySet>item"` 6 | } 7 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/amazonec2/amz/describe_keypairs_test.go: -------------------------------------------------------------------------------- 1 | package amz 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/amazonec2/amz/describe_security_groups.go: -------------------------------------------------------------------------------- 1 | package amz 2 | 3 | type DescribeSecurityGroupsResponse struct { 4 | RequestId string `xml:"requestId"` 5 | SecurityGroupInfo []SecurityGroup `xml:"securityGroupInfo>item"` 6 | } 7 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/amazonec2/amz/describe_security_groups_test.go: -------------------------------------------------------------------------------- 1 | package amz 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/amazonec2/amz/describe_spot_instance_requests.go: -------------------------------------------------------------------------------- 1 | package amz 2 | 3 | type DescribeSpotInstanceRequestsResponse struct { 4 | RequestId string `xml:"requestId"` 5 | SpotInstanceRequestSet []struct { 6 | Status struct { 7 | Code string `xml:"code"` 8 | } `xml:"status"` 9 | InstanceId string `xml:"instanceId"` 10 | } `xml:"spotInstanceRequestSet>item"` 11 | } 12 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/amazonec2/amz/describe_subnets.go: -------------------------------------------------------------------------------- 1 | package amz 2 | 3 | type DescribeSubnetsResponse struct { 4 | RequestId string `xml:"requestId"` 5 | SubnetSet []Subnet `xml:"subnetSet>item"` 6 | } 7 | 8 | type Subnet struct { 9 | SubnetId string `xml:"subnetId"` 10 | State string `xml:"state"` 11 | VpcId string `xml:"vpcId"` 12 | CidrBlock string `xml:"cidrBlock"` 13 | AvailabilityZone string `xml:"availabilityZone"` 14 | DefaultForAz bool `xml:"defaultForAz"` 15 | } 16 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/amazonec2/amz/describe_subnets_test.go: -------------------------------------------------------------------------------- 1 | package amz 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/amazonec2/amz/ec2_test.go: -------------------------------------------------------------------------------- 1 | package amz 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/amazonec2/amz/error.go: -------------------------------------------------------------------------------- 1 | package amz 2 | 3 | type ErrorResponse struct { 4 | Errors []struct { 5 | Code string 6 | Message string 7 | } `xml:"Errors>Error"` 8 | RequestID string 9 | } 10 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/amazonec2/amz/error_codes.go: -------------------------------------------------------------------------------- 1 | package amz 2 | 3 | const ( 4 | ErrorDuplicateGroup = "InvalidGroup.Duplicate" 5 | ) 6 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/amazonec2/amz/error_codes_test.go: -------------------------------------------------------------------------------- 1 | package amz 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/amazonec2/amz/error_test.go: -------------------------------------------------------------------------------- 1 | package amz 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/amazonec2/amz/filter.go: -------------------------------------------------------------------------------- 1 | package amz 2 | 3 | type Filter struct { 4 | Name string 5 | Value string 6 | } 7 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/amazonec2/amz/ip_permission.go: -------------------------------------------------------------------------------- 1 | package amz 2 | 3 | type IpPermission struct { 4 | IpProtocol string `xml:"ipProtocol"` 5 | FromPort int `xml:"fromPort"` 6 | ToPort int `xml:"toPort"` 7 | IpRange string `xml:"ipRanges"` 8 | } 9 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/amazonec2/amz/ip_permission_test.go: -------------------------------------------------------------------------------- 1 | package amz 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/amazonec2/amz/keypair.go: -------------------------------------------------------------------------------- 1 | package amz 2 | 3 | type CreateKeyPairResponse struct { 4 | KeyName string `xml:"keyName"` 5 | KeyFingerprint string `xml:"keyFingerprint"` 6 | KeyMaterial []byte `xml:"keyMaterial"` 7 | } 8 | 9 | type ImportKeyPairResponse struct { 10 | KeyName string `xml:"keyName"` 11 | KeyFingerprint string `xml:"keyFingerprint"` 12 | KeyMaterial []byte `xml:"keyMaterial"` 13 | } 14 | 15 | type KeyPair struct { 16 | KeyFingerprint string `xml:"keyFingerprint"` 17 | KeyName string `xml:"keyName"` 18 | } 19 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/amazonec2/amz/keypair_test.go: -------------------------------------------------------------------------------- 1 | package amz 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/amazonec2/amz/security_group_test.go: -------------------------------------------------------------------------------- 1 | package amz 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/amazonec2/amz/tags.go: -------------------------------------------------------------------------------- 1 | package amz 2 | 3 | type CreateTagsResponse struct { 4 | RequestId string `xml:"requestId"` 5 | Return bool `xml:"return"` 6 | } 7 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/amazonec2/amz/tags_test.go: -------------------------------------------------------------------------------- 1 | package amz 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/azure/azure_test.go: -------------------------------------------------------------------------------- 1 | package azure 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/digitalocean/digitalocean_test.go: -------------------------------------------------------------------------------- 1 | package digitalocean 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/exoscale/exoscale_test.go: -------------------------------------------------------------------------------- 1 | package exoscale 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/fakedriver/fakedriver_test.go: -------------------------------------------------------------------------------- 1 | package fakedriver 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/flag_sort.go: -------------------------------------------------------------------------------- 1 | package drivers 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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/generic/generic_test.go: -------------------------------------------------------------------------------- 1 | package generic 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/google/auth_util_test.go: -------------------------------------------------------------------------------- 1 | package google 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/google/compute_util_test.go: -------------------------------------------------------------------------------- 1 | package google 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/google/google_test.go: -------------------------------------------------------------------------------- 1 | package google 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/hyperv/hyperv.go: -------------------------------------------------------------------------------- 1 | // this is empty to allow builds on non-windows platforms 2 | package hyperv 3 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/hyperv/hyperv_test.go: -------------------------------------------------------------------------------- 1 | package hyperv 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/none/none_test.go: -------------------------------------------------------------------------------- 1 | package none 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/openstack/client_test.go: -------------------------------------------------------------------------------- 1 | package openstack 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/openstack/openstack_test.go: -------------------------------------------------------------------------------- 1 | package openstack 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/rackspace/client_test.go: -------------------------------------------------------------------------------- 1 | package rackspace 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/rackspace/rackspace_test.go: -------------------------------------------------------------------------------- 1 | package rackspace 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/softlayer/softlayer_test.go: -------------------------------------------------------------------------------- 1 | package softlayer 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/virtualbox/network_test.go: -------------------------------------------------------------------------------- 1 | package virtualbox 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/virtualbox/vbm_test.go: -------------------------------------------------------------------------------- 1 | package virtualbox 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/vmwarefusion/fusion_test.go: -------------------------------------------------------------------------------- 1 | package vmwarefusion 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/vmwarefusion/vmrun_test.go: -------------------------------------------------------------------------------- 1 | package vmwarefusion 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/vmwarefusion/vmwarefusion.go: -------------------------------------------------------------------------------- 1 | // Package vmwarefusion is empty to allow builds on non-darwin platforms 2 | package vmwarefusion 3 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/vmwarefusion/vmx_test.go: -------------------------------------------------------------------------------- 1 | package vmwarefusion 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/vmwarevcloudair/vcloudair_test.go: -------------------------------------------------------------------------------- 1 | package vmwarevcloudair 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/vmwarevsphere/errors/config_error.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014 VMware, Inc. All rights reserved. Licensed under the Apache v2 License. 3 | */ 4 | 5 | package errors 6 | 7 | import "fmt" 8 | 9 | type IncompleteVsphereConfigError struct { 10 | component string 11 | } 12 | 13 | func NewIncompleteVsphereConfigError(component string) error { 14 | err := IncompleteVsphereConfigError{ 15 | component: component, 16 | } 17 | return &err 18 | } 19 | 20 | func (err *IncompleteVsphereConfigError) Error() string { 21 | return fmt.Sprintf("Incomplete vSphere information: missing %s", err.component) 22 | } 23 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/vmwarevsphere/errors/config_error_test.go: -------------------------------------------------------------------------------- 1 | package errors 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/vmwarevsphere/errors/datastore_error.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014 VMware, Inc. All rights reserved. Licensed under the Apache v2 License. 3 | */ 4 | 5 | package errors 6 | 7 | import "fmt" 8 | 9 | type DatastoreError struct { 10 | datastore string 11 | operation string 12 | reason string 13 | } 14 | 15 | func NewDatastoreError(datastore, operation, reason string) error { 16 | err := DatastoreError{ 17 | datastore: datastore, 18 | operation: operation, 19 | reason: reason, 20 | } 21 | return &err 22 | } 23 | 24 | func (err *DatastoreError) Error() string { 25 | return fmt.Sprintf("Unable to %s on datastore %s due to %s", err.operation, err.datastore, err.reason) 26 | } 27 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/vmwarevsphere/errors/datastore_error_test.go: -------------------------------------------------------------------------------- 1 | package errors 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/vmwarevsphere/errors/errors.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014 VMware, Inc. All rights reserved. Licensed under the Apache v2 License. 3 | */ 4 | 5 | package errors 6 | 7 | import ( 8 | original "errors" 9 | "fmt" 10 | ) 11 | 12 | func New(message string) error { 13 | return original.New(message) 14 | } 15 | 16 | func NewWithFmt(message string, args ...interface{}) error { 17 | return original.New(fmt.Sprintf(message, args...)) 18 | } 19 | 20 | func NewWithError(message string, err error) error { 21 | return NewWithFmt("%s: %s", message, err.Error()) 22 | } 23 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/vmwarevsphere/errors/errors_test.go: -------------------------------------------------------------------------------- 1 | package errors 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/vmwarevsphere/errors/govc_error.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014 VMware, Inc. All rights reserved. Licensed under the Apache v2 License. 3 | */ 4 | 5 | package errors 6 | 7 | import "fmt" 8 | 9 | type GovcNotFoundError struct { 10 | path string 11 | } 12 | 13 | func NewGovcNotFoundError(path string) error { 14 | err := GovcNotFoundError{ 15 | path: path, 16 | } 17 | return &err 18 | } 19 | 20 | func (err *GovcNotFoundError) Error() string { 21 | return fmt.Sprintf("govc not found: %s", err.path) 22 | } 23 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/vmwarevsphere/errors/govc_error_test.go: -------------------------------------------------------------------------------- 1 | package errors 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/vmwarevsphere/errors/guest_error.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014 VMware, Inc. All rights reserved. Licensed under the Apache v2 License. 3 | */ 4 | 5 | package errors 6 | 7 | import "fmt" 8 | 9 | type GuestError struct { 10 | vm string 11 | operation string 12 | reason string 13 | } 14 | 15 | func NewGuestError(vm, operation, reason string) error { 16 | err := GuestError{ 17 | vm: vm, 18 | operation: operation, 19 | reason: reason, 20 | } 21 | return &err 22 | } 23 | 24 | func (err *GuestError) Error() string { 25 | return fmt.Sprintf("Unable to %s on vm %s due to %s", err.operation, err.vm, err.reason) 26 | } 27 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/vmwarevsphere/errors/guest_error_test.go: -------------------------------------------------------------------------------- 1 | package errors 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/vmwarevsphere/errors/login_error.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014 VMware, Inc. All rights reserved. Licensed under the Apache v2 License. 3 | */ 4 | 5 | package errors 6 | 7 | type InvalidLoginError struct { 8 | } 9 | 10 | func NewInvalidLoginError() error { 11 | err := InvalidLoginError{} 12 | return &err 13 | } 14 | 15 | func (err *InvalidLoginError) Error() string { 16 | return "cannot complete operation due to incorrect vSphere username or password" 17 | } 18 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/vmwarevsphere/errors/login_error_test.go: -------------------------------------------------------------------------------- 1 | package errors 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/vmwarevsphere/errors/state_error.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014 VMware, Inc. All rights reserved. Licensed under the Apache v2 License. 3 | */ 4 | 5 | package errors 6 | 7 | import "fmt" 8 | 9 | type InvalidStateError struct { 10 | vm string 11 | } 12 | 13 | func NewInvalidStateError(vm string) error { 14 | err := InvalidStateError{ 15 | vm: vm, 16 | } 17 | return &err 18 | } 19 | 20 | func (err *InvalidStateError) Error() string { 21 | return fmt.Sprintf("Machine %s state invalid", err.vm) 22 | } 23 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/vmwarevsphere/errors/state_error_test.go: -------------------------------------------------------------------------------- 1 | package errors 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/vmwarevsphere/errors/vm_error.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2014 VMware, Inc. All rights reserved. Licensed under the Apache v2 License. 3 | */ 4 | 5 | package errors 6 | 7 | import "fmt" 8 | 9 | type VMError struct { 10 | operation string 11 | vm string 12 | reason string 13 | } 14 | 15 | func NewVMError(operation, vm, reason string) error { 16 | err := VMError{ 17 | vm: vm, 18 | operation: operation, 19 | reason: reason, 20 | } 21 | return &err 22 | } 23 | 24 | func (err *VMError) Error() string { 25 | return fmt.Sprintf("Unable to %s docker host %s: %s", err.operation, err.vm, err.reason) 26 | } 27 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/vmwarevsphere/errors/vm_error_test.go: -------------------------------------------------------------------------------- 1 | package errors 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/vmwarevsphere/govc_test.go: -------------------------------------------------------------------------------- 1 | package vmwarevsphere 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/vmwarevsphere/vc_conn_test.go: -------------------------------------------------------------------------------- 1 | package vmwarevsphere 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/drivers/vmwarevsphere/vsphere_test.go: -------------------------------------------------------------------------------- 1 | package vmwarevsphere 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/libmachine/auth/auth.go: -------------------------------------------------------------------------------- 1 | package auth 2 | 3 | type AuthOptions struct { 4 | StorePath string 5 | CaCertPath string 6 | CaCertRemotePath string 7 | ServerCertPath string 8 | ServerKeyPath string 9 | ClientKeyPath string 10 | ServerCertRemotePath string 11 | ServerKeyRemotePath string 12 | PrivateKeyPath string 13 | ClientCertPath string 14 | } 15 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/libmachine/auth/auth_test.go: -------------------------------------------------------------------------------- 1 | package auth 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/libmachine/certs.go: -------------------------------------------------------------------------------- 1 | package libmachine 2 | 3 | type CertPathInfo struct { 4 | CaCertPath string 5 | CaKeyPath string 6 | ClientCertPath string 7 | ClientKeyPath string 8 | ServerCertPath string 9 | ServerKeyPath string 10 | } 11 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/libmachine/engine/engine.go: -------------------------------------------------------------------------------- 1 | package engine 2 | 3 | type EngineOptions struct { 4 | ArbitraryFlags []string 5 | Dns []string 6 | GraphDir string 7 | Env []string 8 | Ipv6 bool 9 | InsecureRegistry []string 10 | Labels []string 11 | LogLevel string 12 | StorageDriver string 13 | SelinuxEnabled bool 14 | TlsCaCert string 15 | TlsCert string 16 | TlsKey string 17 | TlsVerify bool 18 | RegistryMirror []string 19 | InstallURL string 20 | } 21 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/libmachine/engine/engine_test.go: -------------------------------------------------------------------------------- 1 | package engine 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/libmachine/errors.go: -------------------------------------------------------------------------------- 1 | package libmachine 2 | 3 | import ( 4 | "errors" 5 | "fmt" 6 | ) 7 | 8 | var ( 9 | ErrInvalidHostname = errors.New("Invalid hostname specified") 10 | ErrUnknownProviderType = errors.New("Unknown hypervisor type") 11 | ) 12 | 13 | type ErrHostDoesNotExist struct { 14 | Name string 15 | } 16 | 17 | func (e ErrHostDoesNotExist) Error() string { 18 | return fmt.Sprintf("Error: Host does not exist: %s", e.Name) 19 | } 20 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/libmachine/provider_test.go: -------------------------------------------------------------------------------- 1 | package libmachine 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/libmachine/provision/centos.go: -------------------------------------------------------------------------------- 1 | package provision 2 | 3 | import ( 4 | "github.com/docker/machine/drivers" 5 | ) 6 | 7 | func init() { 8 | Register("Centos", &RegisteredProvisioner{ 9 | New: NewCentosProvisioner, 10 | }) 11 | } 12 | 13 | func NewCentosProvisioner(d drivers.Driver) Provisioner { 14 | g := GenericProvisioner{ 15 | DockerOptionsDir: "/etc/docker", 16 | DaemonOptionsFile: "/etc/systemd/system/docker.service", 17 | OsReleaseId: "centos", 18 | Packages: []string{}, 19 | Driver: d, 20 | } 21 | p := &CentosProvisioner{ 22 | RedHatProvisioner{ 23 | GenericProvisioner: g, 24 | }, 25 | } 26 | return p 27 | } 28 | 29 | type CentosProvisioner struct { 30 | RedHatProvisioner 31 | } 32 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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.AuthOptions 11 | EngineOptions engine.EngineOptions 12 | DockerOptionsDir string 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/libmachine/provision/errors.go: -------------------------------------------------------------------------------- 1 | package provision 2 | 3 | import ( 4 | "errors" 5 | ) 6 | 7 | var ( 8 | ErrDetectionFailed = errors.New("OS type not recognized") 9 | ErrSSHCommandFailed = errors.New("SSH command failure") 10 | ErrNotImplemented = errors.New("Runtime not implemented") 11 | ) 12 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/libmachine/provision/fedora.go: -------------------------------------------------------------------------------- 1 | package provision 2 | 3 | import ( 4 | "github.com/docker/machine/drivers" 5 | ) 6 | 7 | func init() { 8 | Register("Fedora", &RegisteredProvisioner{ 9 | New: NewFedoraProvisioner, 10 | }) 11 | } 12 | 13 | func NewFedoraProvisioner(d drivers.Driver) Provisioner { 14 | g := GenericProvisioner{ 15 | DockerOptionsDir: "/etc/docker", 16 | DaemonOptionsFile: "/etc/systemd/system/docker.service", 17 | OsReleaseId: "fedora", 18 | Packages: []string{}, 19 | Driver: d, 20 | } 21 | p := &FedoraProvisioner{ 22 | RedHatProvisioner{ 23 | GenericProvisioner: g, 24 | }, 25 | } 26 | return p 27 | } 28 | 29 | type FedoraProvisioner struct { 30 | RedHatProvisioner 31 | } 32 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 := 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(".*fedora/22.*", buf.String()) 21 | if err != nil { 22 | t.Fatal(err) 23 | } 24 | 25 | if !m { 26 | t.Fatalf("expected match for fedora/22") 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/libmachine/provision/pkgaction/action_test.go: -------------------------------------------------------------------------------- 1 | package pkgaction 2 | 3 | import "testing" 4 | 5 | func TestActionValue(t *testing.T) { 6 | if Install.String() != "install" { 7 | t.Fatal("Expected %q but got %q", "install", Install.String()) 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/libmachine/provision/redhat_test.go: -------------------------------------------------------------------------------- 1 | package provision 2 | 3 | import ( 4 | "regexp" 5 | "testing" 6 | ) 7 | 8 | func TestRedHatGenerateYumRepoList(t *testing.T) { 9 | info := &OsRelease{ 10 | Id: "rhel", 11 | } 12 | p := NewRedHatProvisioner(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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 SwarmOptions struct { 8 | IsSwarm bool 9 | Address string 10 | Discovery string 11 | Master bool 12 | Host string 13 | Image string 14 | Strategy string 15 | Heartbeat int 16 | Overcommit float64 17 | TlsCaCert string 18 | TlsCert string 19 | TlsKey string 20 | TlsVerify bool 21 | ArbitraryFlags []string 22 | } 23 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/libmachine/swarm/swarm_test.go: -------------------------------------------------------------------------------- 1 | package swarm 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/log/log_test.go: -------------------------------------------------------------------------------- 1 | package log 2 | 3 | import "testing" 4 | 5 | func TestTerminalLoggerWithFields(t *testing.T) { 6 | logger := TerminalLogger{} 7 | withFieldsLogger := logger.WithFields(Fields{ 8 | "foo": "bar", 9 | "spam": "eggs", 10 | }) 11 | withFieldsTerminalLogger, ok := withFieldsLogger.(TerminalLogger) 12 | if !ok { 13 | t.Fatal("Type assertion to TerminalLogger failed") 14 | } 15 | expectedOutFields := "\t\t foo=bar spam=eggs" 16 | if withFieldsTerminalLogger.fieldOut != expectedOutFields { 17 | t.Fatalf("Expected %q, got %q", expectedOutFields, withFieldsTerminalLogger.fieldOut) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/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{"RSA PRIVATE KEY", nil, 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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/ssh/ssh.go: -------------------------------------------------------------------------------- 1 | package ssh 2 | 3 | import ( 4 | "net" 5 | "time" 6 | 7 | "github.com/docker/machine/log" 8 | ) 9 | 10 | func WaitForTCP(addr string) error { 11 | for { 12 | log.Debugf("Testing TCP connection to: %s", addr) 13 | conn, err := net.DialTimeout("tcp", addr, 2*time.Second) 14 | 15 | if err != nil { 16 | continue 17 | } 18 | 19 | defer conn.Close() 20 | return nil 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/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 | } else { 35 | return "" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/version/version.go: -------------------------------------------------------------------------------- 1 | package version 2 | 3 | var ( 4 | // ConfigVersion dictates which version of the config.json format is 5 | // used. It needs to be bumped if there is a breaking change, and 6 | // therefore migration, introduced to the config file format. 7 | ConfigVersion = 1 8 | 9 | // VERSION should be updated by hand at each release 10 | Version = "0.4.1" 11 | 12 | // GitCommit will be overwritten automatically by the build system 13 | GitCommit = "HEAD" 14 | ) 15 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/docker/machine/version/version_test.go: -------------------------------------------------------------------------------- 1 | package version 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/ivpusic/golog/.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 | *.test 24 | *.prof 25 | example/log.txt 26 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/ivpusic/golog/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.2 5 | - 1.3 6 | 7 | services: 8 | - mongodb 9 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/ivpusic/golog/examples/appenders.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "github.com/ivpusic/golog" 4 | import "github.com/ivpusic/golog/appenders" 5 | 6 | func mongo() { 7 | logger := golog.Default 8 | 9 | // make instance of mongo appender and enable it 10 | logger.Enable(appenders.Mongo(golog.Conf{ 11 | "host": "127.0.0.1:27017", 12 | "db": "somedb", 13 | "collection": "logs", 14 | "username": "myusername", 15 | "password": "mypassword", 16 | })) 17 | 18 | logger.Debug("some message") 19 | } 20 | 21 | func file() { 22 | logger := golog.Default 23 | 24 | // make instance of file appender and enable it 25 | logger.Enable(appenders.File(golog.Conf{ 26 | "path": "/path/to/log.txt", 27 | })) 28 | 29 | logger.Debug("some message") 30 | } 31 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/ivpusic/golog/examples/customappender.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "github.com/ivpusic/golog" 4 | 5 | type CustomAppender struct { 6 | } 7 | 8 | func (s *CustomAppender) Append(log golog.Log) { 9 | // do something with log 10 | // for example you can save it to database 11 | // send it to some service, etc. 12 | } 13 | 14 | func (s *CustomAppender) Id() string { 15 | return "id/of/custom/appender" 16 | } 17 | 18 | func customappender() { 19 | logger := golog.Default 20 | 21 | // make custom appender instance 22 | appender := &CustomAppender{} 23 | 24 | // enable custom appender 25 | logger.Enable(appender) 26 | 27 | // log something 28 | logger.Debug("this will go to custom appender also") 29 | } 30 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/ivpusic/golog/examples/formatting.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "github.com/ivpusic/golog" 4 | 5 | func formatting() { 6 | logger := golog.Default 7 | 8 | // will output `some cool number 4` 9 | // the same you can do for other levels 10 | logger.Debugf("some %s number %d", "cool", 4) 11 | } 12 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/ivpusic/golog/examples/simple.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import "github.com/ivpusic/golog" 4 | 5 | func simple() { 6 | // get default logger 7 | logger := golog.Default 8 | 9 | // default level for all loggers is DEBUG 10 | // you can easily change it it you want 11 | logger.Level = golog.DEBUG 12 | 13 | // log something 14 | logger.Debug("some message") 15 | } 16 | 17 | func main() { 18 | simple() 19 | } 20 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/mitchellh/mapstructure/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.4 5 | 6 | script: 7 | - go test 8 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/user/MAINTAINERS: -------------------------------------------------------------------------------- 1 | Tianon Gravi (@tianon) 2 | Aleksa Sarai (@cyphar) 3 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/user/lookup_unix.go: -------------------------------------------------------------------------------- 1 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 2 | 3 | package user 4 | 5 | import ( 6 | "io" 7 | "os" 8 | ) 9 | 10 | // Unix-specific path to the passwd and group formatted files. 11 | const ( 12 | unixPasswdPath = "/etc/passwd" 13 | unixGroupPath = "/etc/group" 14 | ) 15 | 16 | func GetPasswdPath() (string, error) { 17 | return unixPasswdPath, nil 18 | } 19 | 20 | func GetPasswd() (io.ReadCloser, error) { 21 | return os.Open(unixPasswdPath) 22 | } 23 | 24 | func GetGroupPath() (string, error) { 25 | return unixGroupPath, nil 26 | } 27 | 28 | func GetGroup() (io.ReadCloser, error) { 29 | return os.Open(unixGroupPath) 30 | } 31 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/user/lookup_unsupported.go: -------------------------------------------------------------------------------- 1 | // +build !darwin,!dragonfly,!freebsd,!linux,!netbsd,!openbsd,!solaris 2 | 3 | package user 4 | 5 | import "io" 6 | 7 | func GetPasswdPath() (string, error) { 8 | return "", ErrUnsupported 9 | } 10 | 11 | func GetPasswd() (io.ReadCloser, error) { 12 | return nil, ErrUnsupported 13 | } 14 | 15 | func GetGroupPath() (string, error) { 16 | return "", ErrUnsupported 17 | } 18 | 19 | func GetGroup() (io.ReadCloser, error) { 20 | return nil, ErrUnsupported 21 | } 22 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 golang.org/x/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/openstack/compute/v2/pkg.go: -------------------------------------------------------------------------------- 1 | // The v2 package contains acceptance tests for the Openstack Compute V2 service. 2 | 3 | package v2 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/openstack/identity/v2/pkg.go: -------------------------------------------------------------------------------- 1 | package v2 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/openstack/identity/v3/pkg.go: -------------------------------------------------------------------------------- 1 | package v3 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/openstack/networking/v2/extensions/fwaas/pkg.go: -------------------------------------------------------------------------------- 1 | package fwaas 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/openstack/networking/v2/extensions/lbaas/pkg.go: -------------------------------------------------------------------------------- 1 | package lbaas 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/openstack/networking/v2/extensions/pkg.go: -------------------------------------------------------------------------------- 1 | package extensions 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/openstack/networking/v2/pkg.go: -------------------------------------------------------------------------------- 1 | package v2 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/openstack/orchestration/v1/buildinfo_test.go: -------------------------------------------------------------------------------- 1 | // +build acceptance 2 | 3 | package v1 4 | 5 | import ( 6 | "testing" 7 | 8 | "github.com/rackspace/gophercloud/openstack/orchestration/v1/buildinfo" 9 | th "github.com/rackspace/gophercloud/testhelper" 10 | ) 11 | 12 | func TestBuildInfo(t *testing.T) { 13 | // Create a provider client for making the HTTP requests. 14 | // See common.go in this directory for more information. 15 | client := newClient(t) 16 | 17 | bi, err := buildinfo.Get(client).Extract() 18 | th.AssertNoErr(t, err) 19 | t.Logf("retrieved build info: %+v\n", bi) 20 | } 21 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/openstack/orchestration/v1/hello-compute.json: -------------------------------------------------------------------------------- 1 | { 2 | "heat_template_version": "2013-05-23", 3 | "resources": { 4 | "compute_instance": { 5 | "type": "OS::Nova::Server", 6 | "properties": { 7 | "flavor": "m1.small", 8 | "image": "cirros-0.3.2-x86_64-disk", 9 | "name": "Single Compute Instance" 10 | } 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/openstack/pkg.go: -------------------------------------------------------------------------------- 1 | // +build acceptance 2 | 3 | package openstack 4 | 5 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/rackspace/cdn/v1/common.go: -------------------------------------------------------------------------------- 1 | // +build acceptance 2 | 3 | package v1 4 | 5 | import ( 6 | "testing" 7 | 8 | "github.com/rackspace/gophercloud" 9 | "github.com/rackspace/gophercloud/rackspace" 10 | th "github.com/rackspace/gophercloud/testhelper" 11 | ) 12 | 13 | func newClient(t *testing.T) *gophercloud.ServiceClient { 14 | ao, err := rackspace.AuthOptionsFromEnv() 15 | th.AssertNoErr(t, err) 16 | 17 | client, err := rackspace.AuthenticatedClient(ao) 18 | th.AssertNoErr(t, err) 19 | 20 | c, err := rackspace.NewCDNV1(client, gophercloud.EndpointOpts{}) 21 | th.AssertNoErr(t, err) 22 | return c 23 | } 24 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/rackspace/compute/v2/pkg.go: -------------------------------------------------------------------------------- 1 | package v2 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/rackspace/identity/v2/pkg.go: -------------------------------------------------------------------------------- 1 | package v2 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/rackspace/objectstorage/v1/bulk_test.go: -------------------------------------------------------------------------------- 1 | // +build acceptance rackspace objectstorage v1 2 | 3 | package v1 4 | 5 | import ( 6 | "testing" 7 | 8 | "github.com/rackspace/gophercloud/rackspace/objectstorage/v1/bulk" 9 | th "github.com/rackspace/gophercloud/testhelper" 10 | ) 11 | 12 | func TestBulk(t *testing.T) { 13 | c, err := createClient(t, false) 14 | th.AssertNoErr(t, err) 15 | 16 | var options bulk.DeleteOpts 17 | options = append(options, "container/object1") 18 | res := bulk.Delete(c, options) 19 | th.AssertNoErr(t, res.Err) 20 | body, err := res.ExtractBody() 21 | th.AssertNoErr(t, err) 22 | t.Logf("Response body from Bulk Delete Request: %+v\n", body) 23 | } 24 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/rackspace/orchestration/v1/buildinfo_test.go: -------------------------------------------------------------------------------- 1 | // +build acceptance 2 | 3 | package v1 4 | 5 | import ( 6 | "testing" 7 | 8 | "github.com/rackspace/gophercloud/rackspace/orchestration/v1/buildinfo" 9 | th "github.com/rackspace/gophercloud/testhelper" 10 | ) 11 | 12 | func TestBuildInfo(t *testing.T) { 13 | // Create a provider client for making the HTTP requests. 14 | // See common.go in this directory for more information. 15 | client := newClient(t) 16 | 17 | bi, err := buildinfo.Get(client).Extract() 18 | th.AssertNoErr(t, err) 19 | t.Logf("retrieved build info: %+v\n", bi) 20 | } 21 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/rackspace/pkg.go: -------------------------------------------------------------------------------- 1 | package rackspace 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/rackspace/rackconnect/v3/common.go: -------------------------------------------------------------------------------- 1 | // +build acceptance 2 | 3 | package v3 4 | 5 | import ( 6 | "os" 7 | "testing" 8 | 9 | "github.com/rackspace/gophercloud" 10 | "github.com/rackspace/gophercloud/rackspace" 11 | th "github.com/rackspace/gophercloud/testhelper" 12 | ) 13 | 14 | func newClient(t *testing.T) *gophercloud.ServiceClient { 15 | ao, err := rackspace.AuthOptionsFromEnv() 16 | th.AssertNoErr(t, err) 17 | 18 | client, err := rackspace.AuthenticatedClient(ao) 19 | th.AssertNoErr(t, err) 20 | 21 | c, err := rackspace.NewRackConnectV3(client, gophercloud.EndpointOpts{ 22 | Region: os.Getenv("RS_REGION_NAME"), 23 | }) 24 | th.AssertNoErr(t, err) 25 | return c 26 | } 27 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/acceptance/tools/pkg.go: -------------------------------------------------------------------------------- 1 | package tools 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/endpoint_search_test.go: -------------------------------------------------------------------------------- 1 | package gophercloud 2 | 3 | import ( 4 | "testing" 5 | 6 | th "github.com/rackspace/gophercloud/testhelper" 7 | ) 8 | 9 | func TestApplyDefaultsToEndpointOpts(t *testing.T) { 10 | eo := EndpointOpts{Availability: AvailabilityPublic} 11 | eo.ApplyDefaults("compute") 12 | expected := EndpointOpts{Availability: AvailabilityPublic, Type: "compute"} 13 | th.CheckDeepEquals(t, expected, eo) 14 | 15 | eo = EndpointOpts{Type: "compute"} 16 | eo.ApplyDefaults("object-store") 17 | expected = EndpointOpts{Availability: AvailabilityPublic, Type: "compute"} 18 | th.CheckDeepEquals(t, expected, eo) 19 | } 20 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/blockstorage/v1/apiversions/doc.go: -------------------------------------------------------------------------------- 1 | // Package apiversions provides information and interaction with the different 2 | // API versions for the OpenStack Block Storage service, code-named Cinder. 3 | package apiversions 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/blockstorage/v1/apiversions/urls.go: -------------------------------------------------------------------------------- 1 | package apiversions 2 | 3 | import ( 4 | "strings" 5 | 6 | "github.com/rackspace/gophercloud" 7 | ) 8 | 9 | func getURL(c *gophercloud.ServiceClient, version string) string { 10 | return c.ServiceURL(strings.TrimRight(version, "/") + "/") 11 | } 12 | 13 | func listURL(c *gophercloud.ServiceClient) string { 14 | return c.ServiceURL("") 15 | } 16 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/blockstorage/v1/apiversions/urls_test.go: -------------------------------------------------------------------------------- 1 | package apiversions 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/rackspace/gophercloud" 7 | th "github.com/rackspace/gophercloud/testhelper" 8 | ) 9 | 10 | const endpoint = "http://localhost:57909/" 11 | 12 | func endpointClient() *gophercloud.ServiceClient { 13 | return &gophercloud.ServiceClient{Endpoint: endpoint} 14 | } 15 | 16 | func TestGetURL(t *testing.T) { 17 | actual := getURL(endpointClient(), "v1") 18 | expected := endpoint + "v1/" 19 | th.AssertEquals(t, expected, actual) 20 | } 21 | 22 | func TestListURL(t *testing.T) { 23 | actual := listURL(endpointClient()) 24 | expected := endpoint 25 | th.AssertEquals(t, expected, actual) 26 | } 27 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/blockstorage/v1/snapshots/doc.go: -------------------------------------------------------------------------------- 1 | // Package snapshots provides information and interaction with snapshots in the 2 | // OpenStack Block Storage service. A snapshot is a point in time copy of the 3 | // data contained in an external storage volume, and can be controlled 4 | // programmatically. 5 | package snapshots 6 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/blockstorage/v1/snapshots/util.go: -------------------------------------------------------------------------------- 1 | package snapshots 2 | 3 | import ( 4 | "github.com/rackspace/gophercloud" 5 | ) 6 | 7 | // WaitForStatus will continually poll the resource, checking for a particular 8 | // status. It will do this for the amount of seconds defined. 9 | func WaitForStatus(c *gophercloud.ServiceClient, id, status string, secs int) error { 10 | return gophercloud.WaitFor(secs, func() (bool, error) { 11 | current, err := Get(c, id).Extract() 12 | if err != nil { 13 | return false, err 14 | } 15 | 16 | if current.Status == status { 17 | return true, nil 18 | } 19 | 20 | return false, nil 21 | }) 22 | } 23 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/blockstorage/v1/volumes/doc.go: -------------------------------------------------------------------------------- 1 | // Package volumes provides information and interaction with volumes in the 2 | // OpenStack Block Storage service. A volume is a detachable block storage 3 | // device, akin to a USB hard drive. It can only be attached to one instance at 4 | // a time. 5 | package volumes 6 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/blockstorage/v1/volumes/urls.go: -------------------------------------------------------------------------------- 1 | package volumes 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | func createURL(c *gophercloud.ServiceClient) string { 6 | return c.ServiceURL("volumes") 7 | } 8 | 9 | func listURL(c *gophercloud.ServiceClient) string { 10 | return createURL(c) 11 | } 12 | 13 | func deleteURL(c *gophercloud.ServiceClient, id string) string { 14 | return c.ServiceURL("volumes", id) 15 | } 16 | 17 | func getURL(c *gophercloud.ServiceClient, id string) string { 18 | return deleteURL(c, id) 19 | } 20 | 21 | func updateURL(c *gophercloud.ServiceClient, id string) string { 22 | return deleteURL(c, id) 23 | } 24 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/blockstorage/v1/volumes/util.go: -------------------------------------------------------------------------------- 1 | package volumes 2 | 3 | import ( 4 | "github.com/rackspace/gophercloud" 5 | ) 6 | 7 | // WaitForStatus will continually poll the resource, checking for a particular 8 | // status. It will do this for the amount of seconds defined. 9 | func WaitForStatus(c *gophercloud.ServiceClient, id, status string, secs int) error { 10 | return gophercloud.WaitFor(secs, func() (bool, error) { 11 | current, err := Get(c, id).Extract() 12 | if err != nil { 13 | return false, err 14 | } 15 | 16 | if current.Status == status { 17 | return true, nil 18 | } 19 | 20 | return false, nil 21 | }) 22 | } 23 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/blockstorage/v1/volumetypes/doc.go: -------------------------------------------------------------------------------- 1 | // Package volumetypes provides information and interaction with volume types 2 | // in the OpenStack Block Storage service. A volume type indicates the type of 3 | // a block storage volume, such as SATA, SCSCI, SSD, etc. These can be 4 | // customized or defined by the OpenStack admin. 5 | // 6 | // You can also define extra_specs associated with your volume types. For 7 | // instance, you could have a VolumeType=SATA, with extra_specs (RPM=10000, 8 | // RAID-Level=5) . Extra_specs are defined and customized by the admin. 9 | package volumetypes 10 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/blockstorage/v1/volumetypes/urls.go: -------------------------------------------------------------------------------- 1 | package volumetypes 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | func listURL(c *gophercloud.ServiceClient) string { 6 | return c.ServiceURL("types") 7 | } 8 | 9 | func createURL(c *gophercloud.ServiceClient) string { 10 | return listURL(c) 11 | } 12 | 13 | func getURL(c *gophercloud.ServiceClient, id string) string { 14 | return c.ServiceURL("types", id) 15 | } 16 | 17 | func deleteURL(c *gophercloud.ServiceClient, id string) string { 18 | return getURL(c, id) 19 | } 20 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/cdn/v1/base/doc.go: -------------------------------------------------------------------------------- 1 | // Package base provides information and interaction with the base API 2 | // resource in the OpenStack CDN service. This API resource allows for 3 | // retrieving the Home Document and pinging the root URL. 4 | package base 5 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/cdn/v1/base/requests.go: -------------------------------------------------------------------------------- 1 | package base 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | // Get retrieves the home document, allowing the user to discover the 6 | // entire API. 7 | func Get(c *gophercloud.ServiceClient) GetResult { 8 | var res GetResult 9 | _, res.Err = c.Get(getURL(c), &res.Body, nil) 10 | return res 11 | } 12 | 13 | // Ping retrieves a ping to the server. 14 | func Ping(c *gophercloud.ServiceClient) PingResult { 15 | var res PingResult 16 | _, res.Err = c.Get(pingURL(c), nil, &gophercloud.RequestOpts{ 17 | OkCodes: []int{204}, 18 | MoreHeaders: map[string]string{"Accept": ""}, 19 | }) 20 | return res 21 | } 22 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/cdn/v1/base/urls.go: -------------------------------------------------------------------------------- 1 | package base 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | func getURL(c *gophercloud.ServiceClient) string { 6 | return c.ServiceURL() 7 | } 8 | 9 | func pingURL(c *gophercloud.ServiceClient) string { 10 | return c.ServiceURL("ping") 11 | } 12 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/cdn/v1/flavors/doc.go: -------------------------------------------------------------------------------- 1 | // Package flavors provides information and interaction with the flavors API 2 | // resource in the OpenStack CDN service. This API resource allows for 3 | // listing flavors and retrieving a specific flavor. 4 | // 5 | // A flavor is a mapping configuration to a CDN provider. 6 | package flavors 7 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/cdn/v1/flavors/requests.go: -------------------------------------------------------------------------------- 1 | package flavors 2 | 3 | import ( 4 | "github.com/rackspace/gophercloud" 5 | "github.com/rackspace/gophercloud/pagination" 6 | ) 7 | 8 | // List returns a single page of CDN flavors. 9 | func List(c *gophercloud.ServiceClient) pagination.Pager { 10 | url := listURL(c) 11 | createPage := func(r pagination.PageResult) pagination.Page { 12 | return FlavorPage{pagination.SinglePageBase(r)} 13 | } 14 | return pagination.NewPager(c, url, createPage) 15 | } 16 | 17 | // Get retrieves a specific flavor based on its unique ID. 18 | func Get(c *gophercloud.ServiceClient, id string) GetResult { 19 | var res GetResult 20 | _, res.Err = c.Get(getURL(c, id), &res.Body, nil) 21 | return res 22 | } 23 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/cdn/v1/flavors/urls.go: -------------------------------------------------------------------------------- 1 | package flavors 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | func listURL(c *gophercloud.ServiceClient) string { 6 | return c.ServiceURL("flavors") 7 | } 8 | 9 | func getURL(c *gophercloud.ServiceClient, id string) string { 10 | return c.ServiceURL("flavors", id) 11 | } 12 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/cdn/v1/serviceassets/doc.go: -------------------------------------------------------------------------------- 1 | // Package serviceassets provides information and interaction with the 2 | // serviceassets API resource in the OpenStack CDN service. This API resource 3 | // allows for deleting cached assets. 4 | // 5 | // A service distributes assets across the network. Service assets let you 6 | // interrogate properties about these assets and perform certain actions on them. 7 | package serviceassets 8 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/cdn/v1/serviceassets/fixtures.go: -------------------------------------------------------------------------------- 1 | package serviceassets 2 | 3 | import ( 4 | "net/http" 5 | "testing" 6 | 7 | th "github.com/rackspace/gophercloud/testhelper" 8 | fake "github.com/rackspace/gophercloud/testhelper/client" 9 | ) 10 | 11 | // HandleDeleteCDNAssetSuccessfully creates an HTTP handler at `/services/{id}/assets` on the test handler mux 12 | // that responds with a `Delete` response. 13 | func HandleDeleteCDNAssetSuccessfully(t *testing.T) { 14 | th.Mux.HandleFunc("/services/96737ae3-cfc1-4c72-be88-5d0e7cc9a3f0/assets", func(w http.ResponseWriter, r *http.Request) { 15 | th.TestMethod(t, r, "DELETE") 16 | th.TestHeader(t, r, "X-Auth-Token", fake.TokenID) 17 | w.WriteHeader(http.StatusAccepted) 18 | }) 19 | } 20 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/cdn/v1/serviceassets/requests_test.go: -------------------------------------------------------------------------------- 1 | package serviceassets 2 | 3 | import ( 4 | "testing" 5 | 6 | th "github.com/rackspace/gophercloud/testhelper" 7 | fake "github.com/rackspace/gophercloud/testhelper/client" 8 | ) 9 | 10 | func TestDelete(t *testing.T) { 11 | th.SetupHTTP() 12 | defer th.TeardownHTTP() 13 | 14 | HandleDeleteCDNAssetSuccessfully(t) 15 | 16 | err := Delete(fake.ServiceClient(), "96737ae3-cfc1-4c72-be88-5d0e7cc9a3f0", nil).ExtractErr() 17 | th.AssertNoErr(t, err) 18 | } 19 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/cdn/v1/serviceassets/results.go: -------------------------------------------------------------------------------- 1 | package serviceassets 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | // DeleteResult represents the result of a Delete operation. 6 | type DeleteResult struct { 7 | gophercloud.ErrResult 8 | } 9 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/cdn/v1/serviceassets/urls.go: -------------------------------------------------------------------------------- 1 | package serviceassets 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | func deleteURL(c *gophercloud.ServiceClient, id string) string { 6 | return c.ServiceURL("services", id, "assets") 7 | } 8 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/cdn/v1/services/doc.go: -------------------------------------------------------------------------------- 1 | // Package services provides information and interaction with the services API 2 | // resource in the OpenStack CDN service. This API resource allows for 3 | // listing, creating, updating, retrieving, and deleting services. 4 | // 5 | // A service represents an application that has its content cached to the edge 6 | // nodes. 7 | package services 8 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/cdn/v1/services/errors.go: -------------------------------------------------------------------------------- 1 | package services 2 | 3 | import "fmt" 4 | 5 | func no(str string) error { 6 | return fmt.Errorf("Required parameter %s not provided", str) 7 | } 8 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/cdn/v1/services/urls.go: -------------------------------------------------------------------------------- 1 | package services 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | func listURL(c *gophercloud.ServiceClient) string { 6 | return c.ServiceURL("services") 7 | } 8 | 9 | func createURL(c *gophercloud.ServiceClient) string { 10 | return listURL(c) 11 | } 12 | 13 | func getURL(c *gophercloud.ServiceClient, id string) string { 14 | return c.ServiceURL("services", id) 15 | } 16 | 17 | func updateURL(c *gophercloud.ServiceClient, id string) string { 18 | return getURL(c, id) 19 | } 20 | 21 | func deleteURL(c *gophercloud.ServiceClient, id string) string { 22 | return getURL(c, id) 23 | } 24 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/common/README.md: -------------------------------------------------------------------------------- 1 | # Common Resources 2 | 3 | This directory is for resources that are shared by multiple services. 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/common/extensions/errors.go: -------------------------------------------------------------------------------- 1 | package extensions 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/common/extensions/urls.go: -------------------------------------------------------------------------------- 1 | package extensions 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | // ExtensionURL generates the URL for an extension resource by name. 6 | func ExtensionURL(c *gophercloud.ServiceClient, name string) string { 7 | return c.ServiceURL("extensions", name) 8 | } 9 | 10 | // ListExtensionURL generates the URL for the extensions resource collection. 11 | func ListExtensionURL(c *gophercloud.ServiceClient) string { 12 | return c.ServiceURL("extensions") 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/compute/v2/extensions/bootfromvolume/results.go: -------------------------------------------------------------------------------- 1 | package bootfromvolume 2 | 3 | import ( 4 | os "github.com/rackspace/gophercloud/openstack/compute/v2/servers" 5 | ) 6 | 7 | // CreateResult temporarily contains the response from a Create call. 8 | type CreateResult struct { 9 | os.CreateResult 10 | } 11 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/compute/v2/extensions/bootfromvolume/urls.go: -------------------------------------------------------------------------------- 1 | package bootfromvolume 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | func createURL(c *gophercloud.ServiceClient) string { 6 | return c.ServiceURL("os-volumes_boot") 7 | } 8 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/compute/v2/extensions/bootfromvolume/urls_test.go: -------------------------------------------------------------------------------- 1 | package bootfromvolume 2 | 3 | import ( 4 | "testing" 5 | 6 | th "github.com/rackspace/gophercloud/testhelper" 7 | "github.com/rackspace/gophercloud/testhelper/client" 8 | ) 9 | 10 | func TestCreateURL(t *testing.T) { 11 | th.SetupHTTP() 12 | defer th.TeardownHTTP() 13 | c := client.ServiceClient() 14 | 15 | th.CheckEquals(t, c.Endpoint+"os-volumes_boot", createURL(c)) 16 | } 17 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/compute/v2/extensions/defsecrules/doc.go: -------------------------------------------------------------------------------- 1 | package defsecrules 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/compute/v2/extensions/defsecrules/urls.go: -------------------------------------------------------------------------------- 1 | package defsecrules 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | const rulepath = "os-security-group-default-rules" 6 | 7 | func resourceURL(c *gophercloud.ServiceClient, id string) string { 8 | return c.ServiceURL(rulepath, id) 9 | } 10 | 11 | func rootURL(c *gophercloud.ServiceClient) string { 12 | return c.ServiceURL(rulepath) 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/compute/v2/extensions/diskconfig/doc.go: -------------------------------------------------------------------------------- 1 | // Package diskconfig provides information and interaction with the Disk 2 | // Config extension that works with the OpenStack Compute service. 3 | package diskconfig 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/compute/v2/extensions/doc.go: -------------------------------------------------------------------------------- 1 | // Package extensions provides information and interaction with the 2 | // different extensions available for the OpenStack Compute service. 3 | package extensions 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/compute/v2/extensions/schedulerhints/doc.go: -------------------------------------------------------------------------------- 1 | // Package schedulerhints enables instances to provide the OpenStack scheduler 2 | // hints about where they should be placed in the cloud. 3 | package schedulerhints 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/compute/v2/extensions/secgroups/doc.go: -------------------------------------------------------------------------------- 1 | package secgroups 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/compute/v2/extensions/servergroups/doc.go: -------------------------------------------------------------------------------- 1 | // Package servergroups provides the ability to manage server groups 2 | package servergroups 3 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/compute/v2/extensions/servergroups/urls.go: -------------------------------------------------------------------------------- 1 | package servergroups 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | const resourcePath = "os-server-groups" 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, id string) string { 20 | return c.ServiceURL(resourcePath, id) 21 | } 22 | 23 | func deleteURL(c *gophercloud.ServiceClient, id string) string { 24 | return getURL(c, id) 25 | } 26 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/compute/v2/extensions/tenantnetworks/doc.go: -------------------------------------------------------------------------------- 1 | // Package tenantnetworks provides the ability for tenants to see information about the networks they have access to 2 | package tenantnetworks 3 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/compute/v2/extensions/tenantnetworks/urls.go: -------------------------------------------------------------------------------- 1 | package tenantnetworks 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | const resourcePath = "os-tenant-networks" 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 getURL(c *gophercloud.ServiceClient, id string) string { 16 | return c.ServiceURL(resourcePath, id) 17 | } 18 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/compute/v2/extensions/tenantnetworks/urls_test.go: -------------------------------------------------------------------------------- 1 | package tenantnetworks 2 | 3 | import ( 4 | "testing" 5 | 6 | th "github.com/rackspace/gophercloud/testhelper" 7 | "github.com/rackspace/gophercloud/testhelper/client" 8 | ) 9 | 10 | func TestListURL(t *testing.T) { 11 | th.SetupHTTP() 12 | defer th.TeardownHTTP() 13 | c := client.ServiceClient() 14 | 15 | th.CheckEquals(t, c.Endpoint+"os-tenant-networks", listURL(c)) 16 | } 17 | 18 | func TestGetURL(t *testing.T) { 19 | th.SetupHTTP() 20 | defer th.TeardownHTTP() 21 | c := client.ServiceClient() 22 | id := "1" 23 | 24 | th.CheckEquals(t, c.Endpoint+"os-tenant-networks/"+id, getURL(c, id)) 25 | } 26 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/compute/v2/extensions/volumeattach/doc.go: -------------------------------------------------------------------------------- 1 | // Package volumeattach provides the ability to attach and detach volumes 2 | // to instances 3 | package volumeattach 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/compute/v2/flavors/urls_test.go: -------------------------------------------------------------------------------- 1 | package flavors 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/rackspace/gophercloud" 7 | th "github.com/rackspace/gophercloud/testhelper" 8 | ) 9 | 10 | const endpoint = "http://localhost:57909/" 11 | 12 | func endpointClient() *gophercloud.ServiceClient { 13 | return &gophercloud.ServiceClient{Endpoint: endpoint} 14 | } 15 | 16 | func TestGetURL(t *testing.T) { 17 | actual := getURL(endpointClient(), "foo") 18 | expected := endpoint + "flavors/foo" 19 | th.CheckEquals(t, expected, actual) 20 | } 21 | 22 | func TestListURL(t *testing.T) { 23 | actual := listURL(endpointClient()) 24 | expected := endpoint + "flavors/detail" 25 | th.CheckEquals(t, expected, actual) 26 | } 27 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | 13 | func deleteURL(client *gophercloud.ServiceClient, id string) string { 14 | return client.ServiceURL("images", id) 15 | } 16 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/compute/v2/images/urls_test.go: -------------------------------------------------------------------------------- 1 | package images 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/rackspace/gophercloud" 7 | th "github.com/rackspace/gophercloud/testhelper" 8 | ) 9 | 10 | const endpoint = "http://localhost:57909/" 11 | 12 | func endpointClient() *gophercloud.ServiceClient { 13 | return &gophercloud.ServiceClient{Endpoint: endpoint} 14 | } 15 | 16 | func TestGetURL(t *testing.T) { 17 | actual := getURL(endpointClient(), "foo") 18 | expected := endpoint + "images/foo" 19 | th.CheckEquals(t, expected, actual) 20 | } 21 | 22 | func TestListDetailURL(t *testing.T) { 23 | actual := listDetailURL(endpointClient()) 24 | expected := endpoint + "images/detail" 25 | th.CheckEquals(t, expected, actual) 26 | } 27 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/identity/v2/extensions/admin/roles/urls.go: -------------------------------------------------------------------------------- 1 | package roles 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | const ( 6 | ExtPath = "OS-KSADM" 7 | RolePath = "roles" 8 | UserPath = "users" 9 | ) 10 | 11 | func resourceURL(c *gophercloud.ServiceClient, id string) string { 12 | return c.ServiceURL(ExtPath, RolePath, id) 13 | } 14 | 15 | func rootURL(c *gophercloud.ServiceClient) string { 16 | return c.ServiceURL(ExtPath, RolePath) 17 | } 18 | 19 | func userRoleURL(c *gophercloud.ServiceClient, tenantID, userID, roleID string) string { 20 | return c.ServiceURL("tenants", tenantID, UserPath, userID, RolePath, ExtPath, roleID) 21 | } 22 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/identity/v2/extensions/doc.go: -------------------------------------------------------------------------------- 1 | // Package extensions provides information and interaction with the 2 | // different extensions available for the OpenStack Identity service. 3 | package extensions 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/identity/v2/users/doc.go: -------------------------------------------------------------------------------- 1 | package users 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/identity/v2/users/urls.go: -------------------------------------------------------------------------------- 1 | package users 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | const ( 6 | tenantPath = "tenants" 7 | userPath = "users" 8 | rolePath = "roles" 9 | ) 10 | 11 | func ResourceURL(c *gophercloud.ServiceClient, id string) string { 12 | return c.ServiceURL(userPath, id) 13 | } 14 | 15 | func rootURL(c *gophercloud.ServiceClient) string { 16 | return c.ServiceURL(userPath) 17 | } 18 | 19 | func listRolesURL(c *gophercloud.ServiceClient, tenantID, userID string) string { 20 | return c.ServiceURL(tenantPath, tenantID, userPath, userID, rolePath) 21 | } 22 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/identity/v3/endpoints/doc.go: -------------------------------------------------------------------------------- 1 | // Package endpoints provides information and interaction with the service 2 | // endpoints API resource in the OpenStack Identity service. 3 | // 4 | // For more information, see: 5 | // http://developer.openstack.org/api-ref-identity-v3.html#endpoints-v3 6 | package endpoints 7 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/identity/v3/endpoints/urls.go: -------------------------------------------------------------------------------- 1 | package endpoints 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | func listURL(client *gophercloud.ServiceClient) string { 6 | return client.ServiceURL("endpoints") 7 | } 8 | 9 | func endpointURL(client *gophercloud.ServiceClient, endpointID string) string { 10 | return client.ServiceURL("endpoints", endpointID) 11 | } 12 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/identity/v3/endpoints/urls_test.go: -------------------------------------------------------------------------------- 1 | package endpoints 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/rackspace/gophercloud" 7 | ) 8 | 9 | func TestGetListURL(t *testing.T) { 10 | client := gophercloud.ServiceClient{Endpoint: "http://localhost:5000/v3/"} 11 | url := listURL(&client) 12 | if url != "http://localhost:5000/v3/endpoints" { 13 | t.Errorf("Unexpected list URL generated: [%s]", url) 14 | } 15 | } 16 | 17 | func TestGetEndpointURL(t *testing.T) { 18 | client := gophercloud.ServiceClient{Endpoint: "http://localhost:5000/v3/"} 19 | url := endpointURL(&client, "1234") 20 | if url != "http://localhost:5000/v3/endpoints/1234" { 21 | t.Errorf("Unexpected service URL generated: [%s]", url) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/identity/v3/services/doc.go: -------------------------------------------------------------------------------- 1 | // Package services provides information and interaction with the services API 2 | // resource for the OpenStack Identity service. 3 | package services 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/identity/v3/services/urls.go: -------------------------------------------------------------------------------- 1 | package services 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | func listURL(client *gophercloud.ServiceClient) string { 6 | return client.ServiceURL("services") 7 | } 8 | 9 | func serviceURL(client *gophercloud.ServiceClient, serviceID string) string { 10 | return client.ServiceURL("services", serviceID) 11 | } 12 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/identity/v3/services/urls_test.go: -------------------------------------------------------------------------------- 1 | package services 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/rackspace/gophercloud" 7 | ) 8 | 9 | func TestListURL(t *testing.T) { 10 | client := gophercloud.ServiceClient{Endpoint: "http://localhost:5000/v3/"} 11 | url := listURL(&client) 12 | if url != "http://localhost:5000/v3/services" { 13 | t.Errorf("Unexpected list URL generated: [%s]", url) 14 | } 15 | } 16 | 17 | func TestServiceURL(t *testing.T) { 18 | client := gophercloud.ServiceClient{Endpoint: "http://localhost:5000/v3/"} 19 | url := serviceURL(&client, "1234") 20 | if url != "http://localhost:5000/v3/services/1234" { 21 | t.Errorf("Unexpected service URL generated: [%s]", url) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/identity/v3/tokens/urls_test.go: -------------------------------------------------------------------------------- 1 | package tokens 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/rackspace/gophercloud" 7 | "github.com/rackspace/gophercloud/testhelper" 8 | ) 9 | 10 | func TestTokenURL(t *testing.T) { 11 | testhelper.SetupHTTP() 12 | defer testhelper.TeardownHTTP() 13 | 14 | client := gophercloud.ServiceClient{Endpoint: testhelper.Endpoint()} 15 | 16 | expected := testhelper.Endpoint() + "auth/tokens" 17 | actual := tokenURL(&client) 18 | if actual != expected { 19 | t.Errorf("Expected URL %s, but was %s", expected, actual) 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/networking/v2/apiversions/doc.go: -------------------------------------------------------------------------------- 1 | // Package apiversions provides information and interaction with the different 2 | // API versions for the OpenStack Neutron service. This functionality is not 3 | // restricted to this particular version. 4 | package apiversions 5 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/networking/v2/apiversions/errors.go: -------------------------------------------------------------------------------- 1 | package apiversions 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/networking/v2/apiversions/urls.go: -------------------------------------------------------------------------------- 1 | package apiversions 2 | 3 | import ( 4 | "strings" 5 | 6 | "github.com/rackspace/gophercloud" 7 | ) 8 | 9 | func apiVersionsURL(c *gophercloud.ServiceClient) string { 10 | return c.Endpoint 11 | } 12 | 13 | func apiInfoURL(c *gophercloud.ServiceClient, version string) string { 14 | return c.Endpoint + strings.TrimRight(version, "/") + "/" 15 | } 16 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/networking/v2/apiversions/urls_test.go: -------------------------------------------------------------------------------- 1 | package apiversions 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/rackspace/gophercloud" 7 | th "github.com/rackspace/gophercloud/testhelper" 8 | ) 9 | 10 | const endpoint = "http://localhost:57909/" 11 | 12 | func endpointClient() *gophercloud.ServiceClient { 13 | return &gophercloud.ServiceClient{Endpoint: endpoint} 14 | } 15 | 16 | func TestAPIVersionsURL(t *testing.T) { 17 | actual := apiVersionsURL(endpointClient()) 18 | expected := endpoint 19 | th.AssertEquals(t, expected, actual) 20 | } 21 | 22 | func TestAPIInfoURL(t *testing.T) { 23 | actual := apiInfoURL(endpointClient(), "v2.0") 24 | expected := endpoint + "v2.0/" 25 | th.AssertEquals(t, expected, actual) 26 | } 27 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/networking/v2/common/common_tests.go: -------------------------------------------------------------------------------- 1 | package common 2 | 3 | import ( 4 | "github.com/rackspace/gophercloud" 5 | "github.com/rackspace/gophercloud/testhelper/client" 6 | ) 7 | 8 | const TokenID = client.TokenID 9 | 10 | func ServiceClient() *gophercloud.ServiceClient { 11 | sc := client.ServiceClient() 12 | sc.ResourceBase = sc.Endpoint + "v2.0/" 13 | return sc 14 | } 15 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/networking/v2/extensions/external/doc.go: -------------------------------------------------------------------------------- 1 | // Package external provides information and interaction with the external 2 | // extension for the OpenStack Networking service. 3 | package external 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/networking/v2/extensions/fwaas/doc.go: -------------------------------------------------------------------------------- 1 | // Package fwaas provides information and interaction with the Firewall 2 | // as a Service extension for the OpenStack Networking service. 3 | package fwaas 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/networking/v2/extensions/fwaas/firewalls/errors.go: -------------------------------------------------------------------------------- 1 | package firewalls 2 | 3 | import "fmt" 4 | 5 | func err(str string) error { 6 | return fmt.Errorf("%s", str) 7 | } 8 | 9 | var ( 10 | errPolicyRequired = err("A policy ID is required") 11 | ) 12 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/networking/v2/extensions/fwaas/firewalls/urls.go: -------------------------------------------------------------------------------- 1 | package firewalls 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | const ( 6 | rootPath = "fw" 7 | resourcePath = "firewalls" 8 | ) 9 | 10 | func rootURL(c *gophercloud.ServiceClient) string { 11 | return c.ServiceURL(rootPath, resourcePath) 12 | } 13 | 14 | func resourceURL(c *gophercloud.ServiceClient, id string) string { 15 | return c.ServiceURL(rootPath, resourcePath, id) 16 | } 17 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/networking/v2/extensions/fwaas/rules/errors.go: -------------------------------------------------------------------------------- 1 | package rules 2 | 3 | import "fmt" 4 | 5 | func err(str string) error { 6 | return fmt.Errorf("%s", str) 7 | } 8 | 9 | var ( 10 | errProtocolRequired = err("A protocol is required (tcp, udp, icmp or any)") 11 | errActionRequired = err("An action is required (allow or deny)") 12 | ) 13 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/networking/v2/extensions/fwaas/rules/urls.go: -------------------------------------------------------------------------------- 1 | package rules 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | const ( 6 | rootPath = "fw" 7 | resourcePath = "firewall_rules" 8 | ) 9 | 10 | func rootURL(c *gophercloud.ServiceClient) string { 11 | return c.ServiceURL(rootPath, resourcePath) 12 | } 13 | 14 | func resourceURL(c *gophercloud.ServiceClient, id string) string { 15 | return c.ServiceURL(rootPath, resourcePath, id) 16 | } 17 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/networking/v2/extensions/layer3/doc.go: -------------------------------------------------------------------------------- 1 | // Package layer3 provides access to the Layer-3 networking extension for the 2 | // OpenStack Neutron service. This extension allows API users to route packets 3 | // between subnets, forward packets from internal networks to external ones, 4 | // and access instances from external networks through floating IPs. 5 | package layer3 6 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/networking/v2/extensions/layer3/routers/urls.go: -------------------------------------------------------------------------------- 1 | package routers 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | const resourcePath = "routers" 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 | 15 | func addInterfaceURL(c *gophercloud.ServiceClient, id string) string { 16 | return c.ServiceURL(resourcePath, id, "add_router_interface") 17 | } 18 | 19 | func removeInterfaceURL(c *gophercloud.ServiceClient, id string) string { 20 | return c.ServiceURL(resourcePath, id, "remove_router_interface") 21 | } 22 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/networking/v2/extensions/lbaas/doc.go: -------------------------------------------------------------------------------- 1 | // Package lbaas provides information and interaction with the Load Balancer 2 | // as a Service extension for the OpenStack Networking service. 3 | package lbaas 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/networking/v2/extensions/lbaas/members/urls.go: -------------------------------------------------------------------------------- 1 | package members 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | const ( 6 | rootPath = "lb" 7 | resourcePath = "members" 8 | ) 9 | 10 | func rootURL(c *gophercloud.ServiceClient) string { 11 | return c.ServiceURL(rootPath, resourcePath) 12 | } 13 | 14 | func resourceURL(c *gophercloud.ServiceClient, id string) string { 15 | return c.ServiceURL(rootPath, resourcePath, id) 16 | } 17 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/networking/v2/extensions/lbaas/monitors/urls.go: -------------------------------------------------------------------------------- 1 | package monitors 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | const ( 6 | rootPath = "lb" 7 | resourcePath = "health_monitors" 8 | ) 9 | 10 | func rootURL(c *gophercloud.ServiceClient) string { 11 | return c.ServiceURL(rootPath, resourcePath) 12 | } 13 | 14 | func resourceURL(c *gophercloud.ServiceClient, id string) string { 15 | return c.ServiceURL(rootPath, resourcePath, id) 16 | } 17 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/networking/v2/extensions/lbaas/vips/urls.go: -------------------------------------------------------------------------------- 1 | package vips 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | const ( 6 | rootPath = "lb" 7 | resourcePath = "vips" 8 | ) 9 | 10 | func rootURL(c *gophercloud.ServiceClient) string { 11 | return c.ServiceURL(rootPath, resourcePath) 12 | } 13 | 14 | func resourceURL(c *gophercloud.ServiceClient, id string) string { 15 | return c.ServiceURL(rootPath, resourcePath, id) 16 | } 17 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/networking/v2/extensions/security/groups/urls.go: -------------------------------------------------------------------------------- 1 | package groups 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | const rootPath = "security-groups" 6 | 7 | func rootURL(c *gophercloud.ServiceClient) string { 8 | return c.ServiceURL(rootPath) 9 | } 10 | 11 | func resourceURL(c *gophercloud.ServiceClient, id string) string { 12 | return c.ServiceURL(rootPath, id) 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/networking/v2/extensions/security/rules/urls.go: -------------------------------------------------------------------------------- 1 | package rules 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | const rootPath = "security-group-rules" 6 | 7 | func rootURL(c *gophercloud.ServiceClient) string { 8 | return c.ServiceURL(rootPath) 9 | } 10 | 11 | func resourceURL(c *gophercloud.ServiceClient, id string) string { 12 | return c.ServiceURL(rootPath, id) 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/networking/v2/networks/errors.go: -------------------------------------------------------------------------------- 1 | package networks 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/networking/v2/subnets/doc.go: -------------------------------------------------------------------------------- 1 | // Package subnets contains functionality for working with Neutron subnet 2 | // resources. A subnet represents an IP address block that can be used to 3 | // assign IP addresses to virtual instances. Each subnet must have a CIDR and 4 | // must be associated with a network. IPs can either be selected from the whole 5 | // subnet CIDR or from allocation pools specified by the user. 6 | // 7 | // A subnet can also have a gateway, a list of DNS name servers, and host routes. 8 | // This information is pushed to instances whose interfaces are associated with 9 | // the subnet. 10 | package subnets 11 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/networking/v2/subnets/errors.go: -------------------------------------------------------------------------------- 1 | package subnets 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 | errCIDRRequired = err("A valid CIDR is required") 12 | errInvalidIPType = err("An IP type must either be 4 or 6") 13 | ) 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/objectstorage/v1/accounts/doc.go: -------------------------------------------------------------------------------- 1 | // Package accounts contains functionality for working with Object Storage 2 | // account resources. An account is the top-level resource the object storage 3 | // hierarchy: containers belong to accounts, objects belong to containers. 4 | // 5 | // Another way of thinking of an account is like a namespace for all your 6 | // resources. It is synonymous with a project or tenant in other OpenStack 7 | // services. 8 | package accounts 9 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/objectstorage/v1/accounts/urls.go: -------------------------------------------------------------------------------- 1 | package accounts 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | func getURL(c *gophercloud.ServiceClient) string { 6 | return c.Endpoint 7 | } 8 | 9 | func updateURL(c *gophercloud.ServiceClient) string { 10 | return getURL(c) 11 | } 12 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/objectstorage/v1/accounts/urls_test.go: -------------------------------------------------------------------------------- 1 | package accounts 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/rackspace/gophercloud" 7 | th "github.com/rackspace/gophercloud/testhelper" 8 | ) 9 | 10 | const endpoint = "http://localhost:57909/" 11 | 12 | func endpointClient() *gophercloud.ServiceClient { 13 | return &gophercloud.ServiceClient{Endpoint: endpoint} 14 | } 15 | 16 | func TestGetURL(t *testing.T) { 17 | actual := getURL(endpointClient()) 18 | expected := endpoint 19 | th.CheckEquals(t, expected, actual) 20 | } 21 | 22 | func TestUpdateURL(t *testing.T) { 23 | actual := updateURL(endpointClient()) 24 | expected := endpoint 25 | th.CheckEquals(t, expected, actual) 26 | } 27 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/objectstorage/v1/containers/doc.go: -------------------------------------------------------------------------------- 1 | // Package containers contains functionality for working with Object Storage 2 | // container resources. A container serves as a logical namespace for objects 3 | // that are placed inside it - an object with the same name in two different 4 | // containers represents two different objects. 5 | // 6 | // In addition to containing objects, you can also use the container to control 7 | // access to objects by using an access control list (ACL). 8 | package containers 9 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/objectstorage/v1/containers/urls.go: -------------------------------------------------------------------------------- 1 | package containers 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | func listURL(c *gophercloud.ServiceClient) string { 6 | return c.Endpoint 7 | } 8 | 9 | func createURL(c *gophercloud.ServiceClient, container string) string { 10 | return c.ServiceURL(container) 11 | } 12 | 13 | func getURL(c *gophercloud.ServiceClient, container string) string { 14 | return createURL(c, container) 15 | } 16 | 17 | func deleteURL(c *gophercloud.ServiceClient, container string) string { 18 | return createURL(c, container) 19 | } 20 | 21 | func updateURL(c *gophercloud.ServiceClient, container string) string { 22 | return createURL(c, container) 23 | } 24 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/objectstorage/v1/objects/doc.go: -------------------------------------------------------------------------------- 1 | // Package objects contains functionality for working with Object Storage 2 | // object resources. An object is a resource that represents and contains data 3 | // - such as documents, images, and so on. You can also store custom metadata 4 | // with an object. 5 | package objects 6 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/orchestration/v1/apiversions/doc.go: -------------------------------------------------------------------------------- 1 | // Package apiversions provides information and interaction with the different 2 | // API versions for the OpenStack Heat service. This functionality is not 3 | // restricted to this particular version. 4 | package apiversions 5 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/orchestration/v1/apiversions/requests.go: -------------------------------------------------------------------------------- 1 | package apiversions 2 | 3 | import ( 4 | "github.com/rackspace/gophercloud" 5 | "github.com/rackspace/gophercloud/pagination" 6 | ) 7 | 8 | // ListVersions lists all the Neutron API versions available to end-users 9 | func ListVersions(c *gophercloud.ServiceClient) pagination.Pager { 10 | return pagination.NewPager(c, apiVersionsURL(c), func(r pagination.PageResult) pagination.Page { 11 | return APIVersionPage{pagination.SinglePageBase(r)} 12 | }) 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/orchestration/v1/apiversions/urls.go: -------------------------------------------------------------------------------- 1 | package apiversions 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | func apiVersionsURL(c *gophercloud.ServiceClient) string { 6 | return c.Endpoint 7 | } 8 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/orchestration/v1/buildinfo/doc.go: -------------------------------------------------------------------------------- 1 | // Package buildinfo provides build information about heat deployments. 2 | package buildinfo 3 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/orchestration/v1/buildinfo/requests.go: -------------------------------------------------------------------------------- 1 | package buildinfo 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | // Get retreives data for the given stack template. 6 | func Get(c *gophercloud.ServiceClient) GetResult { 7 | var res GetResult 8 | _, res.Err = c.Get(getURL(c), &res.Body, nil) 9 | return res 10 | } 11 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/orchestration/v1/buildinfo/requests_test.go: -------------------------------------------------------------------------------- 1 | package buildinfo 2 | 3 | import ( 4 | "testing" 5 | 6 | th "github.com/rackspace/gophercloud/testhelper" 7 | fake "github.com/rackspace/gophercloud/testhelper/client" 8 | ) 9 | 10 | func TestGetTemplate(t *testing.T) { 11 | th.SetupHTTP() 12 | defer th.TeardownHTTP() 13 | HandleGetSuccessfully(t, GetOutput) 14 | 15 | actual, err := Get(fake.ServiceClient()).Extract() 16 | th.AssertNoErr(t, err) 17 | 18 | expected := GetExpected 19 | th.AssertDeepEquals(t, expected, actual) 20 | } 21 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/orchestration/v1/buildinfo/urls.go: -------------------------------------------------------------------------------- 1 | package buildinfo 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | func getURL(c *gophercloud.ServiceClient) string { 6 | return c.ServiceURL("build_info") 7 | } 8 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/orchestration/v1/stackevents/doc.go: -------------------------------------------------------------------------------- 1 | // Package stackevents provides operations for finding, listing, and retrieving 2 | // stack events. Stack events are events that take place on stacks such as 3 | // updating and abandoning. 4 | package stackevents 5 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/orchestration/v1/stackresources/doc.go: -------------------------------------------------------------------------------- 1 | // Package stackresources provides operations for working with stack resources. 2 | // A resource is a template artifact that represents some component of your 3 | // desired architecture (a Cloud Server, a group of scaled Cloud Servers, a load 4 | // balancer, some configuration management system, and so forth). 5 | package stackresources 6 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/orchestration/v1/stacks/doc.go: -------------------------------------------------------------------------------- 1 | // Package stacks provides operation for working with Heat stacks. A stack is a 2 | // group of resources (servers, load balancers, databases, and so forth) 3 | // combined to fulfill a useful purpose. Based on a template, Heat orchestration 4 | // engine creates an instantiated set of resources (a stack) to run the 5 | // application framework or component specified (in the template). A stack is a 6 | // running instance of a template. The result of creating a stack is a deployment 7 | // of the application framework or component. 8 | package stacks 9 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/orchestration/v1/stacktemplates/doc.go: -------------------------------------------------------------------------------- 1 | // Package stacktemplates provides operations for working with Heat templates. 2 | // A Cloud Orchestration template is a portable file, written in a user-readable 3 | // language, that describes how a set of resources should be assembled and what 4 | // software should be installed in order to produce a working stack. The template 5 | // specifies what resources should be used, what attributes can be set, and other 6 | // parameters that are critical to the successful, repeatable automation of a 7 | // specific application stack. 8 | package stacktemplates 9 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/openstack/orchestration/v1/stacktemplates/urls.go: -------------------------------------------------------------------------------- 1 | package stacktemplates 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | func getURL(c *gophercloud.ServiceClient, stackName, stackID string) string { 6 | return c.ServiceURL("stacks", stackName, stackID, "template") 7 | } 8 | 9 | func validateURL(c *gophercloud.ServiceClient) string { 10 | return c.ServiceURL("validate") 11 | } 12 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/pagination/pagination_test.go: -------------------------------------------------------------------------------- 1 | package pagination 2 | 3 | import ( 4 | "github.com/rackspace/gophercloud" 5 | "github.com/rackspace/gophercloud/testhelper" 6 | ) 7 | 8 | func createClient() *gophercloud.ServiceClient { 9 | return &gophercloud.ServiceClient{ 10 | ProviderClient: &gophercloud.ProviderClient{TokenID: "abc123"}, 11 | Endpoint: testhelper.Endpoint(), 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/blockstorage/v1/snapshots/doc.go: -------------------------------------------------------------------------------- 1 | // Package snapshots provides information and interaction with the snapshot 2 | // API resource for the Rackspace Block Storage service. 3 | package snapshots 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/blockstorage/v1/volumes/doc.go: -------------------------------------------------------------------------------- 1 | // Package volumes provides information and interaction with the volume 2 | // API resource for the Rackspace Block Storage service. 3 | package volumes 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/blockstorage/v1/volumetypes/delegate.go: -------------------------------------------------------------------------------- 1 | package volumetypes 2 | 3 | import ( 4 | "github.com/rackspace/gophercloud" 5 | os "github.com/rackspace/gophercloud/openstack/blockstorage/v1/volumetypes" 6 | "github.com/rackspace/gophercloud/pagination" 7 | ) 8 | 9 | // List returns all volume types. 10 | func List(client *gophercloud.ServiceClient) pagination.Pager { 11 | return os.List(client) 12 | } 13 | 14 | // Get will retrieve the volume type with the provided ID. To extract the volume 15 | // type from the result, call the Extract method on the GetResult. 16 | func Get(client *gophercloud.ServiceClient, id string) GetResult { 17 | return GetResult{os.Get(client, id)} 18 | } 19 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/blockstorage/v1/volumetypes/doc.go: -------------------------------------------------------------------------------- 1 | // Package volumetypes provides information and interaction with the volume type 2 | // API resource for the Rackspace Block Storage service. 3 | package volumetypes 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/cdn/v1/base/delegate.go: -------------------------------------------------------------------------------- 1 | package base 2 | 3 | import ( 4 | "github.com/rackspace/gophercloud" 5 | 6 | os "github.com/rackspace/gophercloud/openstack/cdn/v1/base" 7 | ) 8 | 9 | // Get retrieves the home document, allowing the user to discover the 10 | // entire API. 11 | func Get(c *gophercloud.ServiceClient) os.GetResult { 12 | return os.Get(c) 13 | } 14 | 15 | // Ping retrieves a ping to the server. 16 | func Ping(c *gophercloud.ServiceClient) os.PingResult { 17 | return os.Ping(c) 18 | } 19 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/cdn/v1/base/doc.go: -------------------------------------------------------------------------------- 1 | // Package base provides information and interaction with the base API 2 | // resource in the Rackspace CDN service. This API resource allows for 3 | // retrieving the Home Document and pinging the root URL. 4 | package base 5 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/cdn/v1/flavors/delegate.go: -------------------------------------------------------------------------------- 1 | package flavors 2 | 3 | import ( 4 | "github.com/rackspace/gophercloud" 5 | 6 | os "github.com/rackspace/gophercloud/openstack/cdn/v1/flavors" 7 | "github.com/rackspace/gophercloud/pagination" 8 | ) 9 | 10 | // List returns a single page of CDN flavors. 11 | func List(c *gophercloud.ServiceClient) pagination.Pager { 12 | return os.List(c) 13 | } 14 | 15 | // Get retrieves a specific flavor based on its unique ID. 16 | func Get(c *gophercloud.ServiceClient, id string) os.GetResult { 17 | return os.Get(c, id) 18 | } 19 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/cdn/v1/flavors/doc.go: -------------------------------------------------------------------------------- 1 | // Package flavors provides information and interaction with the flavors API 2 | // resource in the Rackspace CDN service. This API resource allows for 3 | // listing flavors and retrieving a specific flavor. 4 | // 5 | // A flavor is a mapping configuration to a CDN provider. 6 | package flavors 7 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/cdn/v1/serviceassets/delegate.go: -------------------------------------------------------------------------------- 1 | package serviceassets 2 | 3 | import ( 4 | "github.com/rackspace/gophercloud" 5 | 6 | os "github.com/rackspace/gophercloud/openstack/cdn/v1/serviceassets" 7 | ) 8 | 9 | // Delete accepts a unique ID and deletes the CDN service asset associated with 10 | // it. 11 | func Delete(c *gophercloud.ServiceClient, id string, opts os.DeleteOptsBuilder) os.DeleteResult { 12 | return os.Delete(c, id, opts) 13 | } 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/cdn/v1/serviceassets/delegate_test.go: -------------------------------------------------------------------------------- 1 | package serviceassets 2 | 3 | import ( 4 | "testing" 5 | 6 | os "github.com/rackspace/gophercloud/openstack/cdn/v1/serviceassets" 7 | th "github.com/rackspace/gophercloud/testhelper" 8 | fake "github.com/rackspace/gophercloud/testhelper/client" 9 | ) 10 | 11 | func TestDelete(t *testing.T) { 12 | th.SetupHTTP() 13 | defer th.TeardownHTTP() 14 | 15 | os.HandleDeleteCDNAssetSuccessfully(t) 16 | 17 | err := Delete(fake.ServiceClient(), "96737ae3-cfc1-4c72-be88-5d0e7cc9a3f0", nil).ExtractErr() 18 | th.AssertNoErr(t, err) 19 | } 20 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/cdn/v1/serviceassets/doc.go: -------------------------------------------------------------------------------- 1 | // Package serviceassets provides information and interaction with the 2 | // serviceassets API resource in the Rackspace CDN service. This API resource 3 | // allows for deleting cached assets. 4 | // 5 | // A service distributes assets across the network. Service assets let you 6 | // interrogate properties about these assets and perform certain actions on them. 7 | package serviceassets 8 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/cdn/v1/services/doc.go: -------------------------------------------------------------------------------- 1 | // Package services provides information and interaction with the services API 2 | // resource in the Rackspace CDN service. This API resource allows for 3 | // listing, creating, updating, retrieving, and deleting services. 4 | // 5 | // A service represents an application that has its content cached to the edge 6 | // nodes. 7 | package services 8 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/compute/v2/bootfromvolume/delegate.go: -------------------------------------------------------------------------------- 1 | package bootfromvolume 2 | 3 | import ( 4 | "github.com/rackspace/gophercloud" 5 | osBFV "github.com/rackspace/gophercloud/openstack/compute/v2/extensions/bootfromvolume" 6 | osServers "github.com/rackspace/gophercloud/openstack/compute/v2/servers" 7 | ) 8 | 9 | // Create requests the creation of a server from the given block device mapping. 10 | func Create(client *gophercloud.ServiceClient, opts osServers.CreateOptsBuilder) osServers.CreateResult { 11 | return osBFV.Create(client, opts) 12 | } 13 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/compute/v2/flavors/doc.go: -------------------------------------------------------------------------------- 1 | // Package flavors provides information and interaction with the flavor 2 | // API resource for the Rackspace Cloud Servers service. 3 | package flavors 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/compute/v2/images/doc.go: -------------------------------------------------------------------------------- 1 | // Package images provides information and interaction with the image 2 | // API resource for the Rackspace Cloud Servers service. 3 | package images 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/compute/v2/keypairs/doc.go: -------------------------------------------------------------------------------- 1 | // Package keypairs provides information and interaction with the keypair 2 | // API resource for the Rackspace Cloud Servers service. 3 | package keypairs 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/compute/v2/networks/doc.go: -------------------------------------------------------------------------------- 1 | // Package networks provides information and interaction with the network 2 | // API resource for the Rackspace Cloud Servers service. 3 | package networks 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/compute/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("os-networksv2", id) 7 | } 8 | 9 | func rootURL(c *gophercloud.ServiceClient) string { 10 | return c.ServiceURL("os-networksv2") 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 deleteURL(c *gophercloud.ServiceClient, id string) string { 26 | return resourceURL(c, id) 27 | } 28 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/compute/v2/servers/doc.go: -------------------------------------------------------------------------------- 1 | // Package servers provides information and interaction with the server 2 | // API resource for the Rackspace Cloud Servers service. 3 | package servers 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/compute/v2/virtualinterfaces/urls.go: -------------------------------------------------------------------------------- 1 | package virtualinterfaces 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | func listURL(c *gophercloud.ServiceClient, instanceID string) string { 6 | return c.ServiceURL("servers", instanceID, "os-virtual-interfacesv2") 7 | } 8 | 9 | func createURL(c *gophercloud.ServiceClient, instanceID string) string { 10 | return c.ServiceURL("servers", instanceID, "os-virtual-interfacesv2") 11 | } 12 | 13 | func deleteURL(c *gophercloud.ServiceClient, instanceID, interfaceID string) string { 14 | return c.ServiceURL("servers", instanceID, "os-virtual-interfacesv2", interfaceID) 15 | } 16 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/compute/v2/volumeattach/doc.go: -------------------------------------------------------------------------------- 1 | // Package volumeattach provides the ability to attach and detach volume 2 | // to instances to Rackspace servers 3 | package volumeattach 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/identity/v2/extensions/doc.go: -------------------------------------------------------------------------------- 1 | // Package extensions provides information and interaction with the all the 2 | // extensions available for the Rackspace Identity service. 3 | package extensions 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/identity/v2/tenants/delegate.go: -------------------------------------------------------------------------------- 1 | package tenants 2 | 3 | import ( 4 | "github.com/rackspace/gophercloud" 5 | os "github.com/rackspace/gophercloud/openstack/identity/v2/tenants" 6 | "github.com/rackspace/gophercloud/pagination" 7 | ) 8 | 9 | // ExtractTenants interprets a page of List results as a more usable slice of Tenant structs. 10 | func ExtractTenants(page pagination.Page) ([]os.Tenant, error) { 11 | return os.ExtractTenants(page) 12 | } 13 | 14 | // List enumerates the tenants to which the current token grants access. 15 | func List(client *gophercloud.ServiceClient, opts *os.ListOpts) pagination.Pager { 16 | return os.List(client, opts) 17 | } 18 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/identity/v2/tenants/doc.go: -------------------------------------------------------------------------------- 1 | // Package tenants provides information and interaction with the tenant 2 | // API resource for the Rackspace Identity service. 3 | package tenants 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/identity/v2/users/urls.go: -------------------------------------------------------------------------------- 1 | package users 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | func resetAPIKeyURL(client *gophercloud.ServiceClient, id string) string { 6 | return client.ServiceURL("users", id, "OS-KSADM", "credentials", "RAX-KSKEY:apiKeyCredentials", "RAX-AUTH", "reset") 7 | } 8 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/lb/v1/acl/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package acl provides information and interaction with the access lists feature 3 | of the Rackspace Cloud Load Balancer service. 4 | 5 | The access list management feature allows fine-grained network access controls 6 | to be applied to the load balancer's virtual IP address. A single IP address, 7 | multiple IP addresses, or entire network subnets can be added. Items that are 8 | configured with the ALLOW type always takes precedence over items with the DENY 9 | type. To reject traffic from all items except for those with the ALLOW type, 10 | add a networkItem with an address of "0.0.0.0/0" and a DENY type. 11 | */ 12 | package acl 13 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/lb/v1/acl/urls.go: -------------------------------------------------------------------------------- 1 | package acl 2 | 3 | import ( 4 | "strconv" 5 | 6 | "github.com/rackspace/gophercloud" 7 | ) 8 | 9 | const ( 10 | path = "loadbalancers" 11 | aclPath = "accesslist" 12 | ) 13 | 14 | func resourceURL(c *gophercloud.ServiceClient, lbID, networkID int) string { 15 | return c.ServiceURL(path, strconv.Itoa(lbID), aclPath, strconv.Itoa(networkID)) 16 | } 17 | 18 | func rootURL(c *gophercloud.ServiceClient, lbID int) string { 19 | return c.ServiceURL(path, strconv.Itoa(lbID), aclPath) 20 | } 21 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/lb/v1/monitors/urls.go: -------------------------------------------------------------------------------- 1 | package monitors 2 | 3 | import ( 4 | "strconv" 5 | 6 | "github.com/rackspace/gophercloud" 7 | ) 8 | 9 | const ( 10 | path = "loadbalancers" 11 | monitorPath = "healthmonitor" 12 | ) 13 | 14 | func rootURL(c *gophercloud.ServiceClient, lbID int) string { 15 | return c.ServiceURL(path, strconv.Itoa(lbID), monitorPath) 16 | } 17 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/lb/v1/nodes/urls.go: -------------------------------------------------------------------------------- 1 | package nodes 2 | 3 | import ( 4 | "strconv" 5 | 6 | "github.com/rackspace/gophercloud" 7 | ) 8 | 9 | const ( 10 | lbPath = "loadbalancers" 11 | nodePath = "nodes" 12 | eventPath = "events" 13 | ) 14 | 15 | func resourceURL(c *gophercloud.ServiceClient, lbID, nodeID int) string { 16 | return c.ServiceURL(lbPath, strconv.Itoa(lbID), nodePath, strconv.Itoa(nodeID)) 17 | } 18 | 19 | func rootURL(c *gophercloud.ServiceClient, lbID int) string { 20 | return c.ServiceURL(lbPath, strconv.Itoa(lbID), nodePath) 21 | } 22 | 23 | func eventsURL(c *gophercloud.ServiceClient, lbID int) string { 24 | return c.ServiceURL(lbPath, strconv.Itoa(lbID), nodePath, eventPath) 25 | } 26 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/lb/v1/sessions/urls.go: -------------------------------------------------------------------------------- 1 | package sessions 2 | 3 | import ( 4 | "strconv" 5 | 6 | "github.com/rackspace/gophercloud" 7 | ) 8 | 9 | const ( 10 | path = "loadbalancers" 11 | spPath = "sessionpersistence" 12 | ) 13 | 14 | func rootURL(c *gophercloud.ServiceClient, id int) string { 15 | return c.ServiceURL(path, strconv.Itoa(id), spPath) 16 | } 17 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/lb/v1/ssl/urls.go: -------------------------------------------------------------------------------- 1 | package ssl 2 | 3 | import ( 4 | "strconv" 5 | 6 | "github.com/rackspace/gophercloud" 7 | ) 8 | 9 | const ( 10 | path = "loadbalancers" 11 | sslPath = "ssltermination" 12 | certPath = "certificatemappings" 13 | ) 14 | 15 | func rootURL(c *gophercloud.ServiceClient, id int) string { 16 | return c.ServiceURL(path, strconv.Itoa(id), sslPath) 17 | } 18 | 19 | func certURL(c *gophercloud.ServiceClient, id int) string { 20 | return c.ServiceURL(path, strconv.Itoa(id), sslPath, certPath) 21 | } 22 | 23 | func certResourceURL(c *gophercloud.ServiceClient, id, certID int) string { 24 | return c.ServiceURL(path, strconv.Itoa(id), sslPath, certPath, strconv.Itoa(certID)) 25 | } 26 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/lb/v1/throttle/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package throttle provides information and interaction with the Connection 3 | Throttling feature of the Rackspace Cloud Load Balancer service. 4 | */ 5 | package throttle 6 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/lb/v1/throttle/urls.go: -------------------------------------------------------------------------------- 1 | package throttle 2 | 3 | import ( 4 | "strconv" 5 | 6 | "github.com/rackspace/gophercloud" 7 | ) 8 | 9 | const ( 10 | path = "loadbalancers" 11 | ctPath = "connectionthrottle" 12 | ) 13 | 14 | func rootURL(c *gophercloud.ServiceClient, id int) string { 15 | return c.ServiceURL(path, strconv.Itoa(id), ctPath) 16 | } 17 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/lb/v1/vips/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package vips provides information and interaction with the Virtual IP API 3 | resource for the Rackspace Cloud Load Balancer service. 4 | 5 | A virtual IP (VIP) makes a load balancer accessible by clients. The load 6 | balancing service supports either a public VIP, routable on the public Internet, 7 | or a ServiceNet address, routable only within the region in which the load 8 | balancer resides. 9 | 10 | All load balancers must have at least one virtual IP associated with them at 11 | all times. 12 | */ 13 | package vips 14 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/lb/v1/vips/urls.go: -------------------------------------------------------------------------------- 1 | package vips 2 | 3 | import ( 4 | "strconv" 5 | 6 | "github.com/rackspace/gophercloud" 7 | ) 8 | 9 | const ( 10 | lbPath = "loadbalancers" 11 | vipPath = "virtualips" 12 | ) 13 | 14 | func resourceURL(c *gophercloud.ServiceClient, lbID, nodeID int) string { 15 | return c.ServiceURL(lbPath, strconv.Itoa(lbID), vipPath, strconv.Itoa(nodeID)) 16 | } 17 | 18 | func rootURL(c *gophercloud.ServiceClient, lbID int) string { 19 | return c.ServiceURL(lbPath, strconv.Itoa(lbID), vipPath) 20 | } 21 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/networking/v2/common/common_tests.go: -------------------------------------------------------------------------------- 1 | package common 2 | 3 | import ( 4 | "github.com/rackspace/gophercloud" 5 | "github.com/rackspace/gophercloud/testhelper/client" 6 | ) 7 | 8 | const TokenID = client.TokenID 9 | 10 | func ServiceClient() *gophercloud.ServiceClient { 11 | return client.ServiceClient() 12 | } 13 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/objectstorage/v1/accounts/doc.go: -------------------------------------------------------------------------------- 1 | // Package accounts provides information and interaction with the account 2 | // API resource for the Rackspace Cloud Files service. 3 | package accounts 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/objectstorage/v1/bulk/doc.go: -------------------------------------------------------------------------------- 1 | // Package bulk provides functionality for working with bulk operations in the 2 | // Rackspace Cloud Files service. 3 | package bulk 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/objectstorage/v1/bulk/urls.go: -------------------------------------------------------------------------------- 1 | package bulk 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | func deleteURL(c *gophercloud.ServiceClient) string { 6 | return c.Endpoint + "?bulk-delete" 7 | } 8 | 9 | func extractURL(c *gophercloud.ServiceClient, ext string) string { 10 | return c.Endpoint + "?extract-archive=" + ext 11 | } 12 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/objectstorage/v1/cdncontainers/doc.go: -------------------------------------------------------------------------------- 1 | // Package cdncontainers provides information and interaction with the CDN 2 | // Container API resource for the Rackspace Cloud Files service. 3 | package cdncontainers 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/objectstorage/v1/cdncontainers/urls.go: -------------------------------------------------------------------------------- 1 | package cdncontainers 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | func enableURL(c *gophercloud.ServiceClient, containerName string) string { 6 | return c.ServiceURL(containerName) 7 | } 8 | 9 | func getURL(c *gophercloud.ServiceClient, container string) string { 10 | return c.ServiceURL(container) 11 | } 12 | 13 | func updateURL(c *gophercloud.ServiceClient, container string) string { 14 | return getURL(c, container) 15 | } 16 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/objectstorage/v1/cdncontainers/urls_test.go: -------------------------------------------------------------------------------- 1 | package cdncontainers 2 | 3 | import ( 4 | "testing" 5 | 6 | "github.com/rackspace/gophercloud" 7 | th "github.com/rackspace/gophercloud/testhelper" 8 | ) 9 | 10 | const endpoint = "http://localhost:57909/" 11 | 12 | func endpointClient() *gophercloud.ServiceClient { 13 | return &gophercloud.ServiceClient{Endpoint: endpoint} 14 | } 15 | 16 | func TestEnableURL(t *testing.T) { 17 | actual := enableURL(endpointClient(), "foo") 18 | expected := endpoint + "foo" 19 | th.CheckEquals(t, expected, actual) 20 | } 21 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/objectstorage/v1/cdnobjects/delegate.go: -------------------------------------------------------------------------------- 1 | package cdnobjects 2 | 3 | import ( 4 | "github.com/rackspace/gophercloud" 5 | os "github.com/rackspace/gophercloud/openstack/objectstorage/v1/objects" 6 | ) 7 | 8 | // Delete is a function that deletes an object from the CDN. 9 | func Delete(c *gophercloud.ServiceClient, containerName, objectName string, opts os.DeleteOptsBuilder) os.DeleteResult { 10 | return os.Delete(c, containerName, objectName, nil) 11 | } 12 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/objectstorage/v1/cdnobjects/delegate_test.go: -------------------------------------------------------------------------------- 1 | package cdnobjects 2 | 3 | import ( 4 | "testing" 5 | 6 | os "github.com/rackspace/gophercloud/openstack/objectstorage/v1/objects" 7 | th "github.com/rackspace/gophercloud/testhelper" 8 | fake "github.com/rackspace/gophercloud/testhelper/client" 9 | ) 10 | 11 | func TestDeleteCDNObject(t *testing.T) { 12 | th.SetupHTTP() 13 | defer th.TeardownHTTP() 14 | os.HandleDeleteObjectSuccessfully(t) 15 | 16 | res := Delete(fake.ServiceClient(), "testContainer", "testObject", nil) 17 | th.AssertNoErr(t, res.Err) 18 | 19 | } 20 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/objectstorage/v1/cdnobjects/doc.go: -------------------------------------------------------------------------------- 1 | // Package cdnobjects provides information and interaction with the CDN 2 | // Object API resource for the Rackspace Cloud Files service. 3 | package cdnobjects 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/objectstorage/v1/cdnobjects/request.go: -------------------------------------------------------------------------------- 1 | package cdnobjects 2 | 3 | import ( 4 | "github.com/rackspace/gophercloud" 5 | "github.com/rackspace/gophercloud/rackspace/objectstorage/v1/cdncontainers" 6 | ) 7 | 8 | // CDNURL returns the unique CDN URI for the given container and object. 9 | func CDNURL(c *gophercloud.ServiceClient, containerName, objectName string) (string, error) { 10 | h, err := cdncontainers.Get(c, containerName).Extract() 11 | if err != nil { 12 | return "", err 13 | } 14 | return h.CDNUri + "/" + objectName, nil 15 | } 16 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/objectstorage/v1/containers/doc.go: -------------------------------------------------------------------------------- 1 | // Package containers provides information and interaction with the Container 2 | // API resource for the Rackspace Cloud Files service. 3 | package containers 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/objectstorage/v1/objects/doc.go: -------------------------------------------------------------------------------- 1 | // Package objects provides information and interaction with the Object 2 | // API resource for the Rackspace Cloud Files service. 3 | package objects 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/orchestration/v1/buildinfo/delegate.go: -------------------------------------------------------------------------------- 1 | package buildinfo 2 | 3 | import ( 4 | "github.com/rackspace/gophercloud" 5 | os "github.com/rackspace/gophercloud/openstack/orchestration/v1/buildinfo" 6 | ) 7 | 8 | // Get retreives build info data for the Heat deployment. 9 | func Get(c *gophercloud.ServiceClient) os.GetResult { 10 | return os.Get(c) 11 | } 12 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/orchestration/v1/buildinfo/delegate_test.go: -------------------------------------------------------------------------------- 1 | package buildinfo 2 | 3 | import ( 4 | "testing" 5 | 6 | os "github.com/rackspace/gophercloud/openstack/orchestration/v1/buildinfo" 7 | th "github.com/rackspace/gophercloud/testhelper" 8 | fake "github.com/rackspace/gophercloud/testhelper/client" 9 | ) 10 | 11 | func TestGetTemplate(t *testing.T) { 12 | th.SetupHTTP() 13 | defer th.TeardownHTTP() 14 | os.HandleGetSuccessfully(t, os.GetOutput) 15 | 16 | actual, err := Get(fake.ServiceClient()).Extract() 17 | th.AssertNoErr(t, err) 18 | 19 | expected := os.GetExpected 20 | th.AssertDeepEquals(t, expected, actual) 21 | } 22 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/orchestration/v1/buildinfo/doc.go: -------------------------------------------------------------------------------- 1 | // Package buildinfo provides build information about heat deployments. 2 | package buildinfo 3 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/orchestration/v1/stackevents/doc.go: -------------------------------------------------------------------------------- 1 | // Package stackevents provides operations for finding, listing, and retrieving 2 | // stack events. 3 | package stackevents 4 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/orchestration/v1/stackresources/doc.go: -------------------------------------------------------------------------------- 1 | // Package stackresources provides operations for working with stack resources. 2 | // A resource is a template artifact that represents some component of your 3 | // desired architecture (a Cloud Server, a group of scaled Cloud Servers, a load 4 | // balancer, some configuration management system, and so forth). 5 | package stackresources 6 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/orchestration/v1/stacks/doc.go: -------------------------------------------------------------------------------- 1 | // Package stacks provides operation for working with Heat stacks. A stack is a 2 | // group of resources (servers, load balancers, databases, and so forth) 3 | // combined to fulfill a useful purpose. Based on a template, Heat orchestration 4 | // engine creates an instantiated set of resources (a stack) to run the 5 | // application framework or component specified (in the template). A stack is a 6 | // running instance of a template. The result of creating a stack is a deployment 7 | // of the application framework or component. 8 | package stacks 9 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/orchestration/v1/stacktemplates/delegate.go: -------------------------------------------------------------------------------- 1 | package stacktemplates 2 | 3 | import ( 4 | "github.com/rackspace/gophercloud" 5 | os "github.com/rackspace/gophercloud/openstack/orchestration/v1/stacktemplates" 6 | ) 7 | 8 | // Get retreives data for the given stack template. 9 | func Get(c *gophercloud.ServiceClient, stackName, stackID string) os.GetResult { 10 | return os.Get(c, stackName, stackID) 11 | } 12 | 13 | // Validate validates the given stack template. 14 | func Validate(c *gophercloud.ServiceClient, opts os.ValidateOptsBuilder) os.ValidateResult { 15 | return os.Validate(c, opts) 16 | } 17 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/orchestration/v1/stacktemplates/doc.go: -------------------------------------------------------------------------------- 1 | // Package stacktemplates provides operations for working with Heat templates. 2 | // A Cloud Orchestration template is a portable file, written in a user-readable 3 | // language, that describes how a set of resources should be assembled and what 4 | // software should be installed in order to produce a working stack. The template 5 | // specifies what resources should be used, what attributes can be set, and other 6 | // parameters that are critical to the successful, repeatable automation of a 7 | // specific application stack. 8 | package stacktemplates 9 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/rackconnect/v3/cloudnetworks/urls.go: -------------------------------------------------------------------------------- 1 | package cloudnetworks 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | func listURL(c *gophercloud.ServiceClient) string { 6 | return c.ServiceURL("cloud_networks") 7 | } 8 | 9 | func getURL(c *gophercloud.ServiceClient, id string) string { 10 | return c.ServiceURL("cloud_networks", id) 11 | } 12 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/rackconnect/v3/doc.go: -------------------------------------------------------------------------------- 1 | // Package rackconnect allows Rackspace cloud accounts to leverage version 3 of 2 | // RackConnect, Rackspace's hybrid connectivity solution connecting dedicated 3 | // and cloud servers. 4 | package rackconnect 5 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/rackspace/rackconnect/v3/publicips/urls.go: -------------------------------------------------------------------------------- 1 | package publicips 2 | 3 | import "github.com/rackspace/gophercloud" 4 | 5 | var root = "public_ips" 6 | 7 | func listURL(c *gophercloud.ServiceClient) string { 8 | return c.ServiceURL(root) 9 | } 10 | 11 | func createURL(c *gophercloud.ServiceClient) string { 12 | return c.ServiceURL(root) 13 | } 14 | 15 | func listForServerURL(c *gophercloud.ServiceClient, serverID string) string { 16 | return c.ServiceURL(root + "?cloud_server_id=" + serverID) 17 | } 18 | 19 | func getURL(c *gophercloud.ServiceClient, id string) string { 20 | return c.ServiceURL(root, id) 21 | } 22 | 23 | func deleteURL(c *gophercloud.ServiceClient, id string) string { 24 | return getURL(c, id) 25 | } 26 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/script/acceptancetest: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Run the acceptance tests. 4 | 5 | exec go test -p=1 -tags 'acceptance fixtures' github.com/rackspace/gophercloud/acceptance/... $@ 6 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/script/bootstrap: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # This script helps new contributors set up their local workstation for 4 | # gophercloud development and contributions. 5 | 6 | # Create the environment 7 | export GOPATH=$HOME/go/gophercloud 8 | mkdir -p $GOPATH 9 | 10 | # Download gophercloud into that environment 11 | go get github.com/rackspace/gophercloud 12 | cd $GOPATH/src/github.com/rackspace/gophercloud 13 | git checkout master 14 | 15 | # Write out the env.sh convenience file. 16 | cd $GOPATH 17 | cat <env.sh 18 | #!/bin/bash 19 | export GOPATH=$(pwd) 20 | export GOPHERCLOUD=$GOPATH/src/github.com/rackspace/gophercloud 21 | EOF 22 | chmod a+x env.sh 23 | 24 | # Make changes immediately available as a convenience. 25 | . ./env.sh 26 | 27 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/script/cibuild: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Test script to be invoked by Travis. 4 | 5 | exec script/unittest -v 6 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/script/test: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Run all the tests. 4 | 5 | exec go test -tags 'acceptance fixtures' ./... $@ 6 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/script/unittest: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Run the unit tests. 4 | 5 | exec go test -tags fixtures ./... $@ 6 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/service_client_test.go: -------------------------------------------------------------------------------- 1 | package gophercloud 2 | 3 | import ( 4 | "testing" 5 | 6 | th "github.com/rackspace/gophercloud/testhelper" 7 | ) 8 | 9 | func TestServiceURL(t *testing.T) { 10 | c := &ServiceClient{Endpoint: "http://123.45.67.8/"} 11 | expected := "http://123.45.67.8/more/parts/here" 12 | actual := c.ServiceURL("more", "parts", "here") 13 | th.CheckEquals(t, expected, actual) 14 | } 15 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/rackspace/gophercloud/util_test.go: -------------------------------------------------------------------------------- 1 | package gophercloud 2 | 3 | import ( 4 | "testing" 5 | 6 | th "github.com/rackspace/gophercloud/testhelper" 7 | ) 8 | 9 | func TestWaitFor(t *testing.T) { 10 | err := WaitFor(5, func() (bool, error) { 11 | return true, nil 12 | }) 13 | th.CheckNoErr(t, err) 14 | } 15 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/samalba/dockerclient/auth_test.go: -------------------------------------------------------------------------------- 1 | package dockerclient 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestAuthEncode(t *testing.T) { 8 | a := AuthConfig{Username: "foo", Password: "password", Email: "bar@baz.com"} 9 | expected := "eyJ1c2VybmFtZSI6ImZvbyIsInBhc3N3b3JkIjoicGFzc3dvcmQiLCJlbWFpbCI6ImJhckBiYXouY29tIn0K" 10 | got, _ := a.encode() 11 | 12 | if expected != got { 13 | t.Errorf("testAuthEncode failed. Expected [%s] got [%s]", expected, got) 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/shiena/ansicolor/.gitignore: -------------------------------------------------------------------------------- 1 | # Created by http://www.gitignore.io 2 | 3 | ### Go ### 4 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 5 | *.o 6 | *.a 7 | *.so 8 | 9 | # Folders 10 | _obj 11 | _test 12 | 13 | # Architecture specific extensions/prefixes 14 | *.[568vq] 15 | [568vq].out 16 | 17 | *.cgo1.go 18 | *.cgo2.c 19 | _cgo_defun.c 20 | _cgo_gotypes.go 21 | _cgo_export.* 22 | 23 | _testmain.go 24 | 25 | *.exe 26 | *.test 27 | 28 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/shiena/ansicolor/ansicolor/main.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 shiena Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | 5 | /* 6 | 7 | The ansicolor command colors a console text by ANSI escape sequence like wac. 8 | 9 | $ go get github.com/shiena/ansicolor/ansicolor 10 | 11 | See also: 12 | https://github.com/aslakhellesoy/wac 13 | 14 | */ 15 | package main 16 | 17 | import ( 18 | "io" 19 | "os" 20 | 21 | "github.com/shiena/ansicolor" 22 | ) 23 | 24 | func main() { 25 | w := ansicolor.NewAnsiColorWriter(os.Stdout) 26 | io.Copy(w, os.Stdin) 27 | } 28 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/shiena/ansicolor/ansicolor_ansi.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 shiena Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !windows 6 | 7 | package ansicolor 8 | 9 | import "io" 10 | 11 | type ansiColorWriter struct { 12 | w io.Writer 13 | } 14 | 15 | func (cw *ansiColorWriter) Write(p []byte) (int, error) { 16 | return cw.w.Write(p) 17 | } 18 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/shiena/ansicolor/ansicolor_test.go: -------------------------------------------------------------------------------- 1 | package ansicolor_test 2 | 3 | import ( 4 | "bytes" 5 | "testing" 6 | 7 | "github.com/shiena/ansicolor" 8 | ) 9 | 10 | func TestNewAnsiColor1(t *testing.T) { 11 | inner := bytes.NewBufferString("") 12 | w := ansicolor.NewAnsiColorWriter(inner) 13 | if w == inner { 14 | t.Errorf("Get %#v, want %#v", w, inner) 15 | } 16 | } 17 | 18 | func TestNewAnsiColor2(t *testing.T) { 19 | inner := bytes.NewBufferString("") 20 | w1 := ansicolor.NewAnsiColorWriter(inner) 21 | w2 := ansicolor.NewAnsiColorWriter(w1) 22 | if w1 != w2 { 23 | t.Errorf("Get %#v, want %#v", w1, w2) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/shiena/ansicolor/export_test.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 shiena Authors. All rights reserved. 2 | // Use of this source code is governed by a MIT-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build windows 6 | 7 | package ansicolor 8 | 9 | import "syscall" 10 | 11 | var GetConsoleScreenBufferInfo = getConsoleScreenBufferInfo 12 | 13 | func ChangeColor(color uint16) { 14 | setConsoleTextAttribute(uintptr(syscall.Stdout), color) 15 | } 16 | 17 | func ResetColor() { 18 | ChangeColor(uint16(0x0007)) 19 | } 20 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/github.com/tent/http-link-go/.gitignore: -------------------------------------------------------------------------------- 1 | *.test 2 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 -------------------------------------------------------------------------------- /Godeps/_workspace/src/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. -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/golang.org/x/crypto/ssh/tcpip_test.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 | package ssh 6 | 7 | import ( 8 | "testing" 9 | ) 10 | 11 | func TestAutoPortListenBroken(t *testing.T) { 12 | broken := "SSH-2.0-OpenSSH_5.9hh11" 13 | works := "SSH-2.0-OpenSSH_6.1" 14 | if !isBrokenOpenSSHVersion(broken) { 15 | t.Errorf("version %q not marked as broken", broken) 16 | } 17 | if isBrokenOpenSSHVersion(works) { 18 | t.Errorf("version %q marked as broken", works) 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/golang.org/x/crypto/ssh/test/doc.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 | // This package contains integration tests for the 6 | // golang.org/x/crypto/ssh package. 7 | package test 8 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/golang.org/x/crypto/ssh/testdata/doc.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 | // This package contains test data shared between the various subpackages of 6 | // the golang.org/x/crypto/ssh package. Under no circumstance should 7 | // this data be used for production code. 8 | package testdata 9 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/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 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/gopkg.in/mgo.v2/Makefile: -------------------------------------------------------------------------------- 1 | startdb: 2 | @testdb/setup.sh start 3 | 4 | stopdb: 5 | @testdb/setup.sh stop 6 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/gopkg.in/mgo.v2/README.md: -------------------------------------------------------------------------------- 1 | The MongoDB driver for Go 2 | ------------------------- 3 | 4 | Please go to [http://labix.org/mgo](http://labix.org/mgo) for all project details. 5 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/gopkg.in/mgo.v2/dbtest/export_test.go: -------------------------------------------------------------------------------- 1 | package dbtest 2 | 3 | import ( 4 | "os" 5 | ) 6 | 7 | func (dbs *DBServer) ProcessTest() *os.Process { 8 | if dbs.server == nil { 9 | return nil 10 | } 11 | return dbs.server.Process 12 | } 13 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/gopkg.in/mgo.v2/export_test.go: -------------------------------------------------------------------------------- 1 | package mgo 2 | 3 | import ( 4 | "time" 5 | ) 6 | 7 | func HackPingDelay(newDelay time.Duration) (restore func()) { 8 | globalMutex.Lock() 9 | defer globalMutex.Unlock() 10 | 11 | oldDelay := pingDelay 12 | restore = func() { 13 | globalMutex.Lock() 14 | pingDelay = oldDelay 15 | globalMutex.Unlock() 16 | } 17 | pingDelay = newDelay 18 | return 19 | } 20 | 21 | func HackSyncSocketTimeout(newTimeout time.Duration) (restore func()) { 22 | globalMutex.Lock() 23 | defer globalMutex.Unlock() 24 | 25 | oldTimeout := syncSocketTimeout 26 | restore = func() { 27 | globalMutex.Lock() 28 | syncSocketTimeout = oldTimeout 29 | globalMutex.Unlock() 30 | } 31 | syncSocketTimeout = newTimeout 32 | return 33 | } 34 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/gopkg.in/mgo.v2/internal/sasl/sasl_windows.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #include "sspi_windows.h" 4 | 5 | SECURITY_STATUS SEC_ENTRY sspi_acquire_credentials_handle(CredHandle* cred_handle, char* username, char* password, char* domain); 6 | int sspi_step(CredHandle* cred_handle, int has_context, CtxtHandle* context, PVOID* buffer, ULONG* buffer_length, char* target); 7 | int sspi_send_client_authz_id(CtxtHandle* context, PVOID* buffer, ULONG* buffer_length, char* user_plus_realm); 8 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/gopkg.in/mgo.v2/raceoff.go: -------------------------------------------------------------------------------- 1 | // +build !race 2 | 3 | package mgo 4 | 5 | const raceDetector = false 6 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/gopkg.in/mgo.v2/raceon.go: -------------------------------------------------------------------------------- 1 | // +build race 2 | 3 | package mgo 4 | 5 | const raceDetector = true 6 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/gopkg.in/mgo.v2/saslimpl.go: -------------------------------------------------------------------------------- 1 | //+build sasl 2 | 3 | package mgo 4 | 5 | import ( 6 | "gopkg.in/mgo.v2/internal/sasl" 7 | ) 8 | 9 | func saslNew(cred Credential, host string) (saslStepper, error) { 10 | return sasl.New(cred.Username, cred.Password, cred.Mechanism, cred.Service, host) 11 | } 12 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/gopkg.in/mgo.v2/saslstub.go: -------------------------------------------------------------------------------- 1 | //+build !sasl 2 | 3 | package mgo 4 | 5 | import ( 6 | "fmt" 7 | ) 8 | 9 | func saslNew(cred Credential, host string) (saslStepper, error) { 10 | return nil, fmt.Errorf("SASL support not enabled during build (-tags sasl)") 11 | } 12 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/gopkg.in/mgo.v2/syscall_test.go: -------------------------------------------------------------------------------- 1 | // +build !windows 2 | 3 | package mgo_test 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | func stop(pid int) (err error) { 10 | return syscall.Kill(pid, syscall.SIGSTOP) 11 | } 12 | 13 | func cont(pid int) (err error) { 14 | return syscall.Kill(pid, syscall.SIGCONT) 15 | } 16 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/gopkg.in/mgo.v2/syscall_windows_test.go: -------------------------------------------------------------------------------- 1 | package mgo_test 2 | 3 | func stop(pid int) (err error) { 4 | panicOnWindows() // Always does. 5 | return nil 6 | } 7 | 8 | func cont(pid int) (err error) { 9 | panicOnWindows() // Always does. 10 | return nil 11 | } 12 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/gopkg.in/mgo.v2/testserver/export_test.go: -------------------------------------------------------------------------------- 1 | package testserver 2 | 3 | import ( 4 | "os" 5 | ) 6 | 7 | func (ts *TestServer) ProcessTest() *os.Process { 8 | if ts.server == nil { 9 | return nil 10 | } 11 | return ts.server.Process 12 | } 13 | -------------------------------------------------------------------------------- /Godeps/_workspace/src/gopkg.in/yaml.v2/suite_test.go: -------------------------------------------------------------------------------- 1 | package yaml_test 2 | 3 | import ( 4 | . "gopkg.in/check.v1" 5 | "testing" 6 | ) 7 | 8 | func Test(t *testing.T) { TestingT(t) } 9 | 10 | type S struct{} 11 | 12 | var _ = Suite(&S{}) 13 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | default: install 2 | 3 | OUT=$(GOBIN)/dockerf 4 | 5 | install: 6 | godep go build -gcflags "-N -l" -o $(OUT) 7 | clean: 8 | rm $(OUT) 9 | -------------------------------------------------------------------------------- /api/client/README.md: -------------------------------------------------------------------------------- 1 | docker.go contains Docker's main function. 2 | 3 | This file provides first line CLI argument parsing and environment variable setting. 4 | -------------------------------------------------------------------------------- /api/client/help.go: -------------------------------------------------------------------------------- 1 | package client 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | 7 | flag "github.com/weibocom/dockerf/dflag" 8 | ) 9 | 10 | // usage: dockerf help COMMAND or dockerf COMMAND --help 11 | func (cli *DockerfCli) CmdHelp(args ...string) error { 12 | if len(args) > 1 { 13 | method, exists := cli.getMethod(args[:2]...) 14 | if exists { 15 | method("--help") 16 | return nil 17 | } 18 | } 19 | if len(args) > 0 { 20 | method, exists := cli.getMethod(args[0]) 21 | if !exists { 22 | fmt.Fprintf(cli.err, "dockerf: '%s' is not a dockerf command. See 'docker --help'.\n", args[0]) 23 | os.Exit(1) 24 | } else { 25 | method("--help") 26 | return nil 27 | } 28 | } 29 | 30 | flag.DFlag.Usage() 31 | 32 | return nil 33 | } 34 | -------------------------------------------------------------------------------- /container/cluster/add.go: -------------------------------------------------------------------------------- 1 | package cluster 2 | 3 | import "github.com/weibocom/dockerf/machine" 4 | 5 | func (c *Cluster) AddMaster(m *machine.Machine) error { 6 | return c.Driver.AddMaster(m) 7 | } 8 | 9 | func (c *Cluster) AddWorker(m *machine.Machine) error { 10 | return c.Driver.AddWorker(m) 11 | } 12 | -------------------------------------------------------------------------------- /container/cluster/drivers/swarm/callback.go: -------------------------------------------------------------------------------- 1 | package swarm 2 | 3 | import ( 4 | "strings" 5 | 6 | "github.com/samalba/dockerclient" 7 | "github.com/weibocom/dockerf/events" 8 | ) 9 | 10 | func wrapCallback(eh events.EventsHandler, ec chan error, args ...interface{}) dockerclient.Callback { 11 | return func(e *dockerclient.Event, ec chan error, args ...interface{}) { 12 | id := e.Id 13 | splits := strings.SplitN(e.From, " node:", 2) 14 | from := splits[0] 15 | node := "" 16 | if len(splits) >= 2 { 17 | node = splits[1] 18 | } 19 | status := e.Status 20 | time := e.Time 21 | eh(id, status, from, node, time, args) 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /container/cluster/events.go: -------------------------------------------------------------------------------- 1 | package cluster 2 | 3 | import "github.com/weibocom/dockerf/events" 4 | 5 | func (c *Cluster) RegisterEventHandler(cb events.EventsHandler, args ...interface{}) { 6 | c.Driver.RegisterEventHandler(cb, args) 7 | } 8 | -------------------------------------------------------------------------------- /container/cluster/impl.go: -------------------------------------------------------------------------------- 1 | package cluster 2 | 3 | import ( 4 | _ "github.com/weibocom/dockerf/container/cluster/drivers/swarm" 5 | ) 6 | -------------------------------------------------------------------------------- /container/cluster/run.go: -------------------------------------------------------------------------------- 1 | package cluster 2 | 3 | import "github.com/weibocom/dockerf/container" 4 | 5 | func (c *Cluster) Run(desc *container.ContainerDesc, name string) (string, error) { 6 | return c.Driver.Run(desc, name) 7 | } 8 | -------------------------------------------------------------------------------- /container/name_test.go: -------------------------------------------------------------------------------- 1 | package container 2 | 3 | import ( 4 | "testing" 5 | ) 6 | 7 | func TestNameParse(t *testing.T) { 8 | cn := ContainerName{} 9 | name := "web-1" 10 | if !cn.Parse(name) { 11 | t.Errorf("'%s' is a valid name, but parse error.\n", name) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /dflag/flag.go: -------------------------------------------------------------------------------- 1 | package dflag 2 | 3 | import ( 4 | "os" 5 | 6 | mflag "github.com/docker/docker/pkg/mflag" 7 | ) 8 | 9 | var DFlag = mflag.NewFlagSet(os.Args[0], mflag.ExitOnError) 10 | -------------------------------------------------------------------------------- /events/events.go: -------------------------------------------------------------------------------- 1 | package events 2 | 3 | import "github.com/Sirupsen/logrus" 4 | 5 | type EventsHandler func(id, status, from, node string, time int64, args ...interface{}) 6 | 7 | func DefaultEventHandler(id, status, from, node string, time int64, args ...interface{}) { 8 | logrus.Debugf("event received. id:%s, status:%s, from:%s, node:%s, time:%d", id, status, from, node, time) 9 | } 10 | -------------------------------------------------------------------------------- /log.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "os" 5 | 6 | "github.com/Sirupsen/logrus" 7 | ) 8 | 9 | func setLogLevel(lvl logrus.Level) { 10 | logrus.SetLevel(lvl) 11 | } 12 | 13 | func initLogging() { 14 | logrus.SetOutput(os.Stdout) 15 | } 16 | -------------------------------------------------------------------------------- /machine/delete.go: -------------------------------------------------------------------------------- 1 | package machine 2 | 3 | func (c *Cluster) Remove(m *Machine) error { 4 | return m.Remove() 5 | } 6 | -------------------------------------------------------------------------------- /machine/description.go: -------------------------------------------------------------------------------- 1 | package machine 2 | -------------------------------------------------------------------------------- /machine/engine.go: -------------------------------------------------------------------------------- 1 | package machine 2 | 3 | import ( 4 | "github.com/docker/machine/libmachine/engine" 5 | "github.com/weibocom/dockerf/options" 6 | ) 7 | 8 | type EngineOptions engine.EngineOptions 9 | 10 | func getEngineOptions(opt *options.Options) *EngineOptions { 11 | return &EngineOptions{ 12 | ArbitraryFlags: opt.StringSlice("engine-opt"), 13 | Env: opt.StringSlice("engine-env"), 14 | InsecureRegistry: opt.StringSlice("engine-insecure-registry"), 15 | Labels: opt.StringSlice("engine-label"), 16 | RegistryMirror: opt.StringSlice("engine-registry-mirror"), 17 | StorageDriver: opt.String("engine-storage-driver"), 18 | TlsVerify: true, 19 | InstallURL: opt.String("engine-install-url"), 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /machine/list.go: -------------------------------------------------------------------------------- 1 | package machine 2 | 3 | func (c *Cluster) ListAll() []*Machine { 4 | return c.List(func(m *Machine) bool { return true }) 5 | } 6 | 7 | func (c *Cluster) List(accept func(m *Machine) bool) []*Machine { 8 | c.Lock() 9 | defer c.Unlock() 10 | ms := make([]*Machine, len(c.machines)) 11 | cnt := 0 12 | for _, m := range c.machines { 13 | if accept(m) { 14 | ms[cnt] = m 15 | cnt++ 16 | } 17 | } 18 | return ms[0:cnt] 19 | } 20 | 21 | func (c *Cluster) Get(name string) (*Machine, bool) { 22 | c.Lock() 23 | defer c.Unlock() 24 | m, found := c.machines[name] 25 | return m, found 26 | } 27 | -------------------------------------------------------------------------------- /machine/options/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/weibocom/dockerf/8b2e563752c97f26c7f4d0c5a7caa8902732f223/machine/options/.DS_Store -------------------------------------------------------------------------------- /machine/start.go: -------------------------------------------------------------------------------- 1 | package machine 2 | 3 | func (c *Cluster) Start(m *Machine) error { 4 | return m.Start() 5 | } 6 | -------------------------------------------------------------------------------- /profile.yml: -------------------------------------------------------------------------------- 1 | activeprofile: test 2 | 3 | profiles: 4 | production: 5 | masteraddress: usertag-master-1 6 | frontendcontainernum: 2 7 | discoveryaddress: consul://101.200.173.242:8500/usertag 8 | test: 9 | masteraddress: usertag-master-2 10 | frontendcontainernum: 1 11 | discoveryaddress: consul://101.200.173.242:8500/test-usertag -------------------------------------------------------------------------------- /resources/resources.go: -------------------------------------------------------------------------------- 1 | package resources 2 | 3 | type ResourceOptions struct { 4 | Memory int 5 | Disk int 6 | Cpus int 7 | } 8 | -------------------------------------------------------------------------------- /sequence/sequence.go: -------------------------------------------------------------------------------- 1 | package sequence 2 | 3 | import ( 4 | "sync" 5 | ) 6 | 7 | type Seq struct { 8 | s int 9 | sync.Mutex 10 | } 11 | 12 | func (seq *Seq) Next() int { 13 | seq.Lock() 14 | defer seq.Unlock() 15 | seq.s++ 16 | return seq.s 17 | } 18 | 19 | func (seq *Seq) Get() int { 20 | return seq.s 21 | } 22 | 23 | func (seq *Seq) Max(m int) { 24 | seq.Lock() 25 | defer seq.Unlock() 26 | if m > seq.s { 27 | seq.s = m 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /topology/deploy.go: -------------------------------------------------------------------------------- 1 | package topology 2 | 3 | func (t *Topology) Deploy(group, filters string) error { 4 | return nil 5 | } 6 | -------------------------------------------------------------------------------- /topology/descriptions/container.go: -------------------------------------------------------------------------------- 1 | package descriptions 2 | 3 | type ContainerTopology struct { 4 | EngineOptions map[string]string `yaml:"engine"` 5 | ClusterOptions map[string]string `yaml:"cluster"` 6 | Descriptions []ContainerDescription `yaml:"descriptions"` 7 | } 8 | 9 | type ContainerDescription struct { 10 | Group string 11 | Port string 12 | MinNum int `yaml:"min-num"` 13 | MaxNum int `yaml:"max-num"` 14 | Image string 15 | MachineGroup string `yaml:"machine-group"` 16 | RegisterOptions map[string]string `yaml:"register"` 17 | } 18 | -------------------------------------------------------------------------------- /topology/descriptions/descriptions.go: -------------------------------------------------------------------------------- 1 | package descriptions 2 | 3 | import ( 4 | "io/ioutil" 5 | 6 | "gopkg.in/yaml.v2" 7 | 8 | "github.com/weibocom/dockerf/options" 9 | ) 10 | 11 | type TopologyDescription struct { 12 | Machine MachineTopology 13 | Container ContainerTopology 14 | } 15 | 16 | func NewTopologyDescription(path string) (*TopologyDescription, error) { 17 | data, err := ioutil.ReadFile(path) 18 | if err != nil { 19 | return nil, err 20 | } 21 | td := &TopologyDescription{} 22 | if err := yaml.Unmarshal(data, td); err != nil { 23 | return nil, err 24 | } 25 | return td, nil 26 | } 27 | 28 | func (t *TopologyDescription) GetClusterOptions() *options.Options { 29 | return &options.Options{Values: t.Container.ClusterOptions} 30 | } 31 | -------------------------------------------------------------------------------- /topology/events.go: -------------------------------------------------------------------------------- 1 | package topology 2 | 3 | import "github.com/Sirupsen/logrus" 4 | 5 | func TopologyEventsHandler(id, status, from, node string, time int64, args ...interface{}) { 6 | logrus.Debugf("topology event received. id:%s, status:%s, from:%s, node:%s, time:%d", id, status, from, node, time) 7 | } 8 | -------------------------------------------------------------------------------- /topology/scalecontainer.go: -------------------------------------------------------------------------------- 1 | package topology 2 | 3 | func (t *Topology) ScaleContainer(group string) error { 4 | return nil 5 | } 6 | -------------------------------------------------------------------------------- /utils/capacity.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import ( 4 | "strconv" 5 | "strings" 6 | ) 7 | 8 | // 512m 1gb etc... 9 | func ParseCapacity(str string) (int, error) { 10 | ustr := strings.ToUpper(str) 11 | end := len(ustr) 12 | if ustr[end-1] == 'B' { 13 | end = end - 1 14 | } 15 | base := 1 16 | switch ustr[end-1] { 17 | case 'K': 18 | end -= 1 19 | base = 1024 20 | case 'M': 21 | end -= 1 22 | base = 1024 * 1024 23 | case 'G': 24 | end -= 1 25 | base = 1024 * 1024 * 1024 26 | default: 27 | } 28 | ustr = ustr[0:end] 29 | 30 | num, err := strconv.ParseInt(ustr, 10, 64) 31 | if err != nil { 32 | return -1, err 33 | } 34 | return int(num) * int(base), nil 35 | } 36 | -------------------------------------------------------------------------------- /utils/random.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import ( 4 | "math/rand" 5 | "time" 6 | ) 7 | 8 | var uRandom = rand.New(rand.NewSource(time.Now().UnixNano())) 9 | 10 | func RandomUInt(minimal, maximal int) int { 11 | min := int32(minimal) 12 | max := int32(maximal) 13 | rn := uRandom.Int31n(max) 14 | if rn < min { 15 | rn = rn%(max-min) + min 16 | } 17 | return int(rn) 18 | } 19 | -------------------------------------------------------------------------------- /utils/strings.go: -------------------------------------------------------------------------------- 1 | package utils 2 | 3 | import "strings" 4 | 5 | // delete all blank or empty element 6 | func TrimSplit(str, split string) []string { 7 | splits := strings.Split(str, split) 8 | if len(splits) == 0 { 9 | return splits 10 | } 11 | slice := make([]string, len(splits)) 12 | idx := 0 13 | for _, s := range splits { 14 | ts := strings.TrimSpace(s) 15 | if ts == "" { 16 | continue 17 | } 18 | slice[idx] = ts 19 | idx++ 20 | } 21 | return slice[0:idx] 22 | } 23 | --------------------------------------------------------------------------------