metalsmith.instance_config.CloudInitConfig(ssh_keys=None, user_data=None)¶Bases: metalsmith.instance_config.GenericConfig
Configuration of the target instance using cloud-init.
Compared to GenericConfig, this adds support for managing users.
| Variables: |
|
|---|
add_user(name, admin=True, password_hash=None, sudo=False, **kwargs)¶Add a user to be created on first boot.
| Parameters: |
|
|---|
populate_user_data()¶Get user data for this configuration.
Takes the custom user data and appends requested users to it.
| Returns: | user data as a string. |
|---|
metalsmith.instance_config.GenericConfig(ssh_keys=None, user_data=None)¶Bases: object
Configuration of the target instance.
The information attached to this object will be passed via a configdrive to the instance’s first boot script (e.g. cloud-init).
This class represents generic configuration compatible with most first-boot
implementations. Use CloudInitConfig for features specific to
cloud-init.
| Variables: |
|
|---|
generate(node, hostname=None)¶Generate the config drive information.
| Parameters: |
|
|---|---|
| Returns: | configdrive contents as a dictionary with keys:
|
populate_user_data()¶Get user data for this configuration.
Can be overridden to provide additional features.
| Returns: | user data as a string. |
|---|
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.