X-Git-Url: https://gerrit.fd.io/r/gitweb?p=csit.git;a=blobdiff_plain;f=resources%2Flibraries%2Fpython%2FLispSetup.py;h=99e3de8f7417f0e02c1c2043af91f9de4343e129;hp=13d0501abb2de858489143a1278e2b7fdc599428;hb=a912d105f3a1d8fed0b4cf6b18e0ef7789be81bf;hpb=721f39743c31003ccbdad3c27ffcc3145bfccf90 diff --git a/resources/libraries/python/LispSetup.py b/resources/libraries/python/LispSetup.py index 13d0501abb..99e3de8f74 100644 --- a/resources/libraries/python/LispSetup.py +++ b/resources/libraries/python/LispSetup.py @@ -99,10 +99,12 @@ class LispRemoteMapping(object): 'lisp/del_lisp_remote_mapping.vat', vni=vni, deid=deid, - deid_predix=deid_prefix, + deid_prefix=deid_prefix, seid=seid, seid_prefix=seid_prefix, rloc=rloc) + + class LispAdjacency(object): """Class for lisp adjacency API.""" @@ -117,7 +119,7 @@ class LispAdjacency(object): :param node: VPP node. :param vni: Vni. :param deid: Destination eid address. - :param deid_predix: Destination eid address prefix_len. + :param deid_prefix: Destination eid address prefix_len. :param seid: Source eid address. :param seid_prefix: Source eid address prefix_len. :type node: dict @@ -144,7 +146,7 @@ class LispAdjacency(object): :param node: VPP node. :param vni: Vni. :param deid: Destination eid address. - :param deid_predix: Destination eid address prefix_len. + :param deid_prefix: Destination eid address prefix_len. :param seid: Source eid address. :param seid_prefix: Source eid address prefix_len. :type node: dict @@ -159,11 +161,31 @@ class LispAdjacency(object): 'lisp/del_lisp_adjacency.vat', vni=vni, deid=deid, - deid_predix=deid_prefix, + deid_prefix=deid_prefix, seid=seid, seid_prefix=seid_prefix) +class LispGpeStatus(object): + """Clas for LISP GPE status manipulation.""" + + def __init__(self): + pass + + @staticmethod + def vpp_lisp_gpe_enable_disable(node, state): + """Change the state of LISP GPE - enable or disable. + + :param node: VPP node. + :param state: Requested state - enable or disable. + :type node: dict + :type state: str + """ + + VatExecutor.cmd_from_template(node, 'lisp/lisp_gpe_status.vat', + state=state) + + class LispGpeIface(object): """Class for Lisp gpe interface API.""" @@ -180,11 +202,33 @@ class LispGpeIface(object): :type state: str """ - VatExecutor.cmd_from_template(node, - 'lisp/lisp_gpe_iface.vat', + VatExecutor.cmd_from_template(node, 'lisp/lisp_gpe_iface.vat', state=state) +class LispGpeForwardEntry(object): + """The functionality needed for these methods is not implemented in VPP + (VAT). Bug https://jira.fd.io/browse/VPP-334 was open to cover this issue. + + TODO: Implement when VPP-334 is fixed. + """ + + def __init__(self): + pass + + @staticmethod + def add_lisp_gpe_forward_entry(node, *args): + """Not implemented""" + # TODO: Implement when VPP-334 is fixed. + pass + + @staticmethod + def del_lisp_gpe_forward_entry(node, *args): + """Not implemented""" + # TODO: Implement when VPP-334 is fixed. + pass + + class LispMapResolver(object): """Class for Lisp map resolver API."""