X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2Fhoneycomb%2FHcAPIKwInterfaces.py;h=eff0719e26491c6e6be29cc6c4876de405375a06;hp=3a32cbe5ff1c0bc26978b894c17bd1d6529c3c6b;hb=0b4ceb8d40f0b667eb6083298a4f133b8ae9adaa;hpb=d4e9cf05335c9d819e05477204223068de930df6 diff --git a/resources/libraries/python/honeycomb/HcAPIKwInterfaces.py b/resources/libraries/python/honeycomb/HcAPIKwInterfaces.py index 3a32cbe5ff..eff0719e26 100644 --- a/resources/libraries/python/honeycomb/HcAPIKwInterfaces.py +++ b/resources/libraries/python/honeycomb/HcAPIKwInterfaces.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 Cisco and/or its affiliates. +# Copyright (c) 2017 Cisco and/or its affiliates. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at: @@ -555,6 +555,9 @@ class InterfaceKeywords(object): :rtype: bytearray """ + interface = Topology.convert_interface_reference( + node, interface, "name") + path = ("interfaces", ("interface", "name", interface), "ietf-ip:ipv4", "neighbor") neighbor = [{"ip": ip_addr, "link-layer-address": link_layer_address}, ] @@ -626,6 +629,9 @@ class InterfaceKeywords(object): :rtype: bytearray """ + interface = Topology.convert_interface_reference( + node, interface, "name") + path = ("interfaces", ("interface", "name", interface), "ietf-ip:ipv6") address = {"address": [{"ip": ip_addr, "prefix-length": prefix_len}, ]} return InterfaceKeywords._set_interface_properties( @@ -686,6 +692,9 @@ class InterfaceKeywords(object): :rtype: bytearray """ + interface = Topology.convert_interface_reference( + node, interface, "name") + path = ("interfaces", ("interface", "name", interface), "ietf-ip:ipv6", "neighbor") neighbor = [{"ip": ip_addr, "link-layer-address": link_layer_address}, ] @@ -752,6 +761,9 @@ class InterfaceKeywords(object): :raises HoneycombError: If the parameter is not valid. """ + interface = Topology.convert_interface_reference( + node, interface, "name") + if param not in InterfaceKeywords.ROUTING_PARAMS: raise HoneycombError("The parameter {0} is invalid.".format(param))