def getSoftwareProfile(self, softwareProfileName, optionDict: Optional[Dict[str, bool]] = None): """ Get software profile information Returns: softwareProfile Throws: SoftwareProfileNotFound TortugaException """ url = 'softwareprofiles/?name=%s' % (softwareProfileName) if optionDict: for key, value in optionDict.items(): if not value: continue url += '&include={}'.format(key) try: responseDict = self.get(url) return SoftwareProfile.getListFromDict(responseDict)[0] except TortugaException: raise except Exception as ex: raise TortugaException(exception=ex)
def getSoftwareProfileList(self, tags=None): """ Returns a list of all software profiles in the system. """ url = 'v1/softwareProfiles' try: _, responseDict = self.sendSessionRequest(url) return SoftwareProfile.getListFromDict(responseDict) except TortugaException as ex: raise except Exception as ex: raise TortugaException(exception=ex)