Skip to content

Commit a795dd3

Browse files
reggeenrGitHub Enterprise
authored andcommitted
sdk-update-20230324-173329 (#17)
* fix(generator): SDK update 20230324-173329 * fix(deps): currency update * fix(api): added integration test for egress ips
1 parent 6e7d2ee commit a795dd3

File tree

7 files changed

+1061
-15909
lines changed

7 files changed

+1061
-15909
lines changed

.travis.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,17 @@ before_deploy:
3636
- echo "//na.artifactory.swg-devops.com/artifactory/api/npm/wcp-codeengine-ux-team-npm-local/:_auth=$ARTIFACTORY_PASSWORD" >> ~/.npmrc #pragma: allowlist secret
3737
- echo "//na.artifactory.swg-devops.com/artifactory/api/npm/wcp-codeengine-ux-team-npm-local/:email=$ARTIFACTORY_MAIL" >> ~/.npmrc
3838
- echo "//na.artifactory.swg-devops.com/artifactory/api/npm/wcp-codeengine-ux-team-npm-local/:always-auth=true" >> ~/.npmrc
39+
- npm install -g semantic-release
40+
- npm install -g @semantic-release/changelog
41+
- npm install -g @semantic-release/exec
42+
- npm install -g @semantic-release/git
43+
- npm install -g @semantic-release/github
44+
- npm install -g @semantic-release/npm
3945

4046
deploy:
4147
- provider: script
4248
skip_cleanup: true
43-
script: npx semantic-release
49+
script: semantic-release
4450
on:
4551
node: 18
4652
branch: main

code-engine/v2.ts

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616

1717
/**
18-
* IBM OpenAPI SDK Code Generator Version: 3.64.0-959a5845-20230112-195144
18+
* IBM OpenAPI SDK Code Generator Version: 3.66.0-d6c2d7e0-20230215-221247
1919
*/
2020

2121
/* eslint-disable max-classes-per-file */
@@ -297,6 +297,58 @@ class CodeEngineV2 extends BaseService {
297297

298298
return this.createRequest(parameters);
299299
}
300+
301+
/**
302+
* List egress IP addresses.
303+
*
304+
* Lists all egress IP addresses (public and private) that are used by components running in this project.
305+
*
306+
* @param {Object} params - The parameters to send to the service.
307+
* @param {string} params.projectId - The ID of the project.
308+
* @param {OutgoingHttpHeaders} [params.headers] - Custom request headers
309+
* @returns {Promise<CodeEngineV2.Response<CodeEngineV2.ProjectEgressIPAddresses>>}
310+
*/
311+
public getProjectEgressIps(
312+
params: CodeEngineV2.GetProjectEgressIpsParams
313+
): Promise<CodeEngineV2.Response<CodeEngineV2.ProjectEgressIPAddresses>> {
314+
const _params = { ...params };
315+
const _requiredParams = ['projectId'];
316+
const _validParams = ['projectId', 'headers'];
317+
const _validationErrors = validateParams(_params, _requiredParams, _validParams);
318+
if (_validationErrors) {
319+
return Promise.reject(_validationErrors);
320+
}
321+
322+
const path = {
323+
'project_id': _params.projectId,
324+
};
325+
326+
const sdkHeaders = getSdkHeaders(
327+
CodeEngineV2.DEFAULT_SERVICE_NAME,
328+
'v2',
329+
'getProjectEgressIps'
330+
);
331+
332+
const parameters = {
333+
options: {
334+
url: '/projects/{project_id}/egress_ips',
335+
method: 'GET',
336+
path,
337+
},
338+
defaultOptions: extend(true, {}, this.baseOptions, {
339+
headers: extend(
340+
true,
341+
sdkHeaders,
342+
{
343+
'Accept': 'application/json',
344+
},
345+
_params.headers
346+
),
347+
}),
348+
};
349+
350+
return this.createRequest(parameters);
351+
}
300352
/*************************
301353
* applications
302354
************************/
@@ -2921,6 +2973,13 @@ namespace CodeEngineV2 {
29212973
headers?: OutgoingHttpHeaders;
29222974
}
29232975

2976+
/** Parameters for the `getProjectEgressIps` operation. */
2977+
export interface GetProjectEgressIpsParams {
2978+
/** The ID of the project. */
2979+
projectId: string;
2980+
headers?: OutgoingHttpHeaders;
2981+
}
2982+
29242983
/** Parameters for the `listApps` operation. */
29252984
export interface ListAppsParams {
29262985
/** The ID of the project. */
@@ -4740,6 +4799,14 @@ namespace CodeEngineV2 {
47404799
status?: string;
47414800
}
47424801

4802+
/** Describes the model of egress IP addresses. */
4803+
export interface ProjectEgressIPAddresses {
4804+
/** List of IBM private network IP addresses. */
4805+
private?: string[];
4806+
/** List of public IP addresses. */
4807+
public?: string[];
4808+
}
4809+
47434810
/** Contains a list of projects and pagination information. */
47444811
export interface ProjectList {
47454812
/** Describes properties needed to retrieve the first page of a result list. */

examples/code-engine.v2.test.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,34 @@ describe('CodeEngineV2', () => {
155155
// end-get_project
156156
});
157157

158+
test('getProjectEgressIps request example', async () => {
159+
consoleLogMock.mockImplementation((output) => {
160+
originalLog(output);
161+
});
162+
consoleWarnMock.mockImplementation((output) => {
163+
// if an error occurs, display the message and then fail the test
164+
originalWarn(output);
165+
expect(true).toBeFalsy();
166+
});
167+
168+
originalLog('getProjectEgressIps() result:');
169+
// begin-get_project_egress_ips
170+
171+
const params = {
172+
projectId: '15314cc3-85b4-4338-903f-c28cdee6d005',
173+
};
174+
175+
let res;
176+
try {
177+
res = await codeEngineService.getProjectEgressIps(params);
178+
console.log(JSON.stringify(res.result, null, 2));
179+
} catch (err) {
180+
console.warn(err);
181+
}
182+
183+
// end-get_project_egress_ips
184+
});
185+
158186
test('listApps request example', async () => {
159187
consoleLogMock.mockImplementation((output) => {
160188
originalLog(output);

0 commit comments

Comments
 (0)