Skip to content

Commit

Permalink
Updated examples (describe returns an array)
Browse files Browse the repository at this point in the history
  • Loading branch information
arax committed Dec 17, 2012
1 parent 0ad8e18 commit fd0a971
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions examples/dsl_example.rb
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,13 @@
pp cmpt_data

## wait until the resource is "active"
while cmpt_data.resources.first.attributes.occi.compute.state == "inactive"
while cmpt_data[0].resources.first.attributes.occi.compute.state == "inactive"
puts "\nCompute resource #{cmpt_loc} is inactive, waiting ..."
sleep 1
cmpt_data = describe cmpt_loc
end

puts "\nCompute resource #{cmpt_loc} is #{cmpt_data.resources.first.attributes.occi.compute.state}"
puts "\nCompute resource #{cmpt_loc} is #{cmpt_data[0].resources.first.attributes.occi.compute.state}"

## delete the resource and exit
if clean_up_compute
Expand Down
4 changes: 2 additions & 2 deletions examples/x509auth_example.rb
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,13 @@
pp cmpt_data

## wait until the resource is "active"
while cmpt_data.resources.first.attributes.occi.compute.state == "inactive"
while cmpt_data[0].resources.first.attributes.occi.compute.state == "inactive"
puts "\nCompute resource #{cmpt_loc} is inactive, waiting ..."
sleep 1
cmpt_data = client.describe cmpt_loc
end

puts "\nCompute resource #{cmpt_loc} is #{cmpt_data.resources.first.attributes.occi.compute.state}"
puts "\nCompute resource #{cmpt_loc} is #{cmpt_data[0].resources.first.attributes.occi.compute.state}"

## delete the resource and exit
if clean_up_compute
Expand Down

0 comments on commit fd0a971

Please sign in to comment.