tmp/src/things/things.py
def getRuleForLogicalInterface(self, logicalInterfaceId, ruleId, draft=False):
        """
        Gets a rule for a logical interface.
        Parameters:
          - logicalInterfaceId (string)
          - ruleId (string)
          - draft (boolean)
        Throws APIException on failure.
        """
        if draft:
            req = ApiClient.oneRuleForLogicalInterfaceUrl % (self.host, "/draft", logicalInterfaceId, ruleId)
        else:
            req = ApiClient.oneRuleForLogicalInterfaceUrl % (self.host, "", logicalInterfaceId, ruleId)
        resp = requests.get(req, auth=self.credentials, verify=self.verify)
        if resp.status_code == 200:
            self.logger.debug("logical interface rule retrieved")
        else:
            raise ibmiotf.APIException(resp.status_code, "HTTP error getting logical interface rule", resp)
        return resp.json()
def getRuleForLogicalInterface(self, logicalInterfaceId, ruleId, draft=False):
        """
        Gets a rule for a logical interface.
        Parameters:
          - logicalInterfaceId (string)
          - ruleId (string)
          - draft (boolean)
        Throws APIException on failure.
        """
        if draft:
            req = ApiClient.oneRuleForLogicalInterfaceUrl % (self.host, "/draft", logicalInterfaceId, ruleId)
        else:
            req = ApiClient.oneRuleForLogicalInterfaceUrl % (self.host, "", logicalInterfaceId, ruleId)
        resp = requests.get(req, auth=self.credentials, verify=self.verify)
        if resp.status_code == 200:
            self.logger.debug("logical interface rule retrieved")
        else:
            raise ibmiotf.APIException(resp.status_code, "HTTP error getting logical interface rule", resp)
        return resp.json()
Gets a rule for a logical interface.
        Parameters:
          - logicalInterfaceId (string)
          - ruleId (string)
          - draft (boolean)
        Throws APIException on failure.