.Imports Cable Paths v2018.1
Capability
The Cable Path Import allows the User to INSERT a valid Cable Path with an Origination Equipment and a Destination Equipment record onto existing Cable. Cable Path is an association record that must have valid values before the User can create it for the Cable Name, Equipment, and Location fields. The Cable Path Import process CANNOT INSERT these records, they MUST already exist.
Fields
While the Service ID and the Location are optional, at least one of these must be provided to give the Path a valid location.
Service ID
Conditionally Required
Datatype is String.
Either a Service ID or a Location must be provided.
If both are provided, the Import uses both. If provided, the value is used to lookup an existing record to UPDATE. The Cable Path Import does not INSERT a Service ID. See the Services Import to INSERT Services.
If the lookup fails, it causes an error.
Location
Conditionally Required
Datatype is String.
Either a Service ID or a Location must be provided. If both are provided, the Import uses both.
If provided, the value is used to lookup an existing record to UPDATE. The Cable Path Import will not INSERT a Location. See the Locations Import to INSERT Locations.
If the lookup fails, it causes an error.
Location Type
Datatype is String.
Permitted values are from the LOCATION_TYPE List Values.
This field is used for the Location lookup if provided.
Conditionally Required if the provided Location Name exists with multiple Types.
Child Records
Path Leg
Individual Legs of the Path can be Imported into the Cable Path.
Cable Name
Datatype is String.
This must be a valid preexisting Cable.
Path Status
Datatype is String.
Default Value is blank.
Permitted values are LEFT_IN, blank, or any value added in List Values by your organization.
Pair/Strand Number
Datatype is String.
This must be a valid, existing Pair/Strand Number. If the User needs to INSERT a Pair/Strand, use the Pair/Strand Import or manually create the record.
If the Cable and Pair/Strand are provided and the From or To Equipment and Port are not provided, the From or To Equipment and Port will be copied from the From or To Equipment and Port from the Pair/Strand.
From Equipment ID
Datatype is String.
This must be a valid, existing Equipment ID.
The Cable Path Import will NOT INSERT Equipment IDs. This must be done with the Equipment Import, API, or manually create the Equipment record.
If the lookup fails, it causes an error and the Path does not INSERT.
From Ports Pins Len
Datatype is String.
The Cable Path Import will NOT INSERT Port/Pin/Lens records. This must be done with the Ports/Pins/Lens (PPL), API, or manually create the PPL record.
This must be a valid preexisting Port/Pin/Lens record.
Value in this field is optional. If provided, the value is used to look up existing records to UPDATE.
If the lookup fails, it causes a warning. The Path is created with blank Port/Pin/Len values.
From Port Pin Len Side
Datatype is String.
This optional value is used to help identify a Port, in case an Equipment has multiple ports with the same port number, on different sides.
To Equipment ID
Datatype is String.
This must be a valid preexisting Equipment ID.
The Cable Path Import will NOT INSERT Equipment IDs. This must be done with the Equipment Import, API, or manually create the Equipment record.
To Ports Pins Len
Datatype is String.
The Cable Path Import will NOT INSERT Port/Pin/Lens records. This must be done with the Ports/Pins/Lens (PPL), API, or manually create the PPL record.
This must be a valid preexisting Port/Pin/Lens record.
Value in this field is optional.
If provided, the value is used to look up existing records to UPDATE.
If the lookup fails, it causes a warning, but the Path is created with blank Port/Pin/Len values.
To Port Pin Len Side
Datatype is String.
This optional value is used to help identify a Port, in case an Equipment has multiple ports with the same port number, on different sides.
Backbone Service ID
Datatype is String.
If provided, the value is used to lookup an existing Service record. The Import will not INSERT this Service record. See the Services Import to INSERT Services.
If the lookup fails, it causes an error.
Leg Location
Datatype is String.
This is optional and used to assign the location of the Path Leg. Usually, this is not needed, and the location of the leg will match the location of the Path or the Path's Service. This is usually used to differentiate Path Legs for Services that have multiple Locations.
Leg Location Type
Datatype is String.
Permitted values are from the LOCATION_TYPE List Values.
This field is used for the Leg Location lookup if provided.
Conditionally Required if the provided Leg Location Name exists with multiple Types.
Flags / Conditional Logic
IMPORT FLAGS
RECREATE_EXISTING_PATH
If the Location or Service you are creating the Path for already has a Path, the existing Path is compared to the new Path information. If the Path Legs are the same, nothing changes. If they are different, the default behavior produces an error. If this flag is set to true, then the existing Path will be removed, and a new Path will be created.
Legs Array
To use the above fields to provide Path Leg data, Users can only create a Path with one Path Leg. To use this optional Legs Array field, Users can create Paths with any number of legs.
To use this method, do not use any of the Path Leg fields listed above. If the Legs Array is assigned, all of the individual Path Leg fields are ignored.
The Legs Array lets Users assign values to these array indexes for each Path Leg:
"pathLegLocationName"
"pathLegLocationName"
"pathLegCableName"
"pathLegPairStrand"
"pathLegBackbone"
"FROM_EqpId"
"FROM_EqpPPLPort"
"FROM_EqpPPLSide"
"TO_EqpId"
"TO_EqpPPLPort"
"TO_EqpPPLSide"
These indexes have the same requirements and data types as the Path Leg import fields listed above.
The Legs Array must be assigned in the conditional logic and not mapped.
Example
Here is an example of how this is done with a two-leg Path, from a switch to a panel then a panel to a jack. The strings that are in double quotes are associative array indexes, and they must be written exactly as they appear in this example. The values after the '=>' operators can be literal strings. They can come from the input CSV file using the index syntax or come from Conditional Logic variables that were previously assigned. We recommend using the variables to make the logic slightly more readable and easier to maintain.
///// begin Conditional Logic ///// // Values for first leg $cl_cable_1 = [5]; $cl_pair_1 = [6]; $cl_location_1 = [7]; $cl_backbone_1 = [8]; $cl_from_eqp_1 = [9]; $cl_from_port_1 = [10]; $cl_from_side_1 = [11]; $cl_to_eqp_1 = [12]; $cl_to_port_1 = [13]; $cl_to_side_1 = [14]; // Values for second leg $cl_location_2 = [15]; $cl_cable_2 = [16]; $cl_pair_2 = [17]; $cl_backbone_2 = [18]; $cl_from_eqp_2 = [19]; $cl_from_port_2 = [20]; $cl_from_side_2 = [21]; $cl_to_eqp_2 = [22]; $cl_to_port_2 = [23]; $cl_to_side_2 = [24]; [PATHS.LEGS_ARRAY] = array( // first leg array( "pathLegLocationName" => $cl_location_1, "pathLegCableName" => $cl_cable_1, "pathLegPairStrand" => $cl_pair_1, "pathLegBackbone" => $cl_backbone_1, "FROM_EqpId" => $cl_from_eqp_1, "FROM_EqpPPLPort" => $cl_from_port_1, "FROM_EqpPPLSide" => $cl_from_side_1, "TO_EqpId" => $cl_to_eqp_1, "TO_EqpPPLPort" => $cl_to_port_1, "TO_EqpPPLSide" => $cl_to_side_1, ), // second leg array( "pathLegLocationName" => $cl_location_2, "pathLegCableName" => $cl_cable_2, "pathLegPairStrand" => $cl_pair_2, "pathLegBackbone" => $cl_backbone_2, "FROM_EqpId" => $cl_from_eqp_2, "FROM_EqpPPLPort" => $cl_from_port_2, "FROM_EqpPPLSide" => $cl_from_side_2, "TO_EqpId" => $cl_to_eqp_2, "TO_EqpPPLPort" => $cl_to_port_2, "TO_EqpPPLSide" => $cl_to_side_2, ), ); ///// end Conditional Logic /////
Errors
The following errors occur if the Cable Path Import INSERT or UPDATE fails:
- Error : Invalid Cable Name '<CABLE_NAME>'
- Error : Invalid Cable Pair/Strand '<CABLE_NAME>' '<PAIR_STRAND_NUMBER>'
- Error : Invalid From Equipment '<FROM_EQUIPMENT_ID>'
- Error : Missing From Equipment
- Error : Invalid To Equipment '<TO_EQUIPMENT_ID>'
- Error : Invalid Service ID '<SERVICE_ID>'
- Error : Invalid Location '<LOCATION>'
- Error : Missing Service ID / Location
- Error : Invalid Backbone Service ID '<BACKBONE_SERVICE_ID>'
- Error : Failed to save Path record; <$errorMessage>
- Error : Failed to save Path Leg record; <$errorMessage>
- Error : Invalid Location Type '<LOCATION_TYPE>'
- Error : Invalid Leg Location Type '<LOCATION_TYPE>'
The following errors occur if the Cable Path Import INSERT or UPDATE does NOT fail. The Cable Path will INSERT or UPDATE. However, the subsequent Child record may have a warning generate, and the child record is not added to the Path. The Child record is non-essential for the Path, or it happens after the Save.
- Warning : Invalid From Port/Pin/Len '<FROM_PORT_PIN_LEN>', side '<fromPPLSide>'
- Warning : Invalid To Port/Pin/Len '<TO_PORT_PIN_LEN>', side '<toPPLSide>'
Help Desk Portal - Email: help@pcr.com - Phone: 616.259.9242