�
܍~cU � �" � d Z ddlZddlZddlZddlZddlmZ ddlmZ ddlm
Z
mZmZ ddl
mZmZ e j e� � ZdZd� Zd ed
efd�Zd
ej e fd�Zd
� Zd� Zd� Zd� Zd� Z G d� de
j � � Z e e
j! ffgZ"d� Z#dS )zr
This file contains code used to gather the user data passed to an
instance on rootbox / hyperone cloud platforms
� N)�IPv4Address)�log)�sources�subp�util)�
EventScope� EventTypez
/etc/hostsc � � t j t d�� � } | rt � d� � dS t � d� � dS )NT)�quietz5/etc/hosts exists - setting manage_etc_hosts to FalseFz=/etc/hosts does not exists - setting manage_etc_hosts to True)r � load_file� ETC_HOSTS�LOG�debug)�hostss �F/usr/lib/python3/dist-packages/cloudinit/sources/DataSourceRbxCloud.py�get_manage_etc_hostsr sN � ��N�9�D�1�1�1�E�� �� � �I�J�J�J��u��I�I�M�N�N�N��4� �inc�returnc �t � t t t t | � � � � |z � � � � S �N)�strr �int)�addrr s r �increment_ipr # s- � ��{�3�{�4�0�0�1�1�C�7�8�8�9�9�9r c �D � | t | d� � t | d� � gS )z�Return a list of 3 IP addresses: [addr, addr + 2, addr + 3]
@param addr: an object that is passed to IPvAddress
@return: list of strings
� � )r )r s r �
get_three_ipsr ' |