Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(152)  |  Call(152)  |  Derive(0)  |  Import(0)

src/k/a/karesansui-HEAD/karesansui/gadget/hostby1firewallrule.py   karesansui(Download)
        if os.path.exists(kit.firewall_xml_file) is False:
            check = False
            checker.add_error(_('Has not been initialized. Please initialize.'))
        else:
            kit.firewall_xml = kit.read_firewall_xml()
            rule_id_max_length += len(kit.get_rules())
 
        if not is_param(obj.input, 'rule_id'):
            check = False
            checker.add_error(_('"%s" is required.') % _('ID'))
    if not is_param(obj.input, 'target'):
        check = False
        checker.add_error(_('"%s" is required.') % _('Target'))
    else:
        check = checker.check_firewall_policy(
    if not is_param(obj.input, 'protocol'):
        check = False
        checker.add_error(_('"%s" is required.') % _('Protocol'))
    else:
        check = checker.check_firewall_protocol(
    if not is_param(obj.input, 'source'):
        check = False
        checker.add_error(_('"%s" is required.') % _('Source Address'))
    else:
        check = checker.check_ipaddr(

src/k/a/karesansui-HEAD/karesansui/gadget/guest.py   karesansui(Download)
    if not is_param(obj.input, 'm_name'):
        check = False
        checker.add_error(_('Parameter m_name does not exist.'))
    else:
        check = checker.check_string(
    if not is_param(obj.input, 'm_hypervisor'):
        check = False
        checker.add_error(_('Parameter m_hypervisor does not exist.'))
    else:
        check = checker.check_hypervisor(
    if not is_param(obj.input, 'domain_name'):
        check = False
        checker.add_error(_('Parameter domain_name does not exist.'))
    else:
        check = checker.check_string(
        if obj.input.domain_name in get_dom_list():
            dom_type = get_dom_type(obj.input.domain_name)
            checker.add_error(_("The same domain name already exists for hypervisor '%s'.") % dom_type.upper())
            check = False
 
    if not is_param(obj.input, 'boot_image'):
        check = False
        checker.add_error(_('Parameter boot_image does not exist.'))
    else:
        if obj.input.boot_image == "kernel":

src/k/a/karesansui-HEAD/karesansui/gadget/hostby1network.py   karesansui(Download)
    if not is_param(obj.input, 'name'):
        check = False
        checker.add_error(_('Specify network name.'))
    else:
        check = checker.check_network_name(
    if not is_param(obj.input, 'cidr'):
        check = False
        checker.add_error(_('Specify bridge IP address for the network.'))
    else:
        check = checker.check_ipaddr(
    if not is_param(obj.input, 'bridge'):
        check = False
        checker.add_error(_('Specify bridge name to create for the network.'))
    else:
        check = checker.check_netdev_name(
    if not (A and B):
        check = False
        checker.add_error(_('Specify both %s and %s') % (_('DHCP Start Address'), _('DHCP End Address')))
 
    if is_param(obj.input, 'dhcp_start'):

src/k/a/karesansui-HEAD/karesansui/gadget/host.py   karesansui(Download)
    if not is_param(obj.input, 'm_name'):
        check = False
        checker.add_error(_('Parameter m_name does not exist.'))
    else:
        check = checker.check_string(
    if not is_param(obj.input, 'm_connect_type'):
        check = False
        checker.add_error(_('Parameter m_connect_type does not exist.'))
    else:
        if obj.input.m_connect_type == "karesansui":
 
            if not is_param(obj.input, 'm_hostname'):
                check = False
                checker.add_error(_('"%s" is required.') % _('FQDN'))
                if len(m_hostname_parts) > 2:
                    check = False
                    checker.add_error(_('%s contains too many colon(:)s.') % _('FQDN'))
                else:
                    check = checker.check_domainname(
            if not is_param(obj.input, 'm_uuid'):
                check = False
                checker.add_error(_('"%s" is required.') % _('Unique Key'))
            else:
                check = checker.check_unique_key(

src/k/a/karesansui-HEAD/karesansui/gadget/hostby1settingby1proxy.py   karesansui(Download)
    if not is_param(obj.input, 'proxy_status'):
        check = False
        checker.add_error(_('"%s" is required.') % _('Proxy Settings'))
    else:
        if obj.input.proxy_status == PROXY_ENABLE:
            if not is_param(obj.input, 'proxy_server'):
                check = False
                checker.add_error(_('"%s" is required.') % _('Proxy Server'))
            if not is_param(obj.input, 'proxy_port'):
                check = False
                checker.add_error(_('"%s" is required.') % _('Proxy Port Number'))
            else:
                check = checker.check_number(
            if not is_param(obj.input, 'proxy_user'):
                check = False
                checker.add_error(_('"%s" is required.') % _('Proxy User Name'))
            else:
                check = checker.check_username(
            if not is_param(obj.input, 'proxy_password'):
                check = False
                checker.add_error(_('"%s" is required.') % _('Proxy Password'))
            else:
                check = checker.check_password(

src/k/a/karesansui-HEAD/karesansui/gadget/hostby1watch.py   karesansui(Download)
    else:
        check = False
        checker.add_error(_('"%s" is required.') %_('Name'))
 
    if is_param(obj.input, 'watch_target'):
            # TRANSLATORS:
            #  %sは監視対象ではありません。
            checker.add_error(_('"%s" is not watch target.') %_(obj.input.watch_target))
    else:
        check = False
        checker.add_error(_('"%s" is required.') %_('Watch Target'))
    else:
        check = False
        checker.add_error(_('"%s" is required.') %_('Alert Trigger Count'))
 
    if is_param(obj.input, 'prohibition_period'):
    else:
        check = False
        checker.add_error(_('"%s" is required.') %_('Silent Period'))
 
    if is_param(obj.input, 'threshold_fraction'):

src/k/a/karesansui-HEAD/karesansui/gadget/me.py   karesansui(Download)
        _password_flag = False
        check = False
        checker.add_error(_('"%s" is required.') % _('Password'))
    if not is_param(obj.input, 'new_password'):
        _password_flag = False
        check = False
        checker.add_error(_('"%s" is required.') % _('New Password'))
        _password_flag = False
        check = False
        checker.add_error(_('"%s" is required.') % _('Retype'))
 
    if _password_flag == True:
    if not is_param(obj.input, 'id'):
        check = False
        checker.add_error(_('"%s" is required.') % _('ID'))
    else:
        check = checker.check_number(
    if not is_param(obj.input, 'email'):
        check = False
        checker.add_error(_('"%s" is required.') % _('Mail Address'))
    else:
        check = checker.check_mailaddress(

src/k/a/karesansui-HEAD/karesansui/gadget/hostby1.py   karesansui(Download)
    if not is_param(obj.input, 'm_name'):
        check = False
        checker.add_error(_('Parameter m_name does not exist.'))
    else:
        check = checker.check_string(
    if not is_param(obj.input, 'm_connect_type'):
        check = False
        checker.add_error(_('Parameter m_connect_type does not exist.'))
    else:
        if obj.input.m_connect_type == "karesansui":
 
            if not is_param(obj.input, 'm_hostname'):
                check = False
                checker.add_error(_('"%s" is required.') % _('FQDN'))
                if len(m_hostname_parts) > 2:
                    check = False
                    checker.add_error(_('%s contains too many colon(:)s.') % _('FQDN'))
                else:
                    check = checker.check_domainname(
            if not is_param(obj.input, 'm_uri'):
                check = False
                checker.add_error(_('"%s" is required.') % _('URI'))
            else:
                pass

src/k/a/karesansui-HEAD/karesansui/gadget/hostby1networkstorageby1status.py   karesansui(Download)
    else:
        check = False
        checker.add_error(_('"%s" is required.') %_('Target IQN'))
 
    if is_param(obj.input, 'status'):
    else:
        check = False
        checker.add_error(_('"%s" is required.') %_('Action Status'))
 
    if is_param(obj.input, 'host'):
    else:
        check = False
        checker.add_error(_('"%s" is required.') %_('Target Hostname'))
 
    if is_param(obj.input, 'port'):
    else:
        check = False
        checker.add_error(_('"%s" is required.') %_('Target Port Number'))
 
    obj.view.alert = checker.errors

src/k/a/karesansui-HEAD/karesansui/gadget/hostby1watchby1.py   karesansui(Download)
    else:
        check = False
        checker.add_error(_('"%s" is required.') %_('Watch Name'))
 
    if is_param(obj.input, 'continuation_count'):
    else:
        check = False
        checker.add_error(_('"%s" is required.') %_('Alert Trigger Count'))
    if is_param(obj.input, 'prohibition_period'):
        check = checker.check_number(_('Silent Period'),
    else:
        check = False
        checker.add_error(_('"%s" is required.') %_('Silent Period'))
 
    if is_param(obj.input, 'threshold_fraction'):
    else:
        check = False
        checker.add_error(_('"%s" is required.') %_('Threshold Value'))
 
    if is_param(obj.input, 'threshold_val2'):
    else:
        check = False
        checker.add_error(_('"%s" is required.') %_('Threshold Value'))
 
    if not is_param(obj.input, 'threshold_type'):

  1 | 2 | 3 | 4  Next