Skip to content

Commit

Permalink
http logs
Browse files Browse the repository at this point in the history
  • Loading branch information
gemmahou committed Feb 29, 2024
1 parent 4d73118 commit 9e93dfd
Show file tree
Hide file tree
Showing 5 changed files with 1,231 additions and 13 deletions.
2 changes: 1 addition & 1 deletion config/tests/samples/create/harness.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ func MaybeSkip(t *testing.T, name string, resources []*unstructured.Unstructured
switch gvk.GroupKind() {
case schema.GroupKind{Group: "accesscontextmanager.cnrm.cloud.google.com", Kind: "AccessContextManagerAccessLevel"}:
case schema.GroupKind{Group: "accesscontextmanager.cnrm.cloud.google.com", Kind: "AccessContextManagerServicePerimeter"}:
case schema.GroupKind{Group: "accesscontextmanager.cnrm.cloud.google.com", Kind: "AccessContextManagerServicePerimeterResource"}:
//case schema.GroupKind{Group: "accesscontextmanager.cnrm.cloud.google.com", Kind: "AccessContextManagerServicePerimeterResource"}:

case schema.GroupKind{Group: "apikeys.cnrm.cloud.google.com", Kind: "APIKeysKey"}:

Expand Down
3 changes: 0 additions & 3 deletions mockgcp/pkg/storage/memory.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ import (
"strings"
"sync"

apierrors "k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/runtime/schema"

"google.golang.org/grpc/codes"
"google.golang.org/grpc/status"
"google.golang.org/protobuf/proto"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,279 @@
GET https://accesscontextmanager.googleapis.com/v1/accessPolicies/${accessPolicyID}/accessLevels/kccaccesslevel${uniqueId}?alt=json
Content-Type: application/json
User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev

404 Not Found
Content-Type: application/json

{
"code": 5,
"details": [],
"message": "accessLevel \"accessPolicies/${accessPolicyID}/accessLevels/kccaccesslevel${uniqueId}\" not found"
}

---

POST https://accesscontextmanager.googleapis.com/v1/accessPolicies/${accessPolicyID}/accessLevels?alt=json
Content-Type: application/json
User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev

{
"basic": {
"combiningFunction": "AND",
"conditions": [
{
"devicePolicy": {
"requireCorpOwned": true
}
}
]
},
"name": "accessPolicies/${accessPolicyID}/accessLevels/kccaccesslevel${uniqueId}",
"title": "KCC ${uniqueId}"
}

200 OK
Content-Type: application/json
Grpc-Metadata-Content-Type: application/grpc

{
"done": true,
"metadata": null,
"name": "${operationID}"
}

---

GET https://accesscontextmanager.googleapis.com/v1/accessPolicies/${accessPolicyID}/accessLevels/kccaccesslevel${uniqueId}?alt=json
Content-Type: application/json
User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev

200 OK
Content-Type: application/json
Grpc-Metadata-Content-Type: application/grpc

{
"basic": {
"combiningFunction": "AND",
"conditions": [
{
"devicePolicy": {
"allowedDeviceManagementLevels": [],
"allowedEncryptionStatuses": [],
"osConstraints": [],
"requireAdminApproval": false,
"requireCorpOwned": true,
"requireScreenlock": false
},
"ipSubnetworks": [],
"members": [],
"negate": false,
"regions": [],
"requiredAccessLevels": []
}
]
},
"createTime": null,
"description": "",
"name": "accessPolicies/${accessPolicyID}/accessLevels/kccaccesslevel${uniqueId}",
"title": "KCC ${uniqueId}",
"updateTime": null
}

---

GET https://accesscontextmanager.googleapis.com/v1/accessPolicies/${accessPolicyID}/accessLevels/kccaccesslevel${uniqueId}?alt=json
Content-Type: application/json
User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev

200 OK
Content-Type: application/json
Grpc-Metadata-Content-Type: application/grpc

{
"basic": {
"combiningFunction": "AND",
"conditions": [
{
"devicePolicy": {
"allowedDeviceManagementLevels": [],
"allowedEncryptionStatuses": [],
"osConstraints": [],
"requireAdminApproval": false,
"requireCorpOwned": true,
"requireScreenlock": false
},
"ipSubnetworks": [],
"members": [],
"negate": false,
"regions": [],
"requiredAccessLevels": []
}
]
},
"createTime": null,
"description": "",
"name": "accessPolicies/${accessPolicyID}/accessLevels/kccaccesslevel${uniqueId}",
"title": "KCC ${uniqueId}",
"updateTime": null
}

---

GET https://accesscontextmanager.googleapis.com/v1/accessPolicies/${accessPolicyID}/accessLevels/kccaccesslevel${uniqueId}?alt=json
Content-Type: application/json
User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev

200 OK
Content-Type: application/json
Grpc-Metadata-Content-Type: application/grpc

{
"basic": {
"combiningFunction": "AND",
"conditions": [
{
"devicePolicy": {
"allowedDeviceManagementLevels": [],
"allowedEncryptionStatuses": [],
"osConstraints": [],
"requireAdminApproval": false,
"requireCorpOwned": true,
"requireScreenlock": false
},
"ipSubnetworks": [],
"members": [],
"negate": false,
"regions": [],
"requiredAccessLevels": []
}
]
},
"createTime": null,
"description": "",
"name": "accessPolicies/${accessPolicyID}/accessLevels/kccaccesslevel${uniqueId}",
"title": "KCC ${uniqueId}",
"updateTime": null
}

---

PATCH https://accesscontextmanager.googleapis.com/v1/accessPolicies/${accessPolicyID}/accessLevels/kccaccesslevel${uniqueId}?alt=json&updateMask=title
Content-Type: application/json
User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev

{
"basic": {
"combiningFunction": "AND",
"conditions": [
{
"devicePolicy": {
"requireCorpOwned": true
}
}
]
},
"title": "KCC ${uniqueId} 2"
}

200 OK
Content-Type: application/json
Grpc-Metadata-Content-Type: application/grpc

{
"done": true,
"metadata": null,
"name": "${operationID}"
}

---

GET https://accesscontextmanager.googleapis.com/v1/accessPolicies/${accessPolicyID}/accessLevels/kccaccesslevel${uniqueId}?alt=json
Content-Type: application/json
User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev

200 OK
Content-Type: application/json
Grpc-Metadata-Content-Type: application/grpc

{
"basic": {
"combiningFunction": "AND",
"conditions": [
{
"devicePolicy": {
"allowedDeviceManagementLevels": [],
"allowedEncryptionStatuses": [],
"osConstraints": [],
"requireAdminApproval": false,
"requireCorpOwned": true,
"requireScreenlock": false
},
"ipSubnetworks": [],
"members": [],
"negate": false,
"regions": [],
"requiredAccessLevels": []
}
]
},
"createTime": null,
"description": "",
"name": "accessPolicies/${accessPolicyID}/accessLevels/kccaccesslevel${uniqueId}",
"title": "KCC ${uniqueId} 2",
"updateTime": null
}

---

GET https://accesscontextmanager.googleapis.com/v1/accessPolicies/${accessPolicyID}/accessLevels/kccaccesslevel${uniqueId}?alt=json
Content-Type: application/json
User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev

200 OK
Content-Type: application/json
Grpc-Metadata-Content-Type: application/grpc

{
"basic": {
"combiningFunction": "AND",
"conditions": [
{
"devicePolicy": {
"allowedDeviceManagementLevels": [],
"allowedEncryptionStatuses": [],
"osConstraints": [],
"requireAdminApproval": false,
"requireCorpOwned": true,
"requireScreenlock": false
},
"ipSubnetworks": [],
"members": [],
"negate": false,
"regions": [],
"requiredAccessLevels": []
}
]
},
"createTime": null,
"description": "",
"name": "accessPolicies/${accessPolicyID}/accessLevels/kccaccesslevel${uniqueId}",
"title": "KCC ${uniqueId} 2",
"updateTime": null
}

---

DELETE https://accesscontextmanager.googleapis.com/v1/accessPolicies/${accessPolicyID}/accessLevels/kccaccesslevel${uniqueId}?alt=json
Content-Type: application/json
User-Agent: Terraform/ (+https://www.terraform.io) Terraform-Plugin-SDK/2.10.1 terraform-provider-google-beta/dev

200 OK
Content-Type: application/json
Grpc-Metadata-Content-Type: application/grpc

{
"done": true,
"metadata": null,
"name": "${operationID}"
}
Loading

0 comments on commit 9e93dfd

Please sign in to comment.