Esempio n. 1
0
    def get_one(self, host_id):
        """Retrieve information about the given host.

        :param host_ident: UUID or name of a host.
        """
        context = pecan.request.context
        policy.enforce(context, "host:get", action="host:get")
        host = _get_host(host_id)
        return view.format_host(pecan.request.host_url, host)
Esempio n. 2
0
    def get_one(self, host_ident):
        """Retrieve information about the given host.

        :param host_ident: UUID or name of a host.
        """
        context = pecan.request.context
        policy.enforce(context, "host:get", action="host:get")
        host = api_utils.get_resource('ComputeNode', host_ident)
        return view.format_host(pecan.request.host_url, host)
Esempio n. 3
0
    def get_one(self, host_ident):
        """Retrieve information about the given host.

        :param host_ident: UUID or name of a host.
        """
        context = pecan.request.context
        policy.enforce(context, "host:get", action="host:get")
        host = _get_host(host_ident)
        return view.format_host(pecan.request.host_url, host)
Esempio n. 4
0
 def convert_with_links(nodes, limit, url=None,
                        expand=False, **kwargs):
     collection = HostCollection()
     collection.hosts = [view.format_host(url, p) for p in nodes]
     collection.next = collection.get_next(limit, url=url, **kwargs)
     return collection
Esempio n. 5
0
 def convert_with_links(nodes, limit, url=None,
                        expand=False, **kwargs):
     collection = HostCollection()
     collection.hosts = [view.format_host(url, p) for p in nodes]
     collection.next = collection.get_next(limit, url=url, **kwargs)
     return collection