Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP2:GA
targetcli.1545
load_targetcli_config
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File load_targetcli_config of Package targetcli.1545
#!/usr/bin/env python ''' Python Script to load supplied configuratio file into targetcli configuration space ''' import os, sys from rtslib import Config verbose = True def load_startup_config(startup_config): if not os.path.isfile(startup_config): print >>sys.stderr, "Warning: No %s to load" % startup_config return False config = Config() config.load(startup_config, allow_new_attrs=True) list(config.apply()) if verbose: print "Loaded configuration file: %s" % startup_config return True def usage(): print >>sys.stderr, "Usage: load_targetcli_config STARTUP_CONFIG" return def verify_startup_config_arg(): if len(sys.argv) < 2: usage() sys.exit(1) return sys.argv[1] if __name__ == '__main__': startup_config = verify_startup_config_arg() try: if not load_startup_config(startup_config): print >>sys.stderr, "Unable to load %s" % startup_config sys.exit(1) except Exception, e: print >>sys.stderr, "Error:", e sys.exit(1) sys.exit(0)
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor