Exemplo n.º 1
0
# to their 'multiplied' byte amount
BYTE_MULTIPLIERS = {
    '': 1,
    't': 1024**4,
    'g': 1024**3,
    'm': 1024**2,
    'k': 1024,
}

# used in limits
TIME_UNITS = {'SECOND': 1, 'MINUTE': 60, 'HOUR': 3600, 'DAY': 84400}

_IS_NEUTRON_ATTEMPTED = False
_IS_NEUTRON = False

synchronized = lockutils.synchronized_with_prefix('nova-')


def vpn_ping(address, port, timeout=0.05, session_id=None):
    """Sends a vpn negotiation packet and returns the server session.

    Returns False on a failure. Basic packet structure is below.

    Client packet (14 bytes)::

         0 1      8 9  13
        +-+--------+-----+
        |x| cli_id |?????|
        +-+--------+-----+
        x = packet identifier 0x38
        cli_id = 64 bit identifier
Exemplo n.º 2
0
    'k': 1024,
}

# used in limits
TIME_UNITS = {
    'SECOND': 1,
    'MINUTE': 60,
    'HOUR': 3600,
    'DAY': 84400
}


_IS_NEUTRON_ATTEMPTED = False
_IS_NEUTRON = False

synchronized = lockutils.synchronized_with_prefix('nova-')

SM_IMAGE_PROP_PREFIX = "image_"
SM_INHERITABLE_KEYS = (
    'min_ram', 'min_disk', 'disk_format', 'container_format',
)


def vpn_ping(address, port, timeout=0.05, session_id=None):
    """Sends a vpn negotiation packet and returns the server session.

    Returns False on a failure. Basic packet structure is below.

    Client packet (14 bytes)::

         0 1      8 9  13
Exemplo n.º 3
0
]
CONF = cfg.CONF
CONF.register_opts(monkey_patch_opts)
CONF.register_opts(utils_opts)
CONF.import_opt("network_api_class", "nova.network")

LOG = logging.getLogger(__name__)

# used in limits
TIME_UNITS = {"SECOND": 1, "MINUTE": 60, "HOUR": 3600, "DAY": 84400}


_IS_NEUTRON_ATTEMPTED = False
_IS_NEUTRON = False

synchronized = lockutils.synchronized_with_prefix("nova-")

SM_IMAGE_PROP_PREFIX = "image_"
SM_INHERITABLE_KEYS = ("min_ram", "min_disk", "disk_format", "container_format")


def vpn_ping(address, port, timeout=0.05, session_id=None):
    """Sends a vpn negotiation packet and returns the server session.

    Returns False on a failure. Basic packet structure is below.

    Client packet (14 bytes)::

         0 1      8 9  13
        +-+--------+-----+
        |x| cli_id |?????|