使用cli
from ironicclient import client
kwargs = {'os_username': 'ironic',
'os_password': 'IRONIC_PASSWORD',
'os_auth_url': 'http://192.168.1.72:5000/',
'os_tenant_name': 'services'}
ironic = client.get_client(1, **kwargs)
print ironic.node.list()
print ironic.driver.list()
上面的os_username和os_password是ironic的账号,而不是keystone的账号。
api
- node
- human_id
- instance_uuid
- is_loaded
- links
- maintenance
- manager
- name
- power_state
- provision_state
- set_loaded
- uuid