Return app ModelEntities from bundle deploy
[osm/N2VC.git] / juju / controller.py
1 class Controller(object):
2 def add_model(self, name, config=None, credential=None, owner=None):
3 """Add a model to this controller.
4
5 :param str name: Name of the model
6 :param dict config: Model configuration
7 :param str credential: e.g. '<cloud>:<credential>'
8 :param str owner: Owner username
9
10 """
11 pass
12
13 def add_user(self, username, display_name=None, acl=None, models=None):
14 """Add a user to this controller.
15
16 :param str username: Username
17 :param str display_name: Display name
18 :param str acl: Access control, e.g. 'read'
19 :param list models: Models to which the user is granted access
20
21 """
22 pass
23
24 def change_user_password(self, username, password):
25 """Change the password for a user in this controller.
26
27 :param str username: Username
28 :param str password: New password
29
30 """
31 pass
32
33 def destroy(self, destroy_all_models=False):
34 """Destroy this controller.
35
36 :param bool destroy_all_models: Destroy all hosted models in the
37 controller.
38
39 """
40 pass
41
42 def disable_user(self, username):
43 """Disable a user.
44
45 :param str username: Username
46
47 """
48 pass
49
50 def enable_user(self):
51 """Re-enable a previously disabled user.
52
53 """
54 pass
55
56 def kill(self):
57 """Forcibly terminate all machines and other associated resources for
58 this controller.
59
60 """
61 pass
62
63 def get_models(self, all_=False, username=None):
64 """Return list of available models on this controller.
65
66 :param bool all_: List all models, regardless of user accessibilty
67 (admin use only)
68 :param str username: User for which to list models (admin use only)
69
70 """
71 pass
72
73 def get_payloads(self, *patterns):
74 """Return list of known payloads.
75
76 :param str \*patterns: Patterns to match against
77
78 Each pattern will be checked against the following info in Juju::
79
80 - unit name
81 - machine id
82 - payload type
83 - payload class
84 - payload id
85 - payload tag
86 - payload status
87
88 """
89 pass
90
91 def get_users(self, all_=False):
92 """Return list of users that can connect to this controller.
93
94 :param bool all_: Include disabled users
95
96 """
97 pass
98
99 def login(self):
100 """Log in to this controller.
101
102 """
103 pass
104
105 def logout(self, force=False):
106 """Log out of this controller.
107
108 :param bool force: Don't fail even if user not previously logged in
109 with a password
110
111 """
112 pass
113
114 def get_model(self, name):
115 """Get a model by name.
116
117 :param str name: Model name
118
119 """
120 pass
121
122 def get_user(self, username):
123 """Get a user by name.
124
125 :param str username: Username
126
127 """
128 pass