Skip to content

Commit

Permalink
attempting some further debugging and improvement.
Browse files Browse the repository at this point in the history
  • Loading branch information
ndenny committed Feb 25, 2025
1 parent 17149c3 commit cde24d1
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
13 changes: 8 additions & 5 deletions bin/bastion.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from ruamel.yaml.scalarstring import PreservedScalarString

logger = logging.getLogger()
logging.basicConfig(level = logging.DEBUG)
logging.basicConfig(level = logging.WARN)


BIN_PATH = pathlib.Path(sys.argv[0]).absolute().parent
Expand Down Expand Up @@ -208,6 +208,7 @@ def run(self):
#-- scan through the menu of idioms and associated methods
#-- attempt to match the command line arguments with an idiom
action = self.do_help #-- default is to show the help.
request = Request("help", ID = self.session, context = opts)
for entry in menu:
idioms = entry[:-1]
method = entry[-1]
Expand Down Expand Up @@ -684,7 +685,9 @@ def do_export_zones_provisioned(self, request):
export zones provisioned {vault} {site}
* lists all zones provisioned in the given vault for the named site
"""
print(request.args[0])
vault = self.vault( request.args[0] )
print(vault.name)
site_name = request.args[1]

zone_names = vault.zones(site_name)
Expand Down Expand Up @@ -771,7 +774,6 @@ def do_export_assets_declared(self, request):
#↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑
#-- END "export" operations |
#--------------------------------

def do_refresh_keytab(self, request):
"""
refresh keytab {vault}
Expand Down Expand Up @@ -803,14 +805,15 @@ def do_refresh_keytab(self, request):

if __name__ == '__main__':
app = App().configured()
if sys.argv[1:] != ['shell']:
app.run( )
else:
argdex = dict(enumerate(sys.argv))
if argdex.get(1, None) == 'shell':
if os.environ.get('BASTION_SITE', None) == 'rusina':
rusina = app.site('rusina')
soundscapes = rusina.zone('soundscapes')
asset = soundscapes['HackathonData']
vault = app.vault(asset.policy.vault)
else:
app.run( )

#-- does a full, level 0 backup
#bastion backup site {site}
Expand Down
2 changes: 1 addition & 1 deletion lib/Bastion/CARP.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ def __init__(self, request, *args, **kwargs):

tracer = ''.join( traceback.format_exception(errobj) )

Report.__init__(self, request, status, errobj, body = tracer)
Report.__init__(self, request, status, errobj, report = tracer)



Expand Down
2 changes: 1 addition & 1 deletion lib/Bastion/Vaults/HPSS.py
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ def lsx(self, path = None):


class Vault(isVault):
PROTOCOL = 'HTAR'
PROTOCOL = 'HSI'

def __init__(self, name, **kwargs):
isVault.__init__(self, name, **kwargs)
Expand Down

0 comments on commit cde24d1

Please sign in to comment.