cumulogic_client 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +8 -8
- data/LICENSE.txt +26 -2
- data/NOTICE.txt +10 -2
- data/README.md +50 -3
- data/lib/cumulogic_client/base_client.rb +10 -0
- data/lib/cumulogic_client/nosql.rb +11 -6
- data/lib/cumulogic_client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MTI3MGJhZGVlNjAzYzY3MzQzNDEwODQ4OWVhMmQ3Y2MwNTVkZDA1NA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NzEwOTgyMzVlNGEzNTk1NTY0MDYyYTQxYjZiNzMwNDBhYjU1M2NhYg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NTIwNTE5YTc5ZTNmNWJiNTI3ZmRkZGIzMDBlYTJjMTYwMmJiNDgyZGI0ZmQ3
|
10
|
+
Y2JjNzQ5Mzk0MGUyYjUxMzEyZWVjZDgyOTc4ZDIyZDI2YjMwNTQ5NGUzMDVl
|
11
|
+
N2FlOTJlMGI2MjRhODlmNWE4MzU1Zjg4M2UxMDllNTE0YmVhNWI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NjljMjk3M2VlYmJkNWZkYjQ0MzRkMWQyNjE0NGNhYzllYTAyNWU5ZTQyMDMy
|
14
|
+
YjZhZjk2NDQ1NGI1MWUwOTM3YzlmOWY0NGYzODRjZGUzMWFiNGJmOWQwOTA0
|
15
|
+
N2Y4Y2E5M2JmMWQ5Y2JhMWI1N2VmYTg0MjFmMjc2NjMyZjE4ZTI=
|
data/LICENSE.txt
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
Copyright (c) 2014 CumuLogic, Inc
|
2
|
-
|
3
1
|
Apache License
|
4
2
|
Version 2.0, January 2004
|
5
3
|
http://www.apache.org/licenses/
|
@@ -176,3 +174,29 @@
|
|
176
174
|
of your accepting any such warranty or additional liability.
|
177
175
|
|
178
176
|
END OF TERMS AND CONDITIONS
|
177
|
+
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
179
|
+
|
180
|
+
To apply the Apache License to your work, attach the following
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "{}"
|
182
|
+
replaced with your own identifying information. (Don't include
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
184
|
+
comment syntax for the file format. We also recommend that a
|
185
|
+
file or class name and description of purpose be included on the
|
186
|
+
same "printed page" as the copyright notice for easier
|
187
|
+
identification within third-party archives.
|
188
|
+
|
189
|
+
Copyright {yyyy} {name of copyright owner}
|
190
|
+
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
192
|
+
you may not use this file except in compliance with the License.
|
193
|
+
You may obtain a copy of the License at
|
194
|
+
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
196
|
+
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
200
|
+
See the License for the specific language governing permissions and
|
201
|
+
limitations under the License.
|
202
|
+
|
data/NOTICE.txt
CHANGED
@@ -1,2 +1,10 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
CumuLogic Ruby API Client
|
2
|
+
|
3
|
+
Copyright (c) 2014 CumuLogic, Inc. All Rights Reserved.
|
4
|
+
|
5
|
+
This product is licensed to you under the Apache License, Version 2.0 (the "License").
|
6
|
+
You may not use this product except in compliance with the License.
|
7
|
+
|
8
|
+
This product may include a number of subcomponents with separate copyright notices
|
9
|
+
and license terms. Your use of these subcomponents is subject to the terms and
|
10
|
+
conditions of the subcomponent's license, as noted in the LICENSE file.
|
data/README.md
CHANGED
@@ -1,6 +1,24 @@
|
|
1
|
+

|
2
|
+
|
1
3
|
# CumulogicClient
|
2
4
|
|
3
|
-
|
5
|
+
This is a Ruby gem that supports working with the CumuLogic Cloud Services Platform
|
6
|
+
API from within Ruby.
|
7
|
+
|
8
|
+
This software is Copyright (c) 2014 CumuLogic, Inc, and is licensed via the Apache
|
9
|
+
Software Licence v2.
|
10
|
+
|
11
|
+
## Status
|
12
|
+
|
13
|
+
At this time, the current API bindings are limited to the NoSQL Relational Database as a Service
|
14
|
+
(DBaaS) service module of the CumuLogic platform.
|
15
|
+
|
16
|
+
Additional modules (Relational DBaaS, Queue-as-a-Service, ElasticCache, LBaaS) will be added to
|
17
|
+
this library over time.
|
18
|
+
|
19
|
+
The current released gem version is:
|
20
|
+
|
21
|
+
[](http://badge.fury.io/rb/cumulogic_client)
|
4
22
|
|
5
23
|
## Installation
|
6
24
|
|
@@ -18,7 +36,32 @@ Or install it yourself as:
|
|
18
36
|
|
19
37
|
## Usage
|
20
38
|
|
21
|
-
|
39
|
+
The example function below will return a Nosql client object:
|
40
|
+
|
41
|
+
```ruby
|
42
|
+
require 'cumulogic_client'
|
43
|
+
|
44
|
+
def get_client()
|
45
|
+
url = "http://sandbox.cumulogic.com/cumulogic/REST/"
|
46
|
+
user = "foo@cumulogic.com"
|
47
|
+
password = "MyPass"
|
48
|
+
ssl = false
|
49
|
+
debugon = false
|
50
|
+
CumulogicClient::Nosql.new(url, user, password, ssl, debugon)
|
51
|
+
end
|
52
|
+
```
|
53
|
+
|
54
|
+
Once you have a client, you can make any of the supported calls via the object's methods.
|
55
|
+
In the example below, we will retrieve a listing of Nosql service catalog items from a target
|
56
|
+
controller.
|
57
|
+
|
58
|
+
```ruby
|
59
|
+
cl = get_client()
|
60
|
+
clplans = cl.get_serviceplans(userid(), 6)
|
61
|
+
```
|
62
|
+
|
63
|
+
One important item to note is the use of the integer 6 as the second param of that call.
|
64
|
+
That is the ID of the Nosql service type in the specific target cloud.
|
22
65
|
|
23
66
|
## Testing
|
24
67
|
|
@@ -33,10 +76,14 @@ YAML file at ~/.cumulogic_client.yml with the following contents:
|
|
33
76
|
USER: yourusername
|
34
77
|
PASSWORD: yourpassword
|
35
78
|
SSL: true
|
36
|
-
|
79
|
+
DEBUG: false
|
80
|
+
NOSQLSERVICEID: 6
|
37
81
|
|
38
82
|
## Contributing
|
39
83
|
|
84
|
+
CumuLogic welcomes community involvement in improving this client binding. To
|
85
|
+
contribute, simply:
|
86
|
+
|
40
87
|
1. Fork it
|
41
88
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
42
89
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
@@ -95,6 +95,16 @@ module CumulogicClient
|
|
95
95
|
end
|
96
96
|
end
|
97
97
|
|
98
|
+
def get_serviceplans(createdBy, serviceType)
|
99
|
+
params = {
|
100
|
+
'createdBy' => createdBy,
|
101
|
+
'serviceType' => serviceType
|
102
|
+
}
|
103
|
+
call('serviceplan/getAllServicePlansByUserId', params)
|
104
|
+
end
|
105
|
+
|
106
|
+
|
107
|
+
|
98
108
|
end
|
99
109
|
|
100
110
|
end
|
@@ -40,20 +40,25 @@ module CumulogicClient
|
|
40
40
|
}
|
41
41
|
end
|
42
42
|
|
43
|
+
def terminate(instanceId)
|
44
|
+
return @client.call('nosql/instance/terminateNoSqlInstance', wrapParam(instanceId))
|
45
|
+
end
|
46
|
+
|
43
47
|
def delete(instanceId)
|
44
|
-
|
45
|
-
'noSqlInstanceId' => instanceId
|
46
|
-
}
|
47
|
-
return @client.call('nosql/instance/deleteNoSqlInstance', params)
|
48
|
+
return @client.call('nosql/instance/deleteNoSqlInstance', wrapParam(instanceId))
|
48
49
|
end
|
49
50
|
|
50
|
-
def create(spec)
|
51
|
+
def create(spec, wait=true)
|
51
52
|
response = @client.call('nosql/instance/createNoSqlInstance', spec.to_hash)
|
52
53
|
@newInstanceId = response[0]['noSqlInstanceId']
|
53
|
-
@client.provisioning_completed(self, 30)
|
54
|
+
@client.provisioning_completed(self, 30) if wait
|
54
55
|
return @newInstanceId
|
55
56
|
end
|
56
57
|
|
58
|
+
def get_serviceplans(createdBy, serviceType)
|
59
|
+
@client.get_serviceplans(createdBy, serviceType)
|
60
|
+
end
|
61
|
+
|
57
62
|
def isComplete()
|
58
63
|
instances = self.list()
|
59
64
|
puts instances
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cumulogic_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chip Childers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|