Skip to content

Commit

Permalink
Update response name
Browse files Browse the repository at this point in the history
Signed-off-by: pem70 <[email protected]>
  • Loading branch information
pem70 committed Aug 9, 2024
1 parent ba8e09a commit 2ee6bff
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/zos_console/zowe/zos_console_for_zowe_sdk/console.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

from zowe.core_for_zowe_sdk import SdkApi

from .response import GetReponseResponse, IssueCommandResponse
from .response import ConsoleResponse, IssueCommandResponse


class Console(SdkApi):
Expand Down Expand Up @@ -52,7 +52,7 @@ def issue_command(self, command: str, console: Optional[str] = None) -> IssueCom
response_json = self.request_handler.perform_request("PUT", custom_args)
return IssueCommandResponse(response_json)

def get_response(self, response_key: str, console: Optional[str] = None) -> GetReponseResponse:
def get_response(self, response_key: str, console: Optional[str] = None) -> ConsoleResponse:
"""
Collect outstanding synchronous z/OS Console response messages.
Expand All @@ -65,11 +65,11 @@ def get_response(self, response_key: str, console: Optional[str] = None) -> GetR
Returns
-------
GetReponseResponse
ConsoleResponse
A JSON containing the response to the command
"""
custom_args = self._create_custom_request_arguments()
request_url = "{}/solmsgs/{}".format(console or "defcn", response_key)
custom_args["url"] = self._request_endpoint.replace("defcn", request_url)
response_json = self.request_handler.perform_request("GET", custom_args)
return GetReponseResponse(response_json)
return ConsoleResponse(response_json)
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@
Copyright Contributors to the Zowe Project.
"""
from .console import GetReponseResponse, IssueCommandResponse

from .console import ConsoleResponse, IssueCommandResponse
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
Copyright Contributors to the Zowe Project.
"""

from dataclasses import dataclass
from typing import Any, Optional

Expand All @@ -33,7 +34,7 @@ def __setitem__(self, key: str, value: str) -> None:


@dataclass
class GetReponseResponse:
class ConsoleResponse:
cmd_response: Optional[str] = None
sol_key_detected: Optional[bool] = None

Expand Down

0 comments on commit 2ee6bff

Please sign in to comment.