Esempio n. 1
0
File: pxe.py Progetto: sadig/DC2
 def _index(self, *args, **kwargs):
     verb = kwargs.get('verb', None)
     backend_list = backends.backend_list()
     pxe_list = pxemethods.pxe_list()
     page = self._prepare_page(verb)
     page.set_title('DC2 Admincenter - PXE Types - Index')
     page.add_page_data({
         'backendlist': backend_list,
         'pxelist': pxe_list
     })
     page.set_action('index')
     result = self._prepare_output(verb['request_type'],
                                   verb['request_content_type'],
                                   output={'content': page.render()})
     return result
Esempio n. 2
0
 def _index(self, *args, **kwargs):
     params = web.input()
     verb = kwargs.get('verb', None)
     page = self._prepare_page(verb)
     backend_list = backends.backend_list()
     backend_id = params.get('backend_id', None)
     backend = backends.backend_get({'_id': backend_id})
     self._init_backend(backend)
     pxelist = self._pxemethods.list()
     pxe_methods = pxemethods.pxe_list()
     page.set_title('DC2 Admincenter - Backends - PXE Bootmethods - Index')
     page.add_page_data({
         'backendlist': backend_list,
         'backend_id': backend_id,
         'backend_pxemethods': pxelist,
         'pxemethods': pxe_methods,
     })
     page.set_action('index')
     result = self._prepare_output(verb['request_type'],
                                   verb['request_content_type'],
                                   output={'content': page.render()})
     return result