Skip to content

Commit

Permalink
changes to the SdkApi classes
Browse files Browse the repository at this point in the history
Signed-off-by: aadityasinha-dotcom <[email protected]>
  • Loading branch information
aadityasinha-dotcom committed Aug 25, 2024
1 parent 9571c8c commit 420388e
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/core/zowe/core_for_zowe_sdk/sdk_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class SdkApi:
Name of the logger (same as the filename by default)
"""

def __init__(self, profile: dict, default_url: str, logger_name: str = __name__, log = False):
def __init__(self, profile: dict, default_url: str, logger_name: str = __name__, log = True):
session = Session(profile)
self.session: ISession = session.load()

Expand Down
2 changes: 1 addition & 1 deletion src/zos_console/zowe/zos_console_for_zowe_sdk/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class Console(SdkApi):
"""

def __init__(self, connection: dict, log = False):
super().__init__(connection, "/zosmf/restconsoles/consoles/defcn", logger_name=__name__)
super().__init__(connection, "/zosmf/restconsoles/consoles/defcn", logger_name=__name__, log=log)

def issue_command(self, command: str, console: Optional[str] = None) -> IssueCommandResponse:
"""Issues a command on z/OS Console.
Expand Down
4 changes: 2 additions & 2 deletions src/zos_files/zowe/zos_files_for_zowe_sdk/file_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class FileSystems(SdkApi):
A profile for connection in dict (json) format
"""

def __init__(self, connection: dict):
super().__init__(connection, "/zosmf/restfiles/", logger_name=__name__)
def __init__(self, connection: dict, log=True):
super().__init__(connection, "/zosmf/restfiles/", logger_name=__name__, log=log)
self._default_headers["Accept-Encoding"] = "gzip"

def create(self, file_system_name: str, options: dict = {}) -> dict:
Expand Down
4 changes: 2 additions & 2 deletions src/zos_files/zowe/zos_files_for_zowe_sdk/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ class Files(SdkApi):
uss: USSFiles
fs: FileSystems

def __init__(self, connection: dict, log = False):
super().__init__(connection, "/zosmf/restfiles/", logger_name=__name__)
def __init__(self, connection: dict, log = True):
super().__init__(connection, "/zosmf/restfiles/", logger_name=__name__, log=log)
self._default_headers["Accept-Encoding"] = "gzip"
self.ds = Datasets(connection)
self.uss = USSFiles(connection)
Expand Down
4 changes: 2 additions & 2 deletions src/zos_jobs/zowe/zos_jobs_for_zowe_sdk/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class Jobs(SdkApi):
A profile for connection in dict (json) format
"""

def __init__(self, connection: dict, log = False):
super().__init__(connection, "/zosmf/restjobs/jobs/", logger_name=__name__)
def __init__(self, connection: dict, log = True):
super().__init__(connection, "/zosmf/restjobs/jobs/", logger_name=__name__, log=log)

def get_job_status(self, jobname: str, jobid: str) -> JobResponse:
"""
Expand Down
4 changes: 2 additions & 2 deletions src/zos_tso/zowe/zos_tso_for_zowe_sdk/tso.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ class Tso(SdkApi):
Profile used for tso connection
"""

def __init__(self, connection: dict, tso_profile: Optional[dict] = None, log = False):
super().__init__(connection, "/zosmf/tsoApp/tso", logger_name=__name__)
def __init__(self, connection: dict, tso_profile: Optional[dict] = None, log = True):
super().__init__(connection, "/zosmf/tsoApp/tso", logger_name=__name__, log=log)
self.session_not_found = constants["TsoSessionNotFound"]
self.tso_profile = tso_profile or {}

Expand Down
4 changes: 2 additions & 2 deletions src/zosmf/zowe/zosmf_for_zowe_sdk/zosmf.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ class Zosmf(SdkApi):
The z/OSMF connection object (generated by the ZoweSDK object)
"""

def __init__(self, connection: dict, log = False):
super().__init__(connection, "/zosmf/info", logger_name=__name__)
def __init__(self, connection: dict, log = True):
super().__init__(connection, "/zosmf/info", logger_name=__name__, log=log)

def get_info(self) -> ZosmfResponse:
"""
Expand Down

0 comments on commit 420388e

Please sign in to comment.