Skip to content

Commit

Permalink
fixed PR as latest comments
Browse files Browse the repository at this point in the history
  • Loading branch information
krishnaglodha committed Dec 26, 2024
1 parent baf8b49 commit f09559a
Show file tree
Hide file tree
Showing 4 changed files with 116 additions and 152 deletions.
44 changes: 22 additions & 22 deletions docs/pages/async/workspace.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Workspaces
# Workspaces

`geoserverx` allows users to access all/one workspace from GeoServer, along with ability to do CRUD operations on workspaces.
`geoserverx` allows users to access all/one workspace from GeoServer, along with ability to do CRUD operations on workspaces.

!!! get "Get started"
To start using `geoserverx` in Sync mode, create a new instance of `AsyncGeoServerX` Class, ream more about it [here](https://geobeyond.github.io/geoserverx/pages/async/)
To start using `geoserverx` in Sync mode, create a new instance of `AsyncGeoServerX` Class, read more about it [here](https://geobeyond.github.io/geoserverx/pages/async/)

## Get all workspaces

Expand All @@ -16,7 +16,7 @@ await client.get_all_workspaces()

## Get single workspace

This command fetches workspace with parameter as name of it from GeoServer.
Fetches workspace details.

```Python
# Get workspace with name `cite`
Expand All @@ -25,28 +25,28 @@ await client.get_workspace('cite')

## Create workspace

This command allows user to create new workspace.
This command allows user to create new workspace.
Creating new workspace requires following parameters

| Parameter | Required | Default value | Data type | Description |
| ----------- | ----------- | ----------- |---- | ------------------------------------ |
| Name | :white_check_mark: | | `str` | To define Name of the workspace |
| default | :negative_squared_cross_mark: | `False` | `bool` | To define whether to keep workspace as default or not |
| isolated | :negative_squared_cross_mark: | `False` |`bool` | To define whether to keep workspace as Isolated or not |
| Parameter | Required | Default value | Data type | Description |
| --------- | ----------------------------- | ------------- | --------- | ------------------------------------------------------ |
| Name | :white_check_mark: | | `str` | To define Name of the workspace |
| default | :negative_squared_cross_mark: | `False` | `bool` | To define whether to keep workspace as default or not |
| isolated | :negative_squared_cross_mark: | `False` | `bool` | To define whether to keep workspace as Isolated or not |

```Python
#Create new workspace with name `my_wrkspc` , make it Default and Isolated
await client.create_workspace(name='my_wrkspc',default=True,Isolated=True)
```

## Delete workspace

This command allows user to delete workspace.
This command allows user to delete workspace.

| Parameter | Required | Default value | Data type | Description |
| ----------- | ----------- | ----------- | -- | ------------------------------------ |
| workspace | :white_check_mark: | | `str` | Name of the workspace |
| recurse | :negative_squared_cross_mark: | `False` | `bool` | This parameter recursively deletes all layers referenced by the specified workspace, including data stores, coverage stores, feature types, and so on |
| Parameter | Required | Default value | Data type | Description |
| --------- | ----------------------------- | ------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| workspace | :white_check_mark: | | `str` | Name of the workspace |
| recurse | :negative_squared_cross_mark: | `False` | `bool` | This parameter recursively deletes all layers referenced by the specified workspace, including data stores, coverage stores, feature types, and so on |

```Python
#Delete workspace with name `my_wrkspc`.
Expand All @@ -55,14 +55,14 @@ await client.delete_workspace(workspace='my_wrkspc',recurse=True)

## Update workspace

This command allows user to update existing workspace.
This command allows user to update existing workspace.
Updating workspace requires following parameters

| Parameter | Required | Data type | Description |
| ----------- | ----------- | ----------- | ------------------------------------ |
| name | :white_check_mark: | `str` | Name of the workspace to be updated |
| update | :white_check_mark: | [`UpdateWorkspaceInfo`](https://github.com/geobeyond/geoserverx/blob/b7757c9f0130864b06c40c2faa17afc841fc705f/src/geoserverx/models/workspace.py#L42) | To define body of the update request |
| Parameter | Required | Data type | Description |
| --------- | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| name | :white_check_mark: | `str` | Name of the workspace to be updated |
| update | :white_check_mark: | [`UpdateWorkspaceInfo`](https://github.com/geobeyond/geoserverx/blob/b7757c9f0130864b06c40c2faa17afc841fc705f/src/geoserverx/models/workspace.py#L42) | To define body of the update request |

```Python
#Updating workspace with name `my_wrkspc` , make is Isolated and rename it to `my_new_wrkspc`
from geoserverx.models.workspace import UpdateWorkspaceInfo
Expand Down
55 changes: 28 additions & 27 deletions docs/pages/sync/workspace.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Workspaces
# Workspaces

`geoserverx` allows users to access all/one workspace from GeoServer, along with ability to do CRUD operations on workspaces.
`geoserverx` allows users to access all/one workspace from GeoServer, along with ability to do CRUD operations on workspaces.

!!! get "Get started"
To start using `geoserverx` in Sync mode, create a new instance of `SyncGeoServerX` Class, ream more about it [here](https://geobeyond.github.io/geoserverx/pages/sync/)

To start using `geoserverx` in Sync mode, create a new instance of `SyncGeoServerX` Class, read more about it [here](https://geobeyond.github.io/geoserverx/pages/sync/)

## Get all workspaces

This command fetches all workspaces available in GeoServer. No paramters are required to be passed.

```Python
Expand All @@ -15,54 +15,55 @@ client.get_all_workspaces()
```

## Get single workspace

This command fetches workspace with parameter as name of it from GeoServer.

```Python
# Get workspace with name `cite`
client.get_workspace('cite')
```

## Create workspace
This command allows user to create new workspace.

| Parameter | Required | Default value | Data type | Description |
| ----------- | ----------- | ----------- |---- | ------------------------------------ |
| Name | :white_check_mark: | | `str` | workspace name |
| default | :negative_squared_cross_mark: | `False` | `bool` | whether to keep workspace as default |
| isolated | :negative_squared_cross_mark: | `False` |`bool` | set workspace as being isolated |


This command allows user to create new workspace.

| Parameter | Required | Default value | Data type | Description |
| --------- | ----------------------------- | ------------- | --------- | ----------------------------------------------------- |
| Name | :white_check_mark: | | `str` | To define Name of the workspace |
| default | :negative_squared_cross_mark: | `False` | `bool` | To define whether to keep workspace as default or not |
| isolated | :negative_squared_cross_mark: | `False` | `bool` | To define whether to keep workspace as default or not |

```Python
#Create new workspace with name `my_wrkspc` , make it Default and Isolated
client.create_workspace(name='my_wrkspc',default=True,Isolated=True)
```

## Delete workspace
This command allows user to delete workspace.



| Parameter | Required | Default value | Data type | Description |
| ----------- | ----------- | ----------- | -- | ------------------------------------ |
| workspace | :white_check_mark: | | `str` | Name of the workspace |
| recurse | :negative_squared_cross_mark: | `False` | `bool` | This parameter recursively deletes all layers referenced by the specified workspace, including data stores, coverage stores, feature types, and so on |

This command allows user to delete workspace.

| Parameter | Required | Default value | Data type | Description |
| --------- | ----------------------------- | ------------- | --------- | ----------------------------------------------------------------------------------------------------------------------------------------------------- |
| workspace | :white_check_mark: | | `str` | Name of the workspace |
| recurse | :negative_squared_cross_mark: | `False` | `bool` | This parameter recursively deletes all layers referenced by the specified workspace, including data stores, coverage stores, feature types, and so on |

```Python
#Delete workspace with name `my_wrkspc`.
client.delete_workspace(workspace='my_wrkspc',recurse=True)
```

## Update workspace
This command allows user to update existing workspace.

| Parameter | Required | Data type | Description |
| ----------- | ----------- | ----------- | ------------------------------------ |
| name | :white_check_mark: | `str` | Name of the workspace to be updated |
| update | :white_check_mark: | [`UpdateWorkspaceInfo`](https://github.com/geobeyond/geoserverx/blob/b7757c9f0130864b06c40c2faa17afc841fc705f/src/geoserverx/models/workspace.py#L42) | To define body of the update request |

This command allows user to update existing workspace.

| Parameter | Required | Data type | Description |
| --------- | ------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
| name | :white_check_mark: | `str` | Name of the workspace to be updated |
| update | :white_check_mark: | [`UpdateWorkspaceInfo`](https://github.com/geobeyond/geoserverx/blob/b7757c9f0130864b06c40c2faa17afc841fc705f/src/geoserverx/models/workspace.py#L42) | To define body of the update request |

```Python
#Updating workspace with name `my_wrkspc` , make is Isolated and rename it to `my_new_wrkspc`
from geoserverx.models.workspace import UpdateWorkspaceInfo

client.update_workspace(name='my_wrkspc',update=UpdateWorkspaceInfo(name='my_new_wrkspc',isolated=True))
```
```
Loading

0 comments on commit f09559a

Please sign in to comment.