threefoldtecharchive / 0-templates

0-robot templates
Apache License 2.0
1 stars 1 forks source link

check the disk is alive #247 #253

Closed BolaNasr closed 5 years ago

BolaNasr commented 5 years ago

it works fine using kds farm

 [1]: robot = j.clients.zrobot.robots['local']
   ...: args = {
   ...:     'sync': True,
   ...:     'mode': 'user',
   ...:     'admin': 'password',
   ...:     'path' : '/mnt/storagepools/4bac68c9-d055-44cb-92ea-051cd4dfd89f/filesystems/zdb'
   ...: }
   ...: 

In [2]: zdb = robot.services.create('github.com/threefoldtech/0-templates/zerodb/0.0.1', 'tests_disk',
   ...:  data=args)

In [3]: zdb.schedule_action('install').wait(die=True)
Out[3]: install

In [4]: zdb.schedule_action('start').wait(die=True)
Out[4]: start

In [5]: zdb.state
Out[5]: {'actions': {'install': 'ok', 'start': 'ok'}, 'status': {'running': 'ok'}}