summaryrefslogtreecommitdiff
path: root/doc/rtd/topics/datasources.rst
blob: c2354ace1e8936139d990419d463ea63d76b9380 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
.. _datasources:

=========
Datasources
=========
----------
 What is a datasource?
----------

Datasources are sources of configuration data for cloud-init that typically come
from the user (aka userdata) or come from the stack that created the configuration
drive (aka metadata). Typical userdata would include files, yaml, and shell scripts
while typical metadata would include server name, instance id, display name and other
cloud specific details. Since there are multiple ways to provide this data (each cloud
solution seems to prefer its own way) internally a datasource abstract class was
created to allow for a single way to access the different cloud systems methods 
to provide this data through the typical usage of subclasses.

The current interface that a datasource object must provide is the following:

.. sourcecode:: python
    
    def get_userdata(self, apply_filter=False)
    
    @property
    def launch_index(self)
    
    @property
    def is_disconnected(self)
    
    def get_userdata_raw(self)
    
    # the data sources' config_obj is a cloud-config formated
    # object that came to it from ways other than cloud-config
    # because cloud-config content would be handled elsewhere
    def get_config_obj(self)
    
    def get_public_ssh_keys(self)
    
    def device_name_to_device(self, name)
    
    def get_locale(self)
    
    @property
    def availability_zone(self)
    
    def get_instance_id(self)
    
    def get_hostname(self, fqdn=False)
    
    def get_package_mirror_info(self)

---------------------------
EC2
---------------------------

TBD

---------------------------
Config Drive
---------------------------

.. include:: ../../sources/configdrive/README.rst

---------------------------
Alt cloud
---------------------------

.. include:: ../../sources/altcloud/README.rst

---------------------------
No cloud
---------------------------

.. include:: ../../sources/nocloud/README.rst

---------------------------
MAAS
---------------------------

TBD

---------------------------
CloudStack
---------------------------

TBD

---------------------------
OVF
---------------------------

See: https://bazaar.launchpad.net/~cloud-init-dev/cloud-init/trunk/files/head:/doc/sources/ovf/

---------------------------
Fallback/None
---------------------------

TBD