README.md in azure-armrest-0.0.1 vs README.md in azure-armrest-0.0.2
- old
+ new
@@ -11,54 +11,38 @@
## Synopsis
```ruby
require 'azure/armrest'
-# Set things on a global level. All other objects will then use the
+# Create a configuration object. All service objects will then use the
# information you set here.
+# A token will be retrieved based on the information you provided
-Azure::Armrest::ArmrestManager.configure(
+conf = Azure::Armrest::ArmrestService.configure(
:client_id => 'XXXXX',
:client_key => 'YYYYY',
:tenant_id => 'ZZZZZ',
:subscription_id => 'ABCDEFG'
)
# This will then use the configuration info set above.
-vmm = Azure::Armrest::VirtualMachineManager.new
+# You can add other options specific to the service to be created
+vms = Azure::Armrest::VirtualMachineService.new(conf, options)
-# Alternatively you can set the configuration information on a per-instance
-# basis if you need different credentials for different classes.
-vmm = Azure::Armrest::VirtualMachineManager.new(
- :client_id => 'XXXXX',
- :client_key => 'YYYYY',
- :tenant_id => 'ZZZZZ',
- :subscription_id => 'ABCDEFG'
-)
-
-# Call this before making method calls if using per-instance configuration.
-# This is not necessary if you set it via ArmrestManager.configure.
-vmm.get_token
-
# Create a virtual machine
vmm.create_virtual_machine(
:name => 'some_vm',
- :location => 'West US',
+ :location => 'West US',
:vm_size => 'Standard_A1',
:computer_name => 'whatever',
:admin_username => 'admin_user',
:admin_password => 'adminxxxxxx',
:os_disk => {:name => 'disk_name1', :os_type => 'Linux', :caching => 'read'},
:data_disks => {:name => 'data_disk1', :lun => 0, :caching => 'read'}
)
```
-## Tokens and methods
-
-You will not be able to make any method calls until you first call the
-get_token method.
-
## Subscriptions
If you do not provide a subscription ID to the constructor, then the first
subscription ID returned from a REST call will be used.
@@ -73,6 +57,7 @@
## Authors
* Daniel Berger
* Bronagh Sorota
+* Bill Wei