Beispiel #1
0
    def getUsableNodes(self, softwareProfileName):
        url = 'v1/softwareProfiles/%s/usable' % (
            urllib.parse.quote_plus(softwareProfileName))

        try:
            _, responseDict = self.sendSessionRequest(url)

            return Node.getListFromDict(responseDict)
        except TortugaException as ex:
            raise
        except Exception as ex:
            raise TortugaException(exception=ex)
Beispiel #2
0
    def getNodeList(self, softwareProfileName):
        """
        Return list of nodes contained within specified software profile
        """

        url = 'v1/softwareProfiles/%s/nodes' % (
            urllib.parse.quote_plus(softwareProfileName))

        try:
            _, responseDict = self.sendSessionRequest(url)

            return Node.getListFromDict(responseDict)
        except TortugaException as ex:
            raise
        except Exception as ex:
            raise TortugaException(exception=ex)