10
Datasources are sources of configuration data for cloud-init that typically come
11
from the user (aka userdata) or come from the stack that created the configuration
12
drive (aka metadata). Typical userdata would include files, yaml, and shell scripts
13
while typical metadata would include server name, instance id, display name and other
14
cloud specific details. Since there are multiple ways to provide this data (each cloud
15
solution seems to prefer its own way) internally a datasource abstract class was
16
created to allow for a single way to access the different cloud systems methods
17
to provide this data through the typical usage of subclasses.
19
The current interface that a datasource object must provide is the following:
21
.. sourcecode:: python
23
def get_userdata(self, apply_filter=False)
26
def launch_index(self)
29
def is_disconnected(self)
31
def get_userdata_raw(self)
33
# the data sources' config_obj is a cloud-config formated
34
# object that came to it from ways other than cloud-config
35
# because cloud-config content would be handled elsewhere
36
def get_config_obj(self)
38
def get_public_ssh_keys(self)
40
def device_name_to_device(self, name)
45
def availability_zone(self)
47
def get_instance_id(self)
49
def get_hostname(self, fqdn=False)
51
def get_package_mirror_info(self)
53
---------------------------
55
---------------------------
59
---------------------------
61
---------------------------
63
.. include:: ../../sources/configdrive/README.rst
65
---------------------------
67
---------------------------
69
.. include:: ../../sources/altcloud/README.rst
71
---------------------------
73
---------------------------
75
.. include:: ../../sources/nocloud/README.rst
77
---------------------------
79
---------------------------
83
---------------------------
85
---------------------------
89
---------------------------
91
---------------------------
93
See: https://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/files/head:/doc/sources/ovf/
95
---------------------------
97
---------------------------