projects
/
osm
/
osmclient.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bug 376 fix
[osm/osmclient.git]
/
osmclient
/
scripts
/
osm.py
diff --git
a/osmclient/scripts/osm.py
b/osmclient/scripts/osm.py
index
dee931f
..
23f6889
100755
(executable)
--- a/
osmclient/scripts/osm.py
+++ b/
osmclient/scripts/osm.py
@@
-36,6
+36,11
@@
import time
envvar='OSM_SO_PORT',
help='hostname of server. ' +
'Also can set OSM_SO_PORT in environment')
envvar='OSM_SO_PORT',
help='hostname of server. ' +
'Also can set OSM_SO_PORT in environment')
+@click.option('--so-project',
+ default='default',
+ envvar='OSM_SO_PROJECT',
+ help='Project Name in SO. ' +
+ 'Also can set OSM_SO_PROJECT in environment')
@click.option('--ro-hostname',
default=None,
envvar='OSM_RO_HOSTNAME',
@click.option('--ro-hostname',
default=None,
envvar='OSM_RO_HOSTNAME',
@@
-47,7
+52,7
@@
import time
help='hostname of RO server. ' +
'Also can set OSM_RO_PORT in environment')
@click.pass_context
help='hostname of RO server. ' +
'Also can set OSM_RO_PORT in environment')
@click.pass_context
-def cli(ctx, hostname, so_port, ro_hostname, ro_port):
+def cli(ctx, hostname, so_port,
so_project,
ro_hostname, ro_port):
if hostname is None:
print(
"either hostname option or OSM_HOSTNAME " +
if hostname is None:
print(
"either hostname option or OSM_HOSTNAME " +
@@
-56,6
+61,7
@@
def cli(ctx, hostname, so_port, ro_hostname, ro_port):
ctx.obj = client.Client(
host=hostname,
so_port=so_port,
ctx.obj = client.Client(
host=hostname,
so_port=so_port,
+ so_project=so_project,
ro_host=ro_hostname,
ro_port=ro_port)
ro_host=ro_hostname,
ro_port=ro_port)
@@
-454,9
+460,12
@@
def vim_delete(ctx, name):
@cli.command(name='vim-list')
@cli.command(name='vim-list')
+@click.option('--ro_update/--no_ro_update',
+ default=False,
+ help='update list from RO')
@click.pass_context
@click.pass_context
-def vim_list(ctx):
- resp = ctx.obj.vim.list()
+def vim_list(ctx
, ro_update
):
+ resp = ctx.obj.vim.list(
ro_update
)
table = PrettyTable(['vim name', 'uuid'])
for vim in resp:
table.add_row([vim['name'], vim['uuid']])
table = PrettyTable(['vim name', 'uuid'])
for vim in resp:
table.add_row([vim['name'], vim['uuid']])