Permalink
Browse files

first commit

  • Loading branch information...
1 parent a4bf22d commit f95c66ff07a443d3032889137006c3ca3e53905e @holinnn committed Apr 21, 2010
Showing with 29 additions and 29 deletions.
  1. +29 −29 README.rdoc
View
@@ -3,53 +3,53 @@
OvhRb helps you to use the OVH SOAPI in a ruby way
=== Installation
- gem install ovh-rb
+ gem install ovh-rb
=== Usage
All methods are available here http://www.ovh.com/soapi/fr/
For example :
- require 'soap/wsdlDriver'
+ require 'soap/wsdlDriver'
- wsdl = 'https://www.ovh.com/soapi/soapi-re-1.9.wsdl'
- soapi = SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver
+ wsdl = 'https://www.ovh.com/soapi/soapi-re-1.9.wsdl'
+ soapi = SOAP::WSDLDriverFactory.new(wsdl).create_rpc_driver
- #login
- session = soapi.login('xxxxxx-ovh', '******', 'fr', false)
- puts "login successfull"
+ #login
+ session = soapi.login('xxxxxx-ovh', '******', 'fr', false)
+ puts "login successfull"
- #domainInfo
- result = soapi.domainInfo(session, 'mydomain.com')
+ #domainInfo
+ result = soapi.domainInfo(session, 'mydomain.com')
Becomes :
- require 'ovh_rb'
+ require 'ovh_rb'
- OvhRb::Session.new('xxxxxx-ovh', '******') do |session|
- result = session.domain_info("mydomain.com")
- end
+ OvhRb::Session.new('xxxxxx-ovh', '******') do |session|
+ result = session.domain_info("mydomain.com")
+ end
So every methods in the SOAPI has an equivalent following ruby conventions
=== Object returned
Executing rpsGetIoStats with SOAP will return :
- #<SOAP::Mapping::Object:0x..fdb887088 {}average=#<SOAP::Mapping::Object:0x..fdb8865c0
- {}serviceTime=#<SOAP::Mapping::Object:0x..fdb885b48 {}raw="24.033581551715">
- {}IoRequests=#<SOAP::Mapping::Object:0x..fdb884a22 {}read=#<SOAP::Mapping::Object:0x..fdb8841d0
- {}raw="0.0868578964721398"> {}write=#<SOAP::Mapping::Object:0x..fdb8835dc {}raw="6.49833242398628">>>
- {}max=#<SOAP::Mapping::Object:0x..fdb88130e {}serviceTime=#<SOAP::Mapping::Object:0x..fdb8809b8 {}raw="72.5948119715954">
- {}IoRequests=#<SOAP::Mapping::Object:0x..fdb87ffae {}read=#<SOAP::Mapping::Object:0x..fdb87fa7c {}raw="42.4079216629491">
- {}write=#<SOAP::Mapping::Object:0x..fdb87ed20 {}raw="299.651590028509">>> {}current=#<SOAP::Mapping::Object:0x..fdb87bfd0
- {}serviceTime=#<SOAP::Mapping::Object:0x..fdb87b7e2 {}raw="20.6009784756978"> {}IoRequests=#<SOAP::Mapping::Object:0x..fdb87a680
- {}read=#<SOAP::Mapping::Object:0x..fdb879b4a {}raw="0"> {}write=#<SOAP::Mapping::Object:0x..fdb8781f0 {}raw="5.66746463326707">>>
- {}image="https://www.ovh.com:444/iostat/91.121.191/16/608759725540.png">
+ #<SOAP::Mapping::Object:0x..fdb887088 {}average=#<SOAP::Mapping::Object:0x..fdb8865c0
+ {}serviceTime=#<SOAP::Mapping::Object:0x..fdb885b48 {}raw="24.033581551715">
+ {}IoRequests=#<SOAP::Mapping::Object:0x..fdb884a22 {}read=#<SOAP::Mapping::Object:0x..fdb8841d0
+ {}raw="0.0868578964721398"> {}write=#<SOAP::Mapping::Object:0x..fdb8835dc {}raw="6.49833242398628">>>
+ {}max=#<SOAP::Mapping::Object:0x..fdb88130e {}serviceTime=#<SOAP::Mapping::Object:0x..fdb8809b8 {}raw="72.5948119715954">
+ {}IoRequests=#<SOAP::Mapping::Object:0x..fdb87ffae {}read=#<SOAP::Mapping::Object:0x..fdb87fa7c {}raw="42.4079216629491">
+ {}write=#<SOAP::Mapping::Object:0x..fdb87ed20 {}raw="299.651590028509">>> {}current=#<SOAP::Mapping::Object:0x..fdb87bfd0
+ {}serviceTime=#<SOAP::Mapping::Object:0x..fdb87b7e2 {}raw="20.6009784756978"> {}IoRequests=#<SOAP::Mapping::Object:0x..fdb87a680
+ {}read=#<SOAP::Mapping::Object:0x..fdb879b4a {}raw="0"> {}write=#<SOAP::Mapping::Object:0x..fdb8781f0 {}raw="5.66746463326707">>>
+ {}image="https://www.ovh.com:444/iostat/91.121.191/16/608759725540.png">
Executing rps_get_io_stats with OvhRb will return :
- #<OvhRb::OvhObject:0xb6e2d284 @max=#<OvhRb::OvhObject:0xb6e2a700 @service_time="72.5948119715954",
- @io_requests=#<OvhRb::OvhObject:0xb6e29d64 @write="299.651590028509", @read="42.4079216629491">>,
- @average=#<OvhRb::OvhObject:0xb6e2cbf4 @service_time="24.033581551715", @io_requests=#<OvhRb::OvhObject:0xb6e2be34
- @write="6.49833242398628", @read="0.0868578964721398">>, @image="https://www.ovh.com:444/iostat/91.121.191/16/852220927438.png",
- @current=#<OvhRb::OvhObject:0xb6e326bc @service_time="20.6009784756978",
- @io_requests=#<OvhRb::OvhObject:0xb6e72690 @write="5.66746463326707", @read="0">>>
+ #<OvhRb::OvhObject:0xb6e2d284 @max=#<OvhRb::OvhObject:0xb6e2a700 @service_time="72.5948119715954",
+ @io_requests=#<OvhRb::OvhObject:0xb6e29d64 @write="299.651590028509", @read="42.4079216629491">>,
+ @average=#<OvhRb::OvhObject:0xb6e2cbf4 @service_time="24.033581551715", @io_requests=#<OvhRb::OvhObject:0xb6e2be34
+ @write="6.49833242398628", @read="0.0868578964721398">>, @image="https://www.ovh.com:444/iostat/91.121.191/16/852220927438.png",
+ @current=#<OvhRb::OvhObject:0xb6e326bc @service_time="20.6009784756978",
+ @io_requests=#<OvhRb::OvhObject:0xb6e72690 @write="5.66746463326707", @read="0">>>
=== Licence

0 comments on commit f95c66f

Please sign in to comment.