Commit 4c3ccebb authored by Luc Yriarte's avatar Luc Yriarte
Browse files

Merge branch 'intergration_tooling' into 'master'

wdms_client cli with re-usable components to call wdms apis

See merge request !278
parents 8bb8070c 7f9bf0e2
Pipeline #72309 passed with stages
in 9 minutes and 14 seconds
......@@ -28,7 +28,7 @@ integration_test_base_path = str(pathlib.Path(__file__).parent.absolute())
sys.path.append(integration_test_base_path) # set the current directory into the python path
# put after sys.path update
from .variables import Variables, CmdLineSpecialVar
from wdms_client.variables import Variables, CmdLineSpecialVar
from .tests.fixtures import WDMS_Variables
FILTER_IN_TAGS = set()
......
# Copyright 2021 Schlumberger
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
from typing import Union, List
from .wdms import about
from .wdms import version
from .wdms import status
from .wdms import crud
from .wdms import error_cases
from .wdms import model_extensibility
from .wdms import recursive_delete
from .wdms import search_apis
def build_request(path: Union[str, List[str]], sep: str = ".") -> "RequestRunner":
path = path.split(sep) if isinstance(path, str) else path
n_path = ".".join([p.lower().replace(" ", "_") for p in path])
if n_path == "crud.well.get_well":
return crud.well.build_request_get_well()
if n_path == "crud.well.delete_well":
return crud.well.build_request_delete_well()
if n_path == "crud.well.get_well_specific_version":
return crud.well.build_request_get_well_specific_version()
if n_path == "crud.well.get_versions_of_well":
return crud.well.build_request_get_versions_of_well()
if n_path == "crud.well.create_well":
return crud.well.build_request_create_well()
if n_path == "crud.wellbore.delete_wellbore":
return crud.wellbore.build_request_delete_wellbore()
if n_path == "crud.wellbore.get_wellbore_specific_version":
return crud.wellbore.build_request_get_wellbore_specific_version()
if n_path == "crud.wellbore.get_wellbore":
return crud.wellbore.build_request_get_wellbore()
if n_path == "crud.wellbore.get_versions_of_wellbore":
return crud.wellbore.build_request_get_versions_of_wellbore()
if n_path == "crud.wellbore.create_wellbore":
return crud.wellbore.build_request_create_wellbore()
if n_path == "crud.osdu_wellbore.delete_osdu_wellbore":
return crud.osdu_wellbore.build_request_delete_osdu_wellbore()
if n_path == "crud.osdu_wellbore.get_osdu_wellbore_specific_version":
return crud.osdu_wellbore.build_request_get_osdu_wellbore_specific_version()
if n_path == "crud.osdu_wellbore.get_osdu_wellbore":
return crud.osdu_wellbore.build_request_get_osdu_wellbore()
if n_path == "crud.osdu_wellbore.get_versions_of_osdu_wellbore":
return crud.osdu_wellbore.build_request_get_versions_of_osdu_wellbore()
if n_path == "crud.osdu_wellbore.create_osdu_wellbore":
return crud.osdu_wellbore.build_request_create_osdu_wellbore()
if n_path == "crud.osdu_well.delete_osdu_well":
return crud.osdu_well.build_request_delete_osdu_well()
if n_path == "crud.osdu_well.get_osdu_well_specific_version":
return crud.osdu_well.build_request_get_osdu_well_specific_version()
if n_path == "crud.osdu_well.get_osdu_well":
return crud.osdu_well.build_request_get_osdu_well()
if n_path == "crud.osdu_well.get_versions_of_osdu_well":
return crud.osdu_well.build_request_get_versions_of_osdu_well()
if n_path == "crud.osdu_well.create_osdu_well":
return crud.osdu_well.build_request_create_osdu_well()
if n_path == "crud.osdu_welllog.delete_osdu_welllog":
return crud.osdu_welllog.build_request_delete_osdu_welllog()
if n_path == "crud.osdu_welllog.get_osdu_welllog_specific_version":
return crud.osdu_welllog.build_request_get_osdu_welllog_specific_version()
if n_path == "crud.osdu_welllog.get_osdu_welllog":
return crud.osdu_welllog.build_request_get_osdu_welllog()
if n_path == "crud.osdu_welllog.get_versions_of_osdu_welllog":
return crud.osdu_welllog.build_request_get_versions_of_osdu_welllog()
if n_path == "crud.osdu_welllog.create_osdu_welllog":
return crud.osdu_welllog.build_request_create_osdu_welllog()
if n_path == "crud.osdu_wellboretrajectory.delete_osdu_wellboretrajectory":
return crud.osdu_wellboretrajectory.build_request_delete_osdu_wellboretrajectory()
if n_path == "crud.osdu_wellboretrajectory.get_osdu_wellboretrajectory_specific_version":
return crud.osdu_wellboretrajectory.build_request_get_osdu_wellboretrajectory_specific_version()
if n_path == "crud.osdu_wellboretrajectory.get_osdu_wellboretrajectory":
return crud.osdu_wellboretrajectory.build_request_get_osdu_wellboretrajectory()
if n_path == "crud.osdu_wellboretrajectory.get_versions_of_osdu_wellboretrajectory":
return crud.osdu_wellboretrajectory.build_request_get_versions_of_osdu_wellboretrajectory()
if n_path == "crud.osdu_wellboretrajectory.create_osdu_wellboretrajectory":
return crud.osdu_wellboretrajectory.build_request_create_osdu_wellboretrajectory()
if n_path == "crud.osdu_wellboremarkerset.delete_osdu_wellboremarkerset":
return crud.osdu_wellboremarkerset.build_request_delete_osdu_wellboremarkerset()
if n_path == "crud.osdu_wellboremarkerset.get_osdu_wellboremarkerset_specific_version":
return crud.osdu_wellboremarkerset.build_request_get_osdu_wellboremarkerset_specific_version()
if n_path == "crud.osdu_wellboremarkerset.get_osdu_wellboremarkerset":
return crud.osdu_wellboremarkerset.build_request_get_osdu_wellboremarkerset()
if n_path == "crud.osdu_wellboremarkerset.get_versions_of_osdu_wellboremarkerset":
return crud.osdu_wellboremarkerset.build_request_get_versions_of_osdu_wellboremarkerset()
if n_path == "crud.osdu_wellboremarkerset.create_osdu_wellboremarkerset":
return crud.osdu_wellboremarkerset.build_request_create_osdu_wellboremarkerset()
if n_path == "crud.logset.get_versions_of_logset":
return crud.logset.build_request_get_versions_of_logset()
if n_path == "crud.logset.get_logset_specific_version":
return crud.logset.build_request_get_logset_specific_version()
if n_path == "crud.logset.get_logset":
return crud.logset.build_request_get_logset()
if n_path == "crud.logset.delete_logset":
return crud.logset.build_request_delete_logset()
if n_path == "crud.logset.create_logset":
return crud.logset.build_request_create_logset()
if n_path == "crud.marker.delete_marker":
return crud.marker.build_request_delete_marker()
if n_path == "crud.marker.get_versions_of_marker":
return crud.marker.build_request_get_versions_of_marker()
if n_path == "crud.marker.get_marker":
return crud.marker.build_request_get_marker()
if n_path == "crud.marker.get_marker_specific_version":
return crud.marker.build_request_get_marker_specific_version()
if n_path == "crud.marker.create_marker":
return crud.marker.build_request_create_marker()
if n_path == "crud.trajectory.get_versions_of_trajectory":
return crud.trajectory.build_request_get_versions_of_trajectory()
if n_path == "crud.trajectory.get_trajectory":
return crud.trajectory.build_request_get_trajectory()
if n_path == "crud.trajectory.get_trajectory_specific_version":
return crud.trajectory.build_request_get_trajectory_specific_version()
if n_path == "crud.trajectory.delete_trajectory":
return crud.trajectory.build_request_delete_trajectory()
if n_path == "crud.trajectory.create_trajectory":
return crud.trajectory.build_request_create_trajectory()
if n_path == "crud.log.delete_log":
return crud.log.build_request_delete_log()
if n_path == "crud.log.get_versions_of_log":
return crud.log.build_request_get_versions_of_log()
if n_path == "crud.log.get_log_bulk_data":
return crud.log.build_request_get_log_bulk_data()
if n_path == "crud.log.get_log":
return crud.log.build_request_get_log()
if n_path == "crud.log.get_log_specific_version":
return crud.log.build_request_get_log_specific_version()
if n_path == "crud.log.create_log":
return crud.log.build_request_create_log()
if n_path == "crud.log.add_log_bulk_data":
return crud.log.build_request_add_log_bulk_data()
if n_path == "crud.dips.get_dipset":
return crud.dips.build_request_get_dipset()
if n_path == "crud.dips.query_dips":
return crud.dips.build_request_query_dips()
if n_path == "crud.dips.delete_dip":
return crud.dips.build_request_delete_dip()
if n_path == "crud.dips.create_dips":
return crud.dips.build_request_create_dips()
if n_path == "crud.dips.create__dipset":
return crud.dips.build_request_create__dipset()
if n_path == "crud.dips.insert_dips":
return crud.dips.build_request_insert_dips()
if n_path == "crud.dips.get_dip_from_index":
return crud.dips.build_request_get_dip_from_index()
if n_path == "crud.dips.delete_dipset":
return crud.dips.build_request_delete_dipset()
if n_path == "crud.dips.patch_dip":
return crud.dips.build_request_patch_dip()
if n_path == "crud.dips.get_dips":
return crud.dips.build_request_get_dips()
if n_path == "error_cases.create_log_with_invalid_data_should_422":
return error_cases.build_request_create_log_with_invalid_data_should_422()
if n_path == "model_extensibility.get_log_check_for_extra_fields":
return model_extensibility.build_request_get_log_check_for_extra_fields()
if n_path == "model_extensibility.clean_up_delete_log":
return model_extensibility.build_request_clean_up_delete_log()
if n_path == "model_extensibility.create_log_with_extra_fields":
return model_extensibility.build_request_create_log_with_extra_fields()
if n_path == "recursive_delete.setup.recusive_del_setup_end":
return recursive_delete.setup.build_request_recursive_del_setup_end()
if n_path == "recursive_delete.setup.recusive_del_setup_create_well":
return recursive_delete.setup.build_request_recursive_del_setup_create_well()
if n_path == "recursive_delete.setup.recusive_del_setup_check_state_start":
return recursive_delete.setup.build_request_recursive_del_setup_check_state_start()
if n_path == "recursive_delete.setup.recusive_del_setup_create_logs":
return recursive_delete.setup.build_request_recursive_del_setup_create_logs()
if n_path == "recursive_delete.setup.recusive_del_setup_create_logset":
return recursive_delete.setup.build_request_recursive_del_setup_create_logset()
if n_path == "recursive_delete.setup.recusive_del_setup_create_wellbore":
return recursive_delete.setup.build_request_recursive_del_setup_create_wellbore()
if n_path == "recursive_delete.setup.recusive_del_setup_create_record_refs":
return recursive_delete.setup.build_request_recursive_del_setup_create_record_refs()
if n_path == "recursive_delete.delete_well.check_logset_is_deleted":
return recursive_delete.delete_well.build_request_check_logset_is_deleted()
if n_path == "recursive_delete.delete_well.recursive_delete_well":
return recursive_delete.delete_well.build_request_recursive_delete_well()
if n_path == "recursive_delete.delete_well.check_log_is_deleted":
return recursive_delete.delete_well.build_request_check_log_is_deleted()
if n_path == "recursive_delete.delete_well.check_wellbore_is_deleted":
return recursive_delete.delete_well.build_request_check_wellbore_is_deleted()
if n_path == "search_apis.setup.seach_tests_setup_end":
return search_apis.setup.build_request_seach_tests_setup_end()
if n_path == "search_apis.setup.seach_tests_setup_create_logsets":
return search_apis.setup.build_request_seach_tests_setup_create_logsets()
if n_path == "search_apis.setup.seach_tests_setup_create_record_refs":
return search_apis.setup.build_request_seach_tests_setup_create_record_refs()
if n_path == "search_apis.setup.seach_tests_setup_create_logs":
return search_apis.setup.build_request_seach_tests_setup_create_logs()
if n_path == "search_apis.setup.seach_tests_setup_create_wellbore":
return search_apis.setup.build_request_seach_tests_setup_create_wellbore()
if n_path == "search_apis.setup.seach_tests_setup_create_markers":
return search_apis.setup.build_request_seach_tests_setup_create_markers()
if n_path == "search_apis.setup.seach_tests_setup_start":
return search_apis.setup.build_request_seach_tests_setup_start()
if n_path == "search_apis.search.search_logs_by_logset_id":
return search_apis.search.build_request_search_logs_by_logset_id()
if n_path == "search_apis.search.search_markers_by_wellbore_id":
return search_apis.search.build_request_search_markers_by_wellbore_id()
if n_path == "search_apis.search.search_wellbores_by_geo_polygon":
return search_apis.search.build_request_search_wellbores_by_geo_polygon()
if n_path == "search_apis.search.search_logs_by_wellbore_id":
return search_apis.search.build_request_search_logs_by_wellbore_id()
if n_path == "search_apis.search.search_logset_by_wellbores_attribute":
return search_apis.search.build_request_search_logset_by_wellbores_attribute()
if n_path == "search_apis.search.search_logs_by_wellbores_attribute":
return search_apis.search.build_request_search_logs_by_wellbores_attribute()
if n_path == "search_apis.search.search_wellbores_by_bounding_box":
return search_apis.search.build_request_search_wellbores_by_bounding_box()
if n_path == "search_apis.search.search_wellbores_by_distance":
return search_apis.search.build_request_search_wellbores_by_distance()
if n_path == "search_apis.search.search_logs_by_logsets_attribute":
return search_apis.search.build_request_search_logs_by_logsets_attribute()
if n_path == "search_apis.search.search_logset_by_wellbore_id":
return search_apis.search.build_request_search_logset_by_wellbore_id()
if n_path == "about":
return about.build_request_about()
if n_path == "version":
return version.build_request_version()
if n_path == "status":
return status.build_request_status()
raise ValueError(f'No request matches the path {n_path}')
def get_cleaned_ref_and_res(kind: str, res_dict: dict) -> (dict, dict):
if kind =="osdu_wellbore":
return crud.osdu_wellbore.get_cleaned_ref_and_res(res_dict)
if kind =="osdu_well":
return crud.osdu_well.get_cleaned_ref_and_res(res_dict)
if kind =="osdu_welllog":
return crud.osdu_welllog.get_cleaned_ref_and_res(res_dict)
if kind =="osdu_wellboretrajectory":
return crud.osdu_wellboretrajectory.get_cleaned_ref_and_res(res_dict)
if kind =="osdu_wellboremarkerset":
return crud.osdu_wellboremarkerset.get_cleaned_ref_and_res(res_dict)
......@@ -13,8 +13,8 @@
# limitations under the License.
import pytest
from variables import Variables
from ..request_builders.wdms_variables import variables_dict
from wdms_client.variables import Variables
from wdms_client.request_builders.wdms_variables import variables_dict
WDMS_Variables = Variables.from_dict(variables_dict)
......
......@@ -12,14 +12,14 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from ..request_builders.wdms.about import build_request_about
from ..request_builders.wdms.status import build_request_status
from ..request_builders.wdms.version import build_request_version
from wdms_client.request_builders.wdms.about import build_request_about
from wdms_client.request_builders.wdms.status import build_request_status
from wdms_client.request_builders.wdms.version import build_request_version
from .fixtures import with_wdms_env
import pytest
@pytest.mark.tag('basic', 'smoke')
@pytest.mark.tag('basic', 'smoke', 'about')
def test_about(with_wdms_env):
result = build_request_about().call(with_wdms_env)
result.assert_ok()
......
......@@ -23,15 +23,15 @@ import pytest
from tests.unit.generate_data import generate_df
from .fixtures import with_wdms_env
from ..request_builders.wdms.crud.log import build_request_create_log, build_request_delete_log
from ..request_builders.wdms.session import build_delete_session
from ..request_runner import RequestRunner, Request
from wdms_client.request_builders.wdms.crud.log import build_request_create_log, build_request_delete_log
from wdms_client.request_builders.wdms.session import build_delete_session
from wdms_client.request_runner import RequestRunner, Request
from ..request_builders.wdms.crud.osdu_welllog import (
from wdms_client.request_builders.wdms.crud.osdu_welllog import (
build_request_create_osdu_welllog,
build_request_delete_osdu_welllog)
from ..request_builders.wdms.crud.osdu_wellboretrajectory import (
from wdms_client.request_builders.wdms.crud.osdu_wellboretrajectory import (
build_request_create_osdu_wellboretrajectory,
build_request_delete_osdu_wellboretrajectory)
......
......@@ -14,7 +14,7 @@
import pytest
from .fixtures import with_wdms_env
from ..request_builders import build_request
from wdms_client.request_builders import build_request
kind_list = ['well', 'wellbore', 'logset', 'marker', 'trajectory', 'log']
new_parameters_env = {'authorityKind': 'slb',
......
......@@ -14,7 +14,7 @@
import pytest
from .fixtures import with_wdms_env
from ..request_builders import build_request, get_cleaned_ref_and_res
from wdms_client.request_builders import build_request, get_cleaned_ref_and_res
kind_list = ['osdu_wellbore', 'osdu_well', 'osdu_welllog', 'osdu_wellboretrajectory', 'osdu_wellboremarkerset']
......
......@@ -16,10 +16,10 @@ import math
import pytest
from .fixtures import with_wdms_env
from ..request_builders.wdms.crud.dips import *
from wdms_client.request_builders.wdms.crud.dips import *
from jsonschema import validate
from ..request_builders.wdms.crud.log import build_request_get_log
from wdms_client.request_builders.wdms.crud.log import build_request_get_log
new_parameters_env = {'authorityKind': 'slb',
'prefix_data_entity_name': 'wdms_e2e_osdu'}
......
......@@ -14,7 +14,7 @@
import pytest
from .fixtures import with_wdms_env
from ..request_builders.wdms.crud.log import *
from wdms_client.request_builders.wdms.crud.log import *
@pytest.fixture(scope='module')
......
......@@ -13,8 +13,8 @@
# limitations under the License.
import pytest
from ..request_builders.wdms.crud.log import *
from request_runner import RequestRunner, Request
from wdms_client.request_builders.wdms.crud.log import *
from wdms_client.request_runner import RequestRunner, Request
from .fixtures import with_wdms_env
@pytest.fixture(scope="module")
......
......@@ -14,8 +14,8 @@
import pytest
from .fixtures import with_wdms_env
from ..request_builders.wdms.error_cases import build_request_create_log_with_invalid_data_should_422
from ..request_builders.wdms.model_extensibility import *
from wdms_client.request_builders.wdms.error_cases import build_request_create_log_with_invalid_data_should_422
from wdms_client.request_builders.wdms.model_extensibility import *
def test_create_log_with_invalid_data_should_422(with_wdms_env):
......
......@@ -14,8 +14,8 @@
import pytest
from .fixtures import with_wdms_env
from ..request_builders.wdms.recursive_delete.setup import *
from ..request_builders.wdms.recursive_delete.delete_well import *
from wdms_client.request_builders.wdms.recursive_delete.setup import *
from wdms_client.request_builders.wdms.recursive_delete.delete_well import *
from time import sleep
from random import randint
......
......@@ -16,8 +16,8 @@
This file contains test sample showing how use RequestRunner
"""
import pytest
from ..request_runner import Request, RequestRunner
from ..variables import Variables
from wdms_client.request_runner import Request, RequestRunner
from wdms_client.variables import Variables
def sample_of_test():
......
......@@ -14,8 +14,8 @@
import pytest
from .fixtures import with_wdms_env
from ..request_builders.wdms.search_apis.setup import *
from ..request_builders.wdms.search_apis.search import *
from wdms_client.request_builders.wdms.search_apis.setup import *
from wdms_client.request_builders.wdms.search_apis.search import *
from time import sleep
new_parameters_env = {'authorityKind': 'slb',
......
......@@ -14,8 +14,8 @@
import pytest
from .fixtures import with_wdms_env
from ..request_builders.wdms.search_apis.setup import *
from ..request_builders.wdms.search_apis.search import *
from wdms_client.request_builders.wdms.search_apis.setup import *
from wdms_client.request_builders.wdms.search_apis.search import *
from time import sleep
@pytest.fixture(params=['query', 'fastquery'])
......
......@@ -14,10 +14,10 @@
import pytest
from .fixtures import with_wdms_env
from ..request_builders.wdms.crud.osdu_welllog import (
from wdms_client.request_builders.wdms.crud.osdu_welllog import (
build_request_create_osdu_welllog,
build_request_delete_osdu_welllog)
from ..request_builders.wdms.session import (
from wdms_client.request_builders.wdms.session import (
build_create_session,
build_delete_session,
build_get_session,
......
import pytest
from .fixtures import with_wdms_env
from ..request_builders.wdms.crud.trajectory import build_request_create_trajectory, build_request_delete_trajectory, build_request_add_trajectory_bulk_data, build_request_get_trajectory_bulk_data
from wdms_client.request_builders.wdms.crud.trajectory import build_request_create_trajectory, build_request_delete_trajectory, build_request_add_trajectory_bulk_data, build_request_get_trajectory_bulk_data
@pytest.fixture(scope='module')
......
......@@ -3,7 +3,7 @@ from .fixtures import with_wdms_env
from jsonschema import validate
from ..request_builders.wdms.crud.trajectory import build_request_create_trajectory_with_id, \
from wdms_client.request_builders.wdms.crud.trajectory import build_request_create_trajectory_with_id, \
build_request_get_trajectory, build_request_get_trajectory_bulk_data, build_request_add_trajectory_bulk_data, \
build_request_create_trajectory, build_request_delete_trajectory
......
WDMS client CLI
# Usage example
`python -m wdms_client --help` to list available commands.
## list callable apis
Callable apis can be listed using command `list`:
```
:$ python -m wdms_client list
available apis:
- crud.well.get_well
- crud.well.delete_well
- crud.well.get_well_specific_version
- crud.well.get_versions_of_well
- crud.well.create_well
- crud.wellbore.delete_wellbore
- crud.wellbore.get_wellbore_specific_version
...
```
## Show environment
Describe environment variables using command `show-env`. Can pass an environment file:
```
:$ python -m wdms_client show-env "..\..\my_environment.json"
environments variables given environment C:\SRC\opengroup\wellbore-domain-services\tests\integration\functional\my_environment.json
- base_url = http://127.0.0.1:8080/api/os-wellbore-ddms
- token = MY_TOKEN
- cloud_provider = local
- base_url_entity = logs
- entity_kind = osdu:wks:log:1.0.5
- dipsetKind = osdu:wks:dipSet:1.0.0
- wellKind = osdu:wks:well:1.0.2
...
```
## Describe api before call
Use command `descibe` with an `api` and optionally an environment file. It will print details of corresponding request:
```
python -m wdms_client describe crud.well.create_well --environment="..\..\my_environment.json"
============ REQUEST ===============
URL: [POST] http://127.0.0.1:8080/api/os-wellbore-ddms/ddms/v2/wells)
headers:
- accept: application/json
- Content-Type: application/json
- data-partition-id: part
- Connection: close
- Authorization: Bearer 123******r 123
- correlation-id: wdms_e2e__30319cb0-fcc6-463b-9929-d204514d7701
body: -------------------------------------------
[
{
"acl": {
"owners": [
"data.default.owners@part.acl"
],
"viewers": [
"data.default.viewers@part.acl"
]
}, "legal": {
"legaltags": [
...
```
## Perform a call
Use command `descibe` with an `api` and optionally an environment file. It will run it and print the result:
```
python -m wdms_client call about --environment="..\..\my_environment.json"
1 run(s) for about:
# run 1:
[200] - http://127.0.0.1:8080/api/os-wellbore-ddms/about
start: [2021-10-14 13:46:00.279199], end: 2021-10-14 13:46:00.291161, elapsed: 11 ms
============ REQUEST ===============
URL: [GET] http://127.0.0.1:8080/api/os-wellbore-ddms/about)
headers:
- User-Agent: python-requests/2.26.0
- Accept-Encoding: gzip, deflate
- accept: application/json
- Connection: close
- correlation-id: wdms_e2e__8b7c80ea-5bdd-45d7-9738-51431efdc820
============ RESPONSE ===============
headers:
- date: Thu, 14 Oct 2021 11:46:00 GMT
- server: uvicorn
- content-length: 97
- content-type: application/json
- Connection: close
body: -------------------------------------------
{"service":"Wellbore DDMS OSDU","version":"0.2","buildNumber":"local","cloudEnvironment":"local"}
```
## Generated basic environment file
use command `gen-env` to generate a basic environment file. By default, automatically launch editor on the created file.
```
python -m wdms_client gen-env new_environment.json
basic environment file generated in $WORKING_DIR\new_environment.json
```
## Default environment file
If no environment file is provided, it will try to use `local_environment.json` from the working directory if exists.