Unsupported content

 

This version of the documentation is no longer supported. However, the documentation is available for your convenience. You will not be able to leave comments.

Managing pods and containers from the BMC Network Automation the command line interface

The topics in this section describe the following Pod and Container Management (PCM) functions you can perform from the BMC Network Automation command line interface that are related to BMC Cloud Lifecycle Management.

To import and export PCM components

Unable to render {include} The included page could not be found.

To manage containers using a script

This topic contains information about using the container utilities script to test a new container blueprint that you created, before you use the container blueprint to create containers in BMC Cloud Lifecycle Management. See Creating network container blueprints in the BMC Cloud Lifecycle Management on-line technical documentation.

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 are installed with BMC Network Automation. Before using them, expand the file BCAN_HOME\public\bmc\bca-networks\extras\bcan-pcm-utility-8.3.00.zip 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:

  • (Microsoft 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.



Container utility script options

Option

Description

-?

Display Help

-accessSwitchName arg

Hypervisor switch node name

-attachPointName arg

Attach point name

-containerBlueprintName arg

Container blueprint name

-containerName arg

Container name

-deleteOnFailureFlag arg

True or false, default is false.

-externalNetworkSegmentOverrides arg

External network segment overrides, format is componentname:flag (true or false) with pairs separated by comma delimiter. For example, "name1:true","name2:false"

-firewallOverrides arg

Firewall overrides, componentname:flag (true or false) with pairs separated by comma delimiter. For example: "name1:true,name2:false,name3:true"

-ignoreModifyErrorsFlag arg

True or false, default is false.

-ignoreReprovisionErrorsFlag arg

True or false, default is false (for reprovisionContainer).

-ignoreUnmodifyErrorsFlag arg

True or false, default is false.

-loadbalancerOverrides arg

Loadbalancer overrides, format componentname:flag (true/false) with pairs separated by comma delimiter.

-nicAddressValue arg

Address value (required for addVirtualServerNic).

-nicName arg

NIC name (required for addVirtualServerNic, removeVirtualServerNics).

-nicSegmentOverrides arg

NIC segment overrides, format is componentname:flag (true or false) with pairs separated by comma delimiter. For example, "name1:true","name2:false".

-nicServerName arg

NIC server name (required for addVirtualServerNic, removeVirtualServerNics).

-operation arg

Name of operation. 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

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

-podName arg

Pod name

-privateNatAddressValue arg

Private NAT address value (for acquireNatAddress).

-publicNatAddressValue arg

Public NAT address value (for releaseNatAddress).

-releaseOnFailureFlag arg

True or false, default is false.

-runtimeParams arg

A list of runtime parameters in the form name:value with pairs separated by a comma delimiter. For example, runtime.name1:val1,runtime.name2:val2,runtime.name3:val3.

-skipUnmodifyFlag

True or false, default is false.

-url arg

BMC Network Automation application server URL.

-user arg

BMC Network Automation application server user name.

-v

Prints detailed error stack trace.

-zoneName arg

Zone name

Use cases

The following topics describe various use cases for 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

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

To acquire a 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 -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 -v

To provision a NIC to acquire a particular free 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 -addressValue available_ip_address_from_pool -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 -addressValue 14.0.3.13 -zoneName "Zone 1" -v

To provision a NIC to acquire any 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 -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" -v

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

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

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

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

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

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

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

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
Do you want to specify address space overrides []: n
Do you want to specify address pool overrides []: y
Enter pool name (specify link id separated by '#'): BE1_ACCESS#1
Enter pool size: 64
Do you want to specify address pool overrides []: n

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
Do you want to specify address space overrides []: y
Enter network address: 20.0.0.0
Enter network mask (dotted decimal): 255.255.0.0
Do you want to specify public flag []: y
Enter public flag []: true
Do you want to specify address space name []: y
Enter address space name: OUTSIDE_SPACE
Do you want to specify address space overrides []: n

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.

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.
  • You can also perform all of the override operations associated with the modify_container option as needed during a container provision operation.

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 -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

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 -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 -v

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 -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 -v

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 -v

Example

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

Note

You can also perform all of the override operations associated with the modify_container option as needed during a reprovision operation.

Using the API

The BMC Network Automation Web Services API fully exposes the information in the underlying Pod and Container Management (PCM) engine model to facilitate customizations and automated testing. The structure of the BMC Network Automation API reflects the underlying PCM model structure with some concessions made for the differences between the BMC Cloud Lifecycle Management and BMC Network Automation versions of the PCM model. Those differences are masked using Selector Data Transfer Objects (DTOs), which are similar to Union data types in the C programming language. In this case, you can populate some attributes if you select objects by using the BMC Cloud Lifecycle Management paradigm, and other attributes if you select objects by using the BMC Network Automation paradigm.

The Pod and Container Management (PCM) functionality in BMC Network Automation is only available if your deployment has BMC Cloud Lifecycle Management and the Virtual Data Center (VDC) is enabled in your BMC Network Automation. See Enabling the Virtual Data Center in the BMC Network Automation online technical documentation.

The PCM services and DTOs are distributed as part of the BMC Network Automation Web Services API in the ZIP file described on the Distribution files page.

The BMC Network Automation Web Services API provides a set of PCM classes which abstract the lower-level web service functionality into a set of easy-to use classes .In addition to the service classes, the PCM portion of the API provides a set of DTO classes. DTOs are related to each service class. The firewall and zone components of the PCM model are implemented entirely as DTOs. See Using the API in the BMC Cloud Lifecycle Management online technical documentation for information about accessing the Javadoc describing the DTOs.

The API provides the following service classes:

AddressingService class

The AddressingService class offers methods operations acquiring and releasing addresses within a particular container.

Retrieve the WSDL for this service by using the https://server:port/bca-networks/services/AddressingService?wsdl URL.

Method
Description
acquireNatAddress()

Acquires an address from the public address pool associated with the private address pool from which the specified private address was already acquired.

acquirePhysicalServerNicAddress()

Acquires an address for the specified physical NIC that is being provisioned to the specified attach point (physical port) in the specified physical switch.

acquireRogueAddress()

Acquires the next available address from the specified address pool.

acquireSpecificNatAddress()

Acquires a specific address from the public address pool associated with the private address pool from which the specified private address was already acquired.

acquireSpecificPhysicalServerNicAddress()

Acquires an address for the specified physical NIC that is being provisioned to the specified attach point (physical port) in the specified physical switch.

acquireSpecificRogueAddress()

Acquires the specified desired address from the specified address pool.

acquireSpecificVirtualServerNicAddress()

Acquires an address for the specified virtual NIC that is being provisioned to the specified attach point (virtual port created from a virtual port type) in the specified virtual switch.

acquireVirtualServerNicAddress()

Acquires an address for the specified virtual NIC that is being provisioned to the specified attach point (virtual port created from a virtual port type) in the specified virtual switch.

excludeIPAddresses()Excludes given IP addresses from address pools.

reincludeIPAddresses()

Re-includes given IP addresses (that were previously excluded) into address pools.

releaseAllServerNicAddresses()

Releases the addresses previously acquired for all NICs (physical or virtual) associated with the specified server back to their address pools and removes their references from the container.

releaseNatAddress()

Releases the specified public NAT address back to its address pool and removes its reference from the container.

releasePhysicalServerNicAddress()

Releases an address previously acquired for the specified physical server NIC back to its address pool and removes its reference from the container.

releaseRogueAddress()

Release a previously acquired rogue address back to its address pool and removes it reference from the container.

releaseVirtualServerNicAddress()

Releases an address previously acquired for the specified virtual server NIC back to its address pool and removes its reference from the container.

Back to top

ContainerBlueprintService class

The ContainerBlueprintService class provides container blueprint related operations.

Retrieve the WSDL for this service by using the https://server:port/bca-networks/services/ContainerBlueprintService?wsdl URL.

Method
Description
describeIncompatibility()

Returns a description of the ways in which the specified container blueprint is incompatible with the specified pod.

getAllBlueprintNames()Returns a list of all container blueprint names.
getBlueprint()Returns information about the given container blueprint.

getCompatibleBlueprintNames()

Returns a list of container blueprints compatible with the specified pod.

getRuntimeParamNames()

Fetches the set of runtime parameter names in container blueprint.

isCompatible()

Returns a description of the ways in which the specified container blueprint is compatible with the specified pod.

provisionContainer()

Provisions a container on the specified pod using the specified container blueprint.

reprovisionContainer()

Reprovisions a container using an updated version of the blueprint which was used to originally provision it.

Back to top

ContainerService class

The ContainerService class provides container-related lifecycle operations.

Retrieve the WSDL for this service by using the https://server:port/bca-networks/services/ContainerService?wsdl URL.

Method
Description
connectPhysicalServerNic()

Executes a job to configure the specified attach point (port) in the physical switch to support traffic on its associated VLAN.

deprovisionContainer()Deprovisions a container.
getAllContainerNames()Returns a list of all container names.
getAllContainerNodes()Returns information about all nodes in a container.
getAllContainerPairs()Returns information about all pairs in a container.
getContainer()Returns information about the given container.
getContainerJobs()

Returns the IDs of the jobs that were executed during provision, container and deprovision of the given container.

getContainerNamesInPod()

Returns the container names associated with a given pod.

getRuntimeParamNames()

Returns the runtime parameters that would be needed if you were to modify the container to toggle
component states as specified.

modifyContainer()

Modifies the container by toggling dynamic components (NIC segments, VLBs and VFWs) as specified.

Back to top

LoadBalancerService class

The LoadBalancerService class provides operations for administering server load balancing within a given container.

Retrieve the WSDL for this service by using the https://server:port/bca-networks/services/LoadBalancerService?wsdl URL.

Method
Description
addPool()

Executes a job to add a pool of the specified type to the specified Virtual Load Balancer (VLB) device.

addPoolEntries()

Executes a job to add the specified entries to the specified pool in its associated VLB device.

disablePoolEntries()

Executes a job to disable the specified entries in the specified pool in its associated VLB device.

enablePoolEntries()

Executes a job to enable the specified entries in the specified pool in its associated VLB device.

getAllPoolNames()

Retrieves names of load balancer pools within the load balancer in the specified container and zone.

getPool()Retrieves the specified load balancer pool and all of its entries.
removePool()

Executes a job to remove the specified pool from its associated VLB device.

removePoolEntries()

Executes a job to remove the specified entries from the specified pool from its associated VLB device.

Back to top

PodService class

The PodService class provides pod-related operations.

Retrieve the WSDL for this service by using the https://server:port/bca-networks/services/PodService?wsdl URL.

Method
Description
addVlanPool()

Adds a VLAN pool with given information to pod with a specified name.

deleteVlanPool()Deletes a VLAN pool with given name from the specified pod.
getAllPodNames()Returns the names of all pods.
getAllPodNodes()Returns information about all nodes in a pod.
getAllPodPairs()Returns information about all pairs in a pod.
getPod()Returns the information about the given pod.

Back to top

SecurityService class

The SecurityService class provides operations for administering firewall security within a given container.

Retrieve the WSDL for this service by using the https://server:port/bca-networks/services/SecurityService?wsdl URL.

Method
Description
addFirewallRules()

Executes a job to add rules to a particular ACL in a Virtual Firewall (VFW).

addPathRules()Adds path rules and returns FirewallAclUpdateDTO [] as a response.
addPathRules2()Adds path rules and returns PathRuleDTO[] as a response.
getAllFirewallRules()Retrieves all firewall rules for the specified ACL in a VFW.
getAllPathRules()

Retrieves all path rules for the specified container from the BMC Network Automation database.

persistExternalPathRules()

Persists high level path rules in BMC Network Automation.
removeFirewallRules()

Executes a job to remove rules from a particular ACL in a VFW (if they are present).

removePathRules()Removes path rules (if they are present).
replaceFirewallRules()Executes a job to replace rules in a particular ACL in a VFW.

Back to top

Viewing the javadocs for the web services

Perform the following steps to view the javadocs for the BMC Network Automation web services:

  1. Unzip the most recent BCAN_INSTALL\BCA-Networks\public\bmc\bca-networks\extras\bcan-ws-clientapi-8.3.xx.zip file.
  2. Identify the destination directory for the .zip file.
  3. Navigate to the API_Destination_Directory \bcan-ws-clientapi\apidocs directory.
  4. Open the overview-frame.html file. A page displays that provides links to the various DTOs and web service APIs.
  5. Click the com.bmc.bcan.ws.shared link. A page displays that provides links to the javadocs for the various BMC Network Automation web services.

Was this page helpful? Yes No Submitting... Thank you

Comments