Skip to content

Instantly share code, notes, and snippets.

@hunner
Created June 1, 2015 20:20
Show Gist options
  • Select an option

  • Save hunner/8f2d1a7134e363e0f30b to your computer and use it in GitHub Desktop.

Select an option

Save hunner/8f2d1a7134e363e0f30b to your computer and use it in GitHub Desktop.
$url_hash = {
'public_protocol' => pick($public_protocol,'http'),
'public_address' => pick($public_address,'127.0.0.1'),
'compute_port' => pick($compute_port, '8774'),
'compute_version' => pick($compute_version,'v2'),
}
$url = "${url_hash['public_protocol']}://${url_hash['public_address']}:${url_hash['compute_port']}/${url_hash['compute_version']}/${tenant_id}s"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment