Ubuntu Pastebin

Paste from smoser at Tue, 14 Mar 2017 21:13:03 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
In [22]: content
Out[22]: 'auto lo\niface lo inet loopback\n\nauto eth0\niface eth0 inet dhcp\n'

In [23]: eni.convert_eni_data(content)
Out[23]: 
{'config': [{'name': 'eth0',
   'subnets': [{'_orig_eni_name': 'eth0', 'control': 'auto', 'type': 'dhcp'}],
   'type': 'physical'},
  {'name': 'lo',
   'subnets': [{'_orig_eni_name': 'lo',
     'control': 'auto',
     'type': 'loopback'}],
   'type': 'physical'}],
 'version': 1}
Download as text