Beispiel #1
0
def with_namespaced_crd(hostname, aresponses):
    result = {'resources': [{
        'name': NAMESPACED_PEERING_RESOURCE.plural,
        'namespaced': True,
    }]}
    url = NAMESPACED_PEERING_RESOURCE.get_version_url()
    aresponses.add(hostname, url, 'get', result)
Beispiel #2
0
def with_both_crds(hostname, aresponses):
    result = {'resources': [{
        'name': CLUSTER_PEERING_RESOURCE.plural,
        'namespaced': False,
    }, {
        'name': NAMESPACED_PEERING_RESOURCE.plural,
        'namespaced': True,
    }]}
    urls = {
        CLUSTER_PEERING_RESOURCE.get_version_url(),
        NAMESPACED_PEERING_RESOURCE.get_version_url(),
    }
    for url in urls:
        aresponses.add(hostname, url, 'get', result)
Beispiel #3
0
def with_namespaced_cr(hostname, aresponses):
    url = NAMESPACED_PEERING_RESOURCE.get_url(namespace='namespace', name='existent')
    aresponses.add(hostname, url, 'get', {'spec': {}})
Beispiel #4
0
def with_namespaced_specific(hostname, aresponses):
    url = NAMESPACED_PEERING_RESOURCE.get_url(namespace='namespace',
                                              name='peering-name')
    aresponses.add(hostname, url, 'get', {'spec': {}})
Beispiel #5
0
def with_namespaced_default(hostname, aresponses):
    url = NAMESPACED_PEERING_RESOURCE.get_url(namespace='namespace',
                                              name=PEERING_DEFAULT_NAME)
    aresponses.add(hostname, url, 'get', {'spec': {}})