Page tree
Skip to end of metadata
Go to start of metadata

This topic contains information about the container utilities script  that is used to test a new container blueprint that you created before you use the container blueprint to create containers in BMC Cloud Lifecycle Management and examples of using these scripts.

Note

Use the BMC Cloud Lifecycle Management utilities to create, configure, or delete containers and provision or decommission Network Interface Controllers (NICs).

About the container utilities script

The container utilities script can be used to provision, modify, and deprovision a container and add or remove a NIC, without involving BMC Cloud Lifecycle Management. This can be helpful when testing out a new container blueprint.

The container utilities are installed with BMC Network Automation. Before using them, expand the BCAN_HOME\public\bmc\bca-networks\extras\bcan-pcm-utility-8.6.00.zip file into any convenient directory. For consistency with other utilities, expand the file into the BCAN_DATA directory.

Expanding this file creates a bcan-pcm-utility subdirectory structure. The utility scripts are:

  • (Windows) bcan-pcm-utility\bin\container-util.bat
  • (Linux) bcan-pcm-utility/bin/container-util.sh

These scripts have the options listed in the following table.

Note

Arguments must be enclosed in quotation marks (") if they contain one or more spaces, for example, -zoneName "Zone 1". Quotation marks are optional.

 Click here to view the Container utility script options.

Option

Description

-?

Displays Help

-accessSwitchName arg

Specifies the hypervisor switch node name

-additionalParams

 Specifies a list of additional  parameters in name:value pairs format separated by a comma delimiter. For example, transactionId:asdasd-5465-fghfg,nicId:1,hostname:server1

-attachPointName arg

Specifies the attach point name

-containerBlueprintName arg

Specifies the container blueprint name

-containerName arg

Specifies the container name

-deleteOnFailureFlag arg

Indicates whether to remove a container when a failure occurs during container deprovisioning

Valid values: true, false (default)

-externalNetworkSegmentOverrides arg

Specifies the external network segment overrides, which are of the format: componentname:flag (true or false) with pairs separated by a comma delimiter. For example, ""name1:true,name2:false"

-firewallOverrides arg

Specifies the firewall overrides, which are of the format: componentname:flag (true or false) with pairs separated by a comma delimiter. For example: "name1:true,name2:false,name3:true"

-ignoreModifyErrorsFlag arg

Indicates whether to ignore errors that occur while reconfiguring devices during the attempt and update the resources in the container

Valid values: true, false (default)

-ignoreUnmodifyErrorsFlag arg

Indicates whether to ignore errors that occur while reconfiguring devices during the unmodify attempt, and update the resources in the container

Valid values: true, false (default)

-loadBalancerOverrides arg

Specifies the loadbalancer overrides, which are of the format: componentname:flag (true or false) with pairs separated by a comma delimiter

-nicAddressValue arg

Specifies the address value, which is required for the addVirtualServerNic operation

-nicName arg

Specifies the NIC name, which is required for the addVirtualServerNic and removeVirtualServerNics operations

-nicSegmentOverrides arg

Specifies the NIC segment overrides, which are of the format: componentname:flag (true or false) with pairs separated by a comma delimiter. For example, ""name1:true,name2:false".

-nicServerName arg

Specifies the NIC server name, which is required for the addVirtualServerNic and removeVirtualServerNics operations

-operation arg

Specifies the name of operation. The operation name can be one of the following strings:

  • acquire_nat_address
  • acquire_virtual_server_nic_address
  • deprovision_container
  • describe_incompatibility
  • get_compatible_blueprints
  • modify_container
  • provision_container
  • release_all_server_nic_addresses
  • release_nat_address
  • release_virtual_server_nic_address
  • reprovision_container

-password arg

Specifies the BMC Network Automation application server password corresponding to the user name parameter.

-podName arg

Specifies the pod name

-privateNatAddressValue arg

Specifies the private NAT address value, which is required for the acquireNatAddress operation

-publicNatAddressValue arg

Specifies the Public NAT address value, which is required for the releaseNatAddress operation

-registerDnsFlag

Indicates whether a DNS operation should be performed

If this option is set to true, DNS operation is performed for the acquire_virtual_server_nic_address operation.

Valid values: true, false (default)

-releaseOnFailureFlag arg

Indicates whether a NAT address should be released from a pool even when a failure occurs

Valid values: true, false (default)

-restrictedReprovisioningFlag arg

Indicates whether non-reversible content should be added during container reprovisioning. By default, only reversible content can be added during reprovisioning.

Valid values: true (default), false

-runtimeParams arg

Specifies a list of runtime parameters, which are of the format name:value with pairs separated by a comma delimiter. For example, runtime.name1:val1,runtime.name2:val2,runtime.name3:val3.

-skipIPAMOperation arg

Indicates whether BMC Network Automation should skip the actual Acquire Address or Release Address operation on the IPAM system..

Valid values: true, false (default)

This option is applicable to the following operations:

  • acquireNatAddress
  • acquireVirtualServerNicAddress
  • releaseNatAddress
  • releaseVirtualServerNicAddress
  • releaseAllServerNicAddresses

-skipUnmodifyFlag arg

Indicates whether to skip the attempt to unmodify what was modified

Valid values: true, false (default)

-url arg

Specifies the BMC Network Automation application server URL

-user arg

Specifies the BMC Network Automation application server user name

-v

Prints the detailed error stack trace

-zoneName arg

Specifies the zone name

Back to top

Examples of container utilities script

The following topics describe the usage of the container utilities script.

Run the command from the command line in the directory that contains the utility, or enter the directory as a prefix to the command.

Example

(Windows) C:\BCA-Networks-Data>bcan-pcm-utility\bin\container-util.bat -?
(Linux) hostname:/opt/bmc/bca-networks/public/bmc/bca-networks/extras/bcan-pcm-utility/bin # ./container-util.sh -?

To acquire next available NAT address - acquire_nat_address

Use the following command:

container-util.bat -url bna_app_server_url -user bna_app_server_user_name -password bna_app_server_password -operation acquire_nat_address -containerName name_of_container -privateNatAddressValue private_ip_address_to_be_natted -registerDnsFlag register_dns_flag –additionalParams additional_params v

Example

container-util.bat -url  https://vw-pun-bna-pt01 -user sysadmin -password sysadmin1 -operation acquire_nat_address -containerName LargeGoldContainer1 -privateNatAddressValue 12.3.0.36  -additionalParams "transactionId:iuyuy-kklljl-9988,nicId:7"

Note

The acquire_nat_address operation does not support the DNS operation in BMC Network Automation, therefore set registerDnsFlag to false.

Back to top

To acquire a particular NAT address - acquire_nat_address

Use the following command:

container-util.bat -url bna_app_server_url -user bna_app_server_user_name -password bna_app_server_password -operation acquire_nat_address -containerName name_of_container -privateNatAddressValue private_ip_address_to_be_natted -publicNatAddressValue public_ip_address_to_be_natted -skipIPAMOperation skip_IPAM_operation_flag v

Example

container-util.bat -url  https://vw-pun-bna-pt01 -user sysadmin -password sysadmin1 -operation acquire_nat_address -containerName LargeGoldContainer1 -privateNatAddressValue 172.17.10.6 -publicNatAddressValue 10.0.0.2 -skipIPAMOperation false -v

Back to top

To provision a NIC to acquire a particular IP address - acquire_virtual_server_nic_address

Use the following command:

container-util.bat -url bna_app_server_url -user bna_app_server_user_name -password bna_app_server_password -operation acquire_virtual_server_nic_address -containerName name_of_container -nicName nicname -nicServerName nic_server_name -attachPointName port_name -accessSwitchName container_access_node_name -nicAddressValue available_ip_address_from_pool -skipIPAMOperation skip_IPAM_operation_flag v

Example

container-util.bat -url https://vw-pun-bna-pt01 -user sysadmin -password sysadmin1 -operation acquire_virtual_server_nic_address -containerName LargeGoldContainer -nicName NIC-1 -nicServerName NICServer1 -attachPointName "Customer Port Type 1" -accessSwitchName Access -nicAddressValue 14.0.3.13 -zoneName "Zone 1" -skipIPAMOperation true -v

Back to top

To provision a NIC to acquire next available address - acquire_virtual_server_nic_address

Use the following command:

container-util.bat -url bna_app_server_url -user bna_app_server_user_name –password bna_app_server_password -operation acquire_virtual_server_nic_address –containerName name_of_container -nicName nic_name -nicServerName nic_server_name -attachPointName attach_point_name -accessSwitchName container_access_node_name -registerDnsFlag register_dns_flag –additionalParams additional_params v

Example

container-util.bat -url https://vw-pun-bna-pt01 -user sysadmin -password sysadmin1 -operation acquire_virtual_server_nic_address -containerName LargeGoldContainer -nicName NIC-1 -nicServerName NICServer1 -attachPointName "Customer Port Type 1" -accessSwitchName Access -zoneName "Zone 1" -registerDnsFlag true -additionalParams "transactionId:iuyuy-kklljl-9988,nicId:7" –v

Back to top

To unconfigure and delete containers after successful container creation - deprovision_container

Use the following command:

container-util.bat -url bna_app_server_url -user bna_app_server_user_name -password bna_app_server_password -operation deprovision_container -containerName name_of_container -v

Example

container-util.bat -url https://vw-pun-bna-pt01 -user sysadmin -password sysadmin1 -operation deprovision_container -containerName LargeGoldContainer -v

Back to top

To describe incompatibilities in a given container's blueprint - describe_incompatibility

Use the following command:

container-util.bat -url bna_app_server_url -user bna_app_server_user_name -password bna_app_server_password -operation describe_incompatibility -podName created_pod_name -containerBlueprintName container_blueprint_to_be_check -v

Example

container-util.bat -url https://vw-pun-bna-pt01 -user sysadmin -password sysadmin1 -operation describe_incompatibility -podName LargePod -containerBlueprintName "Large Gold Container Blueprint" -v

Back to top

To get compatible blueprint(s) for given pod - get_compatible_blueprints

Use the following command:

container-util.bat -url bna_app_server_url -user bna_app_server_user_name -password bna_app_server_password -operation get_compatible_blueprints -podName created_pod_name -v

Example

container-util.bat -url https://vw-pun-bna-pt01 -user sysadmin -password sysadmin1 -operation get_compatible_blueprints -podName LargePod -v

Back to top

To modify container by overriding an external network segment component - modify_container

Use the following command:

container-util.bat -url bna_app_server_url -user bna_app_server_user_name -password bna_app_server_password -operation modify_container -containerName name_of_container -externalNetworkSegmentOverrides external_network_segment_name:flag_value(true or false)

Example

container-util.bat -url https://vw-pun-bna-pt01 -user sysadmin -password sysadmin1 -operation modify_container -containerName LargeGoldContainer -externalNetworkSegmentOverrides ExternalNetwork:true

Back to top

To modify container by overriding a load balancer component - modify_container

Use the following command:

container-util.bat -url bna_app_server_url -user bna_app_server_user_name -password bna_app_server_password -operation modify_container -containerName name_of_container -loadBalancerOverrides load_balancer_name:flag_value(true or false)

Example

container-util.bat -url https://vw-pun-bna-pt01 -user sysadmin -password sysadmin1 -operation modify_container -containerName LargeGoldContainer -loadBalancerOverrides LoadBalancer1:true

Back to top

To modify container by overriding a firewall component - modify_container

Use the following command:

container-util.bat -url bna_app_server_url -user bna_app_server_user_name -password bna_app_server_password -operation modify_container -containerName name_of_container -firewallOverrides firewall_name:flag_value(true or false)

Example

container-util.bat -url https://vw-pun-bna-pt01 -user sysadmin -password sysadmin1 -operation modify_container -containerName LargeGoldContainer -firewallOverrides Firewall1:true

Back to top

To modify container by overriding a NIC segment component - modify_container

Use the following command:

container-util.bat -url bna_app_server_url -user bna_app_server_user_name -password bna_app_server_password -operation modify_container -containerName name_of_container -nicSegmentOverrides nic_segment_name:flag_value(true or false)

Example

container-util.bat -url https://vw-pun-bna-pt01 -user sysadmin -password sysadmin1 -operation modify_container -containerName LargeGoldContainer -nicSegmentOverrides NIC1:true

Back to top

To modify container by overriding an address pool - modify_container

Use the following command:

container-util.bat -url bna_app_server_url -user bna_app_server_user_name -password bna_app_server_password -operation modify_container -containerName name_of_container

Example

container-util.bat -url https://vw-pun-bna-pt01 -user sysadmin -password sysadmin1 -operation modify_container -containerName LargeGoldContainer

Do you want to override dynamic addressing components [y/N]: y
Do you want to specify address space overrides [y/N]: n
Do you want to specify address pool overrides [y/N]: y
Enter pool name (specify link id separated by '#'): Customer
*Optional if specifying DNS Info
Enter pool size (optional* see above): 24
Do you want to specify/override DNS Information? [y/N]: n
Do you want to specify address pool overrides [y/N]: n

Back to top

To modify container by overriding the DNS information for an address pool - modify_container

Use the following command:

container-util.bat -url bna_app_server_url -user bna_app_server_user_name -password bna_app_server_password -operation modify_container -containerName name_of_container

Example

container-util.bat -url https://vw-pun-bna-pt01 -user sysadmin -password sysadmin1 -operation modify_container -containerName LargeGoldContainer

Do you want to override dynamic addressing components [y/N]: y
Do you want to specify address space overrides [y/N]: n
Do you want to specify address pool overrides [y/N]: y
Enter pool name (specify link id separated by '#'): Customer
*Optional if specifying DNS Info
Enter pool size (optional* see above):
Do you want to specify/override DNS Information? [y/N]: y
Warning:
If you are updating DNS Information for an address pool with some addresses that
are acquired and registered with a DNS, review the address pool details before
proceeding. Review the information in the Container view > Address Pool details
popup.
Do you wish to overwrite the existing DNS information? [y/N]: y
Enter primary DNS server name: 10.128.251.14
Enter reverse DNS server name: 10.128.251.14
Enter secondary DNS server name:
10.128.251.15 *Note - Primary DNS domain suffix is required for DNS registration.
Enter primary DNS domain suffix: dnsbind.com
Enter domain search order (comma separated): dnsbind.com, bind.com
Enter reverse DNS zone name: 60.10.in-addr.arpa
Do you want to specify address pool overrides [y/N]: n

Back to top

To modify container by overriding an address space - modify_container

Use the following command:

container-util.bat -url bna_app_server_url -user bna_app_server_user_name -password bna_app_server_password -operation modify_container -containerName name_of_container -v

Example

container-util.bat -url https://vw-pun-bna-pt01 -user sysadmin -password sysadmin1 -operation modify_container -containerName LargeGoldContainer -v

Do you want to override dynamic addressing components [y/N]: y
Do you want to specify address space overrides [y/N]: y
*Optional if specifying DNS Info
Enter network address (optional* see above):  45.0.0.0
Enter network mask (dotted decimal/CIDR & optional* see above):  255.255.255.0
Do you want to specify public flag [y/N]: N
Do you want to specify address space name [y/N]: y
Enter address space name: Public
Do you want to specify/override DNS Information? [y/N]: N
Do you want to specify address space overrides [y/N]:n

Back to top

To modify container by overriding the DNS information for an address space - modify_container

Use the following command:

container-util.bat -url bna_app_server_url -user bna_app_server_user_name -password bna_app_server_password -operation modify_container -containerName name_of_container -v

Example

container-util.bat -url https://vw-pun-bna-pt01 -user sysadmin -password sysadmin1 -operation modify_container -containerName LargeGoldContainer -v

Do you want to override dynamic addressing components [y/N]: y
Do you want to specify address space overrides [y/N]: y
*Optional if specifying DNS Info
Enter network address (optional* see above):
Enter network mask (dotted decimal/CIDR & optional* see above):
Do you want to specify public flag [y/N]: N
Do you want to specify address space name [y/N]: y
Enter address space name: Public
Do you want to specify/override DNS Information? [y/N]: y
Enter primary DNS server name: 10.128.251.12
Enter reverse DNS server name: 20.121.35.80
Enter secondary DNS server name: 10.128.251.15
*Note - Primary DNS domain suffix is required for DNS registration.

Enter primary DNS domain suffix: dnsbind.com

Enter domain search order (comma separated): dnsbind.com

Enter reverse DNS zone name: 90.in-addr.arpa

Do you want to specify address space overrides [y/N]:n

Back to top

To modify container by overriding an external network - modify_container

Use the following command:

container-util.bat -url bna_app_server_url -user bna_app_server_user_name -password bna_app_server_password -operation modify_container -containerName name_of_container

Example

container-util.bat -url https://vw-pun-bna-pt01 -user sysadmin -password sysadmin1 -operation modify_container -containerName LargeGoldContainer

Do you want to override dynamic addressing components []: y
Do you want to specify address space overrides []: n
Do you want to specify address pool overrides []: n
Do you want to specify external network segment overrides []: y
Enter external network segment name: OUTSIDE
Enter network address: 45.0.0.0
Enter network mask (dotted decimal): 255.255.255.0

Note

You can specify runtime parameters with values and the following flags with the value true or false as needed while using the modify_container operation.

  • ignoreModifyErrorsFlag: Flags whether to ignore errors that occur while reconfiguring devices during the attempt and update the resources in the container.
  • skipUnmodifyFlag: Flags whether to skip the attempt to unmodify what was modified.
  • ignoreUnmodifyErrorsFlag: Flags whether to ignore errors that occur while reconfiguring devices during the unmodify attempt, and update the resources in the container.

Back to top

To create containers after successful pod creation - provision_container

Use the following command:

container-util.bat -url bna_app_server_url -user bna_app_server_user_name -password bna_app_server_password -operation provision_container -podName created_pod_name -containerName name_of_container -containerBlueprintName blueprint_name -v

Example

container-util.bat -url https://vw-pun-bna-pt01 -user sysadmin -password sysadmin1 -operation provision_container -podName LargePod -containerName LargeGoldContainer -containerBlueprintName "Large Gold Container Blueprint" -v

Notes

  • The container name length must not exceed the maximum allowed by the device to be configured. The API validates the container name before starting the container creation. The maximum length of the container name can be set using the BMC Network Automation global property, vdcMaxVirtualGuestFullNameLength. See Default global.properties file. If a value is not specified, the maximum length is defaulted to 32 characters.
  • When creating a container, if you want to use a round robin methodology to select a pod instead of the default capacity methodology, you must change the value of the BMC Network Automation global property, roundrobinPodNodeSelection, to true. You can also use the round robin methodology for selecting pod node pairs for a container by changing the value of the BMC Network Automation global property, roundrobinPodPairSelection, to true. See Default global.properties file.

Back to top

To decommission all NICs of a particular NIC server - release_all_server_nic_addresses

Use the following command:

container-util.bat -url bna_app_server_url -user bna_app_server_user_name -password bna_app_server_password -operation release_all_server_nic_addresses -containerName name_of_container -nicServerName nic_Server_Name –additionalParams additional_params -skipIPAMOperation skip_IPAM_operation_flag v

Example

container-util.bat -url https://vw-pun-bna-pt01 -user sysadmin -password sysadmin1 -operation release_all_server_nic_addresses -containerName LargeGoldContainer -nicServerName NICServer1 -v -additionalParams "transactionId:iuyuy-kklljl-9988,nicId:7" -skipIPAMOperation false -v

Back to top

To release a NAT address from a pool - release_nat_address

Use the following command:

container-util.bat -url bna_app_server_url -user bna_app_server_user_name -password bna_app_server_password -operation release_nat_address -containerName name_of_container -publicNatAddressValue public_ip_address_to_be_released -releaseOnFailure release_on_failure_flag –additionalParams additional_params-skipIPAMOperation skip_IPAM_operation_flag v

Example

container-util.bat-url https://vw-pun-bna-pt01 -user sysadmin -password sysadmin1 -operation release_nat_address -containerName LargeGoldContainer -publicNatAddressValue 12.2.0.3 -releaseOnFailureFlag true -additionalParams "transactionId:iuyuy-kklljl-9988,nicId:7" -skipIPAMOperation true –v

Back to top

To decommission a specified NIC - release_virtual_server_nic_address

Use the following command:

container-util.bat -url bna_app_server_url -user bna_app_server_user_name -password bna_app_server_password -operation release_virtual_server_nic_address -containerName name_of_container -nicName nic_name -nicServerName nic_server_name additionalParams additional_params skip_IPAM_operation_flag v

Example

container-util.bat -url https://vw-pun-bna-pt01 -user sysadmin -password sysadmin1 -operation release_virtual_server_nic_address -containerName LargeGoldContainer -nicName NIC-1 -nicServerName NICServer1 -additionalParams "transactionId:iuyuy-kklljl-9988,nicId:7" -skipIPAMOperation false -v

Back to top

To reprovision a container - reprovision_container

Use the following command:

container-util.bat -url bna_app_server_url -user bna_app_server_user_name -password bna_app_server_password -operation
reprovision_container -containerName name_of_container -containerBlueprintName name_of_container_blueprint_to_be_reprovision -restrictedReprovisioningFlag restricted_reprovisioning_flag (true or false) -v

Example

container-util.bat -url https://vw-pun-bna-pt01 -user sysadmin -password sysadmin1 -operation reprovision_container -containerName LargeGoldContainer -containerBlueprintName "Large Gold Container Blueprint" -restrictedReprovisioningFlag false -v

Note

The restrictedReprovisioningFlag only allows reversible content to be added during reprovisioning. By default, the restrictedReprovisioningFlag is set to true. For details about the restricted reprovisioning mode, see Configuring a reprovisioning operation in BMC Network Automation for network containers.

Back to top