Skip to content

Commit 1af2edb

Browse files
authored
Merge pull request #101 from mbcse/ymlfile
Added Digital Ocean Services to YML file
2 parents c9f7a93 + b2a3a83 commit 1af2edb

File tree

26 files changed

+1660
-479
lines changed

26 files changed

+1660
-479
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,3 +42,5 @@ jspm_packages
4242
# code coverage
4343
coverage
4444
# .coveralls.yml didn't see it in master branch
45+
46+

generator/dummyClasses/do.js

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
class ClassName {
2-
/**
3-
*
4-
* @param {module} do DO SDK
5-
* @param {object} options SDK options
6-
*/
7-
constructor(dosdk, dotoken) {
8-
this._DO = dosdk;
9-
this._instance = new this._DO(dotoken);
10-
this._sdkClassName=this._instance.SDKClassName;
11-
}
12-
13-
function() {
14-
return new Promise((resolve, reject) => {
15-
this._sdkClassName.SDKFunctionName()
2+
/**
3+
*
4+
* @param {module} do DO SDK
5+
* @param {object} options SDK options
6+
*/
7+
constructor(dosdk, dotoken) {
8+
this._DO = dosdk;
9+
this._instance = new this._DO(dotoken);
10+
this._sdkClassName = this._instance.SDKClassName;
11+
}
12+
13+
function() {
14+
return new Promise((resolve, reject) => {
15+
this._sdkClassName
16+
.SDKFunctionName()
1617
.then(data => resolve(data))
1718
.catch(err => reject(err));
18-
});
19-
}
19+
});
2020
}
21-
22-
module.exports = ClassName;
21+
}
22+
23+
module.exports = ClassName;
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
/*This is an auto generated class, please do not change.*/
2+
/**
3+
* Class to create a Droplets object
4+
* @category Digital Ocean
5+
*/
6+
class DO_ComputeInstance {
7+
/**
8+
*
9+
* @param {module} do DO SDK
10+
* @param {object} options SDK options
11+
*/
12+
constructor(dosdk, dotoken) {
13+
this._DO = dosdk;
14+
this._instance = new this._DO(dotoken);
15+
this._droplets = this._instance.droplets;
16+
}
17+
/**
18+
* Trigers the getAll function of Droplets
19+
* @param {StringKeyword} tagName - Data required for getAll
20+
* @param {BooleanKeyword} includeAll - Data required for getAll
21+
* @param {NumberKeyword} page - Data required for getAll
22+
* @param {NumberKeyword} pageSize - Data required for getAll
23+
* @returns {Promise<getAllResponse>}
24+
*/
25+
list(
26+
tagName,
27+
includeAll = undefined,
28+
page = undefined,
29+
pageSize = undefined
30+
) {
31+
return new Promise((resolve, reject) => {
32+
this._droplets
33+
.getAll(tagName, includeAll, page, pageSize)
34+
.then(data => resolve(data))
35+
.catch(err => reject(err));
36+
});
37+
}
38+
/**
39+
* Trigers the create function of Droplets
40+
* @param {DropletCreationRequest} options - Data required for create
41+
* @returns {Promise<createResponse>}
42+
*/
43+
create(options) {
44+
return new Promise((resolve, reject) => {
45+
this._droplets
46+
.create(options)
47+
.then(data => resolve(data))
48+
.catch(err => reject(err));
49+
});
50+
}
51+
/**
52+
* Trigers the deleteById function of Droplets
53+
* @param {StringKeyword} dropletId - Data required for deleteById
54+
* @returns {Promise<deleteByIdResponse>}
55+
*/
56+
destroy(dropletId) {
57+
return new Promise((resolve, reject) => {
58+
this._droplets
59+
.deleteById(dropletId)
60+
.then(data => resolve(data))
61+
.catch(err => reject(err));
62+
});
63+
}
64+
/**
65+
* Trigers the requestAction function of Droplets
66+
* @param {StringKeyword} dropletId - Data required for requestAction
67+
* @param {AnyKeyword} action - Data required for requestAction
68+
* @returns {Promise<requestActionResponse>}
69+
*/
70+
stop(dropletId, action) {
71+
return new Promise((resolve, reject) => {
72+
this._droplets
73+
.requestAction(dropletId, action)
74+
.then(data => resolve(data))
75+
.catch(err => reject(err));
76+
});
77+
}
78+
}
79+
module.exports = DO_ComputeInstance;
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
/*This is an auto generated class, please do not change.*/
2+
/**
3+
* Class to create a Kubernetes object
4+
* @category Digital Ocean
5+
*/
6+
class DO_Kubernetes {
7+
/**
8+
*
9+
* @param {module} do DO SDK
10+
* @param {object} options SDK options
11+
*/
12+
constructor(dosdk, dotoken) {
13+
this._DO = dosdk;
14+
this._instance = new this._DO(dotoken);
15+
this._kubernetes = this._instance.kubernetes;
16+
}
17+
/**
18+
* Trigers the getClusters function of Kubernetes
19+
* @param {BooleanKeyword} includeAll - Data required for getClusters
20+
* @param {NumberKeyword} page - Data required for getClusters
21+
* @param {NumberKeyword} pageSize - Data required for getClusters
22+
* @returns {Promise<getClustersResponse>}
23+
*/
24+
listClusters(includeAll = undefined, page = undefined, pageSize = undefined) {
25+
return new Promise((resolve, reject) => {
26+
this._kubernetes
27+
.getClusters(includeAll, page, pageSize)
28+
.then(data => resolve(data))
29+
.catch(err => reject(err));
30+
});
31+
}
32+
/**
33+
* Trigers the create function of Kubernetes
34+
* @param {NewClusterRequest} options - Data required for create
35+
* @returns {Promise<createResponse>}
36+
*/
37+
create(options) {
38+
return new Promise((resolve, reject) => {
39+
this._kubernetes
40+
.create(options)
41+
.then(data => resolve(data))
42+
.catch(err => reject(err));
43+
});
44+
}
45+
/**
46+
* Trigers the getById function of Kubernetes
47+
* @param {StringKeyword} clusterId - Data required for getById
48+
* @returns {Promise<getByIdResponse>}
49+
*/
50+
describeCluster(clusterId) {
51+
return new Promise((resolve, reject) => {
52+
this._kubernetes
53+
.getById(clusterId)
54+
.then(data => resolve(data))
55+
.catch(err => reject(err));
56+
});
57+
}
58+
/**
59+
* Trigers the delete function of Kubernetes
60+
* @param {StringKeyword} clusterId - Data required for delete
61+
* @returns {Promise<deleteResponse>}
62+
*/
63+
delete(clusterId) {
64+
return new Promise((resolve, reject) => {
65+
this._kubernetes
66+
.delete(clusterId)
67+
.then(data => resolve(data))
68+
.catch(err => reject(err));
69+
});
70+
}
71+
/**
72+
* Trigers the getNodePools function of Kubernetes
73+
* @param {StringKeyword} clusterId - Data required for getNodePools
74+
* @param {BooleanKeyword} includeAll - Data required for getNodePools
75+
* @param {NumberKeyword} page - Data required for getNodePools
76+
* @param {NumberKeyword} pageSize - Data required for getNodePools
77+
* @returns {Promise<getNodePoolsResponse>}
78+
*/
79+
listNodegroups(
80+
clusterId,
81+
includeAll = undefined,
82+
page = undefined,
83+
pageSize = undefined
84+
) {
85+
return new Promise((resolve, reject) => {
86+
this._kubernetes
87+
.getNodePools(clusterId, includeAll, page, pageSize)
88+
.then(data => resolve(data))
89+
.catch(err => reject(err));
90+
});
91+
}
92+
/**
93+
* Trigers the getNodePoolById function of Kubernetes
94+
* @param {StringKeyword} clusterId - Data required for getNodePoolById
95+
* @param {StringKeyword} nodePoolId - Data required for getNodePoolById
96+
* @returns {Promise<getNodePoolByIdResponse>}
97+
*/
98+
describeNodeGroup(clusterId, nodePoolId) {
99+
return new Promise((resolve, reject) => {
100+
this._kubernetes
101+
.getNodePoolById(clusterId, nodePoolId)
102+
.then(data => resolve(data))
103+
.catch(err => reject(err));
104+
});
105+
}
106+
/**
107+
* Trigers the addNodePool function of Kubernetes
108+
* @param {StringKeyword} clusterId - Data required for addNodePool
109+
* @param {ClusterNodePool} nodePool - Data required for addNodePool
110+
* @returns {Promise<addNodePoolResponse>}
111+
*/
112+
createNodeGroup(clusterId, nodePool) {
113+
return new Promise((resolve, reject) => {
114+
this._kubernetes
115+
.addNodePool(clusterId, nodePool)
116+
.then(data => resolve(data))
117+
.catch(err => reject(err));
118+
});
119+
}
120+
/**
121+
* Trigers the deleteNodePool function of Kubernetes
122+
* @param {StringKeyword} clusterId - Data required for deleteNodePool
123+
* @param {StringKeyword} nodePoolId - Data required for deleteNodePool
124+
* @returns {Promise<deleteNodePoolResponse>}
125+
*/
126+
deleteNodegroup(clusterId, nodePoolId) {
127+
return new Promise((resolve, reject) => {
128+
this._kubernetes
129+
.deleteNodePool(clusterId, nodePoolId)
130+
.then(data => resolve(data))
131+
.catch(err => reject(err));
132+
});
133+
}
134+
}
135+
module.exports = DO_Kubernetes;
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
/*This is an auto generated class, please do not change.*/
2+
/**
3+
* Class to create a Databases object
4+
* @category Digital Ocean
5+
*/
6+
class DO_RDBMS {
7+
/**
8+
*
9+
* @param {module} do DO SDK
10+
* @param {object} options SDK options
11+
*/
12+
constructor(dosdk, dotoken) {
13+
this._DO = dosdk;
14+
this._instance = new this._DO(dotoken);
15+
this._databases = this._instance.databases;
16+
}
17+
/**
18+
* Trigers the getAllClusters function of Databases
19+
* @param {StringKeyword} tagName - Data required for getAllClusters
20+
* @param {BooleanKeyword} includeAll - Data required for getAllClusters
21+
* @param {NumberKeyword} page - Data required for getAllClusters
22+
* @param {NumberKeyword} pageSize - Data required for getAllClusters
23+
* @returns {Promise<getAllClustersResponse>}
24+
*/
25+
getClusters(
26+
tagName,
27+
includeAll = undefined,
28+
page = undefined,
29+
pageSize = undefined
30+
) {
31+
return new Promise((resolve, reject) => {
32+
this._databases
33+
.getAllClusters(tagName, includeAll, page, pageSize)
34+
.then(data => resolve(data))
35+
.catch(err => reject(err));
36+
});
37+
}
38+
/**
39+
* Trigers the createCluster function of Databases
40+
* @param {DatabaseCreateClusterRequest} clusterOptions - Data required for createCluster
41+
* @returns {Promise<createClusterResponse>}
42+
*/
43+
createCluster(clusterOptions) {
44+
return new Promise((resolve, reject) => {
45+
this._databases
46+
.createCluster(clusterOptions)
47+
.then(data => resolve(data))
48+
.catch(err => reject(err));
49+
});
50+
}
51+
/**
52+
* Trigers the getClusterById function of Databases
53+
* @param {StringKeyword} clusterId - Data required for getClusterById
54+
* @returns {Promise<getClusterByIdResponse>}
55+
*/
56+
getCluster(clusterId) {
57+
return new Promise((resolve, reject) => {
58+
this._databases
59+
.getClusterById(clusterId)
60+
.then(data => resolve(data))
61+
.catch(err => reject(err));
62+
});
63+
}
64+
/**
65+
* Trigers the resizeCluster function of Databases
66+
* @param {StringKeyword} clusterId - Data required for resizeCluster
67+
* @param {DatabaseResizeClusterRequest} configuration - Data required for resizeCluster
68+
* @returns {Promise<resizeClusterResponse>}
69+
*/
70+
updateCluster(clusterId, configuration) {
71+
return new Promise((resolve, reject) => {
72+
this._databases
73+
.resizeCluster(clusterId, configuration)
74+
.then(data => resolve(data))
75+
.catch(err => reject(err));
76+
});
77+
}
78+
}
79+
module.exports = DO_RDBMS;

0 commit comments

Comments
 (0)