Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V3 conformant #144

Merged
merged 7 commits into from
Mar 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,14 @@

All notable changes to the IBM® Db2® Plug-in for Zowe CLI will be documented in this file.

## Recent Changes

- BugFix: Updated plug-in to exit code 1 if it encounters an error when issuing commands to Db2 [#144](https://github.com/zowe/zowe-cli-db2-plugin/pull/144)
- V3 Breaking: Updated engines, removed health check and v1 profile support, added port and database to config template [#144](https://github.com/zowe/zowe-cli-db2-plugin/pull/144)

## `5.0.6`

- BugFix: Update follow-redirects transitive dependency to resolve technical debt
- BugFix: Update follow-redirects transitive dependency to resolve technical debt [#139](https://github.com/zowe/zowe-cli-db2-plugin/pull/139)

## `5.0.5`

Expand Down
28 changes: 20 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,18 +102,30 @@ When an unsuccessful message displays, you can troubleshoot the installation by
After you install the plug-in, you create a Db2 profile. A Db2 profile is required to issue commands to the Db2 region. Db2 profiles contain your host, port, user name, password, and a database name for the IBM Db2 server of your choice. You can create multiple profiles and switch between them as needed.

**Follow these steps:**
1. Create a Db2 profile:
1. Install the IBM Db2 Plug-in for Zowe CLI
2. Create a Db2 profile:

```
zowe profiles create db2 <profile name> -H <host> -P <port> -u <user> -p <password> -d <database>
zowe config init
```
3. Set the port number to your Db2 port:

```
zowe config set profiles.db2.properties.port <port number>
```

4. Set the database to your Db2 database:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

data base should be two words.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do not believe database should be two words. It is referenced as database in Zowe Docs.


```
zowe config set profiles.db2.properties.database <database name>
```

5. If required, set the SSL File to the CA certificate used for the DB2 server:

```
zowe config set profiles.db2.properties.sslFile <full path to SSL CA Certificate file>
```

The result of the command displays as a success or failure message. You can use your profile when you issue commands in the Db2 command group.

**Tip:** For more information about the syntax, actions, and options, for a profiles create command, open Zowe CLI and issue the following command:
```
zowe profiles create db2 -h
```

## Running tests

Expand Down
6 changes: 3 additions & 3 deletions __tests__/DB2Sessions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import { SESSION } from "./Db2TestConstants";
import { IDB2Session } from "../src/rest/session/doc/IDB2Session";
const port = 1111111;
describe("createDB2Session()", () => {
let args: ICommandArguments = {$0: "", _: [], ...{host: SESSION.hostname, user: SESSION.user, ...SESSION}};
let profile: IProfile = {host: SESSION.hostname, user: SESSION.user, ...SESSION};
let args: ICommandArguments = {$0: "", _: [], ...{host: SESSION.hostname, ...SESSION}};
let profile: IProfile = {host: SESSION.hostname, ...SESSION};
it("should create a session from cmd arguments if profile is undefined", () => {
let session: any = DB2Session.createDB2Session(args);
session = session.ISession as IDB2Session;
Expand All @@ -38,7 +38,7 @@ describe("createDB2Session()", () => {
expect(session.database).toEqual(SESSION.database);
});
it("should create a session and override profile with cmd arguments", () => {
args = {$0: "", _: [], ...{host: SESSION.hostname, user: SESSION.user, ...SESSION}};
args = {$0: "", _: [], ...{host: SESSION.hostname, ...SESSION}};
profile = {...profile, hostname: "some-test-host", port: 1111111};
let session: any = DB2Session.createDB2Session(args);
session = session.ISession as IDB2Session;
Expand Down
2 changes: 0 additions & 2 deletions __tests__/__resources__/properties/example_properties.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
# my-database-name - This is the name of the database #
###############################################################################

# see bright profiles create db2 --help for more info

db2:
host: my-db2-host
port: my-db2-port
Expand Down
5 changes: 3 additions & 2 deletions __tests__/__snapshots__/imperative.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ Object {
"**/cli/*/*.definition!(.d).*s",
],
"name": "db2",
"pluginHealthCheck": "./lib/HealthCheck.handler",
"productDisplayName": "IBM® Db2® Plug-in for Zowe CLI",
"profiles": Array [
Object {
"schema": Object {
"description": "A profile for interaction with Db2 for the z/OS region",
"properties": Object {
"database": Object {
"includeInTemplate": true,
"optionDefinition": Object {
"aliases": Array [
"d",
Expand Down Expand Up @@ -49,6 +49,7 @@ Object {
"type": "string",
},
"port": Object {
"includeInTemplate": true,
"optionDefinition": Object {
"aliases": Array [
"P",
Expand All @@ -64,7 +65,7 @@ Object {
"aliases": Array [
"s",
],
"description": "Path to an SSL Certificate file",
"description": "Path to the root CA Certificate file",
"name": "ssl-file",
"type": "string",
},
Expand Down
53 changes: 0 additions & 53 deletions jenkins/configure-to-bundle.js

This file was deleted.

7 changes: 0 additions & 7 deletions jenkins/integration_tests.sh

This file was deleted.

23 changes: 0 additions & 23 deletions jenkins/npm_login.expect

This file was deleted.

7 changes: 0 additions & 7 deletions jenkins/system_tests.sh

This file was deleted.

Loading
Loading