equal
deleted
inserted
replaced
1 # Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. |
1 # Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved. |
2 # |
2 # |
3 # Licensed under the Apache License, Version 2.0 (the "License"); you may |
3 # Licensed under the Apache License, Version 2.0 (the "License"); you may |
4 # not use this file except in compliance with the License. You may obtain |
4 # not use this file except in compliance with the License. You may obtain |
5 # a copy of the License at |
5 # a copy of the License at |
6 # |
6 # |
35 |
35 |
36 # TODO(gmoodalb): dnsmasq uses old style `ifreq', so 16 is the maximum |
36 # TODO(gmoodalb): dnsmasq uses old style `ifreq', so 16 is the maximum |
37 # length including the NUL character. If we change it to use new style |
37 # length including the NUL character. If we change it to use new style |
38 # `lifreq', then we will be able to extend the length to 32 characters. |
38 # `lifreq', then we will be able to extend the length to 32 characters. |
39 VNIC_NAME_MAXLEN = 15 |
39 VNIC_NAME_MAXLEN = 15 |
40 VNIC_NAME_PREFIX = 'evs' |
40 VNIC_NAME_PREFIX = 'dh' |
41 VNIC_NAME_SUFFIX = '_0' |
41 VNIC_NAME_SUFFIX = '_0' |
42 VNIC_NAME_LEN_WO_SUFFIX = VNIC_NAME_MAXLEN - \ |
42 VNIC_NAME_LEN_WO_SUFFIX = VNIC_NAME_MAXLEN - \ |
43 len(VNIC_NAME_SUFFIX) |
43 len(VNIC_NAME_SUFFIX) |
44 |
44 |
45 def __init__(self, conf): |
45 def __init__(self, conf): |