projects
/
osm
/
SO.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
BUG 386 update to new RIFT platform
[osm/SO.git]
/
rwlaunchpad
/
ra
/
pytest
/
test_failover.py
diff --git
a/rwlaunchpad/ra/pytest/test_failover.py
b/rwlaunchpad/ra/pytest/test_failover.py
index
40dd7d0
..
d24fbff
100755
(executable)
--- a/
rwlaunchpad/ra/pytest/test_failover.py
+++ b/
rwlaunchpad/ra/pytest/test_failover.py
@@
-20,15
+20,17
@@
@brief System test of stopping launchpad on master and
validating configuration on standby
"""
@brief System test of stopping launchpad on master and
validating configuration on standby
"""
+import argparse
+import gi
import os
import os
+import subprocess
import sys
import time
import sys
import time
-import argparse
-import subprocess
-import gi
-from gi.repository import RwVnfdYang
+from gi.repository import RwProjectVnfdYang
from gi.repository import RwVnfrYang
from gi.repository import RwVnfrYang
+gi.require_version('RwKeyspec', '1.0')
+from gi.repository.RwKeyspec import quoted_key
import rift.auto.proxy
from rift.auto.session import NetconfSession
import rift.auto.proxy
from rift.auto.session import NetconfSession
@@
-46,10
+48,10
@@
def yield_vnfd_vnfr_pairs(proxy, nsr=None):
Tuple: VNFD and its corresponding VNFR entry
"""
def get_vnfd(vnfd_id):
Tuple: VNFD and its corresponding VNFR entry
"""
def get_vnfd(vnfd_id):
- xpath = "/
vnfd-catalog/vnfd[id='{}']".format(vnfd_id
)
- return proxy(RwVnfdYang).get(xpath)
+ xpath = "/
rw-project:project[rw-project:name='default']/vnfd-catalog/vnfd[id={}]".format(quoted_key(vnfd_id)
)
+ return proxy(Rw
Project
VnfdYang).get(xpath)
- vnfr = "/vnfr-catalog/vnfr"
+ vnfr = "/
rw-project:project[rw-project:name='default']/
vnfr-catalog/vnfr"
print ("START")
vnfrs = proxy(RwVnfrYang).get(vnfr, list_obj=True)
print ("STOP")
print ("START")
vnfrs = proxy(RwVnfrYang).get(vnfr, list_obj=True)
print ("STOP")
@@
-60,7
+62,7
@@
def yield_vnfd_vnfr_pairs(proxy, nsr=None):
if vnfr.id not in const_vnfr_ids:
continue
if vnfr.id not in const_vnfr_ids:
continue
- vnfd = get_vnfd(vnfr.vnfd
_ref
)
+ vnfd = get_vnfd(vnfr.vnfd
.id
)
yield vnfd, vnfr
def check_configuration_on_standby(standby_ip):
yield vnfd, vnfr
def check_configuration_on_standby(standby_ip):