1   
 2   
 3   
 4   
 5   
 6   
 7   
 8   
 9   
10   
11   
12   
13   
14   
15   
16   
17  from cm_api.endpoints.types import * 
18   
19  __docformat__ = "epytext" 
20   
21  DASHBOARDS_PATH = "/timeseries/dashboards" 
22   
25   
27    """ 
28    Creates the list of dashboards. If any of the dashboards already exist 
29    this whole command will fail and no dashboards will be created. 
30    @since: API v6 
31    @return: The list of dashboards created. 
32    """ 
33    return call(resource_root.post, DASHBOARDS_PATH, ApiDashboard, \ 
34        ret_is_list=True, data=dashboard_list) 
 35   
37    """ 
38    Returns the list of all dashboards. 
39    @since: API v6 
40    @return: A list of API dashboard objects. 
41    """ 
42    return call(resource_root.get, DASHBOARDS_PATH, ApiDashboard, \ 
43       ret_is_list=True) 
 44   
46    """ 
47    Returns a dashboard definition for the specified name. This dashboard 
48    can be imported with the createDashboards API. 
49    @since: API v6 
50    @return: An API dasbhboard object. 
51    """ 
52    return call(resource_root.get, _get_dashboard_path(dashboard_name), \ 
53        ApiDashboard) 
 54   
63   
65    _ATTRIBUTES = { 
66      'name'  : None, 
67      'json'  : None 
68    } 
69   
70 -  def __init__(self, resource_root, name=None, json=None): 
 72   
74      return "<ApiDashboard>: %s" % (self.name) 
 75   
 78