Example #1
0
    def getHostRoles(self, **args):
        """Returns a list of roles that belong to the specified host"""
        #create list of criteria accepted by API
        acceptable_params = ["host", "rev", "tag"]

        return _get_list(self.base_url, "getHostRoles", "role",
                         acceptable_params, self.debug, **args)
Example #2
0
    def expandRange(self, **args):
        """Returns a list of hosts that match the range expression"""
        #create list of criteria accepted by API
        acceptable_params = ["range", "rev"]

        return _get_list(self.base_url, "expandRange", "member",
                         acceptable_params, self.debug, **args)
Example #3
0
    def getBranches(self, **args):
        """Find and return list of branches for given property"""
        #create list of criteria accepted by API
        acceptable_params = ["property", "rev"]

        return _get_list(self.base_url, "getBranches", "branch",
                         acceptable_params, self.debug, **args)
Example #4
0
    def getTags(self, **args):
        """Find and return list of tags for given property"""
        #create list of criteria accepted by API
        acceptable_params = ["property"]

        return _get_list(self.base_url, "getTags", "tag", acceptable_params,
                         self.debug, **args)
Example #5
0
    def getRoleDependents(self, **args):
        """Find and return list of branches for given property"""
        #create list of criteria accepted by API
        acceptable_params = ["role", "rev", "tag"]

        return _get_list(self.base_url, "getRoleDependents", "role",
                         acceptable_params, self.debug, **args)
Example #6
0
    def getRoleMembers(self, **args):
        """Find and return list of branches for given property"""
        #create list of criteria accepted by API
        acceptable_params = ["role", "definition",
                             "rev"]  # disable definition??

        return _get_list(self.base_url, "getRoleMembers", "host",
                         acceptable_params, self.debug, **args)