dunst 0.0.2 → 0.0.3
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.
- checksums.yaml +4 -4
- data/README.md +110 -0
- data/bin/dunst +6 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0605ff0137a017b0598809b50eed7c87bd4252f3
|
4
|
+
data.tar.gz: 1b3c19f76d20a856786b88f3c1f3e945d9ef5cf7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e37138c6170a389d90a2f2c1f5575c69a1f598006155e827a436a97c567765a46f3bf27faa742b7c2c6e40d83820dc6b330a5314a39ee2a5bc3f8eb7c952034
|
7
|
+
data.tar.gz: 0ac7e745a427600dbea4b5fb2a0183f75455db0e6fb1f7687388d1090763a8a604a01fcf0953d1fd6699b68211a0e29b0c5fbfe4bd2df8261a6bf1f659e641e0
|
data/README.md
CHANGED
@@ -1,3 +1,113 @@
|
|
1
1
|
# Dunst
|
2
2
|
|
3
3
|
Simple cloud management tool using SSH and VMWare Workstation. Supporting clone, start and stop of VMs.
|
4
|
+
|
5
|
+
## Usage
|
6
|
+
|
7
|
+
Call the ```dunst``` command for one server like this:
|
8
|
+
|
9
|
+
```
|
10
|
+
dunst 192.168.0.1 user password cmd
|
11
|
+
```
|
12
|
+
|
13
|
+
### List available machines
|
14
|
+
|
15
|
+
To get a list of all available machines:
|
16
|
+
|
17
|
+
```
|
18
|
+
dunst 192.168.0.1 user password list
|
19
|
+
```
|
20
|
+
|
21
|
+
Returns:
|
22
|
+
|
23
|
+
```
|
24
|
+
Count 3
|
25
|
+
ID VMX STATE MAC IP
|
26
|
+
35986813758351367565 /home/dabo/vms/vmx/35986813758351367565/35986813758351367565.vmx halt 00:50:56:2e:c8:ad
|
27
|
+
46478391399632621556 /home/dabo/vms/vmx/46478391399632621556/46478391399632621556.vmx run 00:50:50:2e:c8:ac 172.23.0.170
|
28
|
+
94165679480162074298 /home/dabo/vms/vmx/94165679480162074298/94165679480162074298.vmx halt 00:50:51:2e:c8:ad
|
29
|
+
```
|
30
|
+
|
31
|
+
### Create new machine
|
32
|
+
|
33
|
+
To create a new machine:
|
34
|
+
|
35
|
+
```
|
36
|
+
dunst 192.168.0.1 user password new
|
37
|
+
```
|
38
|
+
|
39
|
+
Returns:
|
40
|
+
|
41
|
+
```
|
42
|
+
OK 98680029932821660268
|
43
|
+
```
|
44
|
+
|
45
|
+
### Boot a machine
|
46
|
+
|
47
|
+
To start a machine:
|
48
|
+
|
49
|
+
```
|
50
|
+
dunst 192.168.0.1 user password start 98680029932821660268
|
51
|
+
```
|
52
|
+
|
53
|
+
Returns:
|
54
|
+
|
55
|
+
```
|
56
|
+
OK 98680029932821660268
|
57
|
+
```
|
58
|
+
|
59
|
+
### Shutdown
|
60
|
+
|
61
|
+
To shutdown a machine (soft shutdown):
|
62
|
+
|
63
|
+
```
|
64
|
+
dunst 192.168.0.1 user password halt 98680029932821660268
|
65
|
+
```
|
66
|
+
|
67
|
+
Returns:
|
68
|
+
|
69
|
+
```
|
70
|
+
OK 98680029932821660268
|
71
|
+
```
|
72
|
+
|
73
|
+
### Power Off
|
74
|
+
|
75
|
+
To power off a machine (hard shutdown):
|
76
|
+
|
77
|
+
```
|
78
|
+
dunst 192.168.0.1 user password stop 98680029932821660268
|
79
|
+
```
|
80
|
+
|
81
|
+
Returns:
|
82
|
+
|
83
|
+
```
|
84
|
+
OK 98680029932821660268
|
85
|
+
```
|
86
|
+
|
87
|
+
### Reboot
|
88
|
+
|
89
|
+
To reboot a machine (soft reboot):
|
90
|
+
|
91
|
+
```
|
92
|
+
dunst 192.168.0.1 user password reboot 98680029932821660268
|
93
|
+
```
|
94
|
+
|
95
|
+
Returns:
|
96
|
+
|
97
|
+
```
|
98
|
+
OK 98680029932821660268
|
99
|
+
```
|
100
|
+
|
101
|
+
### Reset
|
102
|
+
|
103
|
+
To reset a machine (hard reboot):
|
104
|
+
|
105
|
+
```
|
106
|
+
dunst 192.168.0.1 user password reset 98680029932821660268
|
107
|
+
```
|
108
|
+
|
109
|
+
Returns:
|
110
|
+
|
111
|
+
```
|
112
|
+
OK 98680029932821660268
|
113
|
+
```
|
data/bin/dunst
CHANGED
@@ -28,7 +28,12 @@ end
|
|
28
28
|
|
29
29
|
def get_ip(mac)
|
30
30
|
Net::SSH.start(DHCP_HOST, USER, :password => KEY) do |ssh|
|
31
|
-
exe(ssh, "cat /var/log/syslog | grep #{mac} | grep DHCPACK | tail -n1
|
31
|
+
l = exe(ssh, "cat /var/log/syslog | grep #{mac} | grep DHCPACK | tail -n1")
|
32
|
+
if l.match(/on\s([0-9\.]*)\s/)
|
33
|
+
$1
|
34
|
+
else
|
35
|
+
''
|
36
|
+
end
|
32
37
|
end
|
33
38
|
end
|
34
39
|
|