This file is indexed.

/usr/lib/python2.7/dist-packages/senlinclient/v1/client.py is in python-senlinclient 1.0.0-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.

from senlinclient.common import sdk


class Client(object):

    def __init__(self, prof=None, user_agent=None, **kwargs):
        self.conn = sdk.create_connection(prof=prof, user_agent=user_agent,
                                          **kwargs)
        self.service = self.conn.cluster

    ######################################################################
    # The following operations are interfaces exposed to other software
    # which invokes senlinclient today.
    # These methods form a temporary translation layer. This layer will be
    # useless when OpenStackSDK has been adopted all senlin resources.
    ######################################################################

    def profile_types(self, **query):
        """List profile types

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html
        #listProfileTypes
        """
        return self.service.profile_types(**query)

    def get_profile_type(self, profile_type):
        """Show profile type details

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#showProfileType
        """
        return self.service.get_profile_type(profile_type)

    def profiles(self, **query):
        """List profiles

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#listProfiles
        """
        return self.service.profiles(**query)

    def create_profile(self, **attrs):
        """Create a profile

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#createProfile
        """
        return self.service.create_profile(**attrs)

    def get_profile(self, profile):
        """Show profile details

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#showProfile
        """
        return self.service.get_profile(profile)

    def update_profile(self, profile, **attrs):
        """Update a profile

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#updateProfile
        """
        return self.service.update_profile(profile, **attrs)

    def delete_profile(self, profile, ignore_missing=True):
        """Delete a profile

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#deleteProfile
        """
        return self.service.delete_profile(profile, ignore_missing)

    def validate_profile(self, **attrs):
        """Validate a profile spec

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#validateProfile
        """
        return self.service.validate_profile(**attrs)

    def policy_types(self, **query):
        """List policy types

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html
        #listPolicyType
        """
        return self.service.policy_types(**query)

    def get_policy_type(self, policy_type):
        """Show policy type details

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html
        #showPolicyType
        """
        return self.service.get_policy_type(policy_type)

    def policies(self, **query):
        """List policies

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#listPolicies
        """
        return self.service.policies(**query)

    def create_policy(self, **attrs):
        """Create a policy

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#createPolicy
        """
        return self.service.create_policy(**attrs)

    def get_policy(self, policy):
        """Show policy details

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#showPolicy
        """
        return self.service.get_policy(policy)

    def update_policy(self, policy, **attrs):
        """Update policy

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#updatePolicy
        """
        return self.service.update_policy(policy, **attrs)

    def delete_policy(self, policy, ignore_missing=True):
        """Delete policy

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#deletePolicy
        """
        return self.service.delete_policy(policy, ignore_missing)

    def validate_policy(self, **attrs):
        """validate a policy spec

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#validatePolicy
        """
        return self.service.validate_policy(**attrs)

    def clusters(self, **queries):
        """List clusters

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#listClusters
        """
        return self.service.clusters(**queries)

    def create_cluster(self, **attrs):
        """Create a cluster

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#createCluster
        """
        return self.service.create_cluster(**attrs)

    def get_cluster(self, cluster):
        """Show cluster details

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#showCluster
        """
        return self.service.get_cluster(cluster)

    def update_cluster(self, cluster, **attrs):
        """Update cluster

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#updateCluster
        """
        return self.service.update_cluster(cluster, **attrs)

    def delete_cluster(self, cluster, ignore_missing=True):
        """Delete cluster

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#deleteCluster
        """
        return self.service.delete_cluster(cluster, ignore_missing)

    def cluster_add_nodes(self, cluster, nodes):
        """Add a node to cluster

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#clusterAction
        """
        return self.service.cluster_add_nodes(cluster, nodes)

    def cluster_del_nodes(self, cluster, nodes):
        """Delete a node belongs to cluster

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#clusterAction
        """
        return self.service.cluster_del_nodes(cluster, nodes)

    def cluster_resize(self, cluster, **params):
        """Resize cluster

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#clusterAction
        """
        return self.service.cluster_resize(cluster, **params)

    def cluster_scale_out(self, cluster, count):
        """Scale out cluster

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#clusterAction
        """
        return self.service.cluster_scale_out(cluster, count)

    def cluster_scale_in(self, cluster, count):
        """Scale in cluster

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#clusterAction
        """
        return self.service.cluster_scale_in(cluster, count)

    def cluster_policies(self, cluster, **queries):
        """List all policies attached to cluster

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html
        #listClusterPolicies
        """
        return self.service.cluster_policies(cluster, **queries)

    def get_cluster_policy(self, policy, cluster):
        """Show details of a policy attached to cluster

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html
        #showClusterPolicy
        """
        return self.service.get_cluster_policy(policy, cluster)

    def cluster_attach_policy(self, cluster, policy, **attrs):
        """Attach a policy to cluster

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#clusterAction
        """
        return self.service.cluster_attach_policy(cluster, policy, **attrs)

    def cluster_detach_policy(self, cluster, policy):
        """Detach a policy from cluster

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#clusterAction
        """
        return self.service.cluster_detach_policy(cluster, policy)

    def cluster_update_policy(self, cluster, policy, **attrs):
        """Update the policy attachment

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#clusterAction
        """
        return self.service.cluster_update_policy(cluster, policy, **attrs)

    def cluster_collect(self, cluster, path):
        """Resize cluster

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#clusterAction
        """
        return self.service.cluster_collect(cluster, path)

    def check_cluster(self, cluster, **params):
        """Check cluster's health status

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#clusterAction
        """
        return self.service.check_cluster(cluster, **params)

    def recover_cluster(self, cluster, **params):
        """Recover cluster from failure state

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#clusterAction
        """
        return self.service.recover_cluster(cluster, **params)

    def nodes(self, **queries):
        """List nodes

        Doc link: http://developer.openstack.org/api-ref-clustering-v1.html
                  #listNodes
        """
        return self.service.nodes(**queries)

    def create_node(self, **attrs):
        """Create a node

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#createNode
        """
        return self.service.create_node(**attrs)

    def get_node(self, node, details=False):
        """Show node details

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#showNode
        """
        return self.service.get_node(node, details=details)

    def update_node(self, node, **attrs):
        """Update node

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#updateNode
        """
        return self.service.update_node(node, **attrs)

    def delete_node(self, node, ignore_missing=True):
        """Delete node

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#deleteNode
        """
        return self.service.delete_node(node, ignore_missing)

    def check_node(self, node, **params):
        """Check node's health status

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#nodeAction
        """
        return self.service.check_node(node, **params)

    def recover_node(self, node, **params):
        """Recover node from failure state

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#nodeAction
        """
        return self.service.recover_node(node, **params)

    def receivers(self, **queries):
        """List receivers

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#listReceivers
        """
        return self.service.receivers(**queries)

    def create_receiver(self, **attrs):
        """Creare a receiver

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html
        #createReceiver
        """
        return self.service.create_receiver(**attrs)

    def get_receiver(self, receiver):
        """Show receiver details

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#showReceiver
        """
        return self.service.get_receiver(receiver)

    def delete_receiver(self, receiver, ignore_missing=True):
        """Delete receiver

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html
        #deleteReceiver
        """
        return self.service.delete_receiver(receiver, ignore_missing)

    def events(self, **queries):
        """List events

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#listEvents
        """
        return self.service.events(**queries)

    def get_event(self, event):
        """Show event details

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#showEvent
        """
        return self.service.get_event(event)

    def actions(self, **queries):
        """List actions

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#listActions
        """
        return self.service.actions(**queries)

    def get_action(self, action):
        """Show action details

        Doc link:
        http://developer.openstack.org/api-ref-clustering-v1.html#showAction
        """
        return self.service.get_action(action)