ruby_vim_sdk 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README +1 -0
- data/Rakefile +51 -0
- data/lib/ruby_vim_sdk.rb +48 -0
- data/lib/ruby_vim_sdk/base_type.rb +15 -0
- data/lib/ruby_vim_sdk/const.rb +32 -0
- data/lib/ruby_vim_sdk/core_types.rb +68 -0
- data/lib/ruby_vim_sdk/data_type.rb +14 -0
- data/lib/ruby_vim_sdk/enum_type.rb +12 -0
- data/lib/ruby_vim_sdk/ext.rb +9 -0
- data/lib/ruby_vim_sdk/managed_type.rb +12 -0
- data/lib/ruby_vim_sdk/method.rb +37 -0
- data/lib/ruby_vim_sdk/missing_types.rb +11 -0
- data/lib/ruby_vim_sdk/property.rb +49 -0
- data/lib/ruby_vim_sdk/server_objects.rb +2718 -0
- data/lib/ruby_vim_sdk/soap/deserializer.rb +301 -0
- data/lib/ruby_vim_sdk/soap/serializer.rb +225 -0
- data/lib/ruby_vim_sdk/soap/stub_adapter.rb +123 -0
- data/lib/ruby_vim_sdk/soap_exception.rb +12 -0
- data/lib/ruby_vim_sdk/typed_array.rb +9 -0
- data/lib/ruby_vim_sdk/types.rb +22 -0
- data/lib/ruby_vim_sdk/version.rb +5 -0
- data/lib/ruby_vim_sdk/vmodl/data_object.rb +102 -0
- data/lib/ruby_vim_sdk/vmodl/managed_object.rb +78 -0
- data/lib/ruby_vim_sdk/vmodl/method_name.rb +7 -0
- data/lib/ruby_vim_sdk/vmodl/property_path.rb +7 -0
- data/lib/ruby_vim_sdk/vmodl/type_name.rb +7 -0
- data/lib/ruby_vim_sdk/vmodl_helper.rb +33 -0
- data/lib/ruby_vim_sdk/vmomi_support.rb +280 -0
- data/spec/spec_helper.rb +10 -0
- data/spec/unit/soap/deserializer_spec.rb +206 -0
- data/spec/unit/soap/serializer_spec.rb +261 -0
- data/spec/unit/soap/stub_adapter_spec.rb +9 -0
- data/spec/unit/vmodl/data_object_spec.rb +9 -0
- data/spec/unit/vmodl/managed_object_spec.rb +9 -0
- data/spec/unit/vmodl_helper_spec.rb +36 -0
- data/spec/unit/vmomi_support_spec.rb +33 -0
- metadata +121 -0
@@ -0,0 +1,9 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper'
|
2
|
+
|
3
|
+
describe VimSdk::Soap::StubAdapter do
|
4
|
+
it "should send a method invocation"
|
5
|
+
it "should send a property invocation"
|
6
|
+
it "should expose the underlying cookie"
|
7
|
+
it "should serialize a plain argument"
|
8
|
+
it "should serialize an array argument"
|
9
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper'
|
2
|
+
|
3
|
+
describe VimSdk::Vmodl::DataObject do
|
4
|
+
it "should provide the property list in the right order"
|
5
|
+
it "should return properties by name"
|
6
|
+
it "should return properties by WSDL name"
|
7
|
+
it "should initialize default values"
|
8
|
+
it "should let you initialize with a hash of properties"
|
9
|
+
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper'
|
2
|
+
|
3
|
+
describe VimSdk::Vmodl::ManagedObject do
|
4
|
+
it "should invoke a managed method"
|
5
|
+
it "should invoke a managed property"
|
6
|
+
it "should return the managed object id"
|
7
|
+
it "should allow a ManagedObject to be a hash key"
|
8
|
+
end
|
9
|
+
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../spec_helper'
|
2
|
+
|
3
|
+
describe VimSdk::VmodlHelper do
|
4
|
+
describe :camelize do
|
5
|
+
it "should camelize simple forms" do
|
6
|
+
VimSdk::VmodlHelper.camelize("Foo").should == "Foo"
|
7
|
+
VimSdk::VmodlHelper.camelize("foo").should == "Foo"
|
8
|
+
VimSdk::VmodlHelper.camelize("foo_bar").should == "FooBar"
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
describe :underscore do
|
13
|
+
it "should underscore simple forms" do
|
14
|
+
VimSdk::VmodlHelper.underscore("test").should == "test"
|
15
|
+
VimSdk::VmodlHelper.underscore("thisIsAProperty").should == "this_is_a_property"
|
16
|
+
end
|
17
|
+
|
18
|
+
it "should underscore exceptional forms" do
|
19
|
+
VimSdk::VmodlHelper.underscore("numCPUs").should == "num_cpus"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
describe :vmodl_type_to_ruby do
|
24
|
+
it "should convert VMODL type name to ruby" do
|
25
|
+
VimSdk::VmodlHelper.vmodl_type_to_ruby("vmodl.query.PropertyCollector.Change.Op").should ==
|
26
|
+
"Vmodl.Query.PropertyCollector.Change.Op"
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
describe :vmodl_property_to_ruby do
|
31
|
+
it "should convert VMODL property name to ruby" do
|
32
|
+
VimSdk::VmodlHelper.vmodl_property_to_ruby("testProperty").should == "test_property"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
@@ -0,0 +1,33 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../spec_helper'
|
2
|
+
|
3
|
+
describe VimSdk::VmomiSupport do
|
4
|
+
describe :qualified_wsdl_name do
|
5
|
+
it "should provide qualified WSDL names for builtin types"
|
6
|
+
it "should provide qualified WSDL names for array types"
|
7
|
+
it "should provide qualified WSDL names for object types"
|
8
|
+
end
|
9
|
+
|
10
|
+
describe :wsdl_name do
|
11
|
+
it "should provide WSDL names for builtin types"
|
12
|
+
it "should provide WSDL names for array types"
|
13
|
+
it "should provide WSDL names for object types"
|
14
|
+
end
|
15
|
+
|
16
|
+
describe :guess_wsdl_type do
|
17
|
+
it "should guess the WSDL type based on an unqualified name"
|
18
|
+
end
|
19
|
+
|
20
|
+
describe :compatible_type do
|
21
|
+
it "should return itself if the version is compatible"
|
22
|
+
it "should return a compatible type if this is not available in the current version"
|
23
|
+
end
|
24
|
+
|
25
|
+
describe :wsdl_namespace do
|
26
|
+
it "should provide the WSDL namespace for a version"
|
27
|
+
end
|
28
|
+
|
29
|
+
describe :version_namespace do
|
30
|
+
it "should provide the version namespace"
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
metadata
ADDED
@@ -0,0 +1,121 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ruby_vim_sdk
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- VMware
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-04-11 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: builder
|
16
|
+
requirement: &70144442715780 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *70144442715780
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: httpclient
|
27
|
+
requirement: &70144442715300 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
type: :runtime
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *70144442715300
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: nokogiri
|
38
|
+
requirement: &70144442714840 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
44
|
+
type: :runtime
|
45
|
+
prerelease: false
|
46
|
+
version_requirements: *70144442714840
|
47
|
+
description: BOSH vSphere API client
|
48
|
+
email: support@vmware.com
|
49
|
+
executables: []
|
50
|
+
extensions: []
|
51
|
+
extra_rdoc_files: []
|
52
|
+
files:
|
53
|
+
- lib/ruby_vim_sdk.rb
|
54
|
+
- lib/ruby_vim_sdk/base_type.rb
|
55
|
+
- lib/ruby_vim_sdk/const.rb
|
56
|
+
- lib/ruby_vim_sdk/core_types.rb
|
57
|
+
- lib/ruby_vim_sdk/data_type.rb
|
58
|
+
- lib/ruby_vim_sdk/enum_type.rb
|
59
|
+
- lib/ruby_vim_sdk/ext.rb
|
60
|
+
- lib/ruby_vim_sdk/managed_type.rb
|
61
|
+
- lib/ruby_vim_sdk/method.rb
|
62
|
+
- lib/ruby_vim_sdk/missing_types.rb
|
63
|
+
- lib/ruby_vim_sdk/property.rb
|
64
|
+
- lib/ruby_vim_sdk/server_objects.rb
|
65
|
+
- lib/ruby_vim_sdk/soap/deserializer.rb
|
66
|
+
- lib/ruby_vim_sdk/soap/serializer.rb
|
67
|
+
- lib/ruby_vim_sdk/soap/stub_adapter.rb
|
68
|
+
- lib/ruby_vim_sdk/soap_exception.rb
|
69
|
+
- lib/ruby_vim_sdk/typed_array.rb
|
70
|
+
- lib/ruby_vim_sdk/types.rb
|
71
|
+
- lib/ruby_vim_sdk/version.rb
|
72
|
+
- lib/ruby_vim_sdk/vmodl/data_object.rb
|
73
|
+
- lib/ruby_vim_sdk/vmodl/managed_object.rb
|
74
|
+
- lib/ruby_vim_sdk/vmodl/method_name.rb
|
75
|
+
- lib/ruby_vim_sdk/vmodl/property_path.rb
|
76
|
+
- lib/ruby_vim_sdk/vmodl/type_name.rb
|
77
|
+
- lib/ruby_vim_sdk/vmodl_helper.rb
|
78
|
+
- lib/ruby_vim_sdk/vmomi_support.rb
|
79
|
+
- README
|
80
|
+
- Rakefile
|
81
|
+
- spec/spec_helper.rb
|
82
|
+
- spec/unit/soap/deserializer_spec.rb
|
83
|
+
- spec/unit/soap/serializer_spec.rb
|
84
|
+
- spec/unit/soap/stub_adapter_spec.rb
|
85
|
+
- spec/unit/vmodl/data_object_spec.rb
|
86
|
+
- spec/unit/vmodl/managed_object_spec.rb
|
87
|
+
- spec/unit/vmodl_helper_spec.rb
|
88
|
+
- spec/unit/vmomi_support_spec.rb
|
89
|
+
homepage: http://www.vmware.com
|
90
|
+
licenses: []
|
91
|
+
post_install_message:
|
92
|
+
rdoc_options: []
|
93
|
+
require_paths:
|
94
|
+
- lib
|
95
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
96
|
+
none: false
|
97
|
+
requirements:
|
98
|
+
- - ! '>='
|
99
|
+
- !ruby/object:Gem::Version
|
100
|
+
version: '0'
|
101
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
102
|
+
none: false
|
103
|
+
requirements:
|
104
|
+
- - ! '>='
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
version: '0'
|
107
|
+
requirements: []
|
108
|
+
rubyforge_project:
|
109
|
+
rubygems_version: 1.8.12
|
110
|
+
signing_key:
|
111
|
+
specification_version: 3
|
112
|
+
summary: BOSH vSphere API client
|
113
|
+
test_files:
|
114
|
+
- spec/spec_helper.rb
|
115
|
+
- spec/unit/soap/deserializer_spec.rb
|
116
|
+
- spec/unit/soap/serializer_spec.rb
|
117
|
+
- spec/unit/soap/stub_adapter_spec.rb
|
118
|
+
- spec/unit/vmodl/data_object_spec.rb
|
119
|
+
- spec/unit/vmodl/managed_object_spec.rb
|
120
|
+
- spec/unit/vmodl_helper_spec.rb
|
121
|
+
- spec/unit/vmomi_support_spec.rb
|