API equivalent for nova boot --config-drive

Asked by Guido Patanella

I am interested in using the --config-drive option through REST api. So far, all I could found how to use the config-drive option is through the nova boot command:

http://docs.openstack.org/grizzly/openstack-compute/admin/content//config-drive.html

Is this implemented through any API method ?

Question information

Language:
English Edit question
Status:
Answered
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
LiangChen (hs-chen) said :
#1

hi,Guido Patanella
  i see the code in path ../nova/nova/virt/configdrive.py,

  def required_by(instance):
    return instance.get('config_drive') or CONF.force_config_drive

and ../nova/nova/virt/libvirt/driver.py

     # Config drive
        if configdrive.required_by(instance):
            LOG.info(_('Using config drive'), instance=instance)

You can use rest api add "config_drive": true in message body.
You can also configure the Compute service to always create a config drive by setting the following option in /etc/nova/nova.conf:
force_config_drive=true

Can you help with this problem?

Provide an answer of your own, or ask Guido Patanella for more information if necessary.

To post a message you must log in.