import gi
gi.require_version('RwTypes', '1.0')
-gi.require_version('RwsdnYang', '1.0')
+gi.require_version('RwsdnalYang', '1.0')
gi.require_version('RwSdn', '1.0')
gi.require_version('RwTopologyYang','1.0')
GObject,
RwSdn, # Vala package
RwTypes,
- RwsdnYang,
+ RwsdnalYang,
RwTopologyYang as RwTl,
)
"""
Validate the SDN account credentials by accessing the rest API using the provided credentials
"""
- status = RwsdnYang.SdnConnectionStatus()
+ status = RwsdnalYang.SdnConnectionStatus()
url = '{}/{}'.format(account.odl.url,"restconf")
try:
r=requests.get(url,auth=(account.odl.username,account.odl.password))
status.status = "failure"
status.details = "Connection Failed (Invlaid URL): %s" % str(e)
else:
- print("SDN Successfully connected")
status.status = "success"
status.details = "Connection was successful"
self.delete_all_sf(account)
def _fill_rsp_list(self,sfc_rsp_list,sff_list):
- vnffg_rsps = RwsdnYang.VNFFGRenderedPaths()
+ vnffg_rsps = RwsdnalYang.VNFFGRenderedPaths()
for sfc_rsp in sfc_rsp_list['rendered-service-paths']['rendered-service-path']:
rsp = vnffg_rsps.vnffg_rendered_path.add()
rsp.name = sfc_rsp['name']