Repository: Netuitive/netuitive-client-python

Issue:
Define the check ttl as ttl
This client should use the agreed upon "ttl" for the check ttl, instead of "duration".

Discussion:

Patch:
diff --git a/netuitive/check.py b/netuitive/check.py
index b851282..2dd7858 100644
--- a/netuitive/check.py
+++ b/netuitive/check.py
@@ -7,15 +7,15 @@ class Check(object):
         :type name: string
         :param elementId: Associated Element ID
         :type elementId: string
-        :param interval: Check interval in seconds
-        :type interval: int
+        :param ttl: Check TTL in seconds
+        :type ttl: int
     """
 
     def __init__(self,
                  name,
                  elementId,
-                 interval):
+                 ttl):
 
         self.name = name
         self.elementId = elementId
-        self.interval = interval
+        self.ttl = ttl
diff --git a/netuitive/client.py b/netuitive/client.py
index 96d74e7..82fff65 100644
--- a/netuitive/client.py
+++ b/netuitive/client.py
@@ -165,7 +165,7 @@ class Client(object):
         url = self.checkurl + '/' \
             + check.name + '/' \
             + check.elementId + '/' \
-            + str(check.interval)
+            + str(check.ttl)
         try:
             headers = {'User-Agent': self.agent}
             request = urllib2.Request(


Test patch:
diff --git a/tests/test_netuitive.py b/tests/test_netuitive.py
index e3463f4..c75b9b3 100755
--- a/tests/test_netuitive.py
+++ b/tests/test_netuitive.py
@@ -518,7 +518,7 @@ class TestCheck(unittest.TestCase):
 
         self.assertEqual(self.check.name, 'checkName')
         self.assertEqual(self.check.elementId, 'elementId')
-        self.assertEqual(self.check.interval, 60)
+        self.assertEqual(self.check.ttl, 60)
 
     def tearDown(self):
         pass