sapcc / asr1k-neutron-l3

Cisco ASR 1000 Neutron L3 driver
Apache License 2.0
4 stars 1 forks source link

Cannot configure service instances via YANG on 17.2 due to wrong CLI commands #33

Open sebageek opened 4 years ago

sebageek commented 4 years ago

It looks like the YANG stack generates wrong CLI commands to configure a service instance on a port channel. YANG generates service-instance, CLI refuses this, probably wants service instance.

For your convenience, here is the full YANG call we're doing and the response.

Request:

<nc:rpc xmlns:nc="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="yang-trace">
  <nc:edit-config>
    <nc:target>
      <nc:running/>
    </nc:target>
    <nc:config>
      <native xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-native">
        <bridge-domain>
          <brd-id xmlns="http://cisco.com/ns/yang/Cisco-IOS-XE-bridge-domain" operation="merge">
            <bridge-domain-id>3062</bridge-domain-id>
            <member operation="replace">
              <member-interface>
                <interface>Port-channel1</interface>
                <service-instance>3062</service-instance>
              </member-interface>
              <member-interface>
                <interface>Port-channel2</interface>
                <service-instance>3062</service-instance>
              </member-interface>
              <BD-VIF>
                <name>5565</name>
              </BD-VIF>
              <BD-VIF>
                <name>5566</name>
              </BD-VIF>
            </member>
          </brd-id>
        </bridge-domain>
      </native>
    </nc:config>
  </nc:edit-config>
</nc:rpc>

Response:

'severity': 'error', 'tag': 'invalid-value', 'path': None, 'message': 'inconsistent value: Device refused one or more commands', 'type': 'application'

<detail xmlns="http://cisco.com/yang/cisco-ia">
  <bad-cli>
    <bad-command> member Port-channel1 service-instance 3062</bad-command>
    <error-location>2</error-location>
    <parser-response/>
    <parser-context>bridge-domain 3062
 member Port-channel1 service-instance 3062</parser-context>
  </bad-cli>
  <bad-cli>
    <bad-command> member Port-channel2 service-instance 3062</bad-command>
    <error-location>2</error-location>
    <parser-response/>
    <parser-context>bridge-domain 3062
 member Port-channel1 service-instance 3062
 member Port-channel2 service-instance 3062</parser-context>
  </bad-cli>
  <bad-cli>
    <bad-command> member BD-VIF5565</bad-command>
    <error-location>2</error-location>
    <parser-response/>
    <parser-context>bridge-domain 3062
 member Port-channel1 service-instance 3062
 member Port-channel2 service-instance 3062
 member BD-VIF5565</parser-context>
  </bad-cli>
  <bad-cli>
    <bad-command> member BD-VIF5566</bad-command>
    <error-location>2</error-location>
    <parser-response/>
    <parser-context>bridge-domain 3062
 member Port-channel1 service-instance 3062
 member Port-channel2 service-instance 3062
 member BD-VIF5565
 member BD-VIF5566</parser-context>
  </bad-cli>
</detail>
</error-info>

Version in use:

qa-de-1-asr13a#show ver
Cisco IOS XE Software, Version V172_1_SAP_ES2
Cisco IOS Software [Amsterdam], c8000aep Software (X86_64_LINUX_IOSD-UNIVERSALK9-M), Version 17.2.1-SAP, CUST-SPECIAL:V172_1_SAP_ES2
This software is supported for a limited time under special agreement with Cisco Systems, Inc. ES2
Copyright (c) 1986-2020 by Cisco Systems, Inc.
Compiled Thu 07-May-20 16:39 by mcpre
sebageek commented 4 years ago

Cisco advised us not to use <service-instance>, as it is only present for backwardscompability, but to use <service-instance-list><service-instance>{id}</service-instance></service-instance-list> for each entry. The same goes for #28. Will try out.