def test_get_shellinabox_console_url(self): generated_url = console_utils.get_shellinabox_console_url( self.info['port']) console_host = CONF.my_ip if utils.is_valid_ipv6(console_host): console_host = '[%s]' % console_host http_url = "http://%s:%s" % (console_host, self.info['port']) self.assertEqual(generated_url, http_url)
def _get_shellinabox_console(self, scheme): generated_url = ( console_utils.get_shellinabox_console_url(self.info['port'])) console_host = CONF.my_ip if netutils.is_valid_ipv6(console_host): console_host = '[%s]' % console_host http_url = "%s://%s:%s" % (scheme, console_host, self.info['port']) self.assertEqual(http_url, generated_url)
def _get_shellinabox_console(self, scheme): generated_url = (console_utils.get_shellinabox_console_url( self.info['port'])) console_host = CONF.my_ip if ipaddress.ip_address(console_host).version == 6: console_host = '[%s]' % console_host http_url = "%s://%s:%s" % (scheme, console_host, self.info['port']) self.assertEqual(http_url, generated_url)
def get_console(self, task): """Get the type and connection information about the console. :raises: MissingParameterValue if required seamicro parameters are missing :raises: InvalidParameterValue if required parameter are invalid. """ driver_info = _parse_driver_info(task.node) url = console_utils.get_shellinabox_console_url(driver_info['port']) return {'type': 'shellinabox', 'url': url}
def get_console(self, task): """Get the type and connection information about the console. :param task: a TaskManager instance containing the node to act on. :raises: MissingParameterValue when required IPMI credentials or the IPMI terminal port are missing :raises: InvalidParameterValue when the IPMI terminal port is not an integer. """ driver_info = _parse_driver_info(task.node) url = console_utils.get_shellinabox_console_url(driver_info['port']) return {'type': 'shellinabox', 'url': url}
def get_console(self, task): """Get the type and connection information about the console.""" driver_info = _parse_driver_info(task.node) url = console_utils.get_shellinabox_console_url(driver_info['port']) return {'type': 'shellinabox', 'url': url}
def get_console(self, task): """Get the type and connection information about the console.""" driver_info = _parse_driver_info(task.node) url = console_utils.get_shellinabox_console_url(driver_info["port"]) return {"type": "shellinabox", "url": url}