Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
234 changes: 202 additions & 32 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

78 changes: 63 additions & 15 deletions features/v2/org_groups.feature
Original file line number Diff line number Diff line change
Expand Up @@ -12,71 +12,71 @@ Feature: Org Groups
Scenario: Bulk update org group memberships returns "Bad Request" response
Given operation "BulkUpdateOrgGroupMemberships" enabled
And new "BulkUpdateOrgGroupMemberships" request
And body with value {"data": {"attributes": {"orgs": [{"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}]}, "relationships": {"source_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "target_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_membership_bulk_updates"}}
And body with value {"data": {"attributes": {"orgs": [{"org_site": "us1", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}]}, "relationships": {"source_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "target_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_membership_bulk_updates"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/org-management
Scenario: Bulk update org group memberships returns "Not Found" response
Given operation "BulkUpdateOrgGroupMemberships" enabled
And new "BulkUpdateOrgGroupMemberships" request
And body with value {"data": {"attributes": {"orgs": [{"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}]}, "relationships": {"source_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "target_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_membership_bulk_updates"}}
And body with value {"data": {"attributes": {"orgs": [{"org_site": "us1", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}]}, "relationships": {"source_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "target_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_membership_bulk_updates"}}
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/org-management
Scenario: Bulk update org group memberships returns "OK" response
Given operation "BulkUpdateOrgGroupMemberships" enabled
And new "BulkUpdateOrgGroupMemberships" request
And body with value {"data": {"attributes": {"orgs": [{"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}]}, "relationships": {"source_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "target_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_membership_bulk_updates"}}
And body with value {"data": {"attributes": {"orgs": [{"org_site": "us1", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}]}, "relationships": {"source_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "target_org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_membership_bulk_updates"}}
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/org-management
Scenario: Create an org group policy override returns "Bad Request" response
Given operation "CreateOrgGroupPolicyOverride" enabled
And new "CreateOrgGroupPolicyOverride" request
And body with value {"data": {"attributes": {"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "org_group_policy": {"data": {"id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}}, "type": "org_group_policy_overrides"}}
And body with value {"data": {"attributes": {"org_site": "us1", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "org_group_policy": {"data": {"id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}}, "type": "org_group_policy_overrides"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/org-management
Scenario: Create an org group policy override returns "Conflict" response
Given operation "CreateOrgGroupPolicyOverride" enabled
And new "CreateOrgGroupPolicyOverride" request
And body with value {"data": {"attributes": {"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "org_group_policy": {"data": {"id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}}, "type": "org_group_policy_overrides"}}
And body with value {"data": {"attributes": {"org_site": "us1", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "org_group_policy": {"data": {"id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}}, "type": "org_group_policy_overrides"}}
When the request is sent
Then the response status is 409 Conflict

@generated @skip @team:DataDog/org-management
Scenario: Create an org group policy override returns "Created" response
Given operation "CreateOrgGroupPolicyOverride" enabled
And new "CreateOrgGroupPolicyOverride" request
And body with value {"data": {"attributes": {"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "org_group_policy": {"data": {"id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}}, "type": "org_group_policy_overrides"}}
And body with value {"data": {"attributes": {"org_site": "us1", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}, "org_group_policy": {"data": {"id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}}, "type": "org_group_policy_overrides"}}
When the request is sent
Then the response status is 201 Created

@generated @skip @team:DataDog/org-management
Scenario: Create an org group policy returns "Bad Request" response
Given operation "CreateOrgGroupPolicy" enabled
And new "CreateOrgGroupPolicy" request
And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "policy_name": "monitor_timezone"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_policies"}}
And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "DEFAULT", "policy_name": "monitor_timezone", "policy_type": "org_config"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_policies"}}
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/org-management
Scenario: Create an org group policy returns "Conflict" response
Given operation "CreateOrgGroupPolicy" enabled
And new "CreateOrgGroupPolicy" request
And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "policy_name": "monitor_timezone"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_policies"}}
And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "DEFAULT", "policy_name": "monitor_timezone", "policy_type": "org_config"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_policies"}}
When the request is sent
Then the response status is 409 Conflict

@generated @skip @team:DataDog/org-management
Scenario: Create an org group policy returns "Created" response
Given operation "CreateOrgGroupPolicy" enabled
And new "CreateOrgGroupPolicy" request
And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "policy_name": "monitor_timezone"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_policies"}}
And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "DEFAULT", "policy_name": "monitor_timezone", "policy_type": "org_config"}, "relationships": {"org_group": {"data": {"id": "a1b2c3d4-e5f6-7890-abcd-ef0123456789", "type": "org_groups"}}}, "type": "org_group_policies"}}
When the request is sent
Then the response status is 201 Created

Expand Down Expand Up @@ -200,6 +200,54 @@ Feature: Org Groups
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/org-management
Scenario: Get an org group policy override returns "Bad Request" response
Given operation "GetOrgGroupPolicyOverride" enabled
And new "GetOrgGroupPolicyOverride" request
And request contains "org_group_policy_override_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/org-management
Scenario: Get an org group policy override returns "Not Found" response
Given operation "GetOrgGroupPolicyOverride" enabled
And new "GetOrgGroupPolicyOverride" request
And request contains "org_group_policy_override_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/org-management
Scenario: Get an org group policy override returns "OK" response
Given operation "GetOrgGroupPolicyOverride" enabled
And new "GetOrgGroupPolicyOverride" request
And request contains "org_group_policy_override_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/org-management
Scenario: Get an org group policy returns "Bad Request" response
Given operation "GetOrgGroupPolicy" enabled
And new "GetOrgGroupPolicy" request
And request contains "org_group_policy_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 400 Bad Request

@generated @skip @team:DataDog/org-management
Scenario: Get an org group policy returns "Not Found" response
Given operation "GetOrgGroupPolicy" enabled
And new "GetOrgGroupPolicy" request
And request contains "org_group_policy_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 404 Not Found

@generated @skip @team:DataDog/org-management
Scenario: Get an org group policy returns "OK" response
Given operation "GetOrgGroupPolicy" enabled
And new "GetOrgGroupPolicy" request
And request contains "org_group_policy_id" parameter from "REPLACE.ME"
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/org-management
Scenario: Get an org group returns "Bad Request" response
Given operation "GetOrgGroup" enabled
Expand Down Expand Up @@ -323,7 +371,7 @@ Feature: Org Groups
Given operation "UpdateOrgGroupPolicyOverride" enabled
And new "UpdateOrgGroupPolicyOverride" request
And request contains "org_group_policy_override_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "id": "9f8e7d6c-5b4a-3210-fedc-ba0987654321", "type": "org_group_policy_overrides"}}
And body with value {"data": {"attributes": {"org_site": "us1", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "id": "9f8e7d6c-5b4a-3210-fedc-ba0987654321", "type": "org_group_policy_overrides"}}
When the request is sent
Then the response status is 400 Bad Request

Expand All @@ -332,7 +380,7 @@ Feature: Org Groups
Given operation "UpdateOrgGroupPolicyOverride" enabled
And new "UpdateOrgGroupPolicyOverride" request
And request contains "org_group_policy_override_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "id": "9f8e7d6c-5b4a-3210-fedc-ba0987654321", "type": "org_group_policy_overrides"}}
And body with value {"data": {"attributes": {"org_site": "us1", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "id": "9f8e7d6c-5b4a-3210-fedc-ba0987654321", "type": "org_group_policy_overrides"}}
When the request is sent
Then the response status is 404 Not Found

Expand All @@ -341,7 +389,7 @@ Feature: Org Groups
Given operation "UpdateOrgGroupPolicyOverride" enabled
And new "UpdateOrgGroupPolicyOverride" request
And request contains "org_group_policy_override_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"org_site": "datadoghq.com", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "id": "9f8e7d6c-5b4a-3210-fedc-ba0987654321", "type": "org_group_policy_overrides"}}
And body with value {"data": {"attributes": {"org_site": "us1", "org_uuid": "c3d4e5f6-a7b8-9012-cdef-012345678901"}, "id": "9f8e7d6c-5b4a-3210-fedc-ba0987654321", "type": "org_group_policy_overrides"}}
When the request is sent
Then the response status is 200 OK

Expand All @@ -350,7 +398,7 @@ Feature: Org Groups
Given operation "UpdateOrgGroupPolicy" enabled
And new "UpdateOrgGroupPolicy" request
And request contains "org_group_policy_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"content": {"value": "UTC"}}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}
And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "DEFAULT"}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}
When the request is sent
Then the response status is 400 Bad Request

Expand All @@ -359,7 +407,7 @@ Feature: Org Groups
Given operation "UpdateOrgGroupPolicy" enabled
And new "UpdateOrgGroupPolicy" request
And request contains "org_group_policy_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"content": {"value": "UTC"}}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}
And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "DEFAULT"}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}
When the request is sent
Then the response status is 404 Not Found

Expand All @@ -368,7 +416,7 @@ Feature: Org Groups
Given operation "UpdateOrgGroupPolicy" enabled
And new "UpdateOrgGroupPolicy" request
And request contains "org_group_policy_id" parameter from "REPLACE.ME"
And body with value {"data": {"attributes": {"content": {"value": "UTC"}}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}
And body with value {"data": {"attributes": {"content": {"value": "UTC"}, "enforcement_tier": "DEFAULT"}, "id": "1a2b3c4d-5e6f-7890-abcd-ef0123456789", "type": "org_group_policies"}}
When the request is sent
Then the response status is 200 OK

Expand Down
12 changes: 12 additions & 0 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -4197,6 +4197,12 @@
"type": "unsafe"
}
},
"GetOrgGroupPolicy": {
"tag": "Org Groups",
"undo": {
"type": "safe"
}
},
"UpdateOrgGroupPolicy": {
"tag": "Org Groups",
"undo": {
Expand Down Expand Up @@ -4233,6 +4239,12 @@
"type": "unsafe"
}
},
"GetOrgGroupPolicyOverride": {
"tag": "Org Groups",
"undo": {
"type": "safe"
}
},
"UpdateOrgGroupPolicyOverride": {
"tag": "Org Groups",
"undo": {
Expand Down
14 changes: 14 additions & 0 deletions private/bdd_runner/src/support/scenarios_model_mapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9601,6 +9601,13 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = {
},
operationResponseType: "OrgGroupPolicyResponse",
},
"OrgGroupsApi.V2.GetOrgGroupPolicy": {
orgGroupPolicyId: {
type: "string",
format: "uuid",
},
operationResponseType: "OrgGroupPolicyResponse",
},
"OrgGroupsApi.V2.DeleteOrgGroupPolicy": {
orgGroupPolicyId: {
type: "string",
Expand Down Expand Up @@ -9652,6 +9659,13 @@ export const ScenariosModelMappings: { [key: string]: OperationMapping } = {
},
operationResponseType: "OrgGroupPolicyOverrideResponse",
},
"OrgGroupsApi.V2.GetOrgGroupPolicyOverride": {
orgGroupPolicyOverrideId: {
type: "string",
format: "uuid",
},
operationResponseType: "OrgGroupPolicyOverrideResponse",
},
"OrgGroupsApi.V2.DeleteOrgGroupPolicyOverride": {
orgGroupPolicyOverrideId: {
type: "string",
Expand Down
Loading
Loading