alignak_backend_client/client.py
def get_domains(self):
        """
        Connect to alignak backend and retrieve all available child endpoints of root

        If connection is successful, returns a list of all the resources available in the backend:
        Each resource is identified with its title and provides its endpoint relative to backend
        root endpoint.::

            [
                {u'href': u'loghost', u'title': u'loghost'},
                {u'href': u'escalation', u'title': u'escalation'},
                ...
            ]


        If an error occurs a BackendException is raised.

        If an exception occurs, it is raised to caller.

        :return: list of available resources
        :rtype: list
        """

        resp = self.get('')
        if "_links" in resp:
            _links = resp["_links"]
            if "child" in _links:
                return _links["child"]

        return {}
def get_domains(self):
        resp = self.get('')
        if "_links" in resp:
            _links = resp["_links"]
            if "child" in _links:
                return _links["child"]

        return {}
def get_domains ( self ) : resp = self . get ( '' ) if "_links" in resp : _links = resp [ "_links" ] if "child" in _links : return _links [ "child" ] return { }
Connect to alignak backend and retrieve all available child endpoints of root

        If connection is successful, returns a list of all the resources available in the backend:
        Each resource is identified with its title and provides its endpoint relative to backend
        root endpoint.::

            [
                {u'href': u'loghost', u'title': u'loghost'},
                {u'href': u'escalation', u'title': u'escalation'},
                ...
            ]


        If an error occurs a BackendException is raised.

        If an exception occurs, it is raised to caller.

        :return: list of available resources
        :rtype: list
Connect to alignak backend and retrieve all available child endpoints of root