Skip to content
Snippets Groups Projects
Commit 88ff0707 authored by marchettim's avatar marchettim Committed by Gerrit Code Review
Browse files

Merge changes I4396d3ef,I1f9ce570

* changes:
  Update ping/pong example for R3
  Fix error raising interface
parents 2cea6a01 4396d3ef
No related branches found
No related tags found
No related merge requests found
......@@ -74,6 +74,7 @@ nsd:nsd-catalog:
description: Management VL
name: mgmt_vl
short-name: mgmt_vl
vim-network-name: mgmt
type: ELAN
vendor: RIFT.io
version: '1.0'
......
......@@ -31,7 +31,6 @@ vnfd:vnfd-catalog:
type: VPORT
http-endpoint:
- path: api/v1/ping/stats
polling_interval_secs: '2'
port: '18888'
mgmt-interface:
dashboard-params:
......@@ -50,11 +49,13 @@ vnfd:vnfd-catalog:
count: '1'
interface:
- name: eth0
position: 0
type: EXTERNAL
virtual-interface:
type: VIRTIO
external-connection-point-ref: ping_vnfd/cp0
- name: eth1
position: 1
type: EXTERNAL
virtual-interface:
type: VIRTIO
......@@ -67,7 +68,7 @@ vnfd:vnfd-catalog:
storage-gb: '4'
vcpu-count: '1'
vnf-configuration:
service-primitive:
config-primitive:
- name: start
- name: stop
- name: restart
......
......@@ -31,7 +31,6 @@ vnfd:vnfd-catalog:
type: VPORT
http-endpoint:
- path: api/v1/pong/stats
polling_interval_secs: '2'
port: '18889'
mgmt-interface:
dashboard-params:
......@@ -50,11 +49,13 @@ vnfd:vnfd-catalog:
count: '1'
interface:
- name: eth0
position: 0
type: EXTERNAL
virtual-interface:
type: VIRTIO
external-connection-point-ref: pong_vnfd/cp0
- name: eth1
position: 1
type: EXTERNAL
virtual-interface:
type: VIRTIO
......@@ -67,7 +68,7 @@ vnfd:vnfd-catalog:
storage-gb: '4'
vcpu-count: '1'
vnf-configuration:
service-primitive:
config-primitive:
- name: start
- name: stop
- name: restart
......
......@@ -63,16 +63,16 @@ def start():
remove_flag('actions.start')
return
# Attempt to raise the non-mgmt interface, but ignore failures if
# the interface is already up.
try:
cmd = "sudo timeout 30 /sbin/ifup eth1"
cmd = "sudo timeout 30 /sbin/ifup eth1"
result, err = charms.sshproxy._run(cmd)
except Exception as e:
action_fail('command failed: {}, errors: {}'.format(e, e.output))
remove_flag('actions.start')
return
pass
try:
cmd = "sudo timeout 30 /usr/bin/systemctl start {}". \
cmd = "sudo timeout 30 /usr/bin/systemctl start {}". \
format(cfg['mode'])
result, err = charms.sshproxy._run(cmd)
except Exception as e:
......
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