#!/usr/bin/env python
# -*- coding: utf-8 -*-
+from __future__ import print_function
+
from copy import deepcopy
from lxml import etree
schema = 'https://github.com/fp7-ofelia/ocf/blob/ocf.rspecs/openflow/schemas/ad.xsd'
namespace = 'openflow'
extensions = {}
- namespaces = dict(extensions.items() + [('default', namespace)])
+ namespaces = dict(list(extensions.items()) + [('default', namespace)])
#template = '<RSpec type="%s"></RSpec>' % type
template = '<rspec></rspec>'
# Network
def get_networks(self):
- raise Exception, "Not implemented"
+ raise Exception("Not implemented")
network_elems = self.xml.xpath('//network')
networks = [network_elem.get_instance(fields=['name', 'slice']) for \
network_elem in network_elems]
def add_network(self, network):
- raise Exception, "Not implemented"
+ raise Exception("Not implemented")
network_tags = self.xml.xpath('//network[@name="%s"]' % network)
if not network_tags:
network_tag = self.xml.add_element('network', name=network)
import pprint
from sfa.rspecs.rspec import RSpec
from sfa.rspecs.rspec_elements import *
- print "main ofeliav1"
+ print("main ofeliav1")
if len(sys.argv)!=2:
r = RSpec('/tmp/resources.rspec')
else: