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

changing account, instance and instance_type tables to have global un… #1272

Merged
Merged
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
44 changes: 44 additions & 0 deletions configuration/etl/etl.d/jobs_cloud_common.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
"namespace": "ETL\\Maintenance",
"options_class": "MaintenanceOptions",
"definition_file_list": [
"cloud_common/account.json",
"cloud_common/event.json",
"cloud_common/asset.json",
"cloud_common/instance_data.json",
Expand Down Expand Up @@ -97,6 +98,49 @@
{
"#": "Note that any actions run after this cannot truncate the tables set here",

"name": "CloudAccountUnknownInitializer",
"description": "Initialize values for unknown hosts, images, etc. that are specific to a resource",
"class": "StructuredFileIngestor",
"definition_file": "cloud_common/account.json",
"endpoints": {
"source": {
"type": "jsonfile",
"name": "Cloud record types",
"path": "cloud_common/account.json"
}
}
},
{
"#": "Note that any actions run after this cannot truncate the tables set here",

"name": "CloudInstanceUnknownInitializer",
"description": "Initialize values for unknown hosts, images, etc. that are specific to a resource",
"class": "StructuredFileIngestor",
"definition_file": "cloud_common/instance.json",
"endpoints": {
"source": {
"type": "jsonfile",
"name": "Cloud record types",
"path": "cloud_common/instance.json"
}
}
},
{
"name": "CloudInstanceTypeUnknownInitializer",
"description": "Initialize values for unknown hosts, images, etc. that are specific to a resource",
"class": "StructuredFileIngestor",
"definition_file": "cloud_common/instance_type.json",
"endpoints": {
"source": {
"type": "jsonfile",
"name": "Cloud record types",
"path": "cloud_common/instance_type.json"
}
}
},
{
"#": "Note that any actions run after this cannot truncate the tables set here",

"name": "CloudUnknownDimensionInitializer",
"description": "Initialize values for unknown hosts, images, etc. that are specific to a resource",
"class": "DatabaseIngestor",
Expand Down
8 changes: 8 additions & 0 deletions configuration/etl/etl_action_defs.d/cloud_common/account.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"#": "This action loads data from a structured file and only needs the table definition",
"table_definition": [
{
"$ref": "${table_definition_dir}/cloud_common/account.json#/table_definition"
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,11 @@
"#": "the first part of the key and not -1. We will continue to use -1 for global unknowns.",

"table_definition": [
{
"$ref": "${table_definition_dir}/cloud_common/account.json#/table_definition"
},
{
"$ref": "${table_definition_dir}/cloud_common/host.json#/table_definition"
},
{
"$ref": "${table_definition_dir}/cloud_common/image.json#/table_definition"
},
{
"$ref": "${table_definition_dir}/cloud_common/instance.json#/table_definition"
},
{
"$ref": "${table_definition_dir}/cloud_common/instance_type.json#/table_definition"
}
],

Expand Down Expand Up @@ -61,12 +52,6 @@
},

"destination_record_map": {
"account": {
"resource_id": "resource_id",
"account_id": "unknown_id",
"provider_account": "unknown_key",
"display": "unknown_display"
},
"host": {
"resource_id": "resource_id",
"host_id": "unknown_id",
Expand All @@ -76,18 +61,6 @@
"resource_id": "resource_id",
"image_id": "unknown_id",
"image": "unknown_key"
},
"instance": {
"resource_id": "resource_id",
"instance_id": "unknown_id",
"account_id": "unknown_id",
"provider_identifier": "unknown_key"
},
"instance_type": {
"resource_id": "resource_id",
"instance_type_id": "unknown_id",
"instance_type": "unknown_key",
"display": "unknown_display"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"#": "This action loads data from a structured file and only needs the table definition",
"table_definition": [
{
"$ref": "${table_definition_dir}/cloud_common/instance.json#/table_definition"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"#": "This action loads data from a structured file and only needs the table definition",
"table_definition": [
{
"$ref": "${table_definition_dir}/cloud_common/instance_type.json#/table_definition"
}
]
}
4 changes: 4 additions & 0 deletions configuration/etl/etl_data.d/cloud_common/account.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[
["resource_id", "account_id", "provider_account", "display"],
[-1, 1, "Unknown", "Unknown"]
]
4 changes: 4 additions & 0 deletions configuration/etl/etl_data.d/cloud_common/instance.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[
["resource_id", "instance_id", "account_id", "provider_identifier", "person_id"],
[-1, 1, 1, "unknown", -1]
]
4 changes: 4 additions & 0 deletions configuration/etl/etl_data.d/cloud_common/instance_type.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[
["resource_id", "instance_type_id", "instance_type", "display", "description", "num_cores", "memory_mb", "disk_gb", "start_time", "end_time"],
[-1, 1, "Unknown", "Unknown", null, 0, 0, 0, 0, null]
]