Skip to content

Commit 1b4c0ea

Browse files
authored
Merge pull request #76 from cisco-ie/revert-75-rel-v1.0.12
Revert "Release v1.0.12"
2 parents fa239b3 + 911935a commit 1b4c0ea

File tree

6 files changed

+8
-21
lines changed

6 files changed

+8
-21
lines changed

src/cisco_gnmi/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@
3030
from .xe import XEClient
3131
from .builder import ClientBuilder
3232

33-
__version__ = "1.0.12"
33+
__version__ = "1.0.11"

src/cisco_gnmi/cli.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,6 @@ def gnmi_subscribe():
113113
default="SAMPLE",
114114
choices=proto.gnmi_pb2.SubscriptionMode.keys(),
115115
)
116-
parser.add_argument(
117-
"-req_mode",
118-
help="SubscriptionList.Mode mode for Subscriptions. Defaults to STREAM.",
119-
default="STREAM",
120-
choices=proto.gnmi_pb2.SubscriptionList.Mode.keys(),
121-
)
122116
parser.add_argument(
123117
"-suppress_redundant",
124118
help="Suppress redundant information in Subscription.",
@@ -165,8 +159,6 @@ def gnmi_subscribe():
165159
kwargs["sample_interval"] = args.interval * int(1e9)
166160
if args.mode:
167161
kwargs["sub_mode"] = args.mode
168-
if args.req_mode:
169-
kwargs["request_mode"] = args.req_mode
170162
if args.suppress_redundant:
171163
kwargs["suppress_redundant"] = args.suppress_redundant
172164
if args.heartbeat_interval:

src/cisco_gnmi/client.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,8 +408,7 @@ def subscribe_xpaths(
408408
subscription_list.subscription.extend(subscriptions)
409409
return self.subscribe([subscription_list])
410410

411-
@classmethod
412-
def parse_xpath_to_gnmi_path(cls, xpath, origin=None):
411+
def parse_xpath_to_gnmi_path(self, xpath, origin=None):
413412
"""Parses an XPath to proto.gnmi_pb2.Path.
414413
This function should be overridden by any child classes for origin logic.
415414

src/cisco_gnmi/nx.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,7 @@ def subscribe_xpaths(
289289
heartbeat_interval,
290290
)
291291

292-
@classmethod
293-
def parse_xpath_to_gnmi_path(cls, xpath, origin=None):
292+
def parse_xpath_to_gnmi_path(self, xpath, origin=None):
294293
"""Attempts to determine whether origin should be YANG (device) or DME.
295294
"""
296295
if origin is None:

src/cisco_gnmi/xe.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,7 @@ def subscribe_xpaths(
312312
prefix
313313
)
314314

315-
@classmethod
316-
def parse_xpath_to_gnmi_path(cls, xpath, origin=None):
315+
def parse_xpath_to_gnmi_path(self, xpath, origin=None):
317316
"""Naively tries to intelligently (non-sequitur!) origin
318317
Otherwise assume rfc7951
319318
legacy is not considered
@@ -324,4 +323,4 @@ def parse_xpath_to_gnmi_path(cls, xpath, origin=None):
324323
origin = "openconfig"
325324
else:
326325
origin = "rfc7951"
327-
return super(XEClient, cls).parse_xpath_to_gnmi_path(xpath, origin)
326+
return super(XEClient, self).parse_xpath_to_gnmi_path(xpath, origin)

src/cisco_gnmi/xr.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,7 @@ def subscribe_xpaths(
338338
heartbeat_interval,
339339
)
340340

341-
@classmethod
342-
def parse_xpath_to_gnmi_path(cls, xpath, origin=None):
341+
def parse_xpath_to_gnmi_path(self, xpath, origin=None):
343342
"""No origin specified implies openconfig
344343
Otherwise origin is expected to be the module name
345344
"""
@@ -352,10 +351,9 @@ def parse_xpath_to_gnmi_path(cls, xpath, origin=None):
352351
# module name
353352
origin, xpath = xpath.split(":", 1)
354353
origin = origin.strip("/")
355-
return super(XRClient, cls).parse_xpath_to_gnmi_path(xpath, origin)
354+
return super(XRClient, self).parse_xpath_to_gnmi_path(xpath, origin)
356355

357-
@classmethod
358-
def parse_cli_to_gnmi_path(cls, command):
356+
def parse_cli_to_gnmi_path(self, command):
359357
"""Parses a CLI command to proto.gnmi_pb2.Path.
360358
IOS XR appears to be the only OS with this functionality.
361359

0 commit comments

Comments
 (0)