vmesh 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile.lock +4 -4
- data/README.md +11 -7
- data/lib/vmesh/commands/df.rb +3 -2
- data/lib/vmesh/version.rb +1 -1
- data/lib/vmesh/vsphere.rb +1 -0
- metadata +2 -2
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
vmesh (0.1.
|
4
|
+
vmesh (0.1.4)
|
5
5
|
gli (= 2.9.0)
|
6
6
|
highline (~> 1.6)
|
7
7
|
logger (= 1.2.8)
|
@@ -33,13 +33,13 @@ GEM
|
|
33
33
|
json (1.8.1)
|
34
34
|
logger (1.2.8)
|
35
35
|
metaclass (0.0.4)
|
36
|
-
mini_portile (0.6.
|
36
|
+
mini_portile (0.6.1)
|
37
37
|
mocha (1.0.0)
|
38
38
|
metaclass (~> 0.0.1)
|
39
39
|
multi_json (1.10.0)
|
40
40
|
multi_test (0.1.1)
|
41
|
-
nokogiri (1.6.
|
42
|
-
mini_portile (
|
41
|
+
nokogiri (1.6.4.1)
|
42
|
+
mini_portile (~> 0.6.0)
|
43
43
|
rake (10.3.1)
|
44
44
|
rbvmomi (1.8.2)
|
45
45
|
builder
|
data/README.md
CHANGED
@@ -104,21 +104,24 @@ Help on a specific command
|
|
104
104
|
### Create or clone
|
105
105
|
|
106
106
|
###### IP Handling
|
107
|
-
|
107
|
+
|
108
|
+
Assuming you have a custom spec defined vmesh can set the IP Address like
|
109
|
+
```
|
110
|
+
vmesh create vmweb01 linux --ip_address='192.168.0.10'
|
111
|
+
```
|
112
|
+
|
113
|
+
When creating multiple servers vmesh automatically increments the IP Address, e.g.
|
108
114
|
```
|
109
|
-
vmesh create vmweb01,vmweb02 linux --ip_address='192.168.0.10'
|
115
|
+
vmesh create "vmweb01,vmweb02" linux --ip_address='192.168.0.10'
|
110
116
|
```
|
111
|
-
|
117
|
+
creates the following servers
|
112
118
|
|| server name || ip ||
|
113
119
|
| vmweb01 | 192.168.0.10 |
|
114
120
|
| vmweb02 | 192.168.0.11 |
|
115
121
|
|
116
|
-
Of course you can just comma separate the IPs too
|
117
|
-
```
|
118
|
-
vmesh create vmweb01,vmweb02 linux --ip_address='192.168.0.10','192.168.0.11'
|
119
|
-
```
|
120
122
|
|
121
123
|
###### How vmesh deals with datastores
|
124
|
+
|
122
125
|
When specifying datastore vmesh will use a datastore matching name exactly, if it doesn't find a match it will gets all datastores with this string in their name then uses the one with the most free space.
|
123
126
|
|
124
127
|
```
|
@@ -126,6 +129,7 @@ When specifying datastore vmesh will use a datastore matching name exactly, if i
|
|
126
129
|
```
|
127
130
|
e.g. for the above, if datastores exist with names FIRST_SEARCH_STRING, ANOTHER_SEARCH_STRING it will find both (as they both contain "SEARCH_STRING") then use the one with the most free space.
|
128
131
|
|
132
|
+
|
129
133
|
### Power
|
130
134
|
|
131
135
|
To change the power state of a VM
|
data/lib/vmesh/commands/df.rb
CHANGED
@@ -14,8 +14,9 @@ command [:df,:diskspace] do |c|
|
|
14
14
|
end
|
15
15
|
puts '%-30.30s%15.15s%15.15s%15.15s%8.8s' % ["Name","Size","Available","Used","Use%"]
|
16
16
|
all_datastores.each do |ds|
|
17
|
-
|
18
|
-
|
17
|
+
ds_used = ds.capacity - ds.free_space
|
18
|
+
pc_used = (ds_used.to_i * 100) / ds.capacity.to_i
|
19
|
+
puts '%-30.30s%15.15s%15.15s%15.15s%8.8s' % ["#{ds.name}","#{ds.capacity}","#{ds.free_space}","#{ds_used}","#{pc_used}%"]
|
19
20
|
end
|
20
21
|
end
|
21
22
|
end
|
data/lib/vmesh/version.rb
CHANGED
data/lib/vmesh/vsphere.rb
CHANGED
@@ -13,6 +13,7 @@ module Vmesh
|
|
13
13
|
:password => connection_options[:password],
|
14
14
|
:datacenter => connection_options[:datacenter],
|
15
15
|
:host => connection_options[:host],
|
16
|
+
:resource_pool => connection_options[:resource_pool],
|
16
17
|
:insecure => connection_options[:insecure],
|
17
18
|
}
|
18
19
|
@vim = RbVmomi::VIM.connect opts
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vmesh
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-11-
|
12
|
+
date: 2014-11-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|