tmp/src/things/things.py
def getPhysicalInterfaceOnDeviceType(self, typeId, draft=False):
        """
        Gets the physical interface associated with a device type.
        Parameters:
            - typeId (string) - the device type
            - draft (boolean)
        Throws APIException on failure.
        """
        if draft:
            req = ApiClient.oneDeviceTypePhysicalInterfaceUrl % (self.host, "/draft", typeId)
        else:
            req = ApiClient.oneDeviceTypePhysicalInterfaceUrl % (self.host, "", typeId)
        resp = requests.get(req, auth=self.credentials, headers={"Content-Type":"application/json"},
                       verify=self.verify)
        if resp.status_code == 200:
            self.logger.debug("Physical interface retrieved from a device type")
        else:
            raise ibmiotf.APIException(resp.status_code, "HTTP error getting physical interface on a device type", resp)
        return resp.json()["id"], resp.json()
def getPhysicalInterfaceOnDeviceType(self, typeId, draft=False):
        """
        Gets the physical interface associated with a device type.
        Parameters:
            - typeId (string) - the device type
            - draft (boolean)
        Throws APIException on failure.
        """
        if draft:
            req = ApiClient.oneDeviceTypePhysicalInterfaceUrl % (self.host, "/draft", typeId)
        else:
            req = ApiClient.oneDeviceTypePhysicalInterfaceUrl % (self.host, "", typeId)
        resp = requests.get(req, auth=self.credentials, headers={"Content-Type":"application/json"},
                       verify=self.verify)
        if resp.status_code == 200:
            self.logger.debug("Physical interface retrieved from a device type")
        else:
            raise ibmiotf.APIException(resp.status_code, "HTTP error getting physical interface on a device type", resp)
        return resp.json()["id"], resp.json()
Gets the physical interface associated with a device type.
        Parameters:
            - typeId (string) - the device type
            - draft (boolean)
        Throws APIException on failure.