Skip to content

Test OF Config with LINC

YAMAMOTO Takashi edited this page Sep 5, 2013 · 6 revisions

Testing OF-config support with LINC

This page describes how to setup LINC and test Ryu OF-config with it.

The procedure is as follows. Although all the procedure is written for reader's convenience, please refer to LINC document for latest informations of LINC. https://github.com/FlowForwarding/LINC-Switch

The test procedure

  • install Erlang environment
  • build LINC
  • configure LINC switch
  • setup for LINC
  • run LINC switch
  • run Ryu test_of_config app

For getting/installing Ryu itself, please refer to http://osrg.github.io/ryu/

Install Erlang environment

Since LINC is written in Erlang, you need to install Erlang execution
environment. Required version is R15B+.

The easiest way is to use binary package from https://www.erlang-solutions.com/downloads/download-erlang-otp

The distribution may also provide Erlang package.

build LINC

install necessary packages for build

install necessary build tools

On Ubuntu:

# apt-get install git-core bridge-utils libpcap0.8 libpcap-dev libcap2-bin uml-utilities

On RedHat/CentOS:

# yum install git sudo bridge-utils libpcap libpcap-devel libcap tunctl

Note that on RedHat/CentOS 5.x you need a newer version of libpcap:

# yum erase libpcap libpcap-devel
# yum install flex byacc
# wget http://www.tcpdump.org/release/libpcap-1.2.1.tar.gz
# tar xzf libpcap-1.2.1.tar.gz
# cd libpcap-1.2.1
# ./configure
# make && make install

get LINC repo and built

Clone LINC repo:

% git clone git://github.com/FlowForwarding/LINC-Switch.git

Then compile everything:

% cd LINC-Switch
% make

Setup LINC

edit LINC switch configuration file. rel/linc/releases/0.1/sys.config Here is the sample sys.config for test_of_config.py to run.

[
 {linc,
  [
   {of_config, enabled},
   {capable_switch_ports,
    [
      {port, 1, [{interface, "linc-port"}]},
      {port, 2, [{interface, "linc-port2"}]}
    ]},
   {capable_switch_queues,
    [
    ]},
   {logical_switches,
    [
     {switch, 0,
      [
       {backend, linc_us4},
       {controllers,
        [
         {"Switch0-DefaultController", "localhost", 6633, tcp}
        ]},
       {queues_status, disabled},
       {ports, [
                {port, 1, {queues, []}},
                {port, 2, {queues, []}}
               ]}
      ]}
    ]}
  ]},
 {enetconf,
  [
   {capabilities, [{base, {1, 1}},
                   {startup, {1, 0}},
                   {'writable-running', {1, 0}}]},
   {callback_module, linc_ofconfig},
   {sshd_ip, any},
   {sshd_port, 1830},
   {sshd_user_passwords,
    [
     {"linc", "linc"}
    ]}
  ]},
 {lager,
  [
   {handlers,
    [
     {lager_console_backend, info},
     {lager_file_backend,
      [
       {"log/error.log", error, 10485760, "$D0", 5},
       {"log/console.log", info, 10485760, "$D0", 5}
      ]}
    ]}
  ]},
 {sasl,
  [
   {sasl_error_logger, {file, "log/sasl-error.log"}},
   {errlog_type, error},
   {error_logger_mf_dir, "log/sasl"},      % Log directory
   {error_logger_mf_maxbytes, 10485760},   % 10 MB max file size
   {error_logger_mf_maxfiles, 5}           % 5 files max
  ]},
 {sync,
  [
   {excluded_modules, [procket]}
  ]}
 
].

setup for LINC

As the above sys.config requires some network interface, create them:

# ip link add linc-port type veth peer name linc-port-peer
# ip link set linc-port up
# ip link add linc-port2 type veth peer name linc-port-peer2
# ip link set linc-port2 up

After stopping LINC, those created interfaces can be deleted:

# ip link delete linc-port
# ip link delete linc-port2

Starting LINC OpenFlow switch

Then run LINC:

# rel/linc/bin/linc console

Run Ryu test_of_config app

Run test_of_config app:

# ryu-manager --verbose ryu.tests.integrated.test_of_config

If you don't install ryu and are working in the git repo directly:

# PYTHONPATH=. ./bin/ryu-manager --verbose ryu/tests/integrated/test_of_config.py

Here is the sample output

$ PYTHONPATH=. ./bin/ryu-manager --verbose ryu/tests/integrated/test_of_config.py
loading app ryu/tests/integrated/test_of_config.py
loading app ryu.controller.ofp_handler
instantiating app ryu/tests/integrated/test_of_config.py of OFConfigClient
<SSHSession(session, initial daemon)> created: client_capabilities=['urn:ietf:params:netconf:capability:writable-running:1.0', 'urn:ietf:params:netconf:capability:rollback-on-error:1.0', 'urn:ietf:params:netconf:capability:validate:1.0', 'urn:ietf:params:netconf:capability:confirmed-commit:1.0', 'urn:ietf:params:netconf:capability:url:1.0?scheme=http,ftp,file,https,sftp', 'urn:ietf:params:netconf:base:1.0', 'urn:liberouter:params:netconf:capability:power-control:1.0', 'urn:ietf:params:netconf:capability:candidate:1.0', 'urn:ietf:params:netconf:capability:xpath:1.0', 'urn:ietf:params:netconf:capability:startup:1.0', 'urn:ietf:params:netconf:capability:interleave:1.0']
starting thread (client mode): 0x2d04690L
Connected (version 2.0, client Erlang)
kex algos:['diffie-hellman-group1-sha1'] server key:['ssh-rsa', 'ssh-dss'] client encrypt:['aes128-cbc', '3des-cbc'] server encrypt:['aes128-cbc', '3des-cbc'] client mac:['hmac-sha1'] server mac:['hmac-sha1'] client compress:['none', 'zlib'] server compress:['none', 'zlib'] client lang:[''] server lang:[''] kex follows?False
Ciphers agreed: local=aes128-cbc, remote=aes128-cbc
using kex diffie-hellman-group1-sha1; server key type ssh-rsa; cipher: local aes128-cbc, remote aes128-cbc; mac: local hmac-sha1, remote hmac-sha1; compression: local none, remote none
Switch to new keys ...
Trying discovered key 7cffb11bb6d1be10041d72a28448f8b7 in /home/yamahata/.ssh/id_dsa
userauth is OK
Authentication (publickey) failed.
Authentication failed.
userauth is OK
Authentication (password) successful!
[chan 1] Max packet in: 34816 bytes
[chan 1] Max packet out: 32768 bytes
Secsh channel 1 opened.
[chan netconf] Sesch channel 1 request ok
installing listener <ncclient.transport.session.HelloHandler object at 0x2d074d0>
queueing <?xml version='1.0' encoding='UTF-8'?>
<nc:hello xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0"><nc:capabilities><nc:capability>urn:ietf:params:netconf:capability:writable-running:1.0</nc:capability><nc:capability>urn:ietf:params:netconf:capability:rollback-on-error:1.0</nc:capability><nc:capability>urn:ietf:params:netconf:capability:validate:1.0</nc:capability><nc:capability>urn:ietf:params:netconf:capability:confirmed-commit:1.0</nc:capability><nc:capability>urn:ietf:params:netconf:capability:url:1.0?scheme=http,ftp,file,https,sftp</nc:capability><nc:capability>urn:ietf:params:netconf:base:1.0</nc:capability><nc:capability>urn:liberouter:params:netconf:capability:power-control:1.0</nc:capability><nc:capability>urn:ietf:params:netconf:capability:candidate:1.0</nc:capability><nc:capability>urn:ietf:params:netconf:capability:xpath:1.0</nc:capability><nc:capability>urn:ietf:params:netconf:capability:startup:1.0</nc:capability><nc:capability>urn:ietf:params:netconf:capability:interleave:1.0</nc:capability></nc:capabilities></nc:hello>
starting main loop
parsed new message
dispatching message to <ncclient.transport.session.HelloHandler object at 0x2d074d0>: <?xml version="1.0" encoding="UTF-8"?><hello xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><capabilities><capability>urn:ietf:params:netconf:base:1.1</capability><capability>urn:ietf:params:netconf:capability:startup:1.0</capability><capability>urn:ietf:params:netconf:capability:writable-running:1.0</capability></capabilities><session-id>6</session-id></hello>
Sending message
discarding listener <ncclient.transport.session.HelloHandler object at 0x2d074d0>
initialized: session-id=6 | server_capabilities=['urn:ietf:params:netconf:capability:startup:1.0', 'urn:ietf:params:netconf:capability:writable-running:1.0', 'urn:ietf:params:netconf:base:1.1']
instantiating app ryu.controller.ofp_handler of OFPHandler
BRICK OFConfigClient
BRICK ofp_event
  CONSUMES EventOFPHello
  CONSUMES EventOFPErrorMsg
  CONSUMES EventOFPSwitchFeatures
  CONSUMES EventOFPEchoRequest
installing listener <ncclient.operations.rpc.RPCReplyListener object at 0x2d07450>
Requesting 'Get'
queueing <?xml version='1.0' encoding='UTF-8'?>
<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:57bc97fa-a0ca-11e2-a778-0026b9765c81"><nc:get /></nc:rpc>
Sync request, will wait for timeout=30
Sending message
parsed new message
dispatching message to <ncclient.operations.rpc.RPCReplyListener object at 0x2d07450>: <?xml version="1.0" encoding="UTF-8"?><rpc-reply message-id="urn:uuid:57bc97fa-a0ca-11e2-a778-0026b9765c81" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><data><capable-switch xmlns="urn:onf:of111:config:yang"><id>CapableSwitch0</id><resources><port><resource-id>LogicalSwitch0-Port1</resource-id><number>1</number><name>Port1</name><current-rate>5000</current-rate><max-rate>5000</max-rate><configuration><admin-state>down</admin-state><no-receive>false</no-receive><no-forward>false</no-forward><no-packet-in>false</no-packet-in></configuration><state><oper-state>up</oper-state><blocked>false</blocked><live>true</live></state><features><current><rate>100Mb-FD</rate><auto-negotiate>true</auto-negotiate><medium>copper</medium><pause>unsupported</pause></current><advertised><rate>invalid</rate><auto-negotiate>true</auto-negotiate><medium>copper</medium><pause>unsupported</pause></advertised><supported><rate>100Mb-FD</rate><auto-negotiate>true</auto-negotiate><medium>copper</medium><pause>unsupported</pause></supported><advertised-peer><rate>100Mb-FD</rate><auto-negotiate>true</auto-negotiate><medium>copper</medium><pause>unsupported</pause></advertised-peer></features></port><port><resource-id>LogicalSwitch0-Port2</resource-id><number>2</number><name>Port2</name><current-rate>5000</current-rate><max-rate>5000</max-rate><configuration><admin-state>down</admin-state><no-receive>false</no-receive><no-forward>false</no-forward><no-packet-in>false</no-packet-in></configuration><state><oper-state>up</oper-state><blocked>false</blocked><live>true</live></state><features><current><rate>100Mb-FD</rate><auto-negotiate>true</auto-negotiate><medium>copper</medium><pause>unsupported</pause></current><advertised><rate>invalid</rate><auto-negotiate>true</auto-negotiate><medium>copper</medium><pause>unsupported</pause></advertised><supported><rate>100Mb-FD</rate><auto-negotiate>true</auto-negotiate><medium>copper</medium><pause>unsupported</pause></supported><advertised-peer><rate>100Mb-FD</rate><auto-negotiate>true</auto-negotiate><medium>copper</medium><pause>unsupported</pause></advertised-peer></features></port></resources><logical-switches><switch><id>LogicalSwitch0</id><capabilities><max-buffered-packets>0</max-buffered-packets><max-tables>255</max-tables><max-ports>16777216</max-ports><flow-statistics>true</flow-statistics><table-statistics>true</table-statistics><port-statistics>true</port-statistics><group-statistics>true</group-statistics><queue-statistics>true</queue-statistics><reassemble-ip-fragments>false</reassemble-ip-fragments><block-looping-ports>false</block-looping-ports><reserved-port-types><type>all</type><type>controller</type><type>table</type><type>inport</type><type>any</type></reserved-port-types><group-types><type>all</type><type>select</type><type>indirect</type><type>fast-failover</type></group-types><group-capabilities><capability>select-weight</capability><capability>select-liveness</capability><capability>chaining</capability></group-capabilities><action-types><type>output</type><type>group</type><type>set-queue</type><type>set-mpls-ttl</type><type>dec-mpls-ttl</type><type>set-nw-ttl</type><type>dec-nw-ttl</type><type>copy-ttl-out</type><type>copy-ttl-in</type><type>push-vlan</type><type>pop-vlan</type><type>push-mpls</type><type>pop-mpls</type><type>push-pbb</type><type>pop-pbb</type><type>set-field</type></action-types><instruction-types><type>goto-table</type><type>write-metadata</type><type>write-actions</type><type>apply-actions</type><type>clear-actions</type><type>meter</type></instruction-types></capabilities><datapath-id>00:26:B9:76:5C:81:00:00</datapath-id><enabled>true</enabled><check-controller-certificate>false</check-controller-certificate><lost-connection-behavior>failSecureMode</lost-connection-behavior><controllers/><resources><port>LogicalSwitch0-Port1</port><port>LogicalSwitch0-Port2</port></resources></switch></logical-switches></capable-switch></data></rpc-reply>
Delivering to <ncclient.operations.retrieve.Get object at 0x2d07690>
Traceback (most recent call last):
  File "/ryu/tests/integrated/test_of_config.py", line 226, in _validate
    xmlschema.assertValid(tree)
  File "lxml.etree.pyx", line 3017, in lxml.etree._Validator.assertValid (src/lxml/lxml.etree.c:129442)
DocumentInvalid: Element '{urn:onf:of111:config:yang}rate': [facet 'enumeration'] The value 'invalid' is not an element of the set {'10Mb-HD', '10Mb-FD', '100Mb-HD', '100Mb-FD', '1Gb-HD', '1Gb-FD', '10Gb', '40Gb', '100Gb', '1Tb', 'other'}., line 2
set(['urn:onf:of111:config:yang'])
source = running
Requesting 'GetConfig'
queueing <?xml version='1.0' encoding='UTF-8'?>
<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:57d09192-a0ca-11e2-a778-0026b9765c81"><nc:get-config><nc:source><nc:running /></nc:source></nc:get-config></nc:rpc>
Sync request, will wait for timeout=30
Sending message
parsed new message
dispatching message to <ncclient.operations.rpc.RPCReplyListener object at 0x2d07450>: <?xml version="1.0" encoding="UTF-8"?><rpc-reply message-id="urn:uuid:57d09192-a0ca-11e2-a778-0026b9765c81" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><data><capable-switch xmlns="urn:onf:of111:config:yang"><id>CapableSwitch0</id><resources><port><resource-id>LogicalSwitch0-Port1</resource-id><configuration><admin-state>down</admin-state><no-receive>false</no-receive><no-forward>false</no-forward><no-packet-in>false</no-packet-in></configuration><features><advertised><rate>invalid</rate><auto-negotiate>true</auto-negotiate><medium>copper</medium><pause>unsupported</pause></advertised></features></port><port><resource-id>LogicalSwitch0-Port2</resource-id><configuration><admin-state>down</admin-state><no-receive>false</no-receive><no-forward>false</no-forward><no-packet-in>false</no-packet-in></configuration><features><advertised><rate>invalid</rate><auto-negotiate>true</auto-negotiate><medium>copper</medium><pause>unsupported</pause></advertised></features></port></resources><logical-switches><switch><id>LogicalSwitch0</id><datapath-id>00:26:B9:76:5C:81:00:00</datapath-id><controllers/></switch></logical-switches></capable-switch></data></rpc-reply>
Delivering to <ncclient.operations.retrieve.GetConfig object at 0x2d0f550>
Traceback (most recent call last):
  File "/ryu/tests/integrated/test_of_config.py", line 226, in _validate
    xmlschema.assertValid(tree)
  File "lxml.etree.pyx", line 3017, in lxml.etree._Validator.assertValid (src/lxml/lxml.etree.c:129442)
DocumentInvalid: Element '{urn:onf:of111:config:yang}rate': [facet 'enumeration'] The value 'invalid' is not an element of the set {'10Mb-HD', '10Mb-FD', '100Mb-HD', '100Mb-FD', '1Gb-HD', '1Gb-FD', '10Gb', '40Gb', '100Gb', '1Tb', 'other'}., line 2
source = startup
Requesting 'GetConfig'
queueing <?xml version='1.0' encoding='UTF-8'?>
<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:57e446ce-a0ca-11e2-a778-0026b9765c81"><nc:get-config><nc:source><nc:startup /></nc:source></nc:get-config></nc:rpc>
Sync request, will wait for timeout=30
Sending message
parsed new message
dispatching message to <ncclient.operations.rpc.RPCReplyListener object at 0x2d07450>: <?xml version="1.0" encoding="UTF-8"?><rpc-reply message-id="urn:uuid:57e446ce-a0ca-11e2-a778-0026b9765c81" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><data><capable-switch xmlns="urn:onf:of111:config:yang"><id>CapableSwitch0</id><resources><port><resource-id>LogicalSwitch0-Port2</resource-id><configuration><admin-state>up</admin-state><no-receive>false</no-receive><no-forward>false</no-forward><no-packet-in>false</no-packet-in></configuration><features><advertised><rate>100Mb-FD</rate><auto-negotiate>true</auto-negotiate><medium>copper</medium><pause>unsupported</pause></advertised></features></port><port><resource-id>LogicalSwitch0-Port1</resource-id><configuration><admin-state>up</admin-state><no-receive>false</no-receive><no-forward>false</no-forward><no-packet-in>false</no-packet-in></configuration><features><advertised><rate>100Mb-FD</rate><auto-negotiate>true</auto-negotiate><medium>copper</medium><pause>unsupported</pause></advertised></features></port></resources><logical-switches><switch><id>LogicalSwitch0</id><datapath-id>00:26:B9:76:5C:81:00:00</datapath-id><controllers/></switch></logical-switches></capable-switch></data></rpc-reply>
Delivering to <ncclient.operations.retrieve.GetConfig object at 0x2d07fd0>
Traceback (most recent call last):
  File "/ryu/tests/integrated/test_of_config.py", line 226, in _validate
    xmlschema.assertValid(tree)
  File "lxml.etree.pyx", line 3017, in lxml.etree._Validator.assertValid (src/lxml/lxml.etree.c:129442)
DocumentInvalid: Element '{urn:onf:of111:config:yang}controllers': Missing child element(s). Expected is ( {urn:onf:of111:config:yang}controller )., line 2
source = candidate
Requesting 'GetConfig'
queueing <?xml version='1.0' encoding='UTF-8'?>
<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:57efecb8-a0ca-11e2-a778-0026b9765c81"><nc:get-config><nc:source><nc:candidate /></nc:source></nc:get-config></nc:rpc>
Sync request, will wait for timeout=30
Sending message
parsed new message
dispatching message to <ncclient.operations.rpc.RPCReplyListener object at 0x2d07450>: <?xml version="1.0" encoding="UTF-8"?><rpc-reply message-id="urn:uuid:57efecb8-a0ca-11e2-a778-0026b9765c81" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><rpc-error><error-tag>invalid-value</error-tag><error-type>application</error-type><error-severity>error</error-severity></rpc-error></rpc-reply>
Delivering to <ncclient.operations.retrieve.GetConfig object at 0x2d07f50>
Traceback (most recent call last):
  File "/ryu/tests/integrated/test_of_config.py", line 315, in _do_of_config
    self._do_get_config('candidate')
  File "/ryu/tests/integrated/test_of_config.py", line 246, in _do_get_config
    config_xml = self.switch.get_config(source)
  File "/ryu/lib/of_config/capable_switch.py", line 101, in get_config
    reply = self.netconf.get_config(source, filter)
  File "/ryu/contrib/ncclient/manager.py", line 78, in wrapper
    return self.execute(op_cls, *args, **kwds)
  File "/ryu/contrib/ncclient/manager.py", line 132, in execute
    raise_mode=self._raise_mode).request(*args, **kwds)
  File "/ryu/contrib/ncclient/operations/retrieve.py", line 87, in request
    return self._request(node)
  File "/ryu/contrib/ncclient/operations/rpc.py", line 289, in _request
    raise self._reply.error
RPCError: {'info': None, 'severity': 'error', 'tag': 'invalid-value', 'path': None, 'message': None, 'type': 'application'}
Requesting 'EditConfig'
queueing <?xml version='1.0' encoding='UTF-8'?>
<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:ns1="urn:onf:of111:config:yang" message-id="urn:uuid:580361e4-a0ca-11e2-a778-0026b9765c81"><nc:edit-config><nc:target><nc:running /></nc:target><nc:config>
  <ns1:capable-switch>
    <ns1:id>CapableSwitch0</ns1:id>
    <ns1:resources>
      <ns1:port>
        <ns1:resource-id>LogicalSwitch0-Port2</ns1:resource-id>
        <ns1:configuration operation="merge">
          <ns1:admin-state>down</ns1:admin-state>
          <ns1:no-receive>false</ns1:no-receive>
          <ns1:no-forward>false</ns1:no-forward>
          <ns1:no-packet-in>false</ns1:no-packet-in>
        </ns1:configuration>
      </ns1:port>
    </ns1:resources>
  </ns1:capable-switch>
</nc:config></nc:edit-config></nc:rpc>
Sync request, will wait for timeout=30
Sending message
parsed new message
dispatching message to <ncclient.operations.rpc.RPCReplyListener object at 0x2d07450>: <?xml version="1.0" encoding="UTF-8"?><rpc-reply message-id="urn:uuid:580361e4-a0ca-11e2-a778-0026b9765c81" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><ok/></rpc-reply>
Delivering to <ncclient.operations.edit.EditConfig object at 0x2e8bfd0>
Requesting 'EditConfig'
queueing <?xml version='1.0' encoding='UTF-8'?>
<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:ns1="urn:onf:of111:config:yang" message-id="urn:uuid:58163b7a-a0ca-11e2-a778-0026b9765c81"><nc:edit-config><nc:target><nc:running /></nc:target><nc:config>
  <ns1:capable-switch>
    <ns1:id>CapableSwitch0</ns1:id>
    <ns1:resources>
      <ns1:port>
        <ns1:resource-id>LogicalSwitch0-Port2</ns1:resource-id>
        <ns1:features>
          <ns1:advertised operation="merge">
            <ns1:rate>10Mb-FD</ns1:rate>
            <ns1:auto-negotiate>true</ns1:auto-negotiate>
            <ns1:medium>copper</ns1:medium>
            <ns1:pause>unsupported</ns1:pause>
          </ns1:advertised>
        </ns1:features>
      </ns1:port>
    </ns1:resources>
  </ns1:capable-switch>
</nc:config></nc:edit-config></nc:rpc>
Sync request, will wait for timeout=30
Sending message
parsed new message
dispatching message to <ncclient.operations.rpc.RPCReplyListener object at 0x2d07450>: <?xml version="1.0" encoding="UTF-8"?><rpc-reply message-id="urn:uuid:58163b7a-a0ca-11e2-a778-0026b9765c81" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><ok/></rpc-reply>
Delivering to <ncclient.operations.edit.EditConfig object at 0x2e8bfd0>
Requesting 'EditConfig'
queueing <?xml version='1.0' encoding='UTF-8'?>
<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:ns1="urn:onf:of111:config:yang" message-id="urn:uuid:58386c4a-a0ca-11e2-a778-0026b9765c81"><nc:edit-config><nc:target><nc:running /></nc:target><nc:config>
  <ns1:capable-switch>
    <ns1:id>CapableSwitch0</ns1:id>
    <ns1:logical-switches>
      <ns1:switch>
        <ns1:id>LogicalSwitch0</ns1:id>
          <ns1:controllers>
            <ns1:controller operation="merge">
              <ns1:id>Switch0-DefaultController</ns1:id>
              <ns1:role>master</ns1:role>
              <ns1:ip-address>127.0.0.1</ns1:ip-address>
              <ns1:port>6633</ns1:port>
              <ns1:protocol>tcp</ns1:protocol>
            </ns1:controller>
          </ns1:controllers>
      </ns1:switch>
    </ns1:logical-switches>
  </ns1:capable-switch>
</nc:config></nc:edit-config></nc:rpc>
Sync request, will wait for timeout=30
Sending message
parsed new message
dispatching message to <ncclient.operations.rpc.RPCReplyListener object at 0x2d07450>: <?xml version="1.0" encoding="UTF-8"?><rpc-reply message-id="urn:uuid:58386c4a-a0ca-11e2-a778-0026b9765c81" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><ok/></rpc-reply>
Delivering to <ncclient.operations.edit.EditConfig object at 0x2e8bfd0>
Requesting 'Get'
queueing <?xml version='1.0' encoding='UTF-8'?>
<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:5851e35a-a0ca-11e2-a778-0026b9765c81"><nc:get /></nc:rpc>
Sync request, will wait for timeout=30
Sending message
parsed new message
dispatching message to <ncclient.operations.rpc.RPCReplyListener object at 0x2d07450>: <?xml version="1.0" encoding="UTF-8"?><rpc-reply message-id="urn:uuid:5851e35a-a0ca-11e2-a778-0026b9765c81" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><data><capable-switch xmlns="urn:onf:of111:config:yang"><id>CapableSwitch0</id><resources><port><resource-id>LogicalSwitch0-Port1</resource-id><number>1</number><name>Port1</name><current-rate>5000</current-rate><max-rate>5000</max-rate><configuration><admin-state>down</admin-state><no-receive>false</no-receive><no-forward>false</no-forward><no-packet-in>false</no-packet-in></configuration><state><oper-state>up</oper-state><blocked>false</blocked><live>true</live></state><features><current><rate>100Mb-FD</rate><auto-negotiate>true</auto-negotiate><medium>copper</medium><pause>unsupported</pause></current><advertised><rate>invalid</rate><auto-negotiate>true</auto-negotiate><medium>copper</medium><pause>unsupported</pause></advertised><supported><rate>100Mb-FD</rate><auto-negotiate>true</auto-negotiate><medium>copper</medium><pause>unsupported</pause></supported><advertised-peer><rate>100Mb-FD</rate><auto-negotiate>true</auto-negotiate><medium>copper</medium><pause>unsupported</pause></advertised-peer></features></port><port><resource-id>LogicalSwitch0-Port2</resource-id><number>2</number><name>Port2</name><current-rate>5000</current-rate><max-rate>5000</max-rate><configuration><admin-state>down</admin-state><no-receive>false</no-receive><no-forward>false</no-forward><no-packet-in>false</no-packet-in></configuration><state><oper-state>up</oper-state><blocked>false</blocked><live>true</live></state><features><current><rate>100Mb-FD</rate><auto-negotiate>true</auto-negotiate><medium>copper</medium><pause>unsupported</pause></current><advertised><rate>invalid</rate><auto-negotiate>true</auto-negotiate><medium>copper</medium><pause>unsupported</pause></advertised><supported><rate>100Mb-FD</rate><auto-negotiate>true</auto-negotiate><medium>copper</medium><pause>unsupported</pause></supported><advertised-peer><rate>100Mb-FD</rate><auto-negotiate>true</auto-negotiate><medium>copper</medium><pause>unsupported</pause></advertised-peer></features></port></resources><logical-switches><switch><id>LogicalSwitch0</id><capabilities><max-buffered-packets>0</max-buffered-packets><max-tables>255</max-tables><max-ports>16777216</max-ports><flow-statistics>true</flow-statistics><table-statistics>true</table-statistics><port-statistics>true</port-statistics><group-statistics>true</group-statistics><queue-statistics>true</queue-statistics><reassemble-ip-fragments>false</reassemble-ip-fragments><block-looping-ports>false</block-looping-ports><reserved-port-types><type>all</type><type>controller</type><type>table</type><type>inport</type><type>any</type></reserved-port-types><group-types><type>all</type><type>select</type><type>indirect</type><type>fast-failover</type></group-types><group-capabilities><capability>select-weight</capability><capability>select-liveness</capability><capability>chaining</capability></group-capabilities><action-types><type>output</type><type>group</type><type>set-queue</type><type>set-mpls-ttl</type><type>dec-mpls-ttl</type><type>set-nw-ttl</type><type>dec-nw-ttl</type><type>copy-ttl-out</type><type>copy-ttl-in</type><type>push-vlan</type><type>pop-vlan</type><type>push-mpls</type><type>pop-mpls</type><type>push-pbb</type><type>pop-pbb</type><type>set-field</type></action-types><instruction-types><type>goto-table</type><type>write-metadata</type><type>write-actions</type><type>apply-actions</type><type>clear-actions</type><type>meter</type></instruction-types></capabilities><datapath-id>00:26:B9:76:5C:81:00:00</datapath-id><enabled>true</enabled><check-controller-certificate>false</check-controller-certificate><lost-connection-behavior>failSecureMode</lost-connection-behavior><controllers/><resources><port>LogicalSwitch0-Port1</port><port>LogicalSwitch0-Port2</port></resources></switch></logical-switches></capable-switch></data></rpc-reply>
Delivering to <ncclient.operations.retrieve.Get object at 0x2e8bfd0>
Traceback (most recent call last):
  File "/ryu/tests/integrated/test_of_config.py", line 226, in _validate
    xmlschema.assertValid(tree)
  File "lxml.etree.pyx", line 3017, in lxml.etree._Validator.assertValid (src/lxml/lxml.etree.c:129442)
DocumentInvalid: Element '{urn:onf:of111:config:yang}rate': [facet 'enumeration'] The value 'invalid' is not an element of the set {'10Mb-HD', '10Mb-FD', '100Mb-HD', '100Mb-FD', '1Gb-HD', '1Gb-FD', '10Gb', '40Gb', '100Gb', '1Tb', 'other'}., line 2
set(['urn:onf:of111:config:yang'])
<ns0:capable-switch xmlns:ns0="urn:onf:of111:config:yang">
  <ns0:id>CapableSwitch0</ns0:id>
  <ns0:resources>
    <ns0:port>
      <ns0:resource-id>LogicalSwitch0-Port1</ns0:resource-id>
      <ns0:number>1</ns0:number>
      <ns0:name>Port1</ns0:name>
      <ns0:current-rate>5000</ns0:current-rate>
      <ns0:max-rate>5000</ns0:max-rate>
      <ns0:configuration>
        <ns0:admin-state>down</ns0:admin-state>
        <ns0:no-receive>false</ns0:no-receive>
        <ns0:no-forward>false</ns0:no-forward>
        <ns0:no-packet-in>false</ns0:no-packet-in>
      </ns0:configuration>
      <ns0:state>
        <ns0:oper-state>up</ns0:oper-state>
        <ns0:blocked>false</ns0:blocked>
        <ns0:live>true</ns0:live>
      </ns0:state>
      <ns0:features>
        <ns0:current>
          <ns0:rate>100Mb-FD</ns0:rate>
          <ns0:auto-negotiate>true</ns0:auto-negotiate>
          <ns0:medium>copper</ns0:medium>
          <ns0:pause>unsupported</ns0:pause>
        </ns0:current>
        <ns0:advertised>
          <ns0:rate>invalid</ns0:rate>
          <ns0:auto-negotiate>true</ns0:auto-negotiate>
          <ns0:medium>copper</ns0:medium>
          <ns0:pause>unsupported</ns0:pause>
        </ns0:advertised>
        <ns0:supported>
          <ns0:rate>100Mb-FD</ns0:rate>
          <ns0:auto-negotiate>true</ns0:auto-negotiate>
          <ns0:medium>copper</ns0:medium>
          <ns0:pause>unsupported</ns0:pause>
        </ns0:supported>
        <ns0:advertised-peer>
          <ns0:rate>100Mb-FD</ns0:rate>
          <ns0:auto-negotiate>true</ns0:auto-negotiate>
          <ns0:medium>copper</ns0:medium>
          <ns0:pause>unsupported</ns0:pause>
        </ns0:advertised-peer>
      </ns0:features>
    </ns0:port>
    <ns0:port>
      <ns0:resource-id>LogicalSwitch0-Port2</ns0:resource-id>
      <ns0:number>2</ns0:number>
      <ns0:name>Port2</ns0:name>
      <ns0:current-rate>5000</ns0:current-rate>
      <ns0:max-rate>5000</ns0:max-rate>
      <ns0:configuration>
        <ns0:admin-state>down</ns0:admin-state>
        <ns0:no-receive>false</ns0:no-receive>
        <ns0:no-forward>false</ns0:no-forward>
        <ns0:no-packet-in>false</ns0:no-packet-in>
      </ns0:configuration>
      <ns0:state>
        <ns0:oper-state>up</ns0:oper-state>
        <ns0:blocked>false</ns0:blocked>
        <ns0:live>true</ns0:live>
      </ns0:state>
      <ns0:features>
        <ns0:current>
          <ns0:rate>100Mb-FD</ns0:rate>
          <ns0:auto-negotiate>true</ns0:auto-negotiate>
          <ns0:medium>copper</ns0:medium>
          <ns0:pause>unsupported</ns0:pause>
        </ns0:current>
        <ns0:advertised>
          <ns0:rate>invalid</ns0:rate>
          <ns0:auto-negotiate>true</ns0:auto-negotiate>
          <ns0:medium>copper</ns0:medium>
          <ns0:pause>unsupported</ns0:pause>
        </ns0:advertised>
        <ns0:supported>
          <ns0:rate>100Mb-FD</ns0:rate>
          <ns0:auto-negotiate>true</ns0:auto-negotiate>
          <ns0:medium>copper</ns0:medium>
          <ns0:pause>unsupported</ns0:pause>
        </ns0:supported>
        <ns0:advertised-peer>
          <ns0:rate>100Mb-FD</ns0:rate>
          <ns0:auto-negotiate>true</ns0:auto-negotiate>
          <ns0:medium>copper</ns0:medium>
          <ns0:pause>unsupported</ns0:pause>
        </ns0:advertised-peer>
      </ns0:features>
    </ns0:port>
  </ns0:resources>
  <ns0:logical-switches>
    <ns0:switch>
      <ns0:id>LogicalSwitch0</ns0:id>
      <ns0:capabilities>
        <ns0:max-buffered-packets>0</ns0:max-buffered-packets>
        <ns0:max-tables>255</ns0:max-tables>
        <ns0:max-ports>16777216</ns0:max-ports>
        <ns0:flow-statistics>true</ns0:flow-statistics>
        <ns0:table-statistics>true</ns0:table-statistics>
        <ns0:port-statistics>true</ns0:port-statistics>
        <ns0:group-statistics>true</ns0:group-statistics>
        <ns0:queue-statistics>true</ns0:queue-statistics>
        <ns0:reassemble-ip-fragments>false</ns0:reassemble-ip-fragments>
        <ns0:block-looping-ports>false</ns0:block-looping-ports>
        <ns0:reserved-port-types>
          <ns0:type>all</ns0:type>
          <ns0:type>controller</ns0:type>
          <ns0:type>table</ns0:type>
          <ns0:type>inport</ns0:type>
          <ns0:type>any</ns0:type>
        </ns0:reserved-port-types>
        <ns0:group-types>
          <ns0:type>all</ns0:type>
          <ns0:type>select</ns0:type>
          <ns0:type>indirect</ns0:type>
          <ns0:type>fast-failover</ns0:type>
        </ns0:group-types>
        <ns0:group-capabilities>
          <ns0:capability>select-weight</ns0:capability>
          <ns0:capability>select-liveness</ns0:capability>
          <ns0:capability>chaining</ns0:capability>
        </ns0:group-capabilities>
        <ns0:action-types>
          <ns0:type>output</ns0:type>
          <ns0:type>group</ns0:type>
          <ns0:type>set-queue</ns0:type>
          <ns0:type>set-mpls-ttl</ns0:type>
          <ns0:type>dec-mpls-ttl</ns0:type>
          <ns0:type>set-nw-ttl</ns0:type>
          <ns0:type>dec-nw-ttl</ns0:type>
          <ns0:type>copy-ttl-out</ns0:type>
          <ns0:type>copy-ttl-in</ns0:type>
          <ns0:type>push-vlan</ns0:type>
          <ns0:type>pop-vlan</ns0:type>
          <ns0:type>push-mpls</ns0:type>
          <ns0:type>pop-mpls</ns0:type>
          <ns0:type>push-pbb</ns0:type>
          <ns0:type>pop-pbb</ns0:type>
          <ns0:type>set-field</ns0:type>
        </ns0:action-types>
        <ns0:instruction-types>
          <ns0:type>goto-table</ns0:type>
          <ns0:type>write-metadata</ns0:type>
          <ns0:type>write-actions</ns0:type>
          <ns0:type>apply-actions</ns0:type>
          <ns0:type>clear-actions</ns0:type>
          <ns0:type>meter</ns0:type>
        </ns0:instruction-types>
      </ns0:capabilities>
      <ns0:datapath-id>00:26:B9:76:5C:81:00:00</ns0:datapath-id>
      <ns0:enabled>true</ns0:enabled>
      <ns0:check-controller-certificate>false</ns0:check-controller-certificate>
      <ns0:lost-connection-behavior>failSecureMode</ns0:lost-connection-behavior>
      <ns0:controllers/>
      <ns0:resources>
        <ns0:port>LogicalSwitch0-Port1</ns0:port>
        <ns0:port>LogicalSwitch0-Port2</ns0:port>
      </ns0:resources>
    </ns0:switch>
  </ns0:logical-switches>
</ns0:capable-switch>

<ns0:port xmlns:ns0="urn:onf:of111:config:yang">
  <ns0:resource-id>LogicalSwitch0-Port1</ns0:resource-id>
  <ns0:number>1</ns0:number>
  <ns0:name>Port1</ns0:name>
  <ns0:current-rate>5000</ns0:current-rate>
  <ns0:max-rate>5000</ns0:max-rate>
  <ns0:configuration>
    <ns0:admin-state>down</ns0:admin-state>
    <ns0:no-receive>false</ns0:no-receive>
    <ns0:no-forward>false</ns0:no-forward>
    <ns0:no-packet-in>false</ns0:no-packet-in>
  </ns0:configuration>
  <ns0:state>
    <ns0:oper-state>up</ns0:oper-state>
    <ns0:blocked>false</ns0:blocked>
    <ns0:live>true</ns0:live>
  </ns0:state>
  <ns0:features>
    <ns0:current>
      <ns0:rate>100Mb-FD</ns0:rate>
      <ns0:auto-negotiate>true</ns0:auto-negotiate>
      <ns0:medium>copper</ns0:medium>
      <ns0:pause>unsupported</ns0:pause>
    </ns0:current>
    <ns0:advertised>
      <ns0:rate>invalid</ns0:rate>
      <ns0:auto-negotiate>true</ns0:auto-negotiate>
      <ns0:medium>copper</ns0:medium>
      <ns0:pause>unsupported</ns0:pause>
    </ns0:advertised>
    <ns0:supported>
      <ns0:rate>100Mb-FD</ns0:rate>
      <ns0:auto-negotiate>true</ns0:auto-negotiate>
      <ns0:medium>copper</ns0:medium>
      <ns0:pause>unsupported</ns0:pause>
    </ns0:supported>
    <ns0:advertised-peer>
      <ns0:rate>100Mb-FD</ns0:rate>
      <ns0:auto-negotiate>true</ns0:auto-negotiate>
      <ns0:medium>copper</ns0:medium>
      <ns0:pause>unsupported</ns0:pause>
    </ns0:advertised-peer>
  </ns0:features>
</ns0:port>

<ns0:port xmlns:ns0="urn:onf:of111:config:yang">
  <ns0:resource-id>LogicalSwitch0-Port2</ns0:resource-id>
  <ns0:number>2</ns0:number>
  <ns0:name>Port2</ns0:name>
  <ns0:current-rate>5000</ns0:current-rate>
  <ns0:max-rate>5000</ns0:max-rate>
  <ns0:configuration>
    <ns0:admin-state>down</ns0:admin-state>
    <ns0:no-receive>false</ns0:no-receive>
    <ns0:no-forward>false</ns0:no-forward>
    <ns0:no-packet-in>false</ns0:no-packet-in>
  </ns0:configuration>
  <ns0:state>
    <ns0:oper-state>up</ns0:oper-state>
    <ns0:blocked>false</ns0:blocked>
    <ns0:live>true</ns0:live>
  </ns0:state>
  <ns0:features>
    <ns0:current>
      <ns0:rate>100Mb-FD</ns0:rate>
      <ns0:auto-negotiate>true</ns0:auto-negotiate>
      <ns0:medium>copper</ns0:medium>
      <ns0:pause>unsupported</ns0:pause>
    </ns0:current>
    <ns0:advertised>
      <ns0:rate>invalid</ns0:rate>
      <ns0:auto-negotiate>true</ns0:auto-negotiate>
      <ns0:medium>copper</ns0:medium>
      <ns0:pause>unsupported</ns0:pause>
    </ns0:advertised>
    <ns0:supported>
      <ns0:rate>100Mb-FD</ns0:rate>
      <ns0:auto-negotiate>true</ns0:auto-negotiate>
      <ns0:medium>copper</ns0:medium>
      <ns0:pause>unsupported</ns0:pause>
    </ns0:supported>
    <ns0:advertised-peer>
      <ns0:rate>100Mb-FD</ns0:rate>
      <ns0:auto-negotiate>true</ns0:auto-negotiate>
      <ns0:medium>copper</ns0:medium>
      <ns0:pause>unsupported</ns0:pause>
    </ns0:advertised-peer>
  </ns0:features>
</ns0:port>

Requesting 'EditConfig'
queueing <?xml version='1.0' encoding='UTF-8'?>
<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:ns1="urn:onf:of111:config:yang" message-id="urn:uuid:58659c74-a0ca-11e2-a778-0026b9765c81"><nc:edit-config><nc:target><nc:running /></nc:target><nc:config>
  <ns1:capable-switch>
    <ns1:id>CapableSwitch0</ns1:id>
    <ns1:resources>
      <ns1:port>
        <ns1:resource-id>LogicalSwitch0-Port1</ns1:resource-id>
        <ns1:configuration operation="merge">
          <ns1:admin-state>down</ns1:admin-state>
        </ns1:configuration>
      </ns1:port>
      <ns1:port>
        <ns1:resource-id>LogicalSwitch0-Port2</ns1:resource-id>
        <ns1:configuration operation="merge">
          <ns1:admin-state>down</ns1:admin-state>
        </ns1:configuration>
      </ns1:port>
    </ns1:resources>
  </ns1:capable-switch>
</nc:config></nc:edit-config></nc:rpc>
Sync request, will wait for timeout=30
Sending message
parsed new message
dispatching message to <ncclient.operations.rpc.RPCReplyListener object at 0x2d07450>: <?xml version="1.0" encoding="UTF-8"?><rpc-reply message-id="urn:uuid:58659c74-a0ca-11e2-a778-0026b9765c81" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><ok/></rpc-reply>
Delivering to <ncclient.operations.edit.EditConfig object at 0x2e91550>
Requesting 'Get'
queueing <?xml version='1.0' encoding='UTF-8'?>
<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:587764ea-a0ca-11e2-a778-0026b9765c81"><nc:get /></nc:rpc>
Sync request, will wait for timeout=30
Sending message
parsed new message
dispatching message to <ncclient.operations.rpc.RPCReplyListener object at 0x2d07450>: <?xml version="1.0" encoding="UTF-8"?><rpc-reply message-id="urn:uuid:587764ea-a0ca-11e2-a778-0026b9765c81" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><data><capable-switch xmlns="urn:onf:of111:config:yang"><id>CapableSwitch0</id><resources><port><resource-id>LogicalSwitch0-Port1</resource-id><number>1</number><name>Port1</name><current-rate>5000</current-rate><max-rate>5000</max-rate><configuration><admin-state>down</admin-state><no-receive>false</no-receive><no-forward>false</no-forward><no-packet-in>false</no-packet-in></configuration><state><oper-state>up</oper-state><blocked>false</blocked><live>true</live></state><features><current><rate>100Mb-FD</rate><auto-negotiate>true</auto-negotiate><medium>copper</medium><pause>unsupported</pause></current><advertised><rate>invalid</rate><auto-negotiate>true</auto-negotiate><medium>copper</medium><pause>unsupported</pause></advertised><supported><rate>100Mb-FD</rate><auto-negotiate>true</auto-negotiate><medium>copper</medium><pause>unsupported</pause></supported><advertised-peer><rate>100Mb-FD</rate><auto-negotiate>true</auto-negotiate><medium>copper</medium><pause>unsupported</pause></advertised-peer></features></port><port><resource-id>LogicalSwitch0-Port2</resource-id><number>2</number><name>Port2</name><current-rate>5000</current-rate><max-rate>5000</max-rate><configuration><admin-state>down</admin-state><no-receive>false</no-receive><no-forward>false</no-forward><no-packet-in>false</no-packet-in></configuration><state><oper-state>up</oper-state><blocked>false</blocked><live>true</live></state><features><current><rate>100Mb-FD</rate><auto-negotiate>true</auto-negotiate><medium>copper</medium><pause>unsupported</pause></current><advertised><rate>invalid</rate><auto-negotiate>true</auto-negotiate><medium>copper</medium><pause>unsupported</pause></advertised><supported><rate>100Mb-FD</rate><auto-negotiate>true</auto-negotiate><medium>copper</medium><pause>unsupported</pause></supported><advertised-peer><rate>100Mb-FD</rate><auto-negotiate>true</auto-negotiate><medium>copper</medium><pause>unsupported</pause></advertised-peer></features></port></resources><logical-switches><switch><id>LogicalSwitch0</id><capabilities><max-buffered-packets>0</max-buffered-packets><max-tables>255</max-tables><max-ports>16777216</max-ports><flow-statistics>true</flow-statistics><table-statistics>true</table-statistics><port-statistics>true</port-statistics><group-statistics>true</group-statistics><queue-statistics>true</queue-statistics><reassemble-ip-fragments>false</reassemble-ip-fragments><block-looping-ports>false</block-looping-ports><reserved-port-types><type>all</type><type>controller</type><type>table</type><type>inport</type><type>any</type></reserved-port-types><group-types><type>all</type><type>select</type><type>indirect</type><type>fast-failover</type></group-types><group-capabilities><capability>select-weight</capability><capability>select-liveness</capability><capability>chaining</capability></group-capabilities><action-types><type>output</type><type>group</type><type>set-queue</type><type>set-mpls-ttl</type><type>dec-mpls-ttl</type><type>set-nw-ttl</type><type>dec-nw-ttl</type><type>copy-ttl-out</type><type>copy-ttl-in</type><type>push-vlan</type><type>pop-vlan</type><type>push-mpls</type><type>pop-mpls</type><type>push-pbb</type><type>pop-pbb</type><type>set-field</type></action-types><instruction-types><type>goto-table</type><type>write-metadata</type><type>write-actions</type><type>apply-actions</type><type>clear-actions</type><type>meter</type></instruction-types></capabilities><datapath-id>00:26:B9:76:5C:81:00:00</datapath-id><enabled>true</enabled><check-controller-certificate>false</check-controller-certificate><lost-connection-behavior>failSecureMode</lost-connection-behavior><controllers/><resources><port>LogicalSwitch0-Port1</port><port>LogicalSwitch0-Port2</port></resources></switch></logical-switches></capable-switch></data></rpc-reply>
Delivering to <ncclient.operations.retrieve.Get object at 0x2e91550>
Traceback (most recent call last):
  File "/ryu/tests/integrated/test_of_config.py", line 226, in _validate
    xmlschema.assertValid(tree)
  File "lxml.etree.pyx", line 3017, in lxml.etree._Validator.assertValid (src/lxml/lxml.etree.c:129442)
DocumentInvalid: Element '{urn:onf:of111:config:yang}rate': [facet 'enumeration'] The value 'invalid' is not an element of the set {'10Mb-HD', '10Mb-FD', '100Mb-HD', '100Mb-FD', '1Gb-HD', '1Gb-FD', '10Gb', '40Gb', '100Gb', '1Tb', 'other'}., line 2
set(['urn:onf:of111:config:yang'])
<ns0:port xmlns:ns0="urn:onf:of111:config:yang">
  <ns0:resource-id>LogicalSwitch0-Port1</ns0:resource-id>
  <ns0:number>1</ns0:number>
  <ns0:name>Port1</ns0:name>
  <ns0:current-rate>5000</ns0:current-rate>
  <ns0:max-rate>5000</ns0:max-rate>
  <ns0:configuration>
    <ns0:admin-state>down</ns0:admin-state>
    <ns0:no-receive>false</ns0:no-receive>
    <ns0:no-forward>false</ns0:no-forward>
    <ns0:no-packet-in>false</ns0:no-packet-in>
  </ns0:configuration>
  <ns0:state>
    <ns0:oper-state>up</ns0:oper-state>
    <ns0:blocked>false</ns0:blocked>
    <ns0:live>true</ns0:live>
  </ns0:state>
  <ns0:features>
    <ns0:current>
      <ns0:rate>100Mb-FD</ns0:rate>
      <ns0:auto-negotiate>true</ns0:auto-negotiate>
      <ns0:medium>copper</ns0:medium>
      <ns0:pause>unsupported</ns0:pause>
    </ns0:current>
    <ns0:advertised>
      <ns0:rate>invalid</ns0:rate>
      <ns0:auto-negotiate>true</ns0:auto-negotiate>
      <ns0:medium>copper</ns0:medium>
      <ns0:pause>unsupported</ns0:pause>
    </ns0:advertised>
    <ns0:supported>
      <ns0:rate>100Mb-FD</ns0:rate>
      <ns0:auto-negotiate>true</ns0:auto-negotiate>
      <ns0:medium>copper</ns0:medium>
      <ns0:pause>unsupported</ns0:pause>
    </ns0:supported>
    <ns0:advertised-peer>
      <ns0:rate>100Mb-FD</ns0:rate>
      <ns0:auto-negotiate>true</ns0:auto-negotiate>
      <ns0:medium>copper</ns0:medium>
      <ns0:pause>unsupported</ns0:pause>
    </ns0:advertised-peer>
  </ns0:features>
</ns0:port>

<ns0:port xmlns:ns0="urn:onf:of111:config:yang">
  <ns0:resource-id>LogicalSwitch0-Port2</ns0:resource-id>
  <ns0:number>2</ns0:number>
  <ns0:name>Port2</ns0:name>
  <ns0:current-rate>5000</ns0:current-rate>
  <ns0:max-rate>5000</ns0:max-rate>
  <ns0:configuration>
    <ns0:admin-state>down</ns0:admin-state>
    <ns0:no-receive>false</ns0:no-receive>
    <ns0:no-forward>false</ns0:no-forward>
    <ns0:no-packet-in>false</ns0:no-packet-in>
  </ns0:configuration>
  <ns0:state>
    <ns0:oper-state>up</ns0:oper-state>
    <ns0:blocked>false</ns0:blocked>
    <ns0:live>true</ns0:live>
  </ns0:state>
  <ns0:features>
    <ns0:current>
      <ns0:rate>100Mb-FD</ns0:rate>
      <ns0:auto-negotiate>true</ns0:auto-negotiate>
      <ns0:medium>copper</ns0:medium>
      <ns0:pause>unsupported</ns0:pause>
    </ns0:current>
    <ns0:advertised>
      <ns0:rate>invalid</ns0:rate>
      <ns0:auto-negotiate>true</ns0:auto-negotiate>
      <ns0:medium>copper</ns0:medium>
      <ns0:pause>unsupported</ns0:pause>
    </ns0:advertised>
    <ns0:supported>
      <ns0:rate>100Mb-FD</ns0:rate>
      <ns0:auto-negotiate>true</ns0:auto-negotiate>
      <ns0:medium>copper</ns0:medium>
      <ns0:pause>unsupported</ns0:pause>
    </ns0:supported>
    <ns0:advertised-peer>
      <ns0:rate>100Mb-FD</ns0:rate>
      <ns0:auto-negotiate>true</ns0:auto-negotiate>
      <ns0:medium>copper</ns0:medium>
      <ns0:pause>unsupported</ns0:pause>
    </ns0:advertised-peer>
  </ns0:features>
</ns0:port>

Requesting 'CloseSession'
queueing <?xml version='1.0' encoding='UTF-8'?>
<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="urn:uuid:588aa29e-a0ca-11e2-a778-0026b9765c81"><nc:close-session /></nc:rpc>
Sync request, will wait for timeout=30
Sending message
[chan netconf] EOF sent (netconf)
Ignoring message for dead channel 1
parsed new message
dispatching message to <ncclient.operations.rpc.RPCReplyListener object at 0x2d07450>: <?xml version="1.0" encoding="UTF-8"?><rpc-reply message-id="urn:uuid:588aa29e-a0ca-11e2-a778-0026b9765c81" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"><ok/></rpc-reply>
Delivering to <ncclient.operations.session.CloseSession object at 0x2d0f8d0>
Broke out of main loop, error=SessionCloseError('Unexpected session close',)
EOF in transport thread
dispatching error to <ncclient.operations.rpc.RPCReplyListener object at 0x2d07450>

Clone this wiki locally