Exemplo n.º 1
0
def this_host(request):
    """Fixture for the current master"""
    tracker = HostTracker(name=api.env.host.partition('.')[0],
                          fqdn=api.env.host)
    # This host is not created/deleted, so don't call make_fixture
    tracker.exists = True
    return tracker
Exemplo n.º 2
0
def this_host(request):
    """Fixture for the current master"""
    tracker = HostTracker(name=api.env.host.partition('.')[0],
                          fqdn=api.env.host)
    tracker.exists = True
    # Finalizer ensures that any certificates added to this_host are removed
    tracker.add_finalizer_certcleanup(request)
    # This host is not created/deleted, so don't call make_fixture
    return tracker
Exemplo n.º 3
0
def this_host(request):
    """Fixture for the current master"""
    tracker = HostTracker(name=api.env.host.partition('.')[0],
                          fqdn=api.env.host)
    tracker.exists = True
    # Finalizer ensures that any certificates added to this_host are removed
    tracker.add_finalizer_certcleanup(request)
    # This host is not created/deleted, so don't call make_fixture
    return tracker
Exemplo n.º 4
0
 def test_raise_limit_and_try_valid_len_hostname(self):
     """Raise limit above default and test hostname with length
     in between default 64 and the new value. Should pass"""
     testhost = HostTracker(name=u'testhost',
                            fqdn=u'{}'.format(
                                self.generate_hostname(MAXHOSTNAMELEN + 1)))
     self.modify_config_maxhostname(testhost, MAXHOSTNAMELEN * 2)
     testhost.create()
     testhost.ensure_missing()
Exemplo n.º 5
0
 def test_try_hostname_length_below_maximum(self):
     """Try to create host with valid hostname. Should pass"""
     valid_length = MAXHOSTNAMELEN // 2
     testhost = HostTracker(name=u'testhost',
                            fqdn=u'{}'.format(
                                self.generate_hostname(valid_length)))
     self.modify_config_maxhostname(testhost, MAXHOSTNAMELEN)
     testhost.create()
     testhost.ensure_missing()
 def test_try_hostname_length_above_maxhostnamelimit(self):
     """Try to create host with hostname length above
     hostnamelength limit. Should fail"""
     testhost = HostTracker(name=u'testhost',
                            fqdn=u'{}'.format(
                                self.generate_hostname(MAXHOSTNAMELEN + 1)))
     self.modify_config_maxhostname(testhost, MAXHOSTNAMELEN)
     with raises_exact(errors.ValidationError(
             name=u'hostname',
             error=u'can be at most {} characters'.format(
                 MAXHOSTNAMELEN))):
         testhost.create()
         testhost.ensure_missing()
 def test_raise_limit_above_and_try_hostname_len_above_limit(self):
     """Raise limit above default and try to create host with hostname
     length above the new-set limit. Should fail"""
     testhost = HostTracker(name=u'testhost',
                            fqdn=u'{}'.format(
                                self.generate_hostname(MAXHOSTNAMELEN * 3)))
     self.modify_config_maxhostname(testhost, MAXHOSTNAMELEN * 2)
     with raises_exact(errors.ValidationError(
             name='hostname',
             error=u'can be at most {} characters'.format(
                 MAXHOSTNAMELEN * 2))):
         testhost.create()
         testhost.ensure_missing()
Exemplo n.º 8
0
def managing_host(request):
    tracker = HostTracker(name=u'managinghost2', fqdn=fqdn2)
    return tracker.make_fixture(request)
Exemplo n.º 9
0
def host5(request):
    tracker = HostTracker(u'webserver5')
    return tracker.make_fixture(request)
Exemplo n.º 10
0
def host4(request):
    tracker = HostTracker(name=u'testhost4')
    return tracker.make_fixture(request)
Exemplo n.º 11
0
def host(request):
    tr = HostTracker('iptest')
    return tr.make_fixture(request)
Exemplo n.º 12
0
def host3(request):
    tracker = HostTracker(u'web5')
    return tracker.make_fixture(request)
def santest_host_2(request):
    tr = HostTracker(u'santest-host-2')
    return tr.make_fixture(request)
def krbalias_host(request):
    tracker = HostTracker(u'testhost-krb')

    return tracker.make_fixture(request)
Exemplo n.º 15
0
def ipv46both_host(request):
    name = u'testipv4and6host'
    tracker = HostTracker(name=name, fqdn=u'%s.%s' % (name, dnszone))
    return tracker.make_fixture(request)
def krb_service_host(request):
    tracker = HostTracker(u'krb-srv-host')

    return tracker.make_fixture(request)
Exemplo n.º 17
0
def lab_host(request):
    name = u'testhost1'
    tracker = HostTracker(name=name,
                          fqdn=u'%s.lab.%s' % (name, api.env.domain))
    return tracker.make_fixture(request)
Exemplo n.º 18
0
def host4(request):
    tracker = HostTracker(name=u'testhost4')
    return tracker.make_fixture(request)
Exemplo n.º 19
0
def host2(request, xmlrpc_setup):
    tr = HostTracker(host2_shortname)
    return tr.make_fixture(request)
Exemplo n.º 20
0
def indicators_host(request):
    tracker = HostTracker(name=u'testhost1', fqdn=fqdn1)
    return tracker.make_fixture(request)
Exemplo n.º 21
0
def host(request):
    tracker = HostTracker(name=u'host')
    return tracker.make_fixture(request)
Exemplo n.º 22
0
def host1(request, xmlrpc_setup):
    tracker = HostTracker(u'web1')
    return tracker.make_fixture(request)
Exemplo n.º 23
0
def invalid_host(request):
    tracker = HostTracker(name='foo_bar',)
    return tracker.make_fixture(request)
Exemplo n.º 24
0
def host1(request):
    tracker = HostTracker(name=u"host1")
    return tracker.make_fixture(request)
Exemplo n.º 25
0
def host1(request, xmlrpc_setup):
    tracker = HostTracker(name=u'host1')
    return tracker.make_fixture(request)
Exemplo n.º 26
0
def ipv4only_host(request, xmlrpc_setup):
    name = u'testipv4onlyhost'
    tracker = HostTracker(name=name, fqdn=u'%s.%s' % (name, dnszone))
    return tracker.make_fixture(request)
Exemplo n.º 27
0
def krb_service_host(request):
    tracker = HostTracker(u'krb-srv-host')

    return tracker.make_fixture(request)
Exemplo n.º 28
0
def ipv46both_host(request):
    name = u'testipv4and6host'
    tracker = HostTracker(name=name, fqdn=u'%s.%s' % (name, dnszone))
    return tracker.make_fixture(request)
Exemplo n.º 29
0
def indicators_host(request):
    tracker = HostTracker(name=u'testhost1', fqdn=fqdn1)
    return tracker.make_fixture(request)
Exemplo n.º 30
0
def host(request):
    tracker = HostTracker(name=u'host')
    return tracker.make_fixture(request)
Exemplo n.º 31
0
def ipv6_fromip_host(request):
    name = u'testipv6fromip'
    tracker = HostTracker(name=name, fqdn=u'%s.%s' % (name, dnszone))
    return tracker.make_fixture(request)
Exemplo n.º 32
0
def krb_host(request):
    tracker = HostTracker(u'krb-host')

    return tracker.make_fixture(request)
Exemplo n.º 33
0
def krb_host(request):
    tracker = HostTracker(u'krb-host')

    return tracker.make_fixture(request)
Exemplo n.º 34
0
def host2(request):
    tracker = HostTracker(u'dev1')
    return tracker.make_fixture(request)
def santest_host_1(request, xmlrpc_setup):
    tr = HostTracker(u'santest-host-1')
    return tr.make_fixture(request)
Exemplo n.º 36
0
def host4(request):
    tracker = HostTracker(u'www5')
    return tracker.make_fixture(request)
def host(request, xmlrpc_setup):
    tr = HostTracker('iptest')
    return tr.make_fixture(request)
def santest_host_2(request):
    tr = HostTracker(u'santest-host-2')
    return tr.make_fixture(request)
Exemplo n.º 39
0
def host2(request):
    tracker = HostTracker(u'dev1')
    return tracker.make_fixture(request)
Exemplo n.º 40
0
def lab_host(request):
    name = u'testhost1'
    tracker = HostTracker(name=name,
                          fqdn=u'%s.lab.%s' % (name, api.env.domain))
    return tracker.make_fixture(request)
Exemplo n.º 41
0
def host3(request):
    tracker = HostTracker(u'web5')
    return tracker.make_fixture(request)
Exemplo n.º 42
0
def invalid_host(request):
    tracker = HostTracker(name='foo_bar', )
    return tracker.make_fixture(request)
Exemplo n.º 43
0
def host4(request):
    tracker = HostTracker(u'www5')
    return tracker.make_fixture(request)
Exemplo n.º 44
0
def ipv6_fromip_host(request):
    name = u'testipv6fromip'
    tracker = HostTracker(name=name, fqdn=u'%s.%s' % (name, dnszone))
    return tracker.make_fixture(request)
Exemplo n.º 45
0
def host5(request):
    tracker = HostTracker(u'webserver5')
    return tracker.make_fixture(request)