add hub-and-spoke diagrams to readme
This commit is contained in:
@ -54,7 +54,6 @@ class MockSpoke(SpokeInterface):
|
||||
def destroy(self, email: str, id: str):
|
||||
current_app.logger.info(f"mock destroy: {id} for {email}")
|
||||
|
||||
|
||||
class ShellScriptSpoke(SpokeInterface):
|
||||
|
||||
def validate_completed_process(self, completedProcess, email=None):
|
||||
@ -157,17 +156,12 @@ class ShellScriptSpoke(SpokeInterface):
|
||||
{completedProcess.stderr}
|
||||
""")
|
||||
|
||||
def destroy(self, email: str, id: str):
|
||||
def destroy(self, email: str, id: str) -> str:
|
||||
validate_capsul_id(id)
|
||||
completedProcess = run([join(current_app.root_path, 'shell_scripts/destroy.sh'), id], capture_output=True)
|
||||
self.validate_completed_process(completedProcess, email)
|
||||
lines = completedProcess.stdout.splitlines()
|
||||
status = lines[len(lines)-1].decode("utf-8")
|
||||
return status
|
||||
|
||||
if not status == "success":
|
||||
raise ValueError(f"""failed to destroy vm "{id}" for {email}:
|
||||
stdout:
|
||||
{completedProcess.stdout}
|
||||
stderr:
|
||||
{completedProcess.stderr}
|
||||
""")
|
||||
|
||||
|
Reference in New Issue
Block a user