Ejemplo n.º 1
0
    def form(self):
        log("enter storage form function....")
        try:
            self.iscsi_initiator_label = WidgetBase("iscsi_initiator_label",
                                                    "Label",
                                                    "iSCSI Initiator Name:",
                                                    title=True)

            self.iscsi_initiator_name_value = WidgetBase(
                "iscsi_initiator_name_value",
                "Entry",
                "",
                "",
                get_conf=get_current_iscsi_initiator_name)

            self.iscsi_button = WidgetBase(
                'iscsi_button',
                ButtonList,
                '',
                params={
                    'labels': [_('Apply'), _('Reset')],
                    'callback': [self.storage_apply, self.storage_reset]
                })
        except:
            log("Here some error happened.format ext:  %s " %
                traceback.format_exc())

        return [
            "Storage", "Storage",
            [
                (self.iscsi_initiator_label, self.iscsi_initiator_name_value),
                (WidgetBase('__', 'Label', vhelp=140), ),
                (self.iscsi_button, ),
            ]
        ]
Ejemplo n.º 2
0
    def form(self):
        log("enter storage form function....")
        try:
            self.iscsi_initiator_label = WidgetBase(
                "iscsi_initiator_label",
                "Label",
                "iSCSI Initiator Name:",
                title=True)

            self.iscsi_initiator_name_value = WidgetBase(
                "iscsi_initiator_name_value", "Entry", "", "",
                get_conf=get_current_iscsi_initiator_name)

            self.iscsi_button = WidgetBase(
                'iscsi_button', ButtonList, '',
                params={'labels': [_('Apply'), _('Reset')],
                'callback': [self.storage_apply, self.storage_reset]})
        except:
            log("Here some error happened.format ext:  %s " %
                traceback.format_exc())

        return [
            "Storage",
            "Storage",
            [
                (self.iscsi_initiator_label, self.iscsi_initiator_name_value),
                (WidgetBase('__', 'Label', vhelp=140),),
                (self.iscsi_button,),
            ]]
Ejemplo n.º 3
0
 def form(self):
     title = WidgetBase('imvp_title', 'Label', "",
             get_conf=self._getHeaderInfo, title=True)
     management_server_addr = WidgetBase('imvp_server_addr', 'Label',
                                         _('Management Server'))
     management_server_addr_val = WidgetBase('imvp_server_addr_val','Entry', '', '',
             get_conf=getEngineInformation, get_conf_args=('address',))
     management_server_port = WidgetBase('imvp_serve_port', 'Label',
                                         _('Management Server Port'))
     management_server_port_val = WidgetBase('imvp_serve_port_val', 'Entry', '','',
             get_conf=getEngineInformation, get_conf_args=('port',))
     connect_to_imvp = WidgetBase('connect_to_imvp', 'CheckButton',
                     _('Connect to IMVP Manager and Validate Certificate'))
     set_pw = WidgetBase('set_imvp_pw', 'Label', _('Set IMVP Admin Password'),
                         title=True)
     imvp_pw = WidgetBase('imvp_pw', 'Label', 'Password')
     imvp_pwe = WidgetBase('imvp_pw', 'Entry')
     imvp_cpw = WidgetBase('imvp_cpw', 'Label', 'Confirm Password')
     imvp_cpwe = WidgetBase('imvp_cpw', 'Entry')
     imvp_changes = WidgetBase('imvp_changes', ButtonList, '',
                         params={'labels':[_('Apply'), _('Reset')],
                             'callback': [self.imvp_apply, self.imvp_reset]})
     return [ 'imvp', 'IMVP',
                 [
                     (title,),
                     (management_server_addr, management_server_addr_val),
                     (management_server_port, management_server_port_val),
                     (connect_to_imvp,),
                     (set_pw,),
                     (imvp_pw, imvp_pwe),
                     (imvp_cpw, imvp_cpwe),
                     (WidgetBase('__', 'Label', vhelp=140),),
                     (imvp_changes,),
                 ]
           ]
Ejemplo n.º 4
0
 def form(self):
     title = WidgetBase('imvp_title',
                        'Label',
                        "",
                        get_conf=self._getHeaderInfo,
                        title=True)
     management_server_addr = WidgetBase('imvp_server_addr', 'Label',
                                         _('Management Server'))
     management_server_addr_val = WidgetBase('imvp_server_addr_val',
                                             'Entry',
                                             '',
                                             '',
                                             get_conf=getEngineInformation,
                                             get_conf_args=('address', ))
     management_server_port = WidgetBase('imvp_serve_port', 'Label',
                                         _('Management Server Port'))
     management_server_port_val = WidgetBase('imvp_serve_port_val',
                                             'Entry',
                                             '',
                                             '',
                                             get_conf=getEngineInformation,
                                             get_conf_args=('port', ))
     connect_to_imvp = WidgetBase(
         'connect_to_imvp', 'CheckButton',
         _('Connect to IMVP Manager and Validate Certificate'))
     set_pw = WidgetBase('set_imvp_pw',
                         'Label',
                         _('Set IMVP Admin Password'),
                         title=True)
     imvp_pw = WidgetBase('imvp_pw', 'Label', 'Password')
     imvp_pwe = WidgetBase('imvp_pw', 'Entry')
     imvp_cpw = WidgetBase('imvp_cpw', 'Label', 'Confirm Password')
     imvp_cpwe = WidgetBase('imvp_cpw', 'Entry')
     imvp_changes = WidgetBase('imvp_changes',
                               ButtonList,
                               '',
                               params={
                                   'labels': [_('Apply'),
                                              _('Reset')],
                                   'callback':
                                   [self.imvp_apply, self.imvp_reset]
                               })
     return [
         'imvp', 'IMVP',
         [
             (title, ),
             (management_server_addr, management_server_addr_val),
             (management_server_port, management_server_port_val),
             (connect_to_imvp, ),
             (set_pw, ),
             (imvp_pw, imvp_pwe),
             (imvp_cpw, imvp_cpwe),
             (WidgetBase('__', 'Label', vhelp=140), ),
             (imvp_changes, ),
         ]
     ]