From 99e03ee52f94c435857dd1f4f1cb96e5d261b523 Mon Sep 17 00:00:00 2001 From: Leonardo Maycotte Date: Thu, 7 Apr 2016 23:57:33 -0500 Subject: [PATCH] Adding networking config parameters - Adding the ping_count and accepted_packet_loss params Change-Id: Id6a1e7629b58e0e088fa1d5ffa243ac4936b0728 --- cloudcafe/networking/networks/common/config.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cloudcafe/networking/networks/common/config.py b/cloudcafe/networking/networks/common/config.py index a68e3f4a..6fe43199 100644 --- a/cloudcafe/networking/networks/common/config.py +++ b/cloudcafe/networking/networks/common/config.py @@ -105,3 +105,13 @@ class NetworkingBaseConfig(ConfigSectionInterface): def check_response_attrs(self): """Flag to enable checking the response attributes""" return self.get_boolean("check_response_attrs", True) + + @property + def ping_count(self): + """Ping count to be used like: ping -c ping_count""" + return int(self.get("ping_count", 3)) + + @property + def accepted_packet_loss(self): + """Accepted packet loss percent for server pings""" + return int(self.get("accepted_packet_loss", 0))