#!/usr/bin/python
import urllib2
import urllib
import json
improt re
weatherHtml = urllib.urlopen('http://172.17.37.93:1949/machine/select')
weatherHtml1 = weatherHtml.read()
weatherJSON = json.loads(weatherHtml1)
out=open('/root/cmdb_ip','w')
for i in  weatherJSON["data"]:    
    abc = i['private_ip'] + "\n"    
    for key in abc:        
        out.write(key)