Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
ugo-emekauwa authored May 27, 2023
1 parent b040b0d commit 2653207
Showing 1 changed file with 149 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,12 @@
deploy_usnic_ethernet_adapter_policy = True
deploy_vmmq_ethernet_adapter_policy = True

# Network Configuration - LAN - Supplementary (Optional)
deploy_ethernet_network_group_policy_supplementary1 = True
deploy_ethernet_network_group_policy_supplementary2 = True
deploy_ethernet_network_group_policy_supplementary3 = True
deploy_ethernet_network_group_policy_supplementary4 = True

# Network Configuration - SAN
deploy_fc_zone_policy = True
deploy_fibre_channel_adapter_policy = True
Expand Down Expand Up @@ -435,6 +441,74 @@
ethernet_network_group_policy_native_vlan = 1


#----------------------------------Section 10.1----------------------------------#

# ETHERNET NETWORK GROUP POLICY CONFIGURATION - SUPPLEMENTARY 1

# General Settings
ethernet_network_group_policy_name_supplementary1 = "Eth-Net-Group-Policy-2"
ethernet_network_group_policy_description_supplementary1 = "A Cisco Intersight Ethernet Network Group Policy generated by the UCS Server Deployment Tool."
ethernet_network_group_policy_tags_supplementary1 = {"Org": "IT", "Dept": "DevOps"} # Empty the ethernet_network_group_policy_tags dictionary if no tags are needed, for example: ethernet_network_group_policy_tags = {}

# Policy Detail Settings
## NOTE - For the "Allowed VLANs" setting, the provided value must be a string. Ranges of VLANs can be split with a hyphen or commas with no spaces. Allowed VLANs can be between 1-4093.
ethernet_network_group_policy_allowed_vlans_supplementary1 = "5-7,10"

## NOTE - For the "Native VLAN" setting, the provided value must be an integer. Native VLANs can be between 1-4093.
ethernet_network_group_policy_native_vlan_supplementary1 = 1


#----------------------------------Section 10.2----------------------------------#

# ETHERNET NETWORK GROUP POLICY CONFIGURATION - SUPPLEMENTARY 2

# General Settings
ethernet_network_group_policy_name_supplementary2 = "Eth-Net-Group-Policy-3"
ethernet_network_group_policy_description_supplementary2 = "A Cisco Intersight Ethernet Network Group Policy generated by the UCS Server Deployment Tool."
ethernet_network_group_policy_tags_supplementary2 = {"Org": "IT", "Dept": "DevOps"} # Empty the ethernet_network_group_policy_tags dictionary if no tags are needed, for example: ethernet_network_group_policy_tags = {}

# Policy Detail Settings
## NOTE - For the "Allowed VLANs" setting, the provided value must be a string. Ranges of VLANs can be split with a hyphen or commas with no spaces. Allowed VLANs can be between 1-4093.
ethernet_network_group_policy_allowed_vlans_supplementary2 = "5-7,10"

## NOTE - For the "Native VLAN" setting, the provided value must be an integer. Native VLANs can be between 1-4093.
ethernet_network_group_policy_native_vlan_supplementary2 = 1


#----------------------------------Section 10.3----------------------------------#

# ETHERNET NETWORK GROUP POLICY CONFIGURATION - SUPPLEMENTARY 3

# General Settings
ethernet_network_group_policy_name_supplementary3 = "Eth-Net-Group-Policy-4"
ethernet_network_group_policy_description_supplementary3 = "A Cisco Intersight Ethernet Network Group Policy generated by the UCS Server Deployment Tool."
ethernet_network_group_policy_tags_supplementary3 = {"Org": "IT", "Dept": "DevOps"} # Empty the ethernet_network_group_policy_tags dictionary if no tags are needed, for example: ethernet_network_group_policy_tags = {}

# Policy Detail Settings
## NOTE - For the "Allowed VLANs" setting, the provided value must be a string. Ranges of VLANs can be split with a hyphen or commas with no spaces. Allowed VLANs can be between 1-4093.
ethernet_network_group_policy_allowed_vlans_supplementary3 = "5-7,10"

## NOTE - For the "Native VLAN" setting, the provided value must be an integer. Native VLANs can be between 1-4093.
ethernet_network_group_policy_native_vlan_supplementary3 = 1


#----------------------------------Section 10.4----------------------------------#

# ETHERNET NETWORK GROUP POLICY CONFIGURATION - SUPPLEMENTARY 4

# General Settings
ethernet_network_group_policy_name_supplementary4 = "Eth-Net-Group-Policy-5"
ethernet_network_group_policy_description_supplementary4 = "A Cisco Intersight Ethernet Network Group Policy generated by the UCS Server Deployment Tool."
ethernet_network_group_policy_tags_supplementary4 = {"Org": "IT", "Dept": "DevOps"} # Empty the ethernet_network_group_policy_tags dictionary if no tags are needed, for example: ethernet_network_group_policy_tags = {}

# Policy Detail Settings
## NOTE - For the "Allowed VLANs" setting, the provided value must be a string. Ranges of VLANs can be split with a hyphen or commas with no spaces. Allowed VLANs can be between 1-4093.
ethernet_network_group_policy_allowed_vlans_supplementary4 = "5-7,10"

## NOTE - For the "Native VLAN" setting, the provided value must be an integer. Native VLANs can be between 1-4093.
ethernet_network_group_policy_native_vlan_supplementary4 = 1


#----------------------------------Section 11----------------------------------#

# ETHERNET QOS POLICY CONFIGURATION
Expand Down Expand Up @@ -975,7 +1049,7 @@
## "Number of Sub vNICs", "VMMQ Adapter Policy", "Number of Interrupts", and "Number of Virtual Machine Queues".
##
## NOTE - Pre-existing Ethernet Network Group, Ethernet Network Control, Ethernet QoS, and Ethernet Adapter Policies must be provided when configuring vNICs.
## Default Policies and Pools to be used by all configured vNICs can be provided using the default variables listed below.
## Default Policies and Pools to be used by all configured vNICs will be automatically provided by the UCS Server Deployment Tool.
## To override the default Policy or Pool for a particular vNIC, a corresponding Policy or Pool key and value can be provided for each set of vNIC dictionaries in the vnic_list variable.
## Please see the included example above.
##
Expand Down Expand Up @@ -1251,7 +1325,7 @@
## "Fibre Channel Network", "Fibre Channel QoS", "Fibre Channel Adapter", "FC Zone"
##
## NOTE - Pre-existing Fibre Channel Network, Fibre Channel QoS, and Fibre Channel Adapter Policies must be provided when configuring vHBAs.
## Default Policies and Pools to be used by all configured vHBAs can be provided using the default variables listed below.
## Default Policies and Pools to be used by all configured vHBAs will be automatically provided by the UCS Server Deployment Tool.
## To override the default Policy or Pool for a particular vHBA, a corresponding Policy or Pool key and value can be provided for each set of vHBA dictionaries in the vhba_list variable.
## Please see the included example above.
##
Expand Down Expand Up @@ -5416,7 +5490,14 @@ def post_intersight_server_profile_update(
# Deploy the UCS Server Profile
print("Deploying the UCS Server Profile...")
ucs_server_profile_deployment_api_body = {
"Action": "Deploy"
"ScheduledActions":[
{"Action": "Deploy",
"ProceedOnReboot": False
},
{"Action": "Activate",
"ProceedOnReboot": True
}
]
}
post_intersight_server_profile_update(
server_profile_moid=ucs_server_profile_moid,
Expand Down Expand Up @@ -19655,6 +19736,7 @@ def main():
deployment_tool_fibre_channel_qos_policy_name = ""
deployment_tool_fibre_channel_adapter_policy_name = ""
deployment_tool_fc_zone_policy_name = ""
deployment_tool_uuid_pool_name = ""

# Create the UUID Pool in Intersight
if deploy_uuid_pool:
Expand Down Expand Up @@ -20166,6 +20248,70 @@ def main():
preconfigured_api_client=main_intersight_api_client
)

# Create the Ethernet Network Group Policy in Intersight - Supplementary 1
if deploy_ethernet_network_group_policy_supplementary1:
# Update Policy name with UCS Server Deployment Tool provided prefix and/or suffix
deployment_tool_ethernet_network_group_policy_name_supplementary1 = f"{deployment_name_prefix}{ethernet_network_group_policy_name_supplementary1}{deployment_name_suffix}"
ethernet_network_group_policy_maker(
intersight_api_key_id=None,
intersight_api_key=None,
policy_name=deployment_tool_ethernet_network_group_policy_name_supplementary1,
allowed_vlans=ethernet_network_group_policy_allowed_vlans_supplementary1,
native_vlan=ethernet_network_group_policy_native_vlan_supplementary1,
policy_description=ethernet_network_group_policy_description_supplementary1,
organization=ucs_server_profile_organization,
tags=ethernet_network_group_policy_tags_supplementary1,
preconfigured_api_client=main_intersight_api_client
)

# Create the Ethernet Network Group Policy in Intersight - Supplementary 2
if deploy_ethernet_network_group_policy_supplementary2:
# Update Policy name with UCS Server Deployment Tool provided prefix and/or suffix
deployment_tool_ethernet_network_group_policy_name_supplementary2 = f"{deployment_name_prefix}{ethernet_network_group_policy_name_supplementary2}{deployment_name_suffix}"
ethernet_network_group_policy_maker(
intersight_api_key_id=None,
intersight_api_key=None,
policy_name=deployment_tool_ethernet_network_group_policy_name_supplementary2,
allowed_vlans=ethernet_network_group_policy_allowed_vlans_supplementary2,
native_vlan=ethernet_network_group_policy_native_vlan_supplementary2,
policy_description=ethernet_network_group_policy_description_supplementary2,
organization=ucs_server_profile_organization,
tags=ethernet_network_group_policy_tags_supplementary2,
preconfigured_api_client=main_intersight_api_client
)

# Create the Ethernet Network Group Policy in Intersight - Supplementary 3
if deploy_ethernet_network_group_policy_supplementary3:
# Update Policy name with UCS Server Deployment Tool provided prefix and/or suffix
deployment_tool_ethernet_network_group_policy_name_supplementary3 = f"{deployment_name_prefix}{ethernet_network_group_policy_name_supplementary3}{deployment_name_suffix}"
ethernet_network_group_policy_maker(
intersight_api_key_id=None,
intersight_api_key=None,
policy_name=deployment_tool_ethernet_network_group_policy_name_supplementary3,
allowed_vlans=ethernet_network_group_policy_allowed_vlans_supplementary3,
native_vlan=ethernet_network_group_policy_native_vlan_supplementary3,
policy_description=ethernet_network_group_policy_description_supplementary3,
organization=ucs_server_profile_organization,
tags=ethernet_network_group_policy_tags_supplementary3,
preconfigured_api_client=main_intersight_api_client
)

# Create the Ethernet Network Group Policy in Intersight - Supplementary 4
if deploy_ethernet_network_group_policy_supplementary4:
# Update Policy name with UCS Server Deployment Tool provided prefix and/or suffix
deployment_tool_ethernet_network_group_policy_name_supplementary4 = f"{deployment_name_prefix}{ethernet_network_group_policy_name_supplementary4}{deployment_name_suffix}"
ethernet_network_group_policy_maker(
intersight_api_key_id=None,
intersight_api_key=None,
policy_name=deployment_tool_ethernet_network_group_policy_name_supplementary4,
allowed_vlans=ethernet_network_group_policy_allowed_vlans_supplementary4,
native_vlan=ethernet_network_group_policy_native_vlan_supplementary4,
policy_description=ethernet_network_group_policy_description_supplementary4,
organization=ucs_server_profile_organization,
tags=ethernet_network_group_policy_tags_supplementary4,
preconfigured_api_client=main_intersight_api_client
)

# Create the Ethernet Network Control Policy in Intersight
if deploy_ethernet_network_control_policy:
# Update Policy name with UCS Server Deployment Tool provided prefix and/or suffix
Expand Down

0 comments on commit 2653207

Please sign in to comment.