Skip to content

Commit 9caf4f0

Browse files
committed
renamed acs_deploy to deploy_acs
1 parent 1f7afd7 commit 9caf4f0

File tree

4 files changed

+27
-178
lines changed

4 files changed

+27
-178
lines changed

contentctl/actions/api_deploy.py

Lines changed: 0 additions & 151 deletions
This file was deleted.
File renamed without changes.

contentctl/actions/inspect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def inspectAppAPI(self, config: inspect)->str:
6161
if not package_path.is_file():
6262
raise Exception(f"Cannot run Appinspect API on App '{config.app.title}' - "
6363
f"no package exists as expected path '{package_path}'.\nAre you "
64-
"trying to 'contentctl acs_deploy' the package BEFORE running 'contentctl build'?")
64+
"trying to 'contentctl deploy_acs' the package BEFORE running 'contentctl build'?")
6565

6666
files = {
6767
"app_package": open(package_path,"rb"),

contentctl/contentctl.py

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
1-
from contentctl.actions.initialize import Initialize
1+
import traceback
2+
import sys
3+
import warnings
4+
import pathlib
25
import tyro
3-
from contentctl.objects.config import init, validate, build, new, deploy_acs, deploy_rest, test, test_servers, inspect, report, test_common, release_notes
6+
7+
from contentctl.actions.initialize import Initialize
8+
from contentctl.objects.config import init, validate, build, new, deploy_acs, test, test_servers, inspect, report, test_common, release_notes
49
from contentctl.actions.validate import Validate
510
from contentctl.actions.new_content import NewContent
611
from contentctl.actions.detection_testing.GitService import GitService
@@ -9,15 +14,10 @@
914
DirectorOutputDto,
1015
Build,
1116
)
12-
1317
from contentctl.actions.test import Test
1418
from contentctl.actions.test import TestInputDto
1519
from contentctl.actions.reporting import ReportingInputDto, Reporting
1620
from contentctl.actions.inspect import Inspect
17-
from contentctl.actions.acs_deploy import Deploy
18-
import sys
19-
import warnings
20-
import pathlib
2121
from contentctl.input.yml_reader import YmlReader
2222
from contentctl.actions.release_notes import ReleaseNotes
2323

@@ -82,8 +82,8 @@ def build_func(config:build)->DirectorOutputDto:
8282
def inspect_func(config:inspect)->str:
8383
#Make sure that we have built the most recent version of the app
8484
_ = build_func(config)
85-
appinspect_token = Inspect().execute(config)
86-
return appinspect_token
85+
inspect_token = Inspect().execute(config)
86+
return inspect_token
8787

8888

8989
def release_notes_func(config:release_notes)->None:
@@ -95,14 +95,8 @@ def new_func(config:new):
9595

9696

9797
def deploy_acs_func(config:deploy_acs):
98-
appinspect_token = inspect_func(config)
99-
Deploy().execute(config, appinspect_token)
100-
101-
102-
103-
def deploy_rest_func(config:deploy_rest):
104-
raise Exception("deploy rest not yet implemented")
105-
98+
#This is a bit challenging to get to work with the default values.
99+
raise Exception("deploy acs not yet implemented")
106100

107101
def test_common_func(config:test_common):
108102
director_output_dto = build_func(config)
@@ -178,15 +172,14 @@ def main():
178172
"test":test.model_validate(config_obj),
179173
"test_servers":test_servers.model_construct(**t.__dict__),
180174
"release_notes": release_notes.model_construct(**config_obj),
181-
"deploy_acs": deploy_acs.model_construct(**config_obj),
182-
#"deploy_rest":deploy_rest()
175+
"deploy_acs": deploy_acs.model_construct(**t.__dict__)
183176
}
184177
)
185178

186179

187180

188181

189-
182+
config = None
190183
try:
191184
# Since some model(s) were constructed and not model_validated, we have to catch
192185
# warnings again when creating the cli
@@ -212,8 +205,6 @@ def main():
212205
elif type(config) == deploy_acs:
213206
updated_config = deploy_acs.model_validate(config)
214207
deploy_acs_func(updated_config)
215-
elif type(config) == deploy_rest:
216-
deploy_rest_func(config)
217208
elif type(config) == test or type(config) == test_servers:
218209
if type(config) == test:
219210
#construct the container Infrastructure objects
@@ -223,9 +214,18 @@ def main():
223214
else:
224215
raise Exception(f"Unknown command line type '{type(config).__name__}'")
225216
except Exception as e:
226-
import traceback
227-
traceback.print_exc()
228-
traceback.print_stack()
229-
#print(e)
217+
if config is None:
218+
print("There was a serious issue where the config file could not be created.\n"
219+
"The entire stack trace is provided below (please include it if filing a bug report).\n")
220+
traceback.print_exc()
221+
elif config.verbose:
222+
print("Verbose error logging is ENABLED.\n"
223+
"The entire stack trace has been provided below (please include it if filing a bug report):\n")
224+
traceback.print_exc()
225+
else:
226+
print("Verbose error logging is DISABLED.\n"
227+
"Please use the --verbose command line argument if you need more context for your error or file a bug report.")
228+
print(e)
229+
230230
sys.exit(1)
231231

0 commit comments

Comments
 (0)