Class: Morpheus::APIClient
- Inherits:
-
Object
- Object
- Morpheus::APIClient
show all
- Defined in:
- lib/morpheus/api/api_client.rb
Direct Known Subclasses
AccountsInterface, AppTemplatesInterface, AppsInterface, CloudsInterface, CustomInstanceTypesInterface, DashboardInterface, DeployInterface, DeploymentsInterface, GroupsInterface, InstanceTypesInterface, InstancesInterface, KeyPairsInterface, LicenseInterface, LoadBalancersInterface, LogsInterface, OptionsInterface, ProvisionTypesInterface, RolesInterface, SecurityGroupRulesInterface, SecurityGroupsInterface, ServersInterface, TaskSetsInterface, TasksInterface, UsersInterface, VirtualImagesInterface, WhoamiInterface
Instance Method Summary
collapse
Constructor Details
#initialize(access_token, refresh_token = nil, expires_in = nil, base_url = nil) ⇒ APIClient
Returns a new instance of APIClient.
5
6
7
8
9
10
11
12
|
# File 'lib/morpheus/api/api_client.rb', line 5
def initialize(access_token, refresh_token=nil,expires_in = nil, base_url=nil)
@access_token = access_token
@refresh_token = refresh_token
@base_url = base_url
if expires_in != nil
@expires_at = DateTime.now + expires_in.seconds
end
end
|
Instance Method Details
#accounts ⇒ Object
86
87
88
|
# File 'lib/morpheus/api/api_client.rb', line 86
def accounts
Morpheus::AccountsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#app_templates ⇒ Object
66
67
68
|
# File 'lib/morpheus/api/api_client.rb', line 66
def app_templates
Morpheus::AppTemplatesInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#apps ⇒ Object
62
63
64
|
# File 'lib/morpheus/api/api_client.rb', line 62
def apps
Morpheus::AppsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#clouds ⇒ Object
26
27
28
|
# File 'lib/morpheus/api/api_client.rb', line 26
def clouds
Morpheus::CloudsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#custom_instance_types ⇒ Object
#dashboard ⇒ Object
114
115
116
|
# File 'lib/morpheus/api/api_client.rb', line 114
def dashboard
Morpheus::DashboardInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#deploy ⇒ Object
70
71
72
|
# File 'lib/morpheus/api/api_client.rb', line 70
def deploy
Morpheus::DeployInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#deployments ⇒ Object
74
75
76
|
# File 'lib/morpheus/api/api_client.rb', line 74
def deployments
Morpheus::DeploymentsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#groups ⇒ Object
22
23
24
|
# File 'lib/morpheus/api/api_client.rb', line 22
def groups
Morpheus::GroupsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#instance_types ⇒ Object
38
39
40
|
# File 'lib/morpheus/api/api_client.rb', line 38
def instance_types
Morpheus::InstanceTypesInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#instances ⇒ Object
34
35
36
|
# File 'lib/morpheus/api/api_client.rb', line 34
def instances
Morpheus::InstancesInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#key_pairs ⇒ Object
102
103
104
|
# File 'lib/morpheus/api/api_client.rb', line 102
def key_pairs
Morpheus::KeyPairsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#license ⇒ Object
106
107
108
|
# File 'lib/morpheus/api/api_client.rb', line 106
def license
Morpheus::LicenseInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#load_balancers ⇒ Object
46
47
48
|
# File 'lib/morpheus/api/api_client.rb', line 46
def load_balancers
Morpheus::LoadBalancersInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#logs ⇒ Object
94
95
96
|
# File 'lib/morpheus/api/api_client.rb', line 94
def logs
Morpheus::LogsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#options ⇒ Object
18
19
20
|
# File 'lib/morpheus/api/api_client.rb', line 18
def options
Morpheus::OptionsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#provision_types ⇒ Object
42
43
44
|
# File 'lib/morpheus/api/api_client.rb', line 42
def provision_types
Morpheus::ProvisionTypesInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#roles ⇒ Object
98
99
100
|
# File 'lib/morpheus/api/api_client.rb', line 98
def roles
Morpheus::RolesInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#security_group_rules ⇒ Object
#security_groups ⇒ Object
78
79
80
|
# File 'lib/morpheus/api/api_client.rb', line 78
def security_groups
Morpheus::SecurityGroupsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#servers ⇒ Object
30
31
32
|
# File 'lib/morpheus/api/api_client.rb', line 30
def servers
Morpheus::ServersInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#task_sets ⇒ Object
54
55
56
|
# File 'lib/morpheus/api/api_client.rb', line 54
def task_sets
Morpheus::TaskSetsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#tasks ⇒ Object
50
51
52
|
# File 'lib/morpheus/api/api_client.rb', line 50
def tasks
Morpheus::TasksInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#users ⇒ Object
90
91
92
|
# File 'lib/morpheus/api/api_client.rb', line 90
def users
Morpheus::UsersInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#virtual_images ⇒ Object
58
59
60
|
# File 'lib/morpheus/api/api_client.rb', line 58
def virtual_images
Morpheus::VirtualImagesInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#whoami ⇒ Object
14
15
16
|
# File 'lib/morpheus/api/api_client.rb', line 14
def whoami
Morpheus::WhoamiInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|