Esempio n. 1
0
    def __init__(self, target_iqn, parent):

        UIGroup.__init__(self, target_iqn, parent)
        self.target_iqn = target_iqn
        self.gateway_group = GatewayGroup(self)
        self.client_group = Clients(self)
        self.host_groups = HostGroups(self)
Esempio n. 2
0
    def __init__(self, target_iqn, parent):
        UIGroup.__init__(self, target_iqn, parent)
        self.target_iqn = target_iqn

        self.control_values = []
        self.controls = {}

        self.gateway_group = GatewayGroup(self)
        self.client_group = Clients(self)
        self.host_groups = HostGroups(self)
        self.target_disks = TargetDisks(self)
Esempio n. 3
0
    def __init__(self, target_iqn, parent):
        UIGroup.__init__(self, target_iqn, parent)
        self.target_iqn = target_iqn

        self.control_values = []
        self.controls = {}

        self.gateway_group = GatewayGroup(self)
        self.client_group = Clients(self)
        self.host_groups = HostGroups(self)
        self.target_disks = TargetDisks(self)

        config = self.parent.parent._get_config()
        if not config:
            self.logger.error("Unable to refresh local config")
            raise GatewayError

        self.auth = config['targets'][target_iqn]['auth']
        # decode the chap password if necessary
        if 'username' in self.auth and 'password' in self.auth:
            self.chap = CHAP(self.auth['username'], self.auth['password'],
                             self.auth['password_encryption_enabled'])
            self.auth['username'] = self.chap.user
            self.auth['password'] = self.chap.password
        else:
            self.auth['username'] = ''
            self.auth['password'] = ''

        # decode the chap_mutual password if necessary
        if 'mutual_username' in self.auth and 'mutual_password' in self.auth:
            self.chap_mutual = CHAP(
                self.auth['mutual_username'], self.auth['mutual_password'],
                self.auth['mutual_password_encryption_enabled'])
            self.auth['mutual_username'] = self.chap_mutual.user
            self.auth['mutual_password'] = self.chap_mutual.password
        else:
            self.auth['mutual_username'] = ''
            self.auth['mutual_password'] = ''