psdi.app.dpldasset.unittest

Class DeployedAssetPromotionTest

  • java.lang.Object
    • psdi.app.dpldasset.unittest.DeployedAssetPromotionTest
  • Direct Known Subclasses:
    ComputersPromotionTest, NetworkDevicesPromotionTest, NetworkPrintersPromotionTest


    public abstract class DeployedAssetPromotionTest
    extends java.lang.Object

    Promotion Rules

    Deployed Asset Node

    Asset

    Comment

     

    Assetnum

    Assetnum is generated from an autokey. Autokey must be enabled for promotion to be successful.

    Parent Node

    Parent Asset

    If a node has a parent that is already linked to an authorized asset, the application locates that parent authorized asset and assigns it as the parent for the asset being created.

    Description

    Description

    Description is truncated to the size of the field for assets. If a truncation occurs, the whole description is inserted into the asset long description. If the classification is set to generate descriptions, the existing description may be over-written with the description generated from the classification.

    Serial Number

    Serial Number

    Serial number is the most common data used to establish reconciliation links. You should establish a business process that ensures that if a serial number is modified for a deployed or authorized asset, the corresponding record will also be corrected.

    Asset Tag

    Asset Tag

    Asset tag.

     

    Site

    If the node has a parent that is already linked to an authorized asset, the site of the parent authorized asset is used for the asset site.

    When promoting manually in the Computers application, the value set for the node in the table is used (Note that you cannot change that value directly in the table. You must change the site using the Defaults section at the bottom of the window.).

    When promoting automatically through an escalation, the default value defined in the Promotion Defaults dialog box in the Computers application is used for the asset site.

    A site must be provided.

     

    Location

    If the node has a parent that is already linked to an authorized asset, the location of the parent authorized asset is used.

    When promoting manually in the Computers application, the value set for the node in the table is used.

    When promoting automatically through an escalation, the default value defined in the Promotion Defaults dialog box in the Computers application is used.

    The default value is empty.

     

    Item

    Specifying the item will also specify the classification and will prevent you from specifying the classification separately. The asset will have the same classification as the item.

    The default value is empty.

     

    Status

    The asset status is usually set to Not Ready until the asset is put into service; at that point the status set to Operating.

    The default value is the default creation status of authorized IT assets.

     

    Classification

    If an item is selected, the classification of the item is used as the classification of the asset.

    If a classification is already specified and the user selects an item, the application overwrites the existing classification with the classification of the item specified by the user.

    A classification must be provided, either by entering one directly or by inheriting the classification the selected Item.

     

    Partition

    Set to Y (true) if the node is a partition, N (false) if the node is a computer.

    Hash value

    Hash value

    The unique ID that identifies a partition.

    Promote Partitions?

     

    If this check box is selected, the application promotes all children in the hierarchy of the selected node. The check box is disabled for assets that do not have children.

    • Field Detail

      • userInfo

        protected final UserInfo userInfo
    • Constructor Detail

      • DeployedAssetPromotionTest

        public DeployedAssetPromotionTest()
    • Method Detail

      • getDeployedAssetViewName

        public abstract java.lang.String getDeployedAssetViewName()
      • getAppName

        public abstract java.lang.String getAppName()
      • getNewPromoteActionInstance

        public abstract PromoteAction getNewPromoteActionInstance()
      • getDefaultsKey

        public java.lang.String getDefaultsKey()
        Returns:
        the key in the promotion defaults
      • testDefaultsNullClass

        public void testDefaultsNullClass()
                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testDefaultsLocationAndClass

        public void testDefaultsLocationAndClass()
                                          throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testDefaultsStatusAndItem

        public void testDefaultsStatusAndItem()
                                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testDefaultsWrongClassification

        public void testDefaultsWrongClassification()
                                             throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testDefaultsWrongItem

        public void testDefaultsWrongItem()
                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testDefaultsSetClassificationWhenItemIsSet

        public void testDefaultsSetClassificationWhenItemIsSet()
                                                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testDefaultsSetItemThenClassification

        public void testDefaultsSetItemThenClassification()
                                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testDefaultsNoSiteLocation

        public void testDefaultsNoSiteLocation()
                                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testDefaultsNoSiteStatus

        public void testDefaultsNoSiteStatus()
                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testDefaultsNoSiteItem

        public void testDefaultsNoSiteItem()
                                    throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testDefaultsNoSiteClassification

        public void testDefaultsNoSiteClassification()
                                              throws java.lang.Exception
        Throws:
        java.lang.Exception
      • testPromotionSimple

        public void testPromotionSimple()
                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • promoteDeployedAsset

        protected void promoteDeployedAsset(java.lang.Long nodeId)
                                     throws java.lang.Exception,
                                            MXException,
                                            java.rmi.RemoteException
        Throws:
        java.lang.Exception
        MXException
        java.rmi.RemoteException
      • verifyCreatedAsset

        protected void verifyCreatedAsset(java.lang.Long nodeId,
                                          java.lang.String nodeName,
                                          java.lang.String siteId,
                                          java.lang.String[][] expectedAssetAttributes)
                                   throws java.lang.Exception,
                                          MXException,
                                          java.rmi.RemoteException
        Throws:
        java.lang.Exception
        MXException
        java.rmi.RemoteException
      • findAsset

        protected MboRemote findAsset(java.lang.Long nodeId,
                                      java.lang.String nodeName,
                                      java.lang.String siteId)
                               throws java.lang.Exception,
                                      MXException,
                                      java.rmi.RemoteException
        Throws:
        java.lang.Exception
        MXException
        java.rmi.RemoteException
      • verifyDeployedAssetNotPromoted

        protected void verifyDeployedAssetNotPromoted(java.lang.Long nodeId,
                                                      java.lang.String nodeName)
                                               throws java.lang.Exception,
                                                      MXException,
                                                      java.rmi.RemoteException
        Throws:
        java.lang.Exception
        MXException
        java.rmi.RemoteException
      • findDeployedAsset

        protected MboRemote findDeployedAsset(java.lang.Long nodeId)
                                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • findReconLink

        protected MboRemote findReconLink(java.lang.Long nodeId)
                                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • findAsset

        protected MboRemote findAsset(java.lang.String siteid,
                                      java.lang.Long assetid)
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • setPromotionDefaults

        protected void setPromotionDefaults(java.lang.String siteid,
                                            java.lang.String[][] attributesInOrder)
                                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • setAttributesInOrder

        protected void setAttributesInOrder(MboRemote mbo,
                                            java.lang.String[][] attributesInOrder)
                                     throws MXException,
                                            java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • verifyPromotionDefaults

        protected void verifyPromotionDefaults(java.lang.String siteid,
                                               java.lang.String location,
                                               java.lang.String status,
                                               java.lang.String itemnum,
                                               java.lang.String classstructureid)
                                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • verifyAttributeValue

        protected void verifyAttributeValue(MboRemote mbo,
                                            java.lang.String attributeName,
                                            java.lang.String expectedValue)
                                     throws MXException,
                                            java.rmi.RemoteException
        Throws:
        MXException
        java.rmi.RemoteException
      • setUp

        public void setUp()
                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • findDeployedAsetViewRecord

        protected MboRemote findDeployedAsetViewRecord(java.lang.Long nodeId)
                                                throws java.lang.Exception
        Throws:
        java.lang.Exception
      • createDeployedAsset

        protected abstract java.lang.Long createDeployedAsset(java.lang.String nodename,
                                                              java.lang.Long parent,
                                                              java.lang.Long grandParent,
                                                              java.lang.String[][] attributesCommon,
                                                              java.lang.String[][] attributesSpecific)
                                                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • promoteSet

        protected java.lang.String promoteSet(java.lang.String selectionWhere)
                                       throws java.lang.Exception
        Mimics the behavior (AS OF TAMIT 7.2.1!) OF THE DIALOG BEANS THAT BACK THE PROMOTION DIALOG
        Parameters:
        selectionWhere - The clause that selects which deployed assets to promote
        Returns:
        the message that would be shown to the interactive user
        Throws:
        java.lang.Exception