mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
fixed examples for HPC access
This commit is contained in:
parent
01f53e1b25
commit
e27c1151dd
3 changed files with 10 additions and 7 deletions
|
@ -764,9 +764,9 @@ This page discusses the following topics:
|
|||
1. List all available floating ip addresses:
|
||||
|
||||
response = conn.list_addresses
|
||||
response.body['addresses'] # returns an array of address hashes
|
||||
response.headers # returns the headers
|
||||
response.body['addresses'][0]['id'] # returns the id of the address
|
||||
response.body['floating_ips'] # returns an array of address hashes
|
||||
response.headers # returns the headers
|
||||
response.body['floating_ips'][0]['id'] # returns the id of the address
|
||||
|
||||
2. Obtain the details of a particular address:
|
||||
|
||||
|
|
|
@ -813,14 +813,17 @@ You can find the values the access key, secret key, and other values by clicking
|
|||
|
||||
1. List all available floating IP addresses:
|
||||
|
||||
response = conn.list_server_addresses
|
||||
server = conn.servers.first
|
||||
response = conn.list_server_addresses(server.id)
|
||||
response.body['addresses'] # returns an array of address hashes
|
||||
response.headers # returns the headers
|
||||
response.body['addresses'][0]['id'] # returns the id of the address
|
||||
|
||||
|
||||
2. List addresses by network for a server:
|
||||
|
||||
response = conn.list_server_addresses_by_network("<address_id>") # get the address
|
||||
server = conn.servers.first
|
||||
network = network_conn.networks.first.name
|
||||
response = conn.list_server_addresses_by_network(server.id, name) # get the addresses (assumes server is in network)
|
||||
|
||||
3. Obtain the details of a particular address:
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ To connect to the HP Cloud Networking Service, follow these steps:
|
|||
|
||||
3. Establish a connection to the HP Cloud Networking service
|
||||
|
||||
conn = Fog::HP::Networking.new(
|
||||
conn = Fog::HP::Network.new(
|
||||
:hp_access_key => "<your_ACCESS_KEY>",
|
||||
:hp_secret_key => "<your_SECRET_KEY>",
|
||||
:hp_auth_uri => "<IDENTITY_ENDPOINT_URL>",
|
||||
|
|
Loading…
Reference in a new issue