File tree Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Expand file tree Collapse file tree 3 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 19
19
CloudStackException ,
20
20
read_config ,
21
21
)
22
+ from .version import __version__
22
23
23
24
24
25
__all__ = [
@@ -51,7 +52,7 @@ def _format_json(data, theme):
51
52
52
53
53
54
def main (args = None ):
54
- parser = argparse .ArgumentParser (description = "Cloustack client." )
55
+ parser = argparse .ArgumentParser (description = "Cloudstack client." )
55
56
parser .add_argument (
56
57
"--region" ,
57
58
"-r" ,
@@ -92,7 +93,15 @@ def main(args=None):
92
93
help = "trace the HTTP requests done on stderr" ,
93
94
)
94
95
parser .add_argument (
95
- "command" , metavar = "COMMAND" , help = "Cloudstack API command to execute"
96
+ "command" ,
97
+ metavar = "COMMAND" ,
98
+ help = "Cloudstack API command to execute" ,
99
+ )
100
+
101
+ parser .add_argument (
102
+ "--version" ,
103
+ action = "version" ,
104
+ version = __version__ ,
96
105
)
97
106
98
107
def parse_option (x ):
@@ -111,6 +120,7 @@ def parse_option(x):
111
120
)
112
121
113
122
options = parser .parse_args (args = args )
123
+
114
124
command = options .command
115
125
kwargs = defaultdict (set )
116
126
for arg in options .arguments :
@@ -128,8 +138,10 @@ def parse_option(x):
128
138
129
139
if options .post :
130
140
config ["method" ] = "post"
141
+
131
142
if options .trace :
132
143
config ["trace" ] = True
144
+
133
145
cs = CloudStack (** config )
134
146
ok = True
135
147
response = None
Original file line number Diff line number Diff line change
1
+ __version__ = "3.3.1"
Original file line number Diff line number Diff line change 1
1
[metadata]
2
2
name = cs
3
- version = 3.3.0
3
+ version = 3.3.1
4
4
url = https://github.com/ngine-io/cs
5
5
author = Bruno Renié
6
6
description = A simple yet powerful CloudStack API client for Python and the command-line.
You can’t perform that action at this time.
0 commit comments