2016-11-18 14:16:47 +00:00
|
|
|
#!/usr/bin/python
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
#
|
|
|
|
# Copyright (c) 2016 Red Hat, Inc.
|
|
|
|
#
|
|
|
|
# This file is part of Ansible
|
|
|
|
#
|
|
|
|
# Ansible is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# Ansible is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with Ansible. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
#
|
|
|
|
|
2017-08-16 03:16:38 +00:00
|
|
|
ANSIBLE_METADATA = {'metadata_version': '1.1',
|
2017-03-14 16:07:22 +00:00
|
|
|
'status': ['preview'],
|
|
|
|
'supported_by': 'community'}
|
|
|
|
|
2016-12-06 10:35:25 +00:00
|
|
|
|
2016-11-18 14:16:47 +00:00
|
|
|
DOCUMENTATION = '''
|
|
|
|
---
|
|
|
|
module: ovirt_host_networks
|
2017-04-21 22:20:24 +00:00
|
|
|
short_description: Module to manage host networks in oVirt/RHV
|
2016-11-18 14:16:47 +00:00
|
|
|
version_added: "2.3"
|
|
|
|
author: "Ondra Machacek (@machacekondra)"
|
|
|
|
description:
|
2017-04-21 22:20:24 +00:00
|
|
|
- "Module to manage host networks in oVirt/RHV."
|
2016-11-18 14:16:47 +00:00
|
|
|
options:
|
|
|
|
name:
|
|
|
|
description:
|
2017-05-03 13:15:36 +00:00
|
|
|
- "Name of the host to manage networks for."
|
2016-11-18 14:16:47 +00:00
|
|
|
required: true
|
|
|
|
state:
|
|
|
|
description:
|
|
|
|
- "Should the host be present/absent."
|
|
|
|
choices: ['present', 'absent']
|
|
|
|
default: present
|
|
|
|
bond:
|
|
|
|
description:
|
|
|
|
- "Dictionary describing network bond:"
|
|
|
|
- "C(name) - Bond name."
|
|
|
|
- "C(mode) - Bonding mode."
|
|
|
|
- "C(interfaces) - List of interfaces to create a bond."
|
|
|
|
interface:
|
|
|
|
description:
|
|
|
|
- "Name of the network interface where logical network should be attached."
|
|
|
|
networks:
|
|
|
|
description:
|
|
|
|
- "List of dictionary describing networks to be attached to interface or bond:"
|
|
|
|
- "C(name) - Name of the logical network to be assigned to bond or interface."
|
|
|
|
- "C(boot_protocol) - Boot protocol one of the I(none), I(static) or I(dhcp)."
|
|
|
|
- "C(address) - IP address in case of I(static) boot protocol is used."
|
2018-03-30 11:56:11 +00:00
|
|
|
- "C(netmask) - Subnet mask in case of I(static) boot protocol is used."
|
2016-11-18 14:16:47 +00:00
|
|
|
- "C(gateway) - Gateway in case of I(static) boot protocol is used."
|
2016-12-14 16:42:15 +00:00
|
|
|
- "C(version) - IP version. Either v4 or v6. Default is v4."
|
2016-11-18 14:16:47 +00:00
|
|
|
labels:
|
|
|
|
description:
|
|
|
|
- "List of names of the network label to be assigned to bond or interface."
|
|
|
|
check:
|
|
|
|
description:
|
|
|
|
- "If I(true) verify connectivity between host and engine."
|
|
|
|
- "Network configuration changes will be rolled back if connectivity between
|
|
|
|
engine and the host is lost after changing network configuration."
|
|
|
|
save:
|
|
|
|
description:
|
|
|
|
- "If I(true) network configuration will be persistent, by default they are temporary."
|
|
|
|
extends_documentation_fragment: ovirt
|
|
|
|
'''
|
|
|
|
|
|
|
|
EXAMPLES = '''
|
|
|
|
# Examples don't contain auth parameter for simplicity,
|
|
|
|
# look at ovirt_auth module to see how to reuse authentication:
|
|
|
|
|
|
|
|
# Create bond on eth0 and eth1 interface, and put 'myvlan' network on top of it:
|
|
|
|
- name: Bonds
|
|
|
|
ovirt_host_networks:
|
|
|
|
name: myhost
|
|
|
|
bond:
|
|
|
|
name: bond0
|
|
|
|
mode: 2
|
|
|
|
interfaces:
|
|
|
|
- eth1
|
|
|
|
- eth2
|
|
|
|
networks:
|
|
|
|
- name: myvlan
|
|
|
|
boot_protocol: static
|
|
|
|
address: 1.2.3.4
|
2018-03-30 11:56:11 +00:00
|
|
|
netmask: 255.255.255.0
|
2016-11-18 14:16:47 +00:00
|
|
|
gateway: 1.2.3.4
|
|
|
|
version: v4
|
|
|
|
|
|
|
|
# Remove bond0 bond from host interfaces:
|
|
|
|
- ovirt_host_networks:
|
|
|
|
state: absent
|
|
|
|
name: myhost
|
|
|
|
bond:
|
|
|
|
name: bond0
|
|
|
|
|
|
|
|
# Assign myvlan1 and myvlan2 vlans to host eth0 interface:
|
|
|
|
- ovirt_host_networks:
|
|
|
|
name: myhost
|
|
|
|
interface: eth0
|
|
|
|
networks:
|
|
|
|
- name: myvlan1
|
|
|
|
- name: myvlan2
|
|
|
|
|
|
|
|
# Remove myvlan2 vlan from host eth0 interface:
|
|
|
|
- ovirt_host_networks:
|
|
|
|
state: absent
|
|
|
|
name: myhost
|
|
|
|
interface: eth0
|
|
|
|
networks:
|
|
|
|
- name: myvlan2
|
|
|
|
|
|
|
|
# Remove all networks/vlans from host eth0 interface:
|
|
|
|
- ovirt_host_networks:
|
|
|
|
state: absent
|
|
|
|
name: myhost
|
|
|
|
interface: eth0
|
|
|
|
'''
|
|
|
|
|
|
|
|
RETURN = '''
|
|
|
|
id:
|
|
|
|
description: ID of the host NIC which is managed
|
|
|
|
returned: On success if host NIC is found.
|
|
|
|
type: str
|
|
|
|
sample: 7de90f31-222c-436c-a1ca-7e655bd5b60c
|
|
|
|
host_nic:
|
2017-04-21 22:20:24 +00:00
|
|
|
description: "Dictionary of all the host NIC attributes. Host NIC attributes can be found on your oVirt/RHV instance
|
2017-05-16 14:48:26 +00:00
|
|
|
at following url: http://ovirt.github.io/ovirt-engine-api-model/master/#types/host_nic."
|
2016-11-18 14:16:47 +00:00
|
|
|
returned: On success if host NIC is found.
|
2017-04-27 11:01:11 +00:00
|
|
|
type: dict
|
2016-11-18 14:16:47 +00:00
|
|
|
'''
|
|
|
|
|
2017-02-02 19:45:22 +00:00
|
|
|
import traceback
|
|
|
|
|
|
|
|
try:
|
|
|
|
import ovirtsdk4.types as otypes
|
|
|
|
except ImportError:
|
|
|
|
pass
|
|
|
|
|
|
|
|
from ansible.module_utils.basic import AnsibleModule
|
|
|
|
from ansible.module_utils.ovirt import (
|
|
|
|
BaseModule,
|
|
|
|
check_sdk,
|
|
|
|
create_connection,
|
|
|
|
equal,
|
|
|
|
get_dict_of_struct,
|
|
|
|
get_entity,
|
|
|
|
get_link_name,
|
|
|
|
ovirt_full_argument_spec,
|
|
|
|
search_by_name,
|
|
|
|
)
|
|
|
|
|
2016-11-18 14:16:47 +00:00
|
|
|
|
2018-03-30 11:56:11 +00:00
|
|
|
def get_mode_type(mode_number):
|
|
|
|
"""
|
|
|
|
Adaptive transmit load balancing (balance-tlb): mode=1 miimon=100
|
|
|
|
Dynamic link aggregation (802.3ad): mode=2 miimon=100
|
|
|
|
Load balance (balance-xor): mode=3 miimon=100
|
|
|
|
Active-Backup: mode=4 miimon=100 xmit_hash_policy=2
|
|
|
|
"""
|
|
|
|
options = []
|
|
|
|
if mode_number is None:
|
|
|
|
return options
|
|
|
|
|
|
|
|
def get_type_name(mode_number):
|
|
|
|
"""
|
|
|
|
We need to maintain this type strings, for the __compare_options method,
|
|
|
|
for easier comparision.
|
|
|
|
"""
|
|
|
|
return [
|
|
|
|
'Active-Backup',
|
|
|
|
'Load balance (balance-xor)',
|
|
|
|
None,
|
|
|
|
'Dynamic link aggregation (802.3ad)',
|
|
|
|
][mode_number]
|
|
|
|
|
|
|
|
try:
|
|
|
|
mode_number = int(mode_number)
|
|
|
|
if mode_number >= 1 and mode_number <= 4:
|
|
|
|
if mode_number == 4:
|
|
|
|
options.append(otypes.Option(name='xmit_hash_policy', value='2'))
|
|
|
|
|
|
|
|
options.append(otypes.Option(name='miimon', value='100'))
|
|
|
|
options.append(
|
|
|
|
otypes.Option(
|
|
|
|
name='mode',
|
|
|
|
type=get_type_name(mode_number - 1),
|
|
|
|
value=str(mode_number)
|
|
|
|
)
|
|
|
|
)
|
|
|
|
else:
|
|
|
|
options.append(otypes.Option(name='mode', value=str(mode_number)))
|
|
|
|
except ValueError:
|
|
|
|
raise Exception("Bond mode must be a number.")
|
|
|
|
|
|
|
|
return options
|
|
|
|
|
|
|
|
|
2016-11-18 14:16:47 +00:00
|
|
|
class HostNetworksModule(BaseModule):
|
|
|
|
|
2018-03-30 11:56:11 +00:00
|
|
|
def __compare_options(self, new_options, old_options):
|
|
|
|
return sorted(get_dict_of_struct(opt) for opt in new_options) != sorted(get_dict_of_struct(opt) for opt in old_options)
|
|
|
|
|
2016-11-18 14:16:47 +00:00
|
|
|
def build_entity(self):
|
|
|
|
return otypes.Host()
|
|
|
|
|
2016-12-14 16:42:15 +00:00
|
|
|
def update_address(self, attachments_service, attachment, network):
|
2018-02-16 07:50:34 +00:00
|
|
|
# Check if there is any change in address assignments and
|
2016-11-18 14:16:47 +00:00
|
|
|
# update it if needed:
|
|
|
|
for ip in attachment.ip_address_assignments:
|
2016-12-14 16:42:15 +00:00
|
|
|
if str(ip.ip.version) == network.get('version', 'v4'):
|
2016-11-18 14:16:47 +00:00
|
|
|
changed = False
|
|
|
|
if not equal(network.get('boot_protocol'), str(ip.assignment_method)):
|
|
|
|
ip.assignment_method = otypes.BootProtocol(network.get('boot_protocol'))
|
|
|
|
changed = True
|
|
|
|
if not equal(network.get('address'), ip.ip.address):
|
|
|
|
ip.ip.address = network.get('address')
|
|
|
|
changed = True
|
|
|
|
if not equal(network.get('gateway'), ip.ip.gateway):
|
|
|
|
ip.ip.gateway = network.get('gateway')
|
|
|
|
changed = True
|
2018-03-30 11:56:11 +00:00
|
|
|
if not equal(network.get('netmask'), ip.ip.netmask):
|
|
|
|
ip.ip.netmask = network.get('netmask')
|
2016-11-18 14:16:47 +00:00
|
|
|
changed = True
|
|
|
|
|
|
|
|
if changed:
|
2016-12-14 16:42:15 +00:00
|
|
|
if not self._module.check_mode:
|
|
|
|
attachments_service.service(attachment.id).update(attachment)
|
2016-11-18 14:16:47 +00:00
|
|
|
self.changed = True
|
|
|
|
break
|
|
|
|
|
|
|
|
def has_update(self, nic_service):
|
|
|
|
update = False
|
|
|
|
bond = self._module.params['bond']
|
|
|
|
networks = self._module.params['networks']
|
2017-10-20 09:42:26 +00:00
|
|
|
labels = self._module.params['labels']
|
2017-01-18 15:00:23 +00:00
|
|
|
nic = get_entity(nic_service)
|
2016-11-18 14:16:47 +00:00
|
|
|
|
|
|
|
if nic is None:
|
|
|
|
return update
|
|
|
|
|
|
|
|
# Check if bond configuration should be updated:
|
|
|
|
if bond:
|
2018-03-30 11:56:11 +00:00
|
|
|
update = self.__compare_options(get_mode_type(bond.get('mode')), getattr(nic.bonding, 'options', []))
|
|
|
|
update = update or not equal(
|
|
|
|
sorted(bond.get('interfaces')) if bond.get('interfaces') else None,
|
|
|
|
sorted(get_link_name(self._connection, s) for s in nic.bonding.slaves)
|
2016-11-18 14:16:47 +00:00
|
|
|
)
|
|
|
|
|
2017-10-20 09:42:26 +00:00
|
|
|
# Check if labels need to be updated on interface/bond:
|
|
|
|
if labels:
|
|
|
|
net_labels = nic_service.network_labels_service().list()
|
2018-03-30 11:56:11 +00:00
|
|
|
# If any lables which user passed aren't assigned, relabel the interface:
|
2017-10-20 09:42:26 +00:00
|
|
|
if sorted(labels) != sorted([lbl.id for lbl in net_labels]):
|
|
|
|
return True
|
|
|
|
|
2016-11-18 14:16:47 +00:00
|
|
|
if not networks:
|
|
|
|
return update
|
|
|
|
|
|
|
|
# Check if networks attachments configuration should be updated:
|
|
|
|
attachments_service = nic_service.network_attachments_service()
|
|
|
|
network_names = [network.get('name') for network in networks]
|
|
|
|
|
|
|
|
attachments = {}
|
|
|
|
for attachment in attachments_service.list():
|
|
|
|
name = get_link_name(self._connection, attachment.network)
|
|
|
|
if name in network_names:
|
|
|
|
attachments[name] = attachment
|
|
|
|
|
|
|
|
for network in networks:
|
|
|
|
attachment = attachments.get(network.get('name'))
|
2018-02-16 07:50:34 +00:00
|
|
|
# If attachment don't exists, we need to create it:
|
2016-11-18 14:16:47 +00:00
|
|
|
if attachment is None:
|
|
|
|
return True
|
|
|
|
|
2016-12-14 16:42:15 +00:00
|
|
|
self.update_address(attachments_service, attachment, network)
|
2016-11-18 14:16:47 +00:00
|
|
|
|
|
|
|
return update
|
|
|
|
|
|
|
|
def _action_save_configuration(self, entity):
|
|
|
|
if self._module.params['save']:
|
|
|
|
if not self._module.check_mode:
|
|
|
|
self._service.service(entity.id).commit_net_config()
|
|
|
|
self.changed = True
|
|
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
argument_spec = ovirt_full_argument_spec(
|
|
|
|
state=dict(
|
|
|
|
choices=['present', 'absent'],
|
|
|
|
default='present',
|
|
|
|
),
|
|
|
|
name=dict(default=None, aliases=['host'], required=True),
|
|
|
|
bond=dict(default=None, type='dict'),
|
|
|
|
interface=dict(default=None),
|
|
|
|
networks=dict(default=None, type='list'),
|
|
|
|
labels=dict(default=None, type='list'),
|
|
|
|
check=dict(default=None, type='bool'),
|
|
|
|
save=dict(default=None, type='bool'),
|
|
|
|
)
|
|
|
|
module = AnsibleModule(argument_spec=argument_spec)
|
|
|
|
check_sdk(module)
|
|
|
|
|
|
|
|
try:
|
2017-03-01 19:59:15 +00:00
|
|
|
auth = module.params.pop('auth')
|
|
|
|
connection = create_connection(auth)
|
2016-11-18 14:16:47 +00:00
|
|
|
hosts_service = connection.system_service().hosts_service()
|
|
|
|
host_networks_module = HostNetworksModule(
|
|
|
|
connection=connection,
|
|
|
|
module=module,
|
|
|
|
service=hosts_service,
|
|
|
|
)
|
|
|
|
|
|
|
|
host = host_networks_module.search_entity()
|
|
|
|
if host is None:
|
|
|
|
raise Exception("Host '%s' was not found." % module.params['name'])
|
|
|
|
|
|
|
|
bond = module.params['bond']
|
|
|
|
interface = module.params['interface']
|
|
|
|
networks = module.params['networks']
|
|
|
|
labels = module.params['labels']
|
|
|
|
nic_name = bond.get('name') if bond else module.params['interface']
|
|
|
|
|
2018-03-07 15:25:32 +00:00
|
|
|
host_service = hosts_service.host_service(host.id)
|
|
|
|
nics_service = host_service.nics_service()
|
2016-11-18 14:16:47 +00:00
|
|
|
nic = search_by_name(nics_service, nic_name)
|
|
|
|
|
2018-03-30 11:56:11 +00:00
|
|
|
network_names = [network['name'] for network in networks or []]
|
2016-11-18 14:16:47 +00:00
|
|
|
state = module.params['state']
|
|
|
|
if (
|
|
|
|
state == 'present' and
|
|
|
|
(nic is None or host_networks_module.has_update(nics_service.service(nic.id)))
|
|
|
|
):
|
2018-03-07 15:25:32 +00:00
|
|
|
# Remove networks which are attached to different interface then user want:
|
|
|
|
attachments_service = host_service.network_attachments_service()
|
2018-03-30 11:56:11 +00:00
|
|
|
|
|
|
|
# Append attachment ID to network if needs update:
|
|
|
|
for a in attachments_service.list():
|
|
|
|
current_network_name = get_link_name(connection, a.network)
|
|
|
|
if current_network_name in network_names:
|
|
|
|
for n in networks:
|
|
|
|
if n['name'] == current_network_name:
|
|
|
|
n['id'] = a.id
|
|
|
|
|
|
|
|
# Check if we have to break some bonds:
|
|
|
|
removed_bonds = []
|
|
|
|
if nic is not None:
|
|
|
|
for host_nic in nics_service.list():
|
|
|
|
if host_nic.bonding and nic.id in [slave.id for slave in host_nic.bonding.slaves]:
|
|
|
|
removed_bonds.append(otypes.HostNic(id=host_nic.id))
|
2018-03-07 15:25:32 +00:00
|
|
|
|
|
|
|
# Assign the networks:
|
2016-11-18 14:16:47 +00:00
|
|
|
host_networks_module.action(
|
|
|
|
entity=host,
|
|
|
|
action='setup_networks',
|
|
|
|
post_action=host_networks_module._action_save_configuration,
|
|
|
|
check_connectivity=module.params['check'],
|
2018-03-30 11:56:11 +00:00
|
|
|
removed_bonds=removed_bonds if removed_bonds else None,
|
2016-11-18 14:16:47 +00:00
|
|
|
modified_bonds=[
|
|
|
|
otypes.HostNic(
|
|
|
|
name=bond.get('name'),
|
|
|
|
bonding=otypes.Bonding(
|
2018-03-30 11:56:11 +00:00
|
|
|
options=get_mode_type(bond.get('mode')),
|
2016-11-18 14:16:47 +00:00
|
|
|
slaves=[
|
|
|
|
otypes.HostNic(name=i) for i in bond.get('interfaces', [])
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
] if bond else None,
|
|
|
|
modified_labels=[
|
|
|
|
otypes.NetworkLabel(
|
2017-10-20 09:42:26 +00:00
|
|
|
id=str(name),
|
2016-11-18 14:16:47 +00:00
|
|
|
host_nic=otypes.HostNic(
|
|
|
|
name=bond.get('name') if bond else interface
|
|
|
|
),
|
|
|
|
) for name in labels
|
|
|
|
] if labels else None,
|
|
|
|
modified_network_attachments=[
|
|
|
|
otypes.NetworkAttachment(
|
2018-03-30 11:56:11 +00:00
|
|
|
id=network.get('id'),
|
2016-11-18 14:16:47 +00:00
|
|
|
network=otypes.Network(
|
|
|
|
name=network['name']
|
|
|
|
) if network['name'] else None,
|
|
|
|
host_nic=otypes.HostNic(
|
|
|
|
name=bond.get('name') if bond else interface
|
|
|
|
),
|
|
|
|
ip_address_assignments=[
|
|
|
|
otypes.IpAddressAssignment(
|
|
|
|
assignment_method=otypes.BootProtocol(
|
|
|
|
network.get('boot_protocol', 'none')
|
|
|
|
),
|
|
|
|
ip=otypes.Ip(
|
|
|
|
address=network.get('address'),
|
|
|
|
gateway=network.get('gateway'),
|
|
|
|
netmask=network.get('netmask'),
|
|
|
|
version=otypes.IpVersion(
|
|
|
|
network.get('version')
|
|
|
|
) if network.get('version') else None,
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
2018-03-30 11:56:11 +00:00
|
|
|
) for network in networks
|
2016-11-18 14:16:47 +00:00
|
|
|
] if networks else None,
|
|
|
|
)
|
|
|
|
elif state == 'absent' and nic:
|
2018-02-28 13:05:32 +00:00
|
|
|
nic_service = nics_service.nic_service(nic.id)
|
|
|
|
|
|
|
|
attachments_service = nic_service.network_attachments_service()
|
2016-11-18 14:16:47 +00:00
|
|
|
attachments = attachments_service.list()
|
2018-02-28 13:05:32 +00:00
|
|
|
attached_labels = set([str(lbl.id) for lbl in nic_service.network_labels_service().list()])
|
2016-11-18 14:16:47 +00:00
|
|
|
if networks:
|
|
|
|
attachments = [
|
|
|
|
attachment for attachment in attachments
|
|
|
|
if get_link_name(connection, attachment.network) in network_names
|
|
|
|
]
|
2018-02-28 13:05:32 +00:00
|
|
|
|
|
|
|
# Need to check if there are any labels to be removed, as backend fail
|
|
|
|
# if we try to send remove non existing label, for bond and attachments it's OK:
|
|
|
|
if (labels and set(labels).intersection(attached_labels)) or bond or attachments:
|
2016-11-18 14:16:47 +00:00
|
|
|
host_networks_module.action(
|
|
|
|
entity=host,
|
|
|
|
action='setup_networks',
|
|
|
|
post_action=host_networks_module._action_save_configuration,
|
|
|
|
check_connectivity=module.params['check'],
|
|
|
|
removed_bonds=[
|
|
|
|
otypes.HostNic(
|
|
|
|
name=bond.get('name'),
|
|
|
|
),
|
|
|
|
] if bond else None,
|
|
|
|
removed_labels=[
|
2018-02-28 13:05:32 +00:00
|
|
|
otypes.NetworkLabel(id=str(name)) for name in labels
|
2018-03-07 15:25:32 +00:00
|
|
|
] if labels else None,
|
2016-11-18 14:16:47 +00:00
|
|
|
removed_network_attachments=list(attachments),
|
|
|
|
)
|
|
|
|
|
|
|
|
nic = search_by_name(nics_service, nic_name)
|
|
|
|
module.exit_json(**{
|
|
|
|
'changed': host_networks_module.changed,
|
|
|
|
'id': nic.id if nic else None,
|
|
|
|
'host_nic': get_dict_of_struct(nic),
|
|
|
|
})
|
|
|
|
except Exception as e:
|
2016-12-14 16:42:15 +00:00
|
|
|
module.fail_json(msg=str(e), exception=traceback.format_exc())
|
2016-11-18 14:16:47 +00:00
|
|
|
finally:
|
2017-03-01 19:59:15 +00:00
|
|
|
connection.close(logout=auth.get('token') is None)
|
2016-11-18 14:16:47 +00:00
|
|
|
|
2016-12-14 16:42:15 +00:00
|
|
|
|
2016-11-18 14:16:47 +00:00
|
|
|
if __name__ == "__main__":
|
|
|
|
main()
|