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

Phase 2 Resources (DCNE-149) #115

Open
wants to merge 70 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
83da2bb
resource and data-source files for dhcp_option_policy
RutvikS-crest Feb 9, 2022
368b32d
added test file for dhcp_option_policy
hthakkar-crest Feb 10, 2022
bdc3043
added docs
RutvikS-crest Feb 21, 2022
3a17ff4
updated dependancies
RutvikS-crest Feb 21, 2022
01b9061
final commit for mso_schema_site_l3out_final
Feb 17, 2022
cfb943d
updated test files for schema_site_l3out
hthakkar-crest Feb 21, 2022
c35d78b
added example for dhcp_option_policy
RutvikS-crest Feb 21, 2022
4b6a974
Initial Commit
hussain-sadikot Feb 21, 2022
f40627e
Added support for resource and data source with test scripts for hubN…
hussain-sadikot Feb 22, 2022
3fd76cc
Updated vendor files
hussain-sadikot Feb 22, 2022
800c24e
added data source for mso_schema_validate
hthakkar-crest Feb 22, 2022
950011c
final commit for mso_schema_validate
hthakkar-crest Feb 22, 2022
1020370
updated schema of mso_schema_validate
hthakkar-crest Feb 22, 2022
d7941f3
Initial commit for MSO DHCP relay policy.
Feb 22, 2022
b200dc7
Added website and example for MSO DHCP Relay Policy.
Feb 23, 2022
6997cab
Removed log file.
Feb 23, 2022
72120fc
Updated test file for DHCP Relay Policy.
Feb 23, 2022
ebfe2f6
Bug resolved.
Feb 24, 2022
de70746
updated website for schema_site_l3out
hthakkar-crest Feb 24, 2022
ba7423c
updated test script destroy error function
hthakkar-crest Feb 24, 2022
b34c1fb
updated dhcp_relay_policy
hthakkar-crest Feb 24, 2022
41845b9
dhcp_option_policy_fix
RutvikS-crest Feb 21, 2022
a9463fd
up0dated DHCP Option pol
RutvikS-crest Feb 24, 2022
57fbfe8
updated options of dhcp_option_pol
RutvikS-crest Feb 24, 2022
dcb8f71
asd
RutvikS-crest Feb 24, 2022
5a0c057
updated vendor
RutvikS-crest Feb 24, 2022
5150984
updated vendor
RutvikS-crest Feb 24, 2022
a8265d3
updated vendor
RutvikS-crest Feb 24, 2022
4edf08e
Added Support for DHCP Option Policy Option
hussain-sadikot Feb 24, 2022
18e9758
Added support
hussain-sadikot Feb 24, 2022
840964d
Final Commit for DHCP Option Policy Option
hussain-sadikot Feb 24, 2022
0c84fbd
initial commit for dhcp_relay_policy_provider
Feb 21, 2022
b2b5971
rebased dhcp_relay_policy_provider branch
hthakkar-crest Feb 22, 2022
c1182d9
added basic test structure for dhcp_relay_policy_provider
hthakkar-crest Feb 23, 2022
083b3b5
updated basic test block of dhcp_relay_policy_provider
hthakkar-crest Feb 24, 2022
389059b
updated negative test case
hthakkar-crest Feb 24, 2022
ebf4c4f
added mutex in dhcp_relay_policy_provider
hthakkar-crest Feb 24, 2022
0e5a9d2
added website and exmaple for dhcp_relay_policy_provider
hthakkar-crest Feb 24, 2022
5403666
added schema_template_bd_dhcp_policy
RutvikS-crest Feb 21, 2022
6b7e08a
added bd_dhcp_policy to provider file
RutvikS-crest Feb 24, 2022
e06f6d3
asdf
RutvikS-crest Feb 24, 2022
f0b4bc0
updated dependancy
RutvikS-crest Feb 25, 2022
8d628d0
added bd_dhcp_pol
RutvikS-crest Feb 25, 2022
d65f9a7
done indentation
hthakkar-crest Feb 24, 2022
da66fa3
updated example file for TPM-2478
hthakkar-crest Feb 25, 2022
96f7e82
updated reference in example file
hthakkar-crest Feb 25, 2022
896168d
updated dependancies
RutvikS-crest Feb 25, 2022
6a2bcea
updated mso_schema_template_bd_dhcp_policy docs
RutvikS-crest Feb 25, 2022
ca9e118
Added variable file
hussain-sadikot Feb 25, 2022
66b5727
Updated dhcp_option_policy_option
hussain-sadikot Feb 25, 2022
56e7539
initial commit for dhcp_relay_policy_provider
hthakkar-crest Feb 25, 2022
55254b7
final commit for dhcp_relay_policy_provider_update
hthakkar-crest Feb 25, 2022
94265f7
updated dhcp option policy test file
hthakkar-crest Feb 25, 2022
67e4a2c
initial commit for schema_template_bd_dhcp_policy test
hthakkar-crest Feb 25, 2022
6f251a8
added basic block for schema template bd dhcp policy
hthakkar-crest Feb 25, 2022
108d7a8
updated code for basic block
hthakkar-crest Feb 25, 2022
96631a4
updated test script schema template bd dhcp policy
hthakkar-crest Feb 25, 2022
717eff4
added TemplateBDDHCPPolicy test files
hthakkar-crest Feb 28, 2022
534c0aa
updated go client to v1.3.1
hthakkar-crest Feb 28, 2022
d01de24
updated dependency
hthakkar-crest Feb 28, 2022
265229e
Phase 2 Resources (#26)
RutvikS-crest Feb 28, 2022
286bc89
Merge branch 'master' into phase-2-resources
RutvikS-crest Mar 2, 2022
08cb346
Updated MSO Client
hussain-sadikot Mar 15, 2022
3acdcd7
Merge pull request #42 from RutvikS-crest/tag-update
RutvikS-crest Mar 15, 2022
f7ebb6f
Add check to ignore error code 141 Resource Not Present to all Delete…
lhercot Mar 1, 2022
508786a
Update CHANGELOG.md for v0.5.0 release
lhercot Mar 1, 2022
15ed5b0
Add Service EPG support for cloud sites (#113)
shrsr Mar 2, 2022
b1617dc
Updated MSO Client
hussain-sadikot Mar 15, 2022
aaa85e9
Adding MSO Schema Site ANP EPG Useg Attr resource and datasource (#58)
mjiyani-crest Apr 26, 2022
cb76084
[ignore] Update mso-go-client to v1.7.0
lhercot Oct 14, 2022
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
3 changes: 2 additions & 1 deletion .gitignore.txt → .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
**/.terraform
**/terraform.tfstate
**/terraform.tfstate.backup
**/.vscode
**/.vscode/*
**/*.log
41 changes: 41 additions & 0 deletions examples/dhcp_option_policy/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
terraform {
required_providers {
mso = {
source = "CiscoDevNet/mso"
}
}
}

provider "mso" {
username = "" # <MSO username>
password = "" # <MSO pwd>
url = "" # <MSO URL>
insecure = true
}

resource "mso_tenant" "tenant1" {
name = var.tenant_name
display_name = var.tenant_name
description = "DemoTenant"
}

resource "mso_dhcp_option_policy" "dp1" {
tenant_id = mso_tenant.tenant1.id
name = "dhcp_opx"
description = "desc"
option {
name = "op2"
data = "d1"
id = "2"
}
option {
name = "op3"
data = "d3"
id = "4"
}
option {
name = "op1"
data = "d1"
id = "1"
}
}
6 changes: 6 additions & 0 deletions examples/dhcp_option_policy/variable.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

variable "tenant_name" {
type = string
default = "mso_tenant"
description = "The name of MSO tenant to use for this configuration"
}
32 changes: 32 additions & 0 deletions examples/dhcp_option_policy_option/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
terraform {
required_providers {
mso = {
source = "CiscoDevNet/mso"
}
}
}

provider "mso" {
username = "" # <MSO username>
password = "" # <MSO pwd>
url = "" # <MSO URL>
insecure = true
}

resource "mso_tenant" "tenant1" {
name = var.tenant_name
display_name = var.tenant_name
description = "DemoTenant"
}

resource "mso_dhcp_option_policy" "example" {
tenant_id = mso_tenant.tenant1.id
name = "example"
}

resource "mso_dhcp_option_policy_option" "example"{
option_policy_name = mso_dhcp_option_policy.example.name
option_name = "example"
option_id = "1"
option_data = "example_data"
}
5 changes: 5 additions & 0 deletions examples/dhcp_option_policy_option/variable.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
variable "tenant_name" {
type = string
default = "mso_tenant"
description = "The name of MSO tenant to use for this configuration"
}
55 changes: 55 additions & 0 deletions examples/dhcp_relay_policy/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
terraform {
required_providers {
mso = {
source = "CiscoDevNet/mso"
}
}
}

provider "mso" {
username = "" # <MSO username>
password = "" # <MSO pwd>
url = "" # <MSO URL>
insecure = true
}

resource "mso_tenant" "tenant1" {
name = var.tenant_name
display_name = var.tenant_name
description = "DemoTenant"
}

resource "mso_schema" "schema1" {
name = var.schema_name
template_name = var.template_name
tenant_id = mso_tenant.tenant1.id
}

resource "mso_schema_template_vrf" "vrf1" {
schema_id = mso_schema.schema1.id
template = mso_schema.schema1.template_name
name = var.vrf_name
display_name = var.vrf_name
}

resource "mso_schema_template_external_epg" "epg1" {
schema_id = mso_schema.schema1.id
template_name = mso_schema.schema1.template_name
external_epg_name = var.external_epg_name
display_name = var.external_epg_name
vrf_name = mso_schema_template_vrf.vrf1.name
}

resource "mso_dhcp_relay_policy" "dp1" {
tenant_id = mso_tenant.tenant1.id
name = var.relay_policy_name
description = "desc"
dhcp_relay_policy_provider {
epg = var.epg
dhcp_server_address = var.dhcp_server_address
}
dhcp_relay_policy_provider {
external_epg = mso_schema_template_external_epg.epg1.id
dhcp_server_address = var.dhcp_server_address
}
}
47 changes: 47 additions & 0 deletions examples/dhcp_relay_policy/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
variable "tenant_name" {
type = string
default = "mso_tenant"
description = "The name of MSO tenant to use for this configuration"
}

variable "schema_name" {
type = string
default = "mso_schema"
description = "The name of MSO schema to use for this configuration"
}

variable "template_name" {
type = string
default = "mso_template"
description = "The name of MSO template to use for this configuration"
}

variable "external_epg_name" {
type = string
default = "mso_external_epg"
description = "The name of MSO external epg to use for this configuration"
}

variable "vrf_name" {
type = string
default = "mso_vrf"
description = "The name of MSO vrf to use for this configuration"
}

variable "dhcp_server_address" {
type = string
default = "1.2.3.4"
description = "DHCP server address."
}

variable "epg" {
type = string
default = "/schemas/621392f81d0000282a4f9d1c/templates/ACC_CREST/anps/UntitledAP1/epgs/test_epg"
description = "EPG."
}

variable "relay_policy_name" {
type = string
default = "relay_policy"
description = "Relay policy name."
}
51 changes: 51 additions & 0 deletions examples/dhcp_relay_policy_provider/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
terraform {
required_providers {
mso = {
source = "CiscoDevNet/mso"
}
}
}

provider "mso" {
username = "" # <MSO username>
password = "" # <MSO pwd>
url = "" # <MSO URL>
insecure = true
}

data "mso_tenant" "example" {
name = "example"
display_name = "example"
}

resource "mso_dhcp_relay_policy" "example" {
tenant_id = data.mso_tenant.example.id
name = "example"
}

resource mso_schema "example"{
name = "example"
template_name = "example"
tenant_id = data.mso_tenant.example.id
}

resource mso_schema_template_vrf "example" {
schema_id = mso_schema.example.id
template = mso_schema.example.template_name
name = "example"
display_name= "example"
}

resource "mso_schema_template_external_epg" "example" {
schema_id = mso_schema.example.id
template_name = mso_schema.example.template_name
external_epg_name = "example"
display_name = "example"
vrf_name = mso_schema_template_vrf.example.name
}

resource "mso_dhcp_relay_policy_provider" "example" {
dhcp_relay_policy_name = mso_dhcp_relay_policy.example.name
dhcp_server_address = "1.2.3.4"
external_epg_ref = mso_schema_template_external_epg.example.id
}
63 changes: 63 additions & 0 deletions examples/schema_site_anp_epg_useg_attr/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
terraform {
required_providers {
mso = {
source = "CiscoDevNet/mso"
}
}
}

provider "mso" {
username = "" # <MSO username>
password = "" # <MSO pwd>
url = "" # <MSO URL>
insecure = true
}

data "mso_site" "example" {
name = "example"
}

data "mso_tenant" "example" {
name = "example"
display_name = "example"
}

resource "mso_schema" "example" {
name = "example"
template_name = "example"
tenant_id = data.mso_tenant.example.id
}

resource "mso_schema_site" "example" {
schema_id = mso_schema.example.id
site_id = data.mso_site.example.id
template_name = mso_schema.example.template_name
}

resource "mso_schema_site_anp" "example" {
schema_id = mso_schema.example.id
anp_name = "ANP_EXAMPLE"
template_name = mso_schema_site.example.template_name
site_id = data.mso_site.example.id
}

resource "mso_schema_site_anp_epg" "example" {
schema_id = mso_schema.example.id
template_name = mso_schema_site.example.template_name
site_id = data.mso_site.example.id
anp_name = mso_schema_site_anp.example.anp_name
epg_name = "EPG_EXAMPLE"
}

resource "mso_schema_site_anp_epg_useg_attr" "useg_attrs" {
schema_id = mso_schema.example.id
site_id = data.mso_site.example.id
anp_name = mso_schema_site_anp.example.anp_name
epg_name = mso_schema_site_anp_epg.example.epg_name
template_name = mso_schema_site.example.template_name
useg_name = "useg_site_test"
useg_type = "tag"
operator = "startsWith"
category = "tagger"
value = "10.2.3.4"
}
50 changes: 50 additions & 0 deletions examples/schema_site_l3out/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
terraform {
required_providers {
mso = {
source = "CiscoDevNet/mso"
}
}
}

provider "mso" {
username = "" # <MSO username>
password = "" # <MSO pwd>
url = "" # <MSO URL>
insecure = true
}

data "mso_site" "example" {
name = "example"
}

data "mso_tenant" "example" {
name = "example"
display_name = "example"
}

resource "mso_schema" "example" {
name = "example"
template_name = "example"
tenant_id = data.mso_tenant.example.id
}

resource "mso_schema_site" "example" {
schema_id = mso_schema.example.id
site_id = data.mso_site.example.id
template_name = "example"
}

resource "mso_schema_site_vrf" "example" {
template_name = mso_schema_site.example.template_name
site_id = mso_schema_site.example.site_id
schema_id = mso_schema_site.example.schema_id
vrf_name = "example"
}

resource "mso_schema_site_l3out" "example" {
schema_id = mso_schema_site.example.schema_id
l3out_name = "example"
template_name = mso_schema_site.example.template_name
vrf_name = mso_schema_site_vrf.example.vrf_name
site_id = mso_schema_site.example.site_id
}
Loading