def _boot_server_with_fip(self, image, flavor, use_floating_ip=True,
                              floating_network=None, **kwargs):
        kwargs["auto_assign_nic"] = True
        server = self._boot_server(image, flavor, **kwargs)

        if not server.networks:
            raise RuntimeError(
                "Server `%s' is not connected to any network. "
                "Use network context for auto-assigning networks "
                "or provide `nics' argument with specific net-id." %
                server.name)

        if use_floating_ip:
            fip = self._attach_floating_ip(server, floating_network)
        else:
            internal_network = list(server.networks)[0]
            fip = {"ip": server.addresses[internal_network][0]["addr"]}

        return server, {"ip": fip.get("ip"),
                        "id": fip.get("id"),
                        "is_floating": use_floating_ip}
Return a colored string using the warning color (`Colors.WARNING`).
dataset/ETHPy150Open openstack/rally/rally/plugins/openstack/scenarios/vm/utils.py/VMScenario._boot_server_with_fip--crossover with--dataset/ETHPy150Open yvesalexandre/bandicoot/bandicoot/helper/tools.py/warning_str