Esempio n. 1
0
def hostinfo():
    '''
    query host info such as uuid,cpu,memory.. and save to db
    '''
    uuid, info = query_dmi()
    ips = query_ip()
    info['name'] = run('hostname').stdout
    update_host(uuid, ips, **info)
Esempio n. 2
0
    def run(self, *args, **kw):
        uuid, info = self.query_dmi()
        ips = self.query_ip()
        info['name'] = run('hostname').stdout

        update_host(uuid, ips, **info)