Class: Morpheus::APIClient
- Inherits:
-
Object
- Object
- Morpheus::APIClient
show all
- Defined in:
- lib/morpheus/api/api_client.rb
Direct Known Subclasses
AccountsInterface, AppsInterface, CloudsInterface, DeployInterface, GroupsInterface, InstanceTypesInterface, InstancesInterface, KeyPairsInterface, LicenseInterface, LoadBalancersInterface, LogsInterface, OptionsInterface, ProvisionTypesInterface, RolesInterface, SecurityGroupRulesInterface, SecurityGroupsInterface, ServersInterface, TaskSetsInterface, TasksInterface, UsersInterface
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
70
71
72
|
# File 'lib/morpheus/api/api_client.rb', line 70
def accounts
Morpheus::AccountsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#apps ⇒ Object
54
55
56
|
# File 'lib/morpheus/api/api_client.rb', line 54
def apps
Morpheus::AppsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#clouds ⇒ Object
22
23
24
|
# File 'lib/morpheus/api/api_client.rb', line 22
def clouds
Morpheus::CloudsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#deploy ⇒ Object
58
59
60
|
# File 'lib/morpheus/api/api_client.rb', line 58
def deploy
Morpheus::DeployInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#groups ⇒ Object
18
19
20
|
# File 'lib/morpheus/api/api_client.rb', line 18
def groups
Morpheus::GroupsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#instance_types ⇒ Object
34
35
36
|
# File 'lib/morpheus/api/api_client.rb', line 34
def instance_types
Morpheus::InstanceTypesInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#instances ⇒ Object
30
31
32
|
# File 'lib/morpheus/api/api_client.rb', line 30
def instances
Morpheus::InstancesInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#key_pairs ⇒ Object
86
87
88
|
# File 'lib/morpheus/api/api_client.rb', line 86
def key_pairs
Morpheus::KeyPairsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#license ⇒ Object
90
91
92
|
# File 'lib/morpheus/api/api_client.rb', line 90
def license
Morpheus::LicenseInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#load_balancers ⇒ Object
42
43
44
|
# File 'lib/morpheus/api/api_client.rb', line 42
def load_balancers
Morpheus::LoadBalancersInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#logs ⇒ Object
78
79
80
|
# File 'lib/morpheus/api/api_client.rb', line 78
def logs
Morpheus::LogsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#options ⇒ Object
14
15
16
|
# File 'lib/morpheus/api/api_client.rb', line 14
def options
Morpheus::OptionsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#provision_types ⇒ Object
38
39
40
|
# File 'lib/morpheus/api/api_client.rb', line 38
def provision_types
Morpheus::ProvisionTypesInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#roles ⇒ Object
82
83
84
|
# File 'lib/morpheus/api/api_client.rb', line 82
def roles
Morpheus::RolesInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#security_group_rules ⇒ Object
#security_groups ⇒ Object
62
63
64
|
# File 'lib/morpheus/api/api_client.rb', line 62
def security_groups
Morpheus::SecurityGroupsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#servers ⇒ Object
26
27
28
|
# File 'lib/morpheus/api/api_client.rb', line 26
def servers
Morpheus::ServersInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#task_sets ⇒ Object
50
51
52
|
# File 'lib/morpheus/api/api_client.rb', line 50
def task_sets
Morpheus::TaskSetsInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#tasks ⇒ Object
46
47
48
|
# File 'lib/morpheus/api/api_client.rb', line 46
def tasks
Morpheus::TasksInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|
#users ⇒ Object
74
75
76
|
# File 'lib/morpheus/api/api_client.rb', line 74
def users
Morpheus::UsersInterface.new(@access_token, @refresh_token, @expires_at, @base_url)
end
|