def __init__(self, shell, endpoint=None): UIRoot.__init__(self, shell) self.error = False self.error_msg = '' self.interactive = True # default interactive mode if settings.config.api_secure: self.http_mode = 'https' else: self.http_mode = 'http' if endpoint is None: self.local_api = ('{}://127.0.0.1:{}/' 'api'.format(self.http_mode, settings.config.api_port)) else: self.local_api = endpoint self.config = {} # Establish the root nodes within the UI, for the different components self.disks = Disks(self) self.ceph = CephGroup(self) self.target = ISCSITarget(self)
def __init__(self, shell, logger, endpoint=None): UIRoot.__init__(self, shell) self.config = {} self.error = False self.error_msg = '' self.logger = logger if settings.config.api_secure: self.http_mode = 'https' else: self.http_mode = 'http' if endpoint == None: self.local_api = '{}://127.0.0.1:{}/api'.format( self.http_mode, settings.config.api_port) else: self.local_api = endpoint # Establish the root nodes within the UI, for the different components self.disks = Disks(self) self.ceph = Ceph(self) self.target = ISCSITarget(self)