Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add table azure_databox_edge_device closes #330 #377

Merged
merged 11 commits into from
Oct 5, 2021
Merged

Conversation

ParthaI
Copy link
Contributor

@ParthaI ParthaI commented Oct 4, 2021

Integration test logs

Logs
No env file present for the current environment:  staging 
 Falling back to .env config
No env file present for the current environment:  staging
customEnv TURBOT_TEST_EXPECTED_TIMEOUT undefined

SETUP: tests/azure_databox_edge_device []

PRETEST: tests/azure_databox_edge_device

TEST: tests/azure_databox_edge_device
Running terraform
data.azurerm_client_config.current: Refreshing state...
data.null_data_source.resource: Refreshing state...
azurerm_resource_group.named_test_resource: Creating...
azurerm_resource_group.named_test_resource: Creation complete after 4s [id=/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest83236]
azurerm_databox_edge_device.named_test_resource: Creating...
azurerm_databox_edge_device.named_test_resource: Still creating... [10s elapsed]
azurerm_databox_edge_device.named_test_resource: Creation complete after 11s [id=/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest83236/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/turbottest83236]

Warning: Deprecated Resource

The null_data_source was historically used to construct intermediate values to
re-use elsewhere in configuration, the same can now be achieved using locals


Apply complete! Resources: 2 added, 0 changed, 0 destroyed.

Outputs:

device_status = [
  {
    "capacity" = 0
    "configured_role_types" = []
    "culture" = ""
    "hcs_version" = ""
    "model" = ""
    "node_count" = 0
    "serial_number" = ""
    "software_version" = ""
    "status" = "ReadyToSetup"
    "time_zone" = ""
    "type" = "DataBoxEdgeDevice"
  },
]
resource_aka = azure:///subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest83236/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/turbottest83236
resource_aka_lower = azure:///subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourcegroups/turbottest83236/providers/microsoft.databoxedge/databoxedgedevices/turbottest83236
resource_id = /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest83236/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/turbottest83236
resource_name = turbottest83236
subscription_id = d46d7416-f95f-4771-bbb5-529d4c76659c

Running SQL query: test-get-query.sql
[
  {
    "id": "/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest83236/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/turbottest83236",
    "name": "turbottest83236",
    "type": "Microsoft.DataBoxEdge/dataBoxEdgeDevices"
  }
]
✔ PASSED

Running SQL query: test-list-query.sql
[
  {
    "id": "/subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest83236/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/turbottest83236",
    "name": "turbottest83236"
  }
]
✔ PASSED

Running SQL query: test-not-found-query.sql
null
✔ PASSED

Running SQL query: test-turbot-query.sql
[
  {
    "akas": [
      "azure:///subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbottest83236/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/turbottest83236",
      "azure:///subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourcegroups/turbottest83236/providers/microsoft.databoxedge/databoxedgedevices/turbottest83236"
    ],
    "name": "turbottest83236",
    "title": "turbottest83236"
  }
]
✔ PASSED

POSTTEST: tests/azure_databox_edge_device

TEARDOWN: tests/azure_databox_edge_device

SUMMARY:

1/1 passed.

Example query results

Results

Basic info

select
  name,
  id,
  type,
  data_box_edge_device_status,
  region
from
  azure_databox_edge_device;
+------------+--------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------+------
| name       | id                                                                                                                                         | type                                     | data_
+------------+--------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------+------
| testdemo12 | /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbot_rg/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testdemo12 | Microsoft.DataBoxEdge/dataBoxEdgeDevices | Ready
+------------+--------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------+------

List databox edge devices which is ready for setup

select
  name,
  id,
  type,
  data_box_edge_device_status
from
  azure_databox_edge_device
where
  data_box_edge_device_status = 'ReadyToSetup';
+------------+--------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------+------
| name       | id                                                                                                                                         | type                                     | data_
+------------+--------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------+------
| testdemo12 | /subscriptions/d46d7416-f95f-4771-bbb5-529d4c76659c/resourceGroups/turbot_rg/providers/Microsoft.DataBoxEdge/dataBoxEdgeDevices/testdemo12 | Microsoft.DataBoxEdge/dataBoxEdgeDevices | Ready
+------------+--------------------------------------------------------------------------------------------------------------------------------------------+------------------------------------------+------

@ParthaI ParthaI requested a review from bigdatasourav October 4, 2021 13:01
@ParthaI ParthaI self-assigned this Oct 4, 2021
@ParthaI ParthaI linked an issue Oct 4, 2021 that may be closed by this pull request
Copy link
Contributor

@bigdatasourav bigdatasourav left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bigdatasourav bigdatasourav merged commit 4394fd2 into main Oct 5, 2021
@bigdatasourav bigdatasourav deleted the issue-330 branch October 5, 2021 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add table azure_databox_edge_device
2 participants