Skip to content

Commit

Permalink
Merge pull request #290 from CiscoDevNet/ISSDK-608
Browse files Browse the repository at this point in the history
Test cases related to complex filters
  • Loading branch information
the-akhil-nair authored Sep 19, 2024
2 parents 96c27e7 + 68a5c13 commit 24998c6
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
32 changes: 32 additions & 0 deletions tests/common/firmware_server_configuration.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
resource "intersight_firmware_server_configuration_utility_distributable" "scu1" {
name = "SCU-6.0.4c nfs"
nr_source {
object_type = "softwarerepository.CifsServer"
additional_properties = jsonencode({
FileLocation = "10.10.10.20/iso.iso"
RemoteIp = "10.10.10.1"
RemoteShare = "/path/to/remote/share"
RemoteFile = "/path/to/remote/file"
Username = "user"
Password = "ChangeMe"
MountOption = "sec=ntlm"
})
}
vendor = "Cisco"
nr_version = "6.0.(4c)"
supported_models = [
"C-series"
]
description = "Cisco SCU-6.0(4c)"
catalog {
moid = data.intersight_softwarerepository_catalog.catalog.results[0].moid
object_type = "softwarerepository.Catalog"
}
}

data "intersight_softwarerepository_catalog" "catalog"{
organization {
class_id = "organization.Organization"
moid = data.intersight_organization_organization.default.results.0.moid
}
}
26 changes: 26 additions & 0 deletions tests/data_sources/complex_filters.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
data "intersight_organization_organization" "organization" {
name = "default"
}

output "default_organization" {
value = data.intersight_organization_organization.organization.results.0
}

data "intersight_softwarerepository_catalog" "sw_catalog" {
organization {
moid = data.intersight_organization_organization.organization.id
}
account_moid = data.intersight_organization_organization.organization.results.0.account_moid
}

output "catalog_in_default_organization" {
value = data.intersight_softwarerepository_catalog.sw_catalog.results.0
}

data "intersight_search_search_item" "os_linux" {
object_type = "compute.PhysicalSummary"
}

output "search_compute_physical" {
value = data.intersight_search_search_item.os_linux.results.0
}

0 comments on commit 24998c6

Please sign in to comment.