Esempio n. 1
0
     cache_page(timeout=settings.CACHE_MIDDLEWARE_SECONDS,
                key_prefix=OPENSHIFT_AWS_CACHE_PREFIX)(
                    OCPAWSTagView.as_view()),
     name="openshift-aws-tags-key",
 ),
 path(
     "tags/openshift/infrastructures/azure/<key>/",
     cache_page(timeout=settings.CACHE_MIDDLEWARE_SECONDS,
                key_prefix=OPENSHIFT_AZURE_CACHE_PREFIX)(
                    OCPAzureTagView.as_view()),
     name="openshift-azure-tags-key",
 ),
 path(
     "reports/aws/costs/",
     cache_page(timeout=settings.CACHE_MIDDLEWARE_SECONDS,
                key_prefix=AWS_CACHE_PREFIX)(AWSCostView.as_view()),
     name="reports-aws-costs",
 ),
 path(
     "reports/aws/instance-types/",
     cache_page(timeout=settings.CACHE_MIDDLEWARE_SECONDS,
                key_prefix=AWS_CACHE_PREFIX)(AWSInstanceTypeView.as_view()),
     name="reports-aws-instance-type",
 ),
 path(
     "reports/aws/storage/",
     cache_page(timeout=settings.CACHE_MIDDLEWARE_SECONDS,
                key_prefix=AWS_CACHE_PREFIX)(AWSStorageView.as_view()),
     name="reports-aws-storage",
 ),
 path(
Esempio n. 2
0
 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/$",
     AWSInstanceTypeView.as_view(),
     name="reports-aws-instance-type"),
 url(r"^reports/aws/storage/$",
     AWSStorageView.as_view(),
     name="reports-aws-storage"),
 url(r"^reports/azure/costs/$",
     AzureCostView.as_view(),
     name="reports-azure-costs"),
 url(r"^reports/azure/instance-types/$",
     AzureInstanceTypeView.as_view(),
     name="reports-azure-instance-type"),
 url(r"^reports/azure/storage/$",
     AzureStorageView.as_view(),
Esempio n. 3
0
     "tags/openshift/infrastructures/aws/<key>/",
     cache_page(timeout=settings.CACHE_MIDDLEWARE_SECONDS, key_prefix=OPENSHIFT_AWS_CACHE_PREFIX)(
         OCPAWSTagView.as_view()
     ),
     name="openshift-aws-tags-key",
 ),
 path(
     "tags/openshift/infrastructures/azure/<key>/",
     cache_page(timeout=settings.CACHE_MIDDLEWARE_SECONDS, key_prefix=OPENSHIFT_AZURE_CACHE_PREFIX)(
         OCPAzureTagView.as_view()
     ),
     name="openshift-azure-tags-key",
 ),
 path(
     "reports/aws/costs/",
     cache_page(timeout=settings.CACHE_MIDDLEWARE_SECONDS, key_prefix=AWS_CACHE_PREFIX)(AWSCostView.as_view()),
     name="reports-aws-costs",
 ),
 path(
     "reports/aws/instance-types/",
     cache_page(timeout=settings.CACHE_MIDDLEWARE_SECONDS, key_prefix=AWS_CACHE_PREFIX)(
         AWSInstanceTypeView.as_view()
     ),
     name="reports-aws-instance-type",
 ),
 path(
     "reports/aws/storage/",
     cache_page(timeout=settings.CACHE_MIDDLEWARE_SECONDS, key_prefix=AWS_CACHE_PREFIX)(AWSStorageView.as_view()),
     name="reports-aws-storage",
 ),
 path(
Esempio n. 4
0
ROUTER = DefaultRouter()
ROUTER.register(r'dataexportrequests', DataExportRequestViewSet, base_name='dataexportrequests')
ROUTER.register(r'metrics', CostModelMetricsMapViewSet, base_name='metrics')
ROUTER.register(r'providers', ProviderViewSet)
ROUTER.register(r'preferences', UserPreferenceViewSet, base_name='preferences')

# 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/aws/$', OCPAWSTagView.as_view(),
        name='openshift-aws-tags'),
    url(r'^reports/aws/costs/$', AWSCostView.as_view(), name='reports-aws-costs'),
    url(r'^reports/aws/instance-types/$', AWSInstanceTypeView.as_view(),
        name='reports-aws-instance-type'),
    url(r'^reports/aws/storage/$', AWSStorageView.as_view(),
        name='reports-aws-storage'),
    url(r'^reports/azure/costs/$', AzureCostView.as_view(), name='reports-azure-costs'),
    url(r'^reports/azure/instance-types/$', AzureInstanceTypeView.as_view(),
        name='reports-azure-instance-type'),
    url(r'^reports/azure/storage/$', AzureStorageView.as_view(),
        name='reports-azure-storage'),
    url(r'^reports/openshift/costs/$', OCPCostView.as_view(),
        name='reports-openshift-costs'),
    url(r'^reports/openshift/memory/$', OCPMemoryView.as_view(),
        name='reports-openshift-memory'),
    url(r'^reports/openshift/compute/$', OCPCpuView.as_view(),
        name='reports-openshift-cpu'),
Esempio n. 5
0
      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(),
      name="openshift-tags-key"),
 path("tags/openshift/infrastructures/all/<key>/",
      OCPAllTagView.as_view(),
      name="openshift-all-tags-key"),
 path("tags/openshift/infrastructures/aws/<key>/",
      OCPAWSTagView.as_view(),
      name="openshift-aws-tags-key"),
 path("tags/openshift/infrastructures/azure/<key>/",
      OCPAzureTagView.as_view(),
      name="openshift-azure-tags-key"),
 path("reports/aws/costs/", AWSCostView.as_view(),
      name="reports-aws-costs"),
 path("reports/aws/instance-types/",
      AWSInstanceTypeView.as_view(),
      name="reports-aws-instance-type"),
 path("reports/aws/storage/",
      AWSStorageView.as_view(),
      name="reports-aws-storage"),
 path("reports/azure/costs/",
      AzureCostView.as_view(),
      name="reports-azure-costs"),
 path("reports/azure/instance-types/",
      AzureInstanceTypeView.as_view(),
      name="reports-azure-instance-type"),
 path("reports/azure/storage/",
      AzureStorageView.as_view(),