Exemple #1
0
 path("cloud-accounts/", cloud_accounts, name="cloud-accounts"),
 path("currency/", get_currency, name="currency"),
 path("cost-type/", UserCostTypeSettings.as_view(), name="cost-type"),
 path("account-settings/",
      AccountSettings.as_view(),
      name="account-settings"),
 path("account-settings/<str:setting>/",
      AccountSettings.as_view(),
      name="get-account-setting"),
 path("status/", StatusView.as_view(), name="server-status"),
 path("openapi.json", openapi, name="openapi"),
 path("metrics/", metrics, name="metrics"),
 path(
     "tags/aws/",
     cache_page(timeout=settings.CACHE_MIDDLEWARE_SECONDS,
                key_prefix=AWS_CACHE_PREFIX)(AWSTagView.as_view()),
     name="aws-tags",
 ),
 path(
     "tags/azure/",
     cache_page(timeout=settings.CACHE_MIDDLEWARE_SECONDS,
                key_prefix=AZURE_CACHE_PREFIX)(AzureTagView.as_view()),
     name="azure-tags",
 ),
 path(
     "tags/gcp/",
     cache_page(timeout=settings.CACHE_MIDDLEWARE_SECONDS,
                key_prefix=GCP_CACHE_PREFIX)(GCPTagView.as_view()),
     name="gcp-tags",
 ),
 path(
Exemple #2
0
from sources.api.views import SourcesViewSet

ROUTER = DefaultRouter()
ROUTER.register(r"dataexportrequests",
                DataExportRequestViewSet,
                basename="dataexportrequests")
ROUTER.register(r"sources", SourcesViewSet, basename="sources")
ROUTER.register(r"cloud-accounts",
                CloudAccountViewSet,
                basename="cloud_accounts")
# pylint: disable=invalid-name
urlpatterns = [
    url(r"^status/$", StatusView.as_view(), name="server-status"),
    url(r"^openapi.json", openapi, name="openapi"),
    url(r"^metrics/$", metrics, name="metrics"),
    url(r"^tags/aws/$", AWSTagView.as_view(), name="aws-tags"),
    url(r"^tags/azure/$", AzureTagView.as_view(), name="azure-tags"),
    url(r"^tags/openshift/$", OCPTagView.as_view(), name="openshift-tags"),
    url(r"^tags/openshift/infrastructures/all/$",
        OCPAllTagView.as_view(),
        name="openshift-all-tags"),
    url(r"^tags/openshift/infrastructures/aws/$",
        OCPAWSTagView.as_view(),
        name="openshift-aws-tags"),
    url(r"^tags/openshift/infrastructures/azure/$",
        OCPAzureTagView.as_view(),
        name="openshift-azure-tags"),
    url(r"^reports/aws/costs/$",
        AWSCostView.as_view(),
        name="reports-aws-costs"),
    url(r"^reports/aws/instance-types/$",
Exemple #3
0
from koku.cache import OPENSHIFT_AZURE_CACHE_PREFIX
from koku.cache import OPENSHIFT_CACHE_PREFIX
from sources.api.views import SourcesViewSet


ROUTER = DefaultRouter()
ROUTER.register(r"dataexportrequests", DataExportRequestViewSet, basename="dataexportrequests")
ROUTER.register(r"sources", SourcesViewSet, basename="sources")
urlpatterns = [
    path("cloud-accounts/", cloud_accounts, name="cloud-accounts"),
    path("status/", StatusView.as_view(), name="server-status"),
    path("openapi.json", openapi, name="openapi"),
    path("metrics/", metrics, name="metrics"),
    path(
        "tags/aws/",
        cache_page(timeout=settings.CACHE_MIDDLEWARE_SECONDS, key_prefix=AWS_CACHE_PREFIX)(AWSTagView.as_view()),
        name="aws-tags",
    ),
    path(
        "tags/azure/",
        cache_page(timeout=settings.CACHE_MIDDLEWARE_SECONDS, key_prefix=AZURE_CACHE_PREFIX)(AzureTagView.as_view()),
        name="azure-tags",
    ),
    path(
        "tags/openshift/",
        cache_page(timeout=settings.CACHE_MIDDLEWARE_SECONDS, key_prefix=OPENSHIFT_CACHE_PREFIX)(OCPTagView.as_view()),
        name="openshift-tags",
    ),
    path(
        "tags/openshift/infrastructures/all/",
        cache_page(timeout=settings.CACHE_MIDDLEWARE_SECONDS, key_prefix=OPENSHIFT_ALL_CACHE_PREFIX)(
Exemple #4
0
ROUTER = DefaultRouter()
ROUTER.register(r'dataexportrequests',
                DataExportRequestViewSet,
                basename='dataexportrequests')
ROUTER.register(r'metrics', CostModelMetricsMapViewSet, basename='metrics')
ROUTER.register(r'providers', ProviderViewSet)
ROUTER.register(r'sources', SourcesProxyViewSet, basename='sources-proxy')
ROUTER.register(r'preferences', UserPreferenceViewSet, basename='preferences')
ROUTER.register(r'cloud-accounts',
                CloudAccountViewSet,
                basename='cloud_accounts')
# pylint: disable=invalid-name
urlpatterns = [
    url(r'^status/$', StatusView.as_view(), name='server-status'),
    url(r'^openapi.json', openapi, name='openapi'),
    url(r'^tags/aws/$', AWSTagView.as_view(), name='aws-tags'),
    url(r'^tags/azure/$', AzureTagView.as_view(), name='azure-tags'),
    url(r'^tags/openshift/$', OCPTagView.as_view(), name='openshift-tags'),
    url(r'^tags/openshift/infrastructures/all/$',
        OCPAllTagView.as_view(),
        name='openshift-all-tags'),
    url(r'^tags/openshift/infrastructures/aws/$',
        OCPAWSTagView.as_view(),
        name='openshift-aws-tags'),
    url(r'^tags/openshift/infrastructures/azure/$',
        OCPAzureTagView.as_view(),
        name='openshift-azure-tags'),
    url(r'^reports/aws/costs/$',
        AWSCostView.as_view(),
        name='reports-aws-costs'),
    url(r'^reports/aws/instance-types/$',
Exemple #5
0
from api.views import SettingsView
from api.views import StatusView
from sources.api.views import SourcesViewSet

ROUTER = DefaultRouter()
ROUTER.register(r"dataexportrequests",
                DataExportRequestViewSet,
                basename="dataexportrequests")
ROUTER.register(r"sources", SourcesViewSet, basename="sources")
# pylint: disable=invalid-name
urlpatterns = [
    path("cloud-accounts/", cloud_accounts, name="cloud-accounts"),
    path("status/", StatusView.as_view(), name="server-status"),
    path("openapi.json", openapi, name="openapi"),
    path("metrics/", metrics, name="metrics"),
    path("tags/aws/", AWSTagView.as_view(), name="aws-tags"),
    path("tags/azure/", AzureTagView.as_view(), name="azure-tags"),
    path("tags/openshift/", OCPTagView.as_view(), name="openshift-tags"),
    path("tags/openshift/infrastructures/all/",
         OCPAllTagView.as_view(),
         name="openshift-all-tags"),
    path("tags/openshift/infrastructures/aws/",
         OCPAWSTagView.as_view(),
         name="openshift-aws-tags"),
    path("tags/openshift/infrastructures/azure/",
         OCPAzureTagView.as_view(),
         name="openshift-azure-tags"),
    path("tags/aws/<key>/", AWSTagView.as_view(), name="aws-tags-key"),
    path("tags/azure/<key>/", AzureTagView.as_view(), name="azure-tags-key"),
    path("tags/openshift/<key>/",
         OCPTagView.as_view(),