README.md in fog-openstack-0.3.0 vs README.md in fog-openstack-0.3.1

- old
+ new

@@ -80,22 +80,22 @@ ### Compute (Nova) Initialise a connection to the compute service: ```ruby -compute = Fog::Compute::OpenStack.new(@connection_params) +compute = Fog::OpenStack::Compute.new(@connection_params) ``` Get a list of available images for use with booting new instances: ```ruby p compute.images -# => <Fog::Compute::OpenStack::Images +# => <Fog::OpenStack::Compute::Images # filters={}, # server=nil # [ -# <Fog::Compute::OpenStack::Image +# <Fog::OpenStack::Compute::Image # id="57a67f8a-7bae-4578-b684-b9b4dcd48d7f", # ... # > # ] # > @@ -103,21 +103,21 @@ List available flavors so we can decide how powerful to make this instance: ```ruby p compute.flavors -# => <Fog::Compute::OpenStack::Flavors +# => <Fog::OpenStack::Compute::Flavors # [ -# <Fog::Compute::OpenStack::Flavor +# <Fog::OpenStack::Compute::Flavor # id="1", # name="m1.tiny", # ram=512, # disk=1, # vcpus=1, # ... # >, -# <Fog::Compute::OpenStack::Flavor +# <Fog::OpenStack::Compute::Flavor # id="2", # name="m1.small", # ram=2048, # disk=20, # vcpus=1, @@ -139,11 +139,11 @@ # Optionally, wait for the instance to provision before continuing instance.wait_for { ready? } # => {:duration=>17.359134} p instance -# => <Fog::Compute::OpenStack::Server +# => <Fog::OpenStack::Compute::Server # id="63633125-26b5-4fe1-a909-0f44d1ab3337", # instance_name=nil, # addresses={"public"=>[{"OS-EXT-IPS-MAC:mac_addr"=>"fa:16:3e:f4:75:ab", "version"=>4, "addr"=>"1.2.3.4", "OS-EXT-IPS:type"=>"fixed"}]}, # flavor={"id"=>"2"}, # host_id="f5ea01262720d02e886508bc4fa994782c516557d232c72aeb79638e", @@ -175,15 +175,15 @@ Allow TCP traffic through port 22: ```ruby security_group = compute.security_groups.create name: "Test SSH", description: "Allow access to port 22" -# => <Fog::Compute::OpenStack::SecurityGroup +# => <Fog::OpenStack::Compute::SecurityGroup # id="e5d53d00-b3f9-471a-b90f-985694b966ed", # name="Test SSH", # description="Allow access to port 22", -# security_group_rules= <Fog::Compute::OpenStack::SecurityGroupRules +# security_group_rules= <Fog::OpenStack::Compute::SecurityGroupRules # [ # ] # >, # tenant_id="06a9a90c60074cdeae5f7fdd0048d9ac" @@ -194,11 +194,11 @@ from_port: 22, to_port: 22 key_pair = compute.key_pairs.create name: "My Public Key", public_key: "/full/path/to/ssh.pub" -# => <Fog::Compute::OpenStack::KeyPair +# => <Fog::OpenStack::Compute::KeyPair # name="My Public Key", # ... # user_id="20746f49211e4037a91269df6a3fbf7b", # id=nil # > @@ -210,11 +210,11 @@ instance = compute.servers.create name: "Test 2", image_ref: image.id, flavor_ref: flavor.id, key_name: key_pair.name, security_groups: security_group -# => <Fog::Compute::OpenStack::Server +# => <Fog::OpenStack::Compute::Server # id="e18ebdfb-e5f5-4a45-929f-4cc9926dc2c7", # name="Test 2", # state="ACTIVE", # tenant_id="06a9a90c60074cdeae5f7fdd0048d9ac", # key_name="My Public Key", @@ -228,11 +228,11 @@ pool_name = compute.addresses.get_address_pools[0]['name'] floating_ip_address = compute.addresses.create pool: pool_name instance.associate_address floating_ip_address.ip p floating_ip_address -# => <Fog::Compute::OpenStack::Address +# => <Fog::OpenStack::Compute::Address # id="54064324-ce7d-448d-9753-94497b29dc91", # ip="1.2.3.4", # pool="external", # fixed_ip="192.168.0.96", # instance_id="e18ebdfb-e5f5-4a45-929f-4cc9926dc2c7" @@ -254,16 +254,16 @@ ### Volume (Cinder) Create and attach a volume to a running instance: ```ruby -compute = Fog::Compute::OpenStack.new(@connection_params) +compute = Fog::OpenStack::Compute.new(@connection_params) volume = compute.volumes.create name: "Test", description: "Testing", size: 1 -# => <Fog::Compute::OpenStack::Volume +# => <Fog::OpenStack::Compute::Volume # id="4a212986-c6b6-4a93-8319-c6a98e347750", # name="Test", # description="Testing", # size=1, # availability_zone="Production", @@ -290,11 +290,11 @@ volume.reload compute.snapshots.create volume_id: volume.id, name: "test", description: "test" -# => <Fog::Compute::OpenStack::Snapshot +# => <Fog::OpenStack::Compute::Snapshot # id="7a8c9192-25ee-4364-be91-070b7a6d9855", # name="test", # description="test", # volume_id="4a212986-c6b6-4a93-8319-c6a98e347750", # status="creating", @@ -313,11 +313,11 @@ Download Glance image: ```ruby -image = Fog::Image::OpenStack.new(@connection_params) +image = Fog::OpenStack::Image.new(@connection_params) image_out = File.open("/tmp/cirros-image-download", 'wb') streamer = lambda do |chunk, _, _| image_out.write chunk @@ -343,11 +343,11 @@ image_handle = image.images.create name: "cirros", disk_format: "qcow2", container_format: "bare" -# => <Fog::Image::OpenStack::V2::Image +# => <Fog::OpenStack::Image::V2::Image # id="67c4d02c-5601-4619-bd14-d2f7f96a046c", # name="cirros", # visibility="private", # tags=[], # self="/v2/images/67c4d02c-5601-4619-bd14-d2f7f96a046c", @@ -390,16 +390,16 @@ ### Identity (Keystone) List domains (Keystone V3 only): ```ruby -identity = Fog::Identity::OpenStack.new(@connection_params) +identity = Fog::OpenStack::Identity.new(@connection_params) identity.domains -# => <Fog::Identity::OpenStack::V3::Domains +# => <Fog::OpenStack::Identity::V3::Domains # [ -# <Fog::Identity::OpenStack::V3::Domain +# <Fog::OpenStack::Identity::V3::Domain # id="default", # description="", # enabled=true, # name="Default", # > @@ -409,13 +409,13 @@ List projects (aka tenants): ```ruby identity.projects -# => <Fog::Identity::OpenStack::V3::Projects +# => <Fog::OpenStack::Identity::V3::Projects # [ -# <Fog::Identity::OpenStack::V3::Project +# <Fog::OpenStack::Identity::V3::Project # id="008e5537d3424295a03560abc923693c", # domain_id="default", # description="Project 1", # enabled=true, # name="project_1", @@ -423,19 +423,19 @@ # ... # ] # On Keystone V2 identity.tenants -# => <Fog::Identity::OpenStack::V2::Tenants +# => <Fog::OpenStack::Identity::V2::Tenants # [ ... ] ``` List users: ```ruby identity.users -# => <Fog::Identity::OpenStack::V3::Users +# => <Fog::OpenStack::Identity::V3::Users # [ ... ] ``` Create/destroy new user: @@ -444,11 +444,11 @@ user = identity.users.create name: "test", project_id: project_id, email: "test@test.com", password: "test" -# => <Fog::Identity::OpenStack::V3::User +# => <Fog::OpenStack::Identity::V3::User # id="474a59153ebd4e709938e5e9b614dc57", # default_project_id=nil, # description=nil, # domain_id="default", # email="test@test.com", @@ -465,11 +465,11 @@ ```ruby project = identity.projects.create name: "test", description: "test" -# => <Fog::Identity::OpenStack::V3::Project +# => <Fog::OpenStack::Identity::V3::Project # id="423559128a7249f2973cdb7d5d581c4d", # domain_id="default", # description="test", # enabled=true, # name="test", @@ -484,11 +484,11 @@ Grant user role on tenant and revoke it: ```ruby role = identity.roles.select{|role| role.name == "_member_"}[0] -# => <Fog::Identity::OpenStack::V3::Role +# => <Fog::OpenStack::Identity::V3::Role # id="9fe2ff9ee4384b1894a90878d3e92bab", # name="_member_", # > project.grant_role_to_user(role.id, user.id) @@ -500,18 +500,18 @@ Set up a project's public gateway (needed for external access): ```ruby -identity = Fog::Identity::OpenStack.new(@connection_params) +identity = Fog::OpenStack::Identity.new(@connection_params) tenants = identity.projects.select do |project| project.name == @connection_params[:openstack_project_name] end tenant_id = tenants[0].id -neutron = Fog::Network::OpenStack.new(@connection_params) +neutron = Fog::OpenStack::Network.new(@connection_params) network = neutron.networks.create name: "default", tenant_id: tenant_id subnet = network.subnets.create name: "default",