Skip to content

Commit

Permalink
Merge branch 'release/v0.5.0' into docs
Browse files Browse the repository at this point in the history
Signed-off-by: Uladzislau <[email protected]>
  • Loading branch information
KUGDev committed Sep 5, 2024
2 parents b2e98e7 + cf171a9 commit 315c5c6
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 50 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/release-new-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,12 @@ jobs:
# Setting up docs/version path
if [ ! -d "docs" ]; then
mkdir -m 644 "docs"
mkdir -m 755 "docs"
fi
if [ -d "docs/$VERSION"]; then
if [ -d "docs/$VERSION" ]; then
rm -rf "docs/$VERSION"
fi
mkdir -m 644 "docs/$VERSION"
mkdir -m 755 "docs/$VERSION"
# Moving the built docs
mv build/dokka/html/* "docs/$VERSION"
Expand Down
80 changes: 33 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
---
id: home
layout: default
title: Home
permalink: /
---

# Zowe® Сlient Kotlin SDK

# [Click here](https://zowe.github.io/zowe-client-kotlin-sdk/docs) to go to the Zowe Client Kotlin SDK source code docs

Zowe Client Kotlin SDK cover z/OSMF REST API with Kotlin object-oriented code using Retrofit2. It provides functionality to send HTTP requests to z/OSMF using Kotlin functions.

## Installation
Expand Down Expand Up @@ -103,22 +94,21 @@ Brief description of the packages in the SDK:

Refer to the specific package description below to know more the purpose and how to use each of them.

### [org.zowe.kotlinsdk](https://github.com/zowe/zowe-client-kotlin-sdk/tree/main/src/main/kotlin/org/zowe/kotlinsdk/)
### [org.zowe.kotlinsdk](./src/main/kotlin/org/zowe/kotlinsdk/)

The package includes such APIs as:
- **[Data API](https://github.com/zowe/zowe-client-kotlin-sdk/tree/main/src/main/kotlin/org/zowe/kotlinsdk/DataAPI.kt)** - the functionality to work with z/OS datasets and USS files
- **[Console API](https://github.com/zowe/zowe-client-kotlin-sdk/tree/main/src/main/kotlin/org/zowe/kotlinsdk/ConsoleAPI.kt)** - the functionality to work with z/OS console services
- **[Info API](https://github.com/zowe/zowe-client-kotlin-sdk/tree/main/src/main/kotlin/org/zowe/kotlinsdk/InfoAPI.kt)** - the functionality to work with z/OSMF /info endpoint requests (e.g. to get initial system info)
- **[JES API](https://github.com/zowe/zowe-client-kotlin-sdk/tree/main/src/main/kotlin/org/zowe/kotlinsdk/JESApi.kt)** - the functionality to work with z/OS JES
- **[Service API](https://github.com/zowe/zowe-client-kotlin-sdk/tree/main/src/main/kotlin/org/zowe/kotlinsdk/ServiceAPI.kt)** - the functionality to work with z/OS /service endpoint requests (e.g. to change user's password)
- **[Systems API](https://github.com/zowe/zowe-client-kotlin-sdk/tree/main/src/main/kotlin/org/zowe/kotlinsdk/SystemsApi.kt)** - the functionality to work with z/OS /resttopology endpoint requests (e.g. to find out the available systems under the specified address)
- **[TSO API](https://github.com/zowe/zowe-client-kotlin-sdk/tree/main/src/main/kotlin/org/zowe/kotlinsdk/TsoApi.kt)** - the functionality to work with TSO/E address space services
- **[Data API](./src/main/kotlin/org/zowe/kotlinsdk/DataAPI.kt)** - the functionality to work with z/OS datasets and USS files
- **[Console API](./src/main/kotlin/org/zowe/kotlinsdk/ConsoleAPI.kt)** - the functionality to work with z/OS console services
- **[Info API](./src/main/kotlin/org/zowe/kotlinsdk/InfoAPI.kt)** - the functionality to work with z/OSMF /info endpoint requests (e.g. to get initial system info)
- **[JES API](./src/main/kotlin/org/zowe/kotlinsdk/JESApi.kt)** - the functionality to work with z/OS JES
- **[Service API](./src/main/kotlin/org/zowe/kotlinsdk/ServiceAPI.kt)** - the functionality to work with z/OS /service endpoint requests (e.g. to change user's password)
- **[Systems API](./src/main/kotlin/org/zowe/kotlinsdk/SystemsApi.kt)** - the functionality to work with z/OS /resttopology endpoint requests (e.g. to find out the available systems under the specified address)
- **[TSO API](./src/main/kotlin/org/zowe/kotlinsdk/TsoApi.kt)** - the functionality to work with TSO/E address space services

The raw APIs provide descriptions with headers and body parameters to issue a request. To use them, you need to declare a functionality to trigger the specific request together with the response handling. There are default request and response handlers under [org.zowe.kotlinsdk.zowe.client.sdk](#orgzowekotlinsdkzoweclientsdk) package, so you don't need to specify the functionality by yourself.

<div class="note">
<strong>NOTE: </strong>There is also an <strong>API wrapper</strong> functionality builder declared under <strong><a href="https://github.com/zowe/zowe-client-kotlin-sdk/tree/main/src/main/kotlin/org/zowe/kotlinsdk/api.kt">org/zowe/kotlinsdk/api.kt</a></strong> to simplify the process of building the API wrapper.
</div>
> [!NOTE]
> There is also an **API wrapper** functionality builder declared under **[org/zowe/kotlinsdk/api.kt](./src/main/kotlin/org/zowe/kotlinsdk/api.kt)** to simplify the process of building the API wrapper.
To customize the request triggering and response handling:
1. Import the necessary raw API to cover, as well as **Retrofit2 API builder**:
Expand Down Expand Up @@ -166,23 +156,23 @@ if (listDataSetsResponse.isSuccessful){
...
```

### [org.zowe.kotlinsdk.annotations](https://github.com/zowe/zowe-client-kotlin-sdk/tree/main/src/main/kotlin/org/zowe/kotlinsdk/annotations/)
### [org.zowe.kotlinsdk.annotations](./src/main/kotlin/org/zowe/kotlinsdk/annotations/)

The annotations package provides an annotation class to mark the functionality of z/OS available since some version of the z/OS itself. E.g. there is a **[ServiceAPI](https://github.com/zowe/zowe-client-kotlin-sdk/tree/main/src/main/kotlin/org/zowe/kotlinsdk/ServiceAPI.kt)** where the usage of the "change password" functionality is introduced. The **"/zosmf/services/authenticate"** endpoint is available since z/OS 2.5 only.
The annotations package provides an annotation class to mark the functionality of z/OS available since some version of the z/OS itself. E.g. there is a **[ServiceAPI](./src/main/kotlin/org/zowe/kotlinsdk/ServiceAPI.kt)** where the usage of the "change password" functionality is introduced. The **"/zosmf/services/authenticate"** endpoint is available since z/OS 2.5 only.

The "availability" classes:
1. **ZVersion** - the enum class to indicate the version of z/OS
2. **AvailableSince** - the annotation class to mark the functionality with the availability since a specific version (including the version)

### [org.zowe.kotlinsdk.zowe.client.sdk](https://github.com/zowe/zowe-client-kotlin-sdk/tree/main/src/main/kotlin/org/zowe/kotlinsdk/zowe/client/sdk/)
### [org.zowe.kotlinsdk.zowe.client.sdk](./src/main/kotlin/org/zowe/kotlinsdk/zowe/client/sdk/)

This package provides the default API isage implementation that is available to use in your code without defining z/OSMF REST API calls handler. There are subpackages available to separate functionalities of different z/OS components:
1. **[core](https://github.com/zowe/zowe-client-kotlin-sdk/tree/main/src/main/kotlin/org/zowe/kotlinsdk/zowe/client/sdk/core/)** - provides some core features to work with z/OSMF REST API. For now, there is a **[ZOSConnection](https://github.com/zowe/zowe-client-kotlin-sdk/tree/main/src/main/kotlin/org/zowe/kotlinsdk/zowe/client/sdk/core/ZOSConnection.kt)** data class only. This class represents connection instances to carry all the necessary information to send a z/OSMF REST API request
2. **[zosconsole](https://github.com/zowe/zowe-client-kotlin-sdk/tree/main/src/main/kotlin/org/zowe/kotlinsdk/zowe/client/sdk/zosconsole/)** - provides functionality to work with z/OS console services
3. **[zosfiles](https://github.com/zowe/zowe-client-kotlin-sdk/tree/main/src/main/kotlin/org/zowe/kotlinsdk/zowe/client/sdk/zosfiles/)** - provides functionality to work with z/OS datasets
3. **[zosjobs](https://github.com/zowe/zowe-client-kotlin-sdk/tree/main/src/main/kotlin/org/zowe/kotlinsdk/zowe/client/sdk/zosjobs/)** - provides functionality to work with z/OS JES
3. **[zostso](https://github.com/zowe/zowe-client-kotlin-sdk/tree/main/src/main/kotlin/org/zowe/kotlinsdk/zowe/client/sdk/zostso/)** - provides functionality to work with TSO/E address space services
3. **[zosuss](https://github.com/zowe/zowe-client-kotlin-sdk/tree/main/src/main/kotlin/org/zowe/kotlinsdk/zowe/client/sdk/zosuss/)** - provides functionality to work with USS files
1. **[core](./src/main/kotlin/org/zowe/kotlinsdk/zowe/client/sdk/core/)** - provides some core features to work with z/OSMF REST API. For now, there is a **[ZOSConnection](./src/main/kotlin/org/zowe/kotlinsdk/zowe/client/sdk/core/ZOSConnection.kt)** data class only. This class represents connection instances to carry all the necessary information to send a z/OSMF REST API request
2. **[zosconsole](./src/main/kotlin/org/zowe/kotlinsdk/zowe/client/sdk/zosconsole/)** - provides functionality to work with z/OS console services
3. **[zosfiles](./src/main/kotlin/org/zowe/kotlinsdk/zowe/client/sdk/zosfiles/)** - provides functionality to work with z/OS datasets
3. **[zosjobs](./src/main/kotlin/org/zowe/kotlinsdk/zowe/client/sdk/zosjobs/)** - provides functionality to work with z/OS JES
3. **[zostso](./src/main/kotlin/org/zowe/kotlinsdk/zowe/client/sdk/zostso/)** - provides functionality to work with TSO/E address space services
3. **[zosuss](./src/main/kotlin/org/zowe/kotlinsdk/zowe/client/sdk/zosuss/)** - provides functionality to work with USS files

As the example of how to use the default implementation:
1. Import **ZOSConnection** and other classes with the functionality needed:
Expand All @@ -204,11 +194,11 @@ val zosConnection = ZOSConnection("<host>", "<port>", "<username>", "<password>"
val result = ZosDsn(zosConnection).createDsn("<dsn>", <CreateDataset cls instance>)
```

### [org.zowe.kotlinsdk.zowe.config](https://github.com/zowe/zowe-client-kotlin-sdk/tree/main/src/main/kotlin/org/zowe/kotlinsdk/zowe/config/)
### [org.zowe.kotlinsdk.zowe.config](./src/main/kotlin/org/zowe/kotlinsdk/zowe/config/)

This package provides the functionality to work with **[Zowe Team Config v2](https://docs.zowe.org/stable/user-guide/cli-using-using-team-profiles/)**. The **[ZoweConfig](https://github.com/zowe/zowe-client-kotlin-sdk/tree/main/src/main/kotlin/org/zowe/kotlinsdk/zowe/config/ZoweConfig.kt)** class provides the functions to parse and manipulate the **zowe.config.json** file. See the **[org.zowe.kotlinsdk.zowe.examples](#orgzowekotlinsdkzoweexamples)** package for examples.
This package provides the functionality to work with **[Zowe Team Config v2](https://docs.zowe.org/stable/user-guide/cli-using-using-team-profiles/)**. The **[ZoweConfig](./src/main/kotlin/org/zowe/kotlinsdk/zowe/config/ZoweConfig.kt)** class provides the functions to parse and manipulate the **zowe.config.json** file. See the **[org.zowe.kotlinsdk.zowe.examples](#orgzowekotlinsdkzoweexamples)** package for examples.

### [org.zowe.kotlinsdk.zowe.examples](https://github.com/zowe/zowe-client-kotlin-sdk/tree/main/src/main/kotlin/org/zowe/kotlinsdk/zowe/examples/)
### [org.zowe.kotlinsdk.zowe.examples](./src/main/kotlin/org/zowe/kotlinsdk/zowe/examples/)

This package provides the examples of how to work with **[Zowe Team Config v2](https://docs.zowe.org/stable/user-guide/cli-using-using-team-profiles/)** in Kotlin.

Expand All @@ -224,9 +214,8 @@ For the general contributing rules, refer to [CONTRIBUTING.md](https://github.co

### To run integration tests

<div class="note">
<strong>NOTE: </strong>Integration tests are running under the real environment setup. To run them, you need either to have the environment setup and provide all the necessary env variables or to stub the functionality of the z/OSMF REST API responses.
</div>
> [!NOTE]
> Integration tests are running under the real environment setup. To run them, you need either to have the environment setup and provide all the necessary env variables or to stub the functionality of the z/OSMF REST API responses.
Before running integration tests, you need three variables to be set up:
- **``ZOSMF_TEST_URL``** - an URL of the real mainframe with z/OSMF REST API to run the tests
Expand Down Expand Up @@ -255,9 +244,8 @@ The generated docs will be generated under **build/dokka/html**

The rules and commands below describe how to publish artifacts for the Zowe Client Kotlin SDK in Zowe JFrog artifactory.

<div class="note">
<strong>NOTE: </strong>Prefer to use <strong><a href="https://github.com/zowe/zowe-client-kotlin-sdk/tree/main/.github/workflows/release-new-version.yml">GitHub Release Workflow</a></strong> to release a new version of the Zowe Client Kotlin SDK
</div>
> [!NOTE]
> Prefer to use **[GitHub Release Workflow](./.github/workflows/release-new-version.yml)** to release a new version of the Zowe Client Kotlin SDK
### Rules to publish

Expand All @@ -269,16 +257,14 @@ Example:
./gradlew release -Pzowe.deploy.username=$ARTIFACTORY_USERNAME -Pzowe.deploy.password=$ARTIFACTORY_PASSWORD -Partifactory_user=$ARTIFACTORY_USERNAME -Partifactory_password=$ARTIFACTORY_USERNAME
```

<div class="note">
<strong>NOTE: </strong>You can set properties in two ways:
<br>
<br>- on the command-line: <code>-Pzowe.deploy.username=$USERNAME -Pzowe.deploy.password=$PASSWORD</code>
<br>- in <code>~/.gradle/gradle.properties</code>
</div>
> [!NOTE]
> You can set properties in two ways:
>
> - on the command-line: `-Pzowe.deploy.username=$USERNAME -Pzowe.deploy.password=$PASSWORD`
> - in `~/.gradle/gradle.properties`
<div class="warning">
<strong>WARNING: </strong> Do not commit exact properties to the GitHub repository. This is a confidential information. Properties used during the <strong>GitHub Release Workflow</strong> are stored securely under <strong>GitHub Secrets</strong>.
</div>
> [!WARNING]
> Do not commit exact properties to the GitHub repository. This is a confidential information. Properties used during the **GitHub Release Workflow** are stored securely under **GitHub Secrets**.
### Release SNAPSHOT artifacts

Expand Down

0 comments on commit 315c5c6

Please sign in to comment.