tmp/src/things/things.py
def updateRuleOnLogicalInterface(self, logicalInterfaceId, ruleId, name, condition, description=None):
        """
        Updates a rule on a logical interface..
        Parameters:
          - logicalInterfaceId (string),
          - ruleId (string)
          - name (string)
          - condition (string)
          - description (string, optional)
        Returns: response (object).
        Throws APIException on failure.
        """
        req = ApiClient.oneRuleForLogicalInterfaceUrl % (self.host, "/draft", logicalInterfaceId, ruleId)
        body = {"logicalInterfaceId" : logicalInterfaceId, "id" : ruleId, "name" : name, "condition" : condition}
        if description:
          body["description"] = description
        resp = requests.put(req, auth=self.credentials, headers={"Content-Type":"application/json"},
                            data=json.dumps(body), verify=self.verify)
        if resp.status_code == 200:
            self.logger.debug("Logical interface rule updated")
        else:
            raise ibmiotf.APIException(resp.status_code, "HTTP error updating logical interface rule", resp)
        return resp.json()
def updateRuleOnLogicalInterface(self, logicalInterfaceId, ruleId, name, condition, description=None):
        """
        Updates a rule on a logical interface..
        Parameters:
          - logicalInterfaceId (string),
          - ruleId (string)
          - name (string)
          - condition (string)
          - description (string, optional)
        Returns: response (object).
        Throws APIException on failure.
        """
        req = ApiClient.oneRuleForLogicalInterfaceUrl % (self.host, "/draft", logicalInterfaceId, ruleId)
        body = {"logicalInterfaceId" : logicalInterfaceId, "id" : ruleId, "name" : name, "condition" : condition}
        if description:
          body["description"] = description
        resp = requests.put(req, auth=self.credentials, headers={"Content-Type":"application/json"},
                            data=json.dumps(body), verify=self.verify)
        if resp.status_code == 200:
            self.logger.debug("Logical interface rule updated")
        else:
            raise ibmiotf.APIException(resp.status_code, "HTTP error updating logical interface rule", resp)
        return resp.json()
Updates a rule on a logical interface..
        Parameters:
          - logicalInterfaceId (string),
          - ruleId (string)
          - name (string)
          - condition (string)
          - description (string, optional)
        Returns: response (object).
        Throws APIException on failure.