MCPcopy Index your code
hub / github.com/StackStorm/st2 / __init__

Method __init__

st2client/st2client/shell.py:179–426  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

177 ]
178
179 def __init__(self):
180 # Set up of endpoints is delayed until program is run.
181 self.client = None
182
183 # Set up the main parser.
184 self.parser = argparse.ArgumentParser(description=CLI_DESCRIPTION)
185
186 # Set up general program options.
187 self.parser.add_argument(
188 "--version",
189 action="version",
190 version="%(prog)s {version}, on Python {python_major}.{python_minor}.{python_patch}".format(
191 version=get_stackstorm_version(),
192 python_major=sys.version_info.major,
193 python_minor=sys.version_info.minor,
194 python_patch=sys.version_info.micro,
195 ),
196 )
197
198 self.parser.add_argument(
199 "--url",
200 action="store",
201 dest="base_url",
202 default=None,
203 help="Base URL for the API servers. Assumes all servers use the "
204 "same base URL and default ports are used. Get ST2_BASE_URL "
205 "from the environment variables by default.",
206 )
207
208 self.parser.add_argument(
209 "--auth-url",
210 action="store",
211 dest="auth_url",
212 default=None,
213 help="URL for the authentication service. Get ST2_AUTH_URL "
214 "from the environment variables by default.",
215 )
216
217 self.parser.add_argument(
218 "--api-url",
219 action="store",
220 dest="api_url",
221 default=None,
222 help="URL for the API server. Get ST2_API_URL "
223 "from the environment variables by default.",
224 )
225
226 self.parser.add_argument(
227 "--stream-url",
228 action="store",
229 dest="stream_url",
230 default=None,
231 help="URL for the stream endpoint. Get ST2_STREAM_URL"
232 "from the environment variables by default.",
233 )
234
235 self.parser.add_argument(
236 "--api-version",

Callers

nothing calls this directly

Calls 2

get_stackstorm_versionFunction · 0.70
formatMethod · 0.45

Tested by

no test coverage detected