Page 48 - Kaleidoscope Academic Conference Proceedings 2024
P. 48
2024 ITU Kaleidoscope Academic Conference
( , ) = ( , ) (4) Scenario 4: unique based comparison. The semantic of this
scenario is a rule to maintain uniqueness within a certain
⑷ratio extension. This extension takes one parameter to range, meaning that a specific field must be unique within a
perform oversubscription ratio conversion on the input defined range. For example, Formula (11) incorporates the
parameter, following the formula (5) referred to as the extension from Formula (4), used for uniqueness validation.
“Oversubscription Ratio Conversion Formula”:
For the rule:"The IPv4 address of the business network must adhere
( ) = ( ) (5) to the IPv4 format. If there are multiple IPv4 addresses for the bare
metal business network, please separate them with a semicolon, for
example: 1.1.1.1". Inspection formula (8) for the business network
⑸bizValSet extension. This extension takes one parameter (businessIp) field:
to obtain a business mapping list based on the input businessIp = ~/(\d|[1 − 9]\d|1\d{2}|2[0 − 4]\d|25[0
parameter, following the formula (6) referred to as the − 5])(\. (\d|[1 − 9]\d|1\d{2}|2[0
“Business Mapping List Retrieval Formula”: − 4]\d|25[0 − 5])){3} ∗/ (8)
( ) = ( ) (6) Case 1 – regular expression comparison
⑹ seqSomeContained extension. This extension takes two For the rule:"The CPU specification of the bare metal template <=
parameters to determine if the parameter x is included in the CPU quantity * cores per CPU * threads(2)". The bare metal template
sequence of parametery, following the formula (7) referred CPU specifications (bmformworkCpu), CPU quantity(cpuNums), and
to as the “Sequence Inclusion Formula”: the number of cores per CPU (nucNumPerCpu) must satisfy inspection
formula (9):
( , ) = ( , ) (7) bmformworkCpu ≤ (long(enum(cpuNums)) (9)
× nucNumPerCpu) × 2
2.1.3 Inspection model based on scenario division Case 2 – enum mapping comparison
Scenario 1: regular expression comparison. Rules that For the rule:"The run type for bare metal is enum, and the
require specific regular expressions are relatively easy to enumeration values should be selected from 0, 1, 2.". The resource
understand. This means that certain configuration attribute deployment status of bare metal (runType) must satisfy inspection
formula (10):
fields need to satisfy specific regular expressions; otherwise,
the content is considered invalid. Common examples include Y = isEnum(runType, "0,1,2") (10)
validation for IP addresses as shown in Case (1).
Case 3 – enum based comparison
Scenario 2: enum mapping comparison. Due to certain
reporting rules in IT Cloud, some fields need to be reported For the rule:"Bare metal servers with the same cluster must have
as enumeration values to control the reported values within unique management IPs.". Same POD implies a specific range,
where management IP is a detail field. Cluster (Pod), Management
a reasonable range. Therefore, rules need to be designed to IP (manageIp) must satisfy inspection formula (11):
perform condition comparisons after enumeration mapping. Y = isUnique(manageIp,"Pod") (11)
As in Case (2), the CPU quantity is not directly reported to
CMDB in numerical form but is reported based on an Case 4 – unique based comparison
enumeration mapping relationship. For example, the
"cpuNums" field is reported as 1, 2, 3, which actually
corresponds to the CPU numbers 4, 8, 16 cores. Therefore, For the rule:"Allocatable VCPU cores < CPU quantity * cores per
CPU * threads (2) * oversubscription ratio". Allocatable VPU cores
when validating these rules, they must undergo enumeration (vcpuNum), CPU quantity (cpuNums), cores per CPU
value conversion, transforming the reported values into (nucNumPerCpu), and oversubscription ratio (virtualizationRatio)
actual objective values before performing condition need to satisfy inspection formula (12):
comparisons. Formula (9) in this context incorporates the vcpuNum < long(enum(cpuNums)) × nucNumPerCpu (12)
extension of the enumeration mapping used in Formula (2). × 2 × ratio(virtualizationRatio)
Case 5 – conversion based comparison
Scenario 3: enum based comparison. This scenario is
related to Scenario 2 but has different application contexts.
Specifically, Scenario 2 focuses on subsequent inspection For the rule:"The image and the current operating system should
logic after mapping enumeration values. In contrast, this match.". The image (imageName) and operating system (OsType) need
scenario emphasizes checking whether the detail value is to satisfy the inspection formula (13):
within the enumeration range. Therefore, rules need to be set Y=seqSomeContained(getBizValSet(osType), (13)
to ensure that the values must be within the enumeration
range, as shown in Case (3). Formula (10) incorporates the Case 6 – business based comparison
extension from Formula (3), used for enumeration judgment, imageName)
where Y can take the values True or False. Scenario 5: conversion based comparison. This scenario is
quite special because, in the configuration data, some fields
– 4 –