Debian Codegraph @

aodhclient/v2/client.py

raw
1 # Copyright 2012 OpenStack Foundation
2 # All Rights Reserved.
3 #
4 # Licensed under the Apache License, Version 2.0 (the "License"); you may
5 # not use this file except in compliance with the License. You may obtain
6 # a copy of the License at
7 #
8 # http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 # License for the specific language governing permissions and limitations
14 # under the License.
15
16 from aodhclient import client
17 from aodhclient.v2 import alarm
18 from aodhclient.v2 import alarm_history
19 from aodhclient.v2 import capabilities
20 from aodhclient.v2 import metrics
21 from aodhclient.v2 import quota
22
23
24 class Client:
25 """Client for the Aodh v2 API.
26
27 :param string session: session
28 :type session: :py:class:`keystoneauth.adapter.Adapter`
29 """
30
31 def __init__(self, session=None, service_type='alarming', **kwargs):
32 """Initialize a new client for the Aodh v2 API."""
33 self.api = client.SessionClient(session, service_type=service_type,
34 **kwargs)
35 self.alarm = alarm.AlarmManager(self)
36 self.alarm_history = alarm_history.AlarmHistoryManager(self)
37 self.capabilities = capabilities.CapabilitiesManager(self)
38 self.quota = quota.QuotasManager(self)
39 self.metrics = metrics.MetricsManager(self)