blob: 1e4354004706bc2d25e3d8604738660edd538132 [file] [log] [blame]
///////////////////////////////////////////////////////////////////////////////
// //
// Copyright (c) 2000-2019 Ericsson Telecom AB //
// //
// All rights reserved. This program and the accompanying materials //
// are made available under the terms of the Eclipse Public License v2.0 //
// which accompanies this distribution, and is available at //
// https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.html //
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////
// Module: EPTF_CLL_PTCDeployment_Definitions
//
// Purpose:
// This module contains type definitions for TTCN-3 EPTF PTCDeployment implementation.
//
// Module Parameters:
// tsp_EPTF_PTCDeployment_loggingComponentMask - *charstring* - component-type mask for logging, default value: "EPTF_PTCDeployment"
//
// Module depends on:
// <EPTF_CLL_Base_Definitions>
// <EPTF_CLL_Common_Definitions>
// <EPTF_CLL_Logging_Definitions>
//
// Current Owner:
// Zsolt Szalai (EZSOSZA)
//
// Last Review Date:
// 2007-xx-xx
//
// Detailed Comments:
// This module contains type definitions for TTCN-3 EPTF PTCDeployment implementation.
//
///////////////////////////////////////////////////////////////
module EPTF_CLL_PTCDeployment_Definitions {
import from EPTF_CLL_Base_Definitions all;
import from EPTF_CLL_Common_Definitions all;
import from EPTF_CLL_Logging_Definitions all;
modulepar EPTF_PtcDeploymentEntryList tsp_PTCD_database := {};
modulepar charstring tsp_EPTF_PTCDeployment_loggingComponentMask := "EPTF_PTCDeployment";
///////////////////////////////////////////////////////////
// Type: EPTF_HostDeploymentEntry
//
// Purpose:
// This record defines a host with it's weight where PTCs can be run.
//
// Elements:
// host - *charstring* - The name(or IP) of the host
// weight - *integer* - a weight to indicate the probabilty of choosing this host
//
// Detailed Comments:
// -
//
///////////////////////////////////////////////////////////
type record EPTF_HostDeploymentEntry {
charstring host,
integer weight
}
///////////////////////////////////////////////////////////
// Type: EPTF_HostDeploymentEntryList
//
// Purpose:
// This record of defines the hosts where PTCs can be run.
//
// Elements:
// -
//
// Detailed Comments:
// -
//
///////////////////////////////////////////////////////////
type record of EPTF_HostDeploymentEntry EPTF_HostDeploymentEntryList
///////////////////////////////////////////////////////////
// Type: EPTF_PtcDeploymentEntry
//
// Purpose:
// This record defines a role and the hosts that can be used to execute the role
//
// Elements:
// role - *charstring* - The name of the role
// deployment - <hostDeploymentEntryList> - hosts for deploying the role
//
// Detailed Comments:
// -
//
///////////////////////////////////////////////////////////
type record EPTF_PtcDeploymentEntry {
charstring role,
EPTF_HostDeploymentEntryList deployment
}
///////////////////////////////////////////////////////////
// Type: EPTF_PtcDeploymentEntryList
//
// Purpose:
// This record of defines the roles to deploy
//
// Elements:
// -
//
// Detailed Comments:
// This datastructure maps the roles to the hosts where the rules can be executed on.
//
///////////////////////////////////////////////////////////
type record of EPTF_PtcDeploymentEntry EPTF_PtcDeploymentEntryList;
///////////////////////////////////////////////////////////
// Type: EPTF_PTCD_CT
//
// Purpose:
// The component that implements the EPTF PTC Deployment feature
//
// Elements:
// v_PTCD_initialized - *boolean* - initialized flag to prevent miltiple execution of the init/cleanup functions
// v_roledatabase - <EPTF_PtcDeploymentEntryList> - the database for roles and hosts
//
// Detailed Comments:
// To use the EPTF PTC Deployment, this component should be created.
// This compontent make choices of host to deploy a role(testcase) on.
//
//
///////////////////////////////////////////////////////////
type component EPTF_PTCD_CT extends EPTF_Base_CT,EPTF_Logging_CT {
private var boolean v_PTCD_initialized := false;
private var EPTF_PtcDeploymentEntryList v_roledatabase;
private var EPTF_FloatList v_currentBurst := {}
// logging
private var integer v_PTCDeployment_loggingMaskId := c_EPTF_Logging_invalidMaskId;
}
///////////////////////////////////////////////////////////
// Constant: c_EPTF_PTCDeployment_loggingEventClasses
//
// Purpose:
// list of logging event class names used on the PTCD
//
// Detailed Comments:
// <EPTF_Logging_EventClassPrefixList> { "Warning", "Debug" }
///////////////////////////////////////////////////////////
const EPTF_Logging_EventClassPrefixList c_EPTF_PTCDeployment_loggingEventClasses := { "Warning", "Debug" };
///////////////////////////////////////////////////////////
// Constant: c_EPTF_PTCDeployment_loggingClassIdx_Warning
//
// Purpose:
// logging class index for Error
//
// Detailed Comments:
// *0*
///////////////////////////////////////////////////////////
const integer c_EPTF_PTCDeployment_loggingClassIdx_Warning := 0;
///////////////////////////////////////////////////////////
// Constant: c_EPTF_PTCDeployment_loggingClassIdx_Debug
//
// Purpose:
// logging class index for Error
//
// Detailed Comments:
// *1*
///////////////////////////////////////////////////////////
const integer c_EPTF_PTCDeployment_loggingClassIdx_Debug := 1;
}