Skip to content

Commit

Permalink
Create kuadrant package
Browse files Browse the repository at this point in the history
- Move all Kuadrant CR into this package
- Remove Policy suffix from modules under kuadrant/policy

Remove policy suffix from modules under kuadrant/policy
  • Loading branch information
pehala committed Jul 11, 2024
1 parent 97c7300 commit 12948ee
Show file tree
Hide file tree
Showing 78 changed files with 91 additions and 91 deletions.
2 changes: 1 addition & 1 deletion testsuite/gateway/envoy/route.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
if typing.TYPE_CHECKING:
from testsuite.kubernetes.client import KubernetesClient
from testsuite.backend import Backend
from testsuite.policy.authorization.auth_config import AuthConfig
from testsuite.kuadrant.policy.authorization.auth_config import AuthConfig


class EnvoyVirtualRoute(GatewayRoute):
Expand Down
2 changes: 1 addition & 1 deletion testsuite/gateway/gateway_api/gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from testsuite.gateway import Gateway
from testsuite.kubernetes.client import KubernetesClient
from testsuite.kubernetes import KubernetesObject
from testsuite.policy import Policy
from testsuite.kuadrant.policy import Policy
from testsuite.utils import check_condition


Expand Down
2 changes: 1 addition & 1 deletion testsuite/gateway/gateway_api/route.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from testsuite.gateway import Gateway, GatewayRoute, PathMatch, MatchType, RouteMatch
from testsuite.kubernetes.client import KubernetesClient
from testsuite.kubernetes import KubernetesObject, modify
from testsuite.policy import Policy
from testsuite.kuadrant.policy import Policy
from testsuite.utils import asdict, check_condition

if typing.TYPE_CHECKING:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Kuadrant CR object"""
"""Kuadrant CR"""

import dataclasses

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from typing import Literal, Iterable, TYPE_CHECKING, Union

from testsuite.policy.authorization import (
from testsuite.kuadrant.policy.authorization import (
Credentials,
Rule,
Pattern,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from testsuite.gateway import Referencable
from testsuite.kubernetes.client import KubernetesClient
from testsuite.policy import Policy
from testsuite.kuadrant.policy import Policy


class DNSPolicy(Policy):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from testsuite.gateway import Referencable, RouteMatch
from testsuite.kubernetes import modify
from testsuite.kubernetes.client import KubernetesClient
from testsuite.policy import Policy
from testsuite.policy.authorization import Rule
from testsuite.kuadrant.policy import Policy
from testsuite.kuadrant.policy.authorization import Rule
from testsuite.utils import asdict


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from testsuite.gateway import Referencable
from testsuite.kubernetes.client import KubernetesClient
from testsuite.policy import Policy, has_condition
from testsuite.kuadrant.policy import Policy, has_condition


class TLSPolicy(Policy):
Expand Down
2 changes: 1 addition & 1 deletion testsuite/tests/kuadrantctl/cli/test_simple_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from testsuite.httpx.auth import HttpxOidcClientAuth
from testsuite.oas import as_tmp_file
from testsuite.policy.authorization.auth_policy import AuthPolicy
from testsuite.kuadrant.policy.authorization.auth_policy import AuthPolicy


@pytest.fixture(scope="module")
Expand Down
2 changes: 1 addition & 1 deletion testsuite/tests/kuadrantctl/cli/test_simple_limit.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import pytest

from testsuite.oas import as_tmp_file
from testsuite.policy.rate_limit_policy import Limit, RateLimitPolicy
from testsuite.kuadrant.policy.rate_limit import Limit, RateLimitPolicy
from testsuite.utils import asdict


Expand Down
6 changes: 3 additions & 3 deletions testsuite/tests/multicluster/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
from testsuite.gateway.gateway_api.hostname import DNSPolicyExposer
from testsuite.gateway.gateway_api.route import HTTPRoute
from testsuite.kubernetes.client import KubernetesClient
from testsuite.policy import Policy
from testsuite.policy.dns_policy import DNSPolicy
from testsuite.policy.tls_policy import TLSPolicy
from testsuite.kuadrant.policy import Policy
from testsuite.kuadrant.policy.dns import DNSPolicy
from testsuite.kuadrant.policy.tls import TLSPolicy


AnyPolicy = TypeVar("AnyPolicy", bound=Policy)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from keycloak import KeycloakOpenIDConnection, KeycloakUMA

from testsuite.httpx.auth import HttpxOidcClientAuth
from testsuite.policy.authorization import JsonResponse, ValueFrom, Pattern
from testsuite.kuadrant.policy.authorization import JsonResponse, ValueFrom, Pattern

pytestmark = [pytest.mark.authorino]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest

from testsuite.policy.authorization import ValueFrom, Cache
from testsuite.kuadrant.policy.authorization import ValueFrom, Cache
from testsuite.utils import extract_response

pytestmark = [pytest.mark.authorino]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import pytest

from testsuite.policy.authorization import ValueFrom, Cache
from testsuite.kuadrant.policy.authorization import ValueFrom, Cache
from testsuite.utils import extract_response

pytestmark = [pytest.mark.authorino]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest

from testsuite.policy.authorization import Pattern
from testsuite.kuadrant.policy.authorization import Pattern

pytestmark = [pytest.mark.authorino]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest

from testsuite.policy.authorization import Pattern
from testsuite.kuadrant.policy.authorization import Pattern
from testsuite.httpx.auth import HeaderApiKeyAuth

pytestmark = [pytest.mark.authorino]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest

from testsuite.policy.authorization import Pattern
from testsuite.kuadrant.policy.authorization import Pattern

pytestmark = [pytest.mark.authorino]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest

from testsuite.policy.authorization import Pattern, Value, JsonResponse
from testsuite.kuadrant.policy.authorization import Pattern, Value, JsonResponse
from testsuite.utils import extract_response

pytestmark = [pytest.mark.authorino]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest

from testsuite.policy.authorization import Pattern, PatternRef, AnyPattern, AllPattern
from testsuite.kuadrant.policy.authorization import Pattern, PatternRef, AnyPattern, AllPattern

pytestmark = [pytest.mark.authorino]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest

from testsuite.policy.authorization import Pattern
from testsuite.kuadrant.policy.authorization import Pattern

pytestmark = [pytest.mark.authorino]

Expand Down
4 changes: 2 additions & 2 deletions testsuite/tests/singlecluster/authorino/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
from testsuite.httpx.auth import HttpxOidcClientAuth
from testsuite.kubernetes.client import KubernetesClient
from testsuite.kubernetes.api_key import APIKey
from testsuite.policy.authorization.auth_config import AuthConfig
from testsuite.kubernetes.authorino import AuthorinoCR, Authorino, PreexistingAuthorino
from testsuite.kuadrant.policy.authorization.auth_config import AuthConfig
from testsuite.kuadrant.authorino import AuthorinoCR, Authorino, PreexistingAuthorino


@pytest.fixture(scope="session")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from testsuite.httpx.auth import HttpxOidcClientAuth
from testsuite.oidc.keycloak import Keycloak
from testsuite.utils import ContentType
from testsuite.policy.authorization import Pattern, PatternRef, Value, ValueFrom, DenyResponse
from testsuite.kuadrant.policy.authorization import Pattern, PatternRef, Value, ValueFrom, DenyResponse


@pytest.fixture(scope="session")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest

from testsuite.policy.authorization import Credentials
from testsuite.kuadrant.policy.authorization import Credentials

pytestmark = [pytest.mark.authorino]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest

from testsuite.policy.authorization import Value, ValueFrom
from testsuite.kuadrant.policy.authorization import Value, ValueFrom
from testsuite.utils import extract_response

pytestmark = [pytest.mark.authorino]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest

from testsuite.policy.authorization import Value
from testsuite.kuadrant.policy.authorization import Value
from testsuite.utils import extract_response

pytestmark = [pytest.mark.authorino]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""https://github.com/Kuadrant/authorino/blob/main/docs/user-guides/token-normalization.md"""

import pytest
from testsuite.policy.authorization import Pattern, Value, ValueFrom
from testsuite.kuadrant.policy.authorization import Pattern, Value, ValueFrom
from testsuite.httpx.auth import HeaderApiKeyAuth, HttpxOidcClientAuth

pytestmark = [pytest.mark.authorino]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest

from testsuite.policy.authorization import Credentials
from testsuite.kuadrant.policy.authorization import Credentials

pytestmark = [pytest.mark.authorino]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import pytest

from testsuite.policy.authorization import ValueFrom, JsonResponse
from testsuite.kuadrant.policy.authorization import ValueFrom, JsonResponse

pytestmark = [pytest.mark.authorino]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import pytest

from testsuite.httpx.auth import HttpxOidcClientAuth
from testsuite.policy.authorization import Pattern
from testsuite.kuadrant.policy.authorization import Pattern

pytestmark = [pytest.mark.authorino]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest

from testsuite.policy.authorization import Value, JsonResponse
from testsuite.kuadrant.policy.authorization import Value, JsonResponse

pytestmark = [pytest.mark.authorino, pytest.mark.standalone_only]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import pytest

from testsuite.gateway.envoy.route import EnvoyVirtualRoute
from testsuite.policy.authorization.auth_config import AuthConfig
from testsuite.kuadrant.policy.authorization.auth_config import AuthConfig


@pytest.fixture(scope="module")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

import pytest

from testsuite.policy.authorization import Value, JsonResponse
from testsuite.policy.authorization.auth_config import AuthConfig
from testsuite.kuadrant.policy.authorization import Value, JsonResponse
from testsuite.kuadrant.policy.authorization.auth_config import AuthConfig

pytestmark = [pytest.mark.authorino, pytest.mark.standalone_only]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import pytest

from testsuite.gateway.envoy import Envoy
from testsuite.kubernetes.authorino import AuthorinoCR, Authorino
from testsuite.kuadrant.authorino import AuthorinoCR, Authorino


@pytest.fixture(scope="module")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
import pytest

from testsuite.gateway.exposers import LoadBalancerServiceExposer
from testsuite.policy.authorization import Value, JsonResponse
from testsuite.kuadrant.policy.authorization import Value, JsonResponse
from testsuite.httpx import KuadrantClient
from testsuite.policy.authorization.auth_config import AuthConfig
from testsuite.kuadrant.policy.authorization.auth_config import AuthConfig
from testsuite.kubernetes.openshift.route import OpenshiftRoute


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

import pytest

from testsuite.policy.authorization import Value, JsonResponse
from testsuite.kuadrant.policy.authorization import Value, JsonResponse
from testsuite.gateway.envoy import Envoy
from testsuite.policy.authorization.auth_config import AuthConfig
from testsuite.kuadrant.policy.authorization.auth_config import AuthConfig
from testsuite.gateway.envoy.route import EnvoyVirtualRoute


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import pytest
from weakget import weakget

from testsuite.kubernetes.authorino import AuthorinoCR
from testsuite.kuadrant.authorino import AuthorinoCR

pytestmark = [pytest.mark.authorino, pytest.mark.standalone_only]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import pytest

from testsuite.policy.authorization.auth_config import AuthConfig
from testsuite.kuadrant.policy.authorization.auth_config import AuthConfig

pytestmark = [pytest.mark.authorino, pytest.mark.standalone_only]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

from testsuite.certificates import CertInfo
from testsuite.utils import cert_builder
from testsuite.policy.authorization import Pattern
from testsuite.kuadrant.policy.authorization import Pattern


@pytest.fixture(scope="module", autouse=True)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest

from testsuite.policy.authorization import Pattern
from testsuite.kuadrant.policy.authorization import Pattern

pytestmark = [pytest.mark.authorino, pytest.mark.standalone_only]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@

from testsuite.certificates import CertInfo
from testsuite.kubernetes.ingress import Ingress
from testsuite.policy.authorization import Pattern, ValueFrom
from testsuite.policy.authorization.auth_config import AuthConfig
from testsuite.kuadrant.policy.authorization import ValueFrom, Pattern
from testsuite.kuadrant.policy.authorization.auth_config import AuthConfig
from testsuite.utils import cert_builder

pytestmark = [pytest.mark.authorino, pytest.mark.standalone_only]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest

from testsuite.kubernetes.authorino import TracingOptions
from testsuite.kuadrant.authorino import TracingOptions


@pytest.fixture(scope="module")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import pytest

from testsuite.policy.authorization import Credentials
from testsuite.kuadrant.policy.authorization import Credentials
from testsuite.utils import extract_response

pytestmark = [pytest.mark.authorino]
Expand Down
Loading

0 comments on commit 12948ee

Please sign in to comment.