Example #1
0
    def get(self):
        """

        Returns a list with all delay policies (and URL paths to these resources),
        stub count

        Example output:
        {"version": "0.6.4",
        "data":
            {"my_delay":
                {"delay_type": "fixed",
                "name": "my_delay",
                "delayPolicyRef": "/stubo/api/v2/delay-policy/objects/my_delay",
                "milliseconds": 50},
            "pcent_random_samples":
                {"delay_type": "weighted",
                "delays": "fixed,30000,5:normalvariate,5000,1000,15:normalvariate,1000,500,70",
                "name": "pcent_random_samples",
                "delayPolicyRef": "/stubo/api/v2/delay-policy/objects/pcent_random_samples"},
            "delay_1":
                 {"delay_type": "fixed",
                  "name": "delay_1",
                  "delayPolicyRef": "/stubo/api/v2/delay-policy/objects/delay_1",
                  "milliseconds": "0"}
            }
        }
        """
        response, status_code = api_v2_get_delay_policy(self, None, "master")
        self.set_status(status_code)
        self.write(response)
Example #2
0
    def get(self):
        """

        Returns a list with all delay policies (and URL paths to these resources),
        stub count

        Example output:
        {"version": "0.6.4",
        "data":
            {"my_delay":
                {"delay_type": "fixed",
                "name": "my_delay",
                "delayPolicyRef": "/stubo/api/v2/delay-policy/objects/my_delay",
                "milliseconds": 50},
            "pcent_random_samples":
                {"delay_type": "weighted",
                "delays": "fixed,30000,5:normalvariate,5000,1000,15:normalvariate,1000,500,70",
                "name": "pcent_random_samples",
                "delayPolicyRef": "/stubo/api/v2/delay-policy/objects/pcent_random_samples"},
            "delay_1":
                 {"delay_type": "fixed",
                  "name": "delay_1",
                  "delayPolicyRef": "/stubo/api/v2/delay-policy/objects/delay_1",
                  "milliseconds": "0"}
            }
        }
        """
        response, status_code = api_v2_get_delay_policy(self, None, "master")
        self.set_status(status_code)
        self.write(response)
Example #3
0
    def get(self, delay_policy_name):
        """

        Returns delay policy name and all details about his resource
        :param delay_policy_name: <string> delay policy name
        """
        response, status_code = api_v2_get_delay_policy(self, delay_policy_name, "master")
        self.set_status(status_code)
        self.write(response)
Example #4
0
    def get(self, delay_policy_name):
        """

        Returns delay policy name and all details about his resource
        :param delay_policy_name: <string> delay policy name
        """
        response, status_code = api_v2_get_delay_policy(
            self, delay_policy_name, "master")
        self.set_status(status_code)
        self.write(response)