Skip to content
Snippets Groups Projects
Commit 47cb7efc authored by =Rajesh Velandy's avatar =Rajesh Velandy
Browse files

Pulled new Charm for VyOS and fixed space in VNF name

parent 2d9d1647
No related branches found
No related tags found
No related merge requests found
Showing
with 16 additions and 10 deletions
vnfd:vnfd-catalog:
vnfd:
- id: VyOS
name: VyOS Router
short-name: VyOS Router
name: VyOS
short-name: VyOS
description: VyOS Router
logo: osm_2x.png
mgmt-interface:
......
"options":
"vyos-proxy": {}
"basic":
"packages":
- "python-dev"
- "libffi-dev"
- "libssl-dev"
"use_venv": !!bool "false"
"packages": []
"include_system_packages": !!bool "false"
"vyos-proxy": {}
"includes":
- "layer:basic"
"is": "vyos-proxy"
......@@ -41,13 +41,13 @@ def vyos_proxy_ready():
set_flag('vyos-proxy.ready')
@when('action.ping')
@when('actions.ping')
@when_not('vyos-proxy.configured')
def pingme():
action_fail('proxy is not ready')
@when('action.ping')
@when('actions.ping')
@when('vyos-proxy.configured')
def pingme_forreal():
try:
......@@ -55,10 +55,10 @@ def pingme_forreal():
except:
action_fail('ping command failed')
finally:
remove_flag('action.ping')
remove_flag('actions.ping')
# Here you can send results back from ping, if you had time to parse it
action_set(result)
action_set({'output': result})
......@@ -83,8 +83,11 @@ def run(cmd):
client = paramiko.SSHClient()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
client.connect(cfg.get('hostname'), port=22,
username=cfg.get('user'), password=cfg.get('pass'))
try:
client.connect(cfg.get('hostname'), port=22,
username=cfg.get('user'), password=cfg.get('pass'))
except paramiko.ssh_exception.AuthenticationException:
raise MgmtNotConfigured('invalid credentials')
stdin, stdout, stderr = client.exec_command(cmd)
retcode = stdout.channel.recv_exit_status()
......
File added
File added
File added
File added
File added
File added
File added
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment