penv

Use the penv command to create and manage publishing environments when the source of the service model data is either the BMC Atrium CMDB (Atrium Publish) or the CLI pposter (Direct Publish). For more information about publish environments, see Understanding publishing environments and Publishing from a Direct Publish source

You can secure publish environments by applying a password. See Securing publishing environments.

penv syntax

penv (close | init | open | set) <common options> [-f] [-e <EnvID>] [-s <description>]

penv action commands: open, init, close, set, info

penv provides additional functionality with these action commands: close, info, init, open, and set. Some action commands work differently or have different requirements, depending on the type of environment, Atrium Publish or Direct Publish, as described in the following table.

Actions commands

Action command

General description

Specific to BMC Atrium CMDB environments

Specific to direct publish environments

penv close

Removes data related to the specified environment.

Note: BMC recommends you to backup or get information of all the custom publication filters before running this command. Running this command deletes all the user-created custom publication filters and published data from the environment and all the cells are re-initialized. After restarting pserver, the custom filters need to be recreated from the information stored previously and the published data can be retrieved by running the publish command. For more information, see publish.

See example.

If CloseAsset=T, asset data set instances are removed and the asset dataset is removed; default = F (false).
If CloseCells=T, cells are reinitialized with empty ServiceModel; default is T (true).
If CloseAliases=T, aliases of the environment are removed, which releases the cells for usage in another environment; default is T (true).

penv info

Displays information relevant to environments

  • To display column headings, use the -v option.
  • To display cell alias information, use the -p "Level=1" option.
  • Display characteristics are
    • When HomeCell is not set, a empty string is returned ().
    • Cell alias values might include blank characters.
    • Cell name values do not include blank characters.
    • Values containing blank characters are quoted according to the rules for quoting BAROC strings.

All parameters are valid except Cell Aliases.

Relevant parameters are CellAliases, Format, HomeCell, Level, and OriginId.
You must include -p OriginId=Direct Publish as part of the command string if the EnvID is not included.

penv init

Resets the notification error (NOE) subscriptions.

Not applicable

penv open

Creates the asset of the specified environment and stores environment settings in the cell.
After the environment is opened, you cannot modify values for PublishModeServiceModel or PublishModeMgmtData parameters.

Also stores the settings for the environment in the BMC Atrium CMDB

Data is stored only in the cell (and the source file); there is no secondary data store.

penv set

Sets or resets the parameters of the publish environment

You can reset only the AutomatedPublish, HomeCell, CellAliases, Password, NewPassword1, and NewPassword2 parameters.

You can reset only the HomeCell, Cells, and CellAliases, Password, NewPassword1, and NewPassword2 parameters.

penv command options

The following table lists the options for penv.

penv options

Option

Description

<common options> -c -h -? -i -l -q -p -t -u -v -z

See Common command options for Publishing Server CLIs.

Cells = ["["] cell1 {, cellN} ["]"]

The pair of opening and closing brackets are allowed but not mandatory.
Cells extend the existing concept of the HomeCell parameter. HomeCell becomes deprecated because setting HomeCell is equivalent to setting Cells with one element.

A Direct Publish environment can be created by using either the 6Cells or CellAliases action command parameter. Defining a Direct Publish environment with HomeCell is supported for backward compatibility, but it is deprecated. If a CellAliases parameter is given, a list of cells is built by the Publishing Server, consisting of all cell names found in the CellAliases parameter.

The destination cell names are determined as follows:

  • If cells contains a single element, then this cell name is used to publish all data, regardless of any cell information found in the data.
  • If cells contains more than one element, then for components and relationships, the destination cell must be found through the data instance:
    For components, the HomeCell attribute is searched ; then, HomeCellAlias is searched. For relationships, the attribute consumer_home_cell is searched, then Consumer.HomeCellAlias is searched.
  • If no valid destination cell is found, publish fails. If HomeCellAlias is used, then CellAliases must be set; otherwise, publish fails.

    Management data or non-SIM data (that is, instances other than components or relationships) are published to all cells.

-eEnvID

Sets a unique identifier for the environment

Default is PROD.

-f

Forces the command execution without prompting the user to confirm the initialization action.
If the -f option is not specified, you are prompted to confirm command execution.

-sdescription

Describe request

Atrium Publish environments-valid parameters for each action command

The following table provides a brief description of the parameters in the pclient.conf configuration file for an Atrium Publish environment and specifies the parameters that are valid for each penv action command: close, info, init, open, and set.

For a complete list of parameters in the pclient.conf file and additional parameter information, see pclient.conf file and parameters.

Valid parameters for a BMC Atrium CMDB publish environment

Parameter name

Description

close

info

init

open

set

AssetDataSetId

Defines the asset dataset ID; default is BMC.ASSET.EnvId

yes

AssetDataSetType

Defines the asset dataset type as Regular or Overlay; default is Overlay

yes

AssetUnderlyingDataSetId

Defines the underlying dataset for an overlay asset dataset; default is BMC.ASSET

yes

AutomatedPublish

Enables (T) or disables (F) automated publication for the publish environment; default is T, except for overlay publish environments

yes

CellAliases

Defines cellalias-to-cellname pairs that are unique to a given environment
You cannot define CellAliases with the penv CLI command.

yes

yes

CloseAliases

Enables (T) or disables (F) the removal of aliases of an environment; this releases the cells for use in another environment

yes

CloseAsset

Enables (T) or disables (F) the removal of the asset dataset along with all objects in the dataset

yes

CloseCells

Enables (T) or disables (F) the removal of all data instances (including management data) of the service model from the cells

yes

EnvDesc

Describes the environment

yes

EnvName

Specifies the name of the environment

yes

HomeCell

Specifies to which cell to publish. If HomeCell is set, the entire service model is published to the specified cell. In this case, CellAliases are not used.

yes

yes

Format

Defines the information displayed with info

yes

InitMgmtData

Specifies whether management data is initialized, T (true) or F (false)
See pclient.conf file and parameters.

yes

InitServiceModel

Specifies whether the service model is initialized, T (true) or F (false)
See pclient.conf file and parameters.

yes

Level

Determines the amount of information displayed by the info action command

yes

NewPassword1

Specifies a new password

yes

yes

NewPassword2

Confirms a new password

yes

yes

OriginId

Defines the source of the service model data

yes

yes

yes

Password

Specifies a password for authentication

yes

yes

yes

yes

PublishModeMgmtData

Defines whether management data must be approached as overlay or as regular dataset

yes

PublishModeServiceModel

Defines whether components and impact relationships must be approached as overlay or as regular dataset

yes

SourceBarocMgmtData

Causes the import of initial management data from instances in the .baroc files pointed to in the .load file

yes

SourceBarocServiceModel

Causes the import of initial service model data from instances in the .baroc files pointed to in the .load file

yes

SourceEnvMgmtData

Causes initial management data to be imported from instances of the source environment EnvId

yes

SourceEnvServiceModel

Causes initial service model data to be imported from instances in the asset dataset in the source environment EnvId. Data is created in the asset dataset of the environment.

yes

Direct Publish environments-valid parameters for each action command

The following table provides a brief description of the valid parameters in the pclient.conf configuration file for a Direct Publish environment and specifies the parameters that are valid for each penv action command: close, info, init, open, and set.

For a complete list of parameters in the pclient.conf file and additional parameter information, see pclient.conf file and parameters.

Valid parameters for a Direct Publish environment

Parameter name

Description

close

info

init

open

set

CellAliases

Defines cell alias and cell name pairs that are unique in an given environment

yes

yes

Cells

Defines cell names when cell aliases are not used

yes

Format

Defines the information displayed with info

yes

HomeCell

Specifies to which cell to publish. If HomeCell is set, the whole service model is published to the specified cell. In this case, cell aliases are not used.

yes

yes

Level

Determines the amount of information displayed by the info action command

yes

NewPassword1

Specifies a new password

yes

yes

NewPassword2

Confirms a new password

yes

yes

OriginId

Defines the source of the service model data

yes

yes

yes

Password

Specifies a password for authentication

yes

yes

yes

yes

SIM

Enables (T) or disables (F) the classes that can be published for the Direct Publish environments only
If T, only Service Impact Management classes can be published
If F, components and relationships of MC_SM_COMPONENT, MC_SM_RELATIONSHIP, and all subclasses cannot be published

yes

penv examples

This section contains examples of penv info. Some examples of penv are as follows:

Example 1-includes cell names and cell aliases, but no column headings

In example 1, Atrium Publish environments are displayed and cell names and cell aliases are displayed because the -p "Level=1" option is used, but column headings are missing because the -v option is not used.

Example

penv info -p "OriginId=AtriumCMDB" -p "Level=1"
BMC Impact Publishing Server Environment Manager vX.X.XX (Build 231112533 - 29-F
eb-yyyy)
Copyright 2005-yyyy BMC Software, Inc. as an unpublished work. All rights reserv
ed.

Request received and accepted by the Publishing Server
requestId=Z00000gz7xffb7Xpa2Z9kMZi71tmZ

AtriumCMDB

PROD   BMC.ASSET   Regular         T

        Default                 pncell_pun-ldom-rds34
        pncell_pun-ldom-rds34   pncell_pun-ldom-rds34

Example 2-raw format

Example 2 displays the information in raw format, rather than display format.

Example

penv info -p "OriginId=AtriumCMDB" -p "Format=Raw" -p "Level=1" -v
BMC Impact Publishing Server Environment Manager vX.X.XX (Build 231112533 - 29-Feb-yyyy)
Copyright 2005-yyyy BMC Software, Inc. as an unpublished work. All rights reserved.

Request received and accepted by the Publishing Server
requestId=Z00000gz7xffb7Xpa0Z9kMZi71tmZ
AtriumCMDB
PROD 'BMC.ASSET' Regular '' '' T ''
Default 'pncell_pun-ldom-rds34'
'pncell_pun-ldom-rds34' 'pncell_pun-ldom-rds34'

Example 3-includes cell aliases and column headings

In Example 3, cell aliases and column
headings are included for an Atrium Publish environment.

Example

penv info -p "OriginId=AtriumCMDB" -p "Level=1" -v
BMC Impact Publishing Server Environment Manager vX.X.XX (Build 231112533 - 29-Feb-yyyy)
Copyright 2005-yyyy BMC Software, Inc. as an unpublished work. All rights reserved.

Request received and accepted by the Publishing Server
requestId=Z00000gz7xffb7Xp9yZ9kMZi71tmZ

OriginId: AtriumCMDB

----------------------------------------------------------------------------------------------

EnvId   AssetDataSetId   AssetDataSetType   PublishModeMgmtData   PublishModeServiceModel   AutomatedPublish   HomeCell
PROD    BMC.ASSET        Regular                                                            T

        CellAlias               CellName
        Default                 pncell_pun-ldom-rds34
        pncell_pun-ldom-rds34   pncell_pun-ldom-rds34
------------------------------------------------------------------------------------------

Example 4-Direct Publish environment with cell aliases

The following example is for a Direct Publish publish environment. Cell names and cell alias are displayed because of the -p "Level=1" option, and column headings are displayed because the -v option is used.

Example

*penv -p "OriginId=DirectPublish" -p "Level=1" -v info*
BMC Impact Publishing Server Environment Manager vX.X.XX (Build 231112533 - 29-Feb-yyyy)
Copyright 2005-yyyy BMC Software, Inc. as an unpublished work. All rights reserved.

Request received and accepted by the Publishing Server
requestId=Z00000f48fmlfkXp9tZdlMZ3dbyuZ

OriginId: DirectPublish

------------------------
EnvId      HomeCell
direct     direct_cell
------------------------
EnvId      HomeCell
direct_2

        CellAlias      CellName
        direct_al_1    d_cell_1
        direct_al_2    d_cell_2
------------------------
EnvId      HomeCell
direct_3   direct_cell_3
------------------------

Example 5-Shows the impact of running the penv close command in the specified environment

penv close -e <Specific environment name>


For instance, if the Specific environment name is specified as PROD, the following output is displayed:
BMC Impact Publishing Server Environment Manager vX.X.XX (Build 241435256 - 29-May-yyyy)
Copyright 2005-yyyy BMC Software, Inc. as an unpublished work. All rights reserved.

Please confirm command (type y (yes) / n (no). Default is n): y

Request received and accepted by the Publishing Server with id Z00000kbj2af4zXpa1ZyjMZgkkt1b

Request successfully applied
Was this page helpful? Yes No Submitting... Thank you

Comments