From 5c101cbd8aaf1e02c5781cafcc778a652fca2db1 Mon Sep 17 00:00:00 2001 From: Anusha Ramineni Date: Fri, 17 Nov 2017 09:00:24 +0530 Subject: [PATCH] Enable include_rules option for library policy This commit enables 'include_rules' option for library policies in client lib Depends-On: Ib27119ba03d5658ff937f514f6ff3abfe5c390fe Change-Id: I2271579f655481b156ec66382d887b8784b13ad6 --- congressclient/v1/client.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/congressclient/v1/client.py b/congressclient/v1/client.py index 9f1add2..69b68dd 100644 --- a/congressclient/v1/client.py +++ b/congressclient/v1/client.py @@ -90,9 +90,10 @@ class Client(object): self.library_policy_path % policy) return body - def show_library_policy(self, policy): + def show_library_policy(self, policy, include_rules=True): + query = "?include_rules=%s" % include_rules resp, body = self.httpclient.get( - self.library_policy_path % policy) + (self.library_policy_path % policy) + query) return body def create_policy_rule(self, policy_name, body=None): @@ -126,8 +127,9 @@ class Client(object): resp, body = self.httpclient.get(self.policies) return body - def list_library_policy(self): - resp, body = self.httpclient.get(self.library_policies) + def list_library_policy(self, include_rules=True): + query = "?include_rules=%s" % include_rules + resp, body = self.httpclient.get(self.library_policies + query) return body def list_policy_tables(self, policy_name):