diff options
author | Stephen Finucane <sfinucan@redhat.com> | 2019-12-16 09:57:34 +0000 |
---|---|---|
committer | Stephen Finucane <sfinucan@redhat.com> | 2020-01-08 13:54:12 +0000 |
commit | df001770938afdad61f4579498d4153450554788 (patch) | |
tree | efd27b5a37b79610ede81d64b7b3e1e8fb03bedc /nova/utils.py | |
parent | 656c18eaf290a3b6ddf743c953f5cdf1d3fb2f05 (diff) | |
download | nova-df001770938afdad61f4579498d4153450554788.tar.gz |
nova-net: Remove final references to nova-network
Strip out everything matching '(is|use)_neutron', except the tests for
nova-network code and two other places that these tests rely on. Along
the way, remove a whole load of apparently unnecessary mocking that
clearly wasn't caught when we switched over the bulk of testing to use
the neutron network driver.
Change-Id: Ifa9c5c468400261a5e1f66b72c575845173a4f8f
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
Diffstat (limited to 'nova/utils.py')
-rw-r--r-- | nova/utils.py | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/nova/utils.py b/nova/utils.py index 5164607615..72665fe891 100644 --- a/nova/utils.py +++ b/nova/utils.py @@ -360,19 +360,17 @@ def make_dev_path(dev, partition=None, base='/dev'): def sanitize_hostname(hostname, default_name=None): - """Return a hostname which conforms to RFC-952 and RFC-1123 specs except - the length of hostname. + """Sanitize a given hostname. - Window, Linux, and Dnsmasq has different limitation: + Return a hostname which conforms to RFC-952 and RFC-1123 specs except the + length of hostname. Window, Linux, and dnsmasq has different limitation: - Windows: 255 (net_bios limits to 15, but window will truncate it) - Linux: 64 - Dnsmasq: 63 + - Windows: 255 (net_bios limits to 15, but window will truncate it) + - Linux: 64 + - dnsmasq: 63 - Due to nova-network will leverage dnsmasq to set hostname, so we chose - 63. - - """ + We choose the lowest of these (so 63). + """ def truncate_hostname(name): if len(name) > 63: |