Skip to content

Commit

Permalink
ordered dict!
Browse files Browse the repository at this point in the history
  • Loading branch information
lcouzens committed Apr 8, 2024
1 parent 27ae496 commit 5f2ae02
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions koku/koku/rbac.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#
"""Interactions with the rbac service."""
import logging
from collections import OrderedDict
from json.decoder import JSONDecodeError

import requests
Expand All @@ -22,20 +23,22 @@
HOST = "host"
PORT = "port"
PATH = "path"
RESOURCE_TYPES = {
"aws.account": ["read"],
"aws.organizational_unit": ["read"],
"gcp.account": ["read"],
"gcp.project": ["read"],
"azure.subscription_guid": ["read"],
"openshift.cluster": ["read"],
"openshift.node": ["read"],
"openshift.project": ["read"],
"cost_model": ["read", "write"],
"settings": ["read", "write"],
"ibm.account": ["read"],
"oci.payer_tenant_id": ["read"],
}
RESOURCE_TYPES = OrderedDict(
[
("aws.account", ["read"]),
("aws.organizational_unit", ["read"]),
("gcp.account", ["read"]),
("gcp.project", ["read"]),
("azure.subscription_guid", ["read"]),
("openshift.cluster", ["read"]),
("openshift.node", ["read"]),
("openshift.project", ["read"]),
("cost_model", ["read", "write"]),
("settings", ["read", "write"]),
("ibm.account", ["read"]),
("oci.payer_tenant_id", ["read"]),
]
)


def _extract_permission_data(permission):
Expand Down

0 comments on commit 5f2ae02

Please sign in to comment.