Skip to content

Commit

Permalink
Merge pull request #76 from cisco-ie/revert-75-rel-v1.0.12
Browse files Browse the repository at this point in the history
Revert "Release v1.0.12"
  • Loading branch information
remingtonc authored Jul 17, 2020
2 parents fa239b3 + 911935a commit 1b4c0ea
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 21 deletions.
2 changes: 1 addition & 1 deletion src/cisco_gnmi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@
from .xe import XEClient
from .builder import ClientBuilder

__version__ = "1.0.12"
__version__ = "1.0.11"
8 changes: 0 additions & 8 deletions src/cisco_gnmi/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,6 @@ def gnmi_subscribe():
default="SAMPLE",
choices=proto.gnmi_pb2.SubscriptionMode.keys(),
)
parser.add_argument(
"-req_mode",
help="SubscriptionList.Mode mode for Subscriptions. Defaults to STREAM.",
default="STREAM",
choices=proto.gnmi_pb2.SubscriptionList.Mode.keys(),
)
parser.add_argument(
"-suppress_redundant",
help="Suppress redundant information in Subscription.",
Expand Down Expand Up @@ -165,8 +159,6 @@ def gnmi_subscribe():
kwargs["sample_interval"] = args.interval * int(1e9)
if args.mode:
kwargs["sub_mode"] = args.mode
if args.req_mode:
kwargs["request_mode"] = args.req_mode
if args.suppress_redundant:
kwargs["suppress_redundant"] = args.suppress_redundant
if args.heartbeat_interval:
Expand Down
3 changes: 1 addition & 2 deletions src/cisco_gnmi/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,7 @@ def subscribe_xpaths(
subscription_list.subscription.extend(subscriptions)
return self.subscribe([subscription_list])

@classmethod
def parse_xpath_to_gnmi_path(cls, xpath, origin=None):
def parse_xpath_to_gnmi_path(self, xpath, origin=None):
"""Parses an XPath to proto.gnmi_pb2.Path.
This function should be overridden by any child classes for origin logic.
Expand Down
3 changes: 1 addition & 2 deletions src/cisco_gnmi/nx.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,7 @@ def subscribe_xpaths(
heartbeat_interval,
)

@classmethod
def parse_xpath_to_gnmi_path(cls, xpath, origin=None):
def parse_xpath_to_gnmi_path(self, xpath, origin=None):
"""Attempts to determine whether origin should be YANG (device) or DME.
"""
if origin is None:
Expand Down
5 changes: 2 additions & 3 deletions src/cisco_gnmi/xe.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,8 +312,7 @@ def subscribe_xpaths(
prefix
)

@classmethod
def parse_xpath_to_gnmi_path(cls, xpath, origin=None):
def parse_xpath_to_gnmi_path(self, xpath, origin=None):
"""Naively tries to intelligently (non-sequitur!) origin
Otherwise assume rfc7951
legacy is not considered
Expand All @@ -324,4 +323,4 @@ def parse_xpath_to_gnmi_path(cls, xpath, origin=None):
origin = "openconfig"
else:
origin = "rfc7951"
return super(XEClient, cls).parse_xpath_to_gnmi_path(xpath, origin)
return super(XEClient, self).parse_xpath_to_gnmi_path(xpath, origin)
8 changes: 3 additions & 5 deletions src/cisco_gnmi/xr.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,8 +338,7 @@ def subscribe_xpaths(
heartbeat_interval,
)

@classmethod
def parse_xpath_to_gnmi_path(cls, xpath, origin=None):
def parse_xpath_to_gnmi_path(self, xpath, origin=None):
"""No origin specified implies openconfig
Otherwise origin is expected to be the module name
"""
Expand All @@ -352,10 +351,9 @@ def parse_xpath_to_gnmi_path(cls, xpath, origin=None):
# module name
origin, xpath = xpath.split(":", 1)
origin = origin.strip("/")
return super(XRClient, cls).parse_xpath_to_gnmi_path(xpath, origin)
return super(XRClient, self).parse_xpath_to_gnmi_path(xpath, origin)

@classmethod
def parse_cli_to_gnmi_path(cls, command):
def parse_cli_to_gnmi_path(self, command):
"""Parses a CLI command to proto.gnmi_pb2.Path.
IOS XR appears to be the only OS with this functionality.
Expand Down

0 comments on commit 1b4c0ea

Please sign in to comment.