Skip to content
Snippets Groups Projects
Commit 44b561a0 authored by trantzas's avatar trantzas
Browse files

fix for #1:

- Updates on the Metrico Resource Specification creation
parent 80cbd55a
No related branches found
No related tags found
2 merge requests!5MR for Release 2024Q4,!3Updating initially created METRICO Resource Specification
......@@ -42,12 +42,12 @@ public class MetricoService extends RouteBuilder {
private static final Logger logger = LoggerFactory.getLogger(JobService.class);
public static final String OSL_METRICO_RSPEC_NAME = "metrico.osl.etsi.org";
public static final String OSL_METRICO_RSPEC_NAME = "METRICO_Resource_Specification";
public static final String OSL_METRICO_RSPEC_VERSION = "0.0.1";
public static final String OSL_METRICO_RSPEC_CATEGORY = "metrico.osl.etsi.org/v1";
public static final String OSL_METRICO_RESOURCE_CATEGORY = "metrico.osl.etsi.org/v1";
public static final String OSL_METRICO_RSPEC_TYPE = "LogicalResourceSpecification";
public static final String OSL_METRICO_RSPEC_DESCRIPTION = "This Specification is used to describe a generic KubernetesCRD";
public static final String OSL_METRICO_RSPEC_DESCRIPTION = "This Specification is used to describe a generic METRICO job resource";
@Value("${PM_MEASUREMENT_COLLECTION_JOB_UPDATE}")
private String PM_MEASUREMENT_COLLECTION_JOB_UPDATE = "";
......@@ -106,21 +106,21 @@ public class MetricoService extends RouteBuilder {
ResourceSpecificationCreate rsc = new ResourceSpecificationCreate();
rsc.setName( "METRICO_RESOURCE_SPECIFICATION" );
rsc.setName( OSL_METRICO_RSPEC_NAME );
rsc.setCategory( OSL_METRICO_RSPEC_CATEGORY );
rsc.setVersion( OSL_METRICO_RSPEC_VERSION );
rsc.setDescription( OSL_METRICO_RSPEC_DESCRIPTION );
rsc.setType( OSL_METRICO_RSPEC_TYPE );
rsc.setLifecycleStatus( ELifecycle.ACTIVE.getValue() );
rsc.addResourceSpecificationCharacteristicItemShort( "_MT_CHARACTERISTIC_NAME", "", EValueType.TEXT.getValue(), "Used for providing the characteristic of service _MT_SERVICEUUID to update", false);
rsc.addResourceSpecificationCharacteristicItemShort( "_MT_SERVICEUUID", "", EValueType.TEXT.getValue(), "Used for providing the id of the service to update", false);
rsc.addResourceSpecificationCharacteristicItemShort( "_MT_END_TIME", "", EValueType.TEXT.getValue(), "Used for providing the end time", false);
rsc.addResourceSpecificationCharacteristicItemShort( "_MT_START_TIME", "", EValueType.TEXT.getValue(), "Used for providing start time", false);
rsc.addResourceSpecificationCharacteristicItemShort( "_MT_RECURRING_INTERVAL", "G_1MN", EValueType.TEXT.getValue(), "Used for providing the polling interval of prometheus", false);
rsc.addResourceSpecificationCharacteristicItemShort( "_MT_TYPE", "PROMETHEUS", EValueType.TEXT.getValue(), "Used for providing ", false);
rsc.addResourceSpecificationCharacteristicItemShort( "_MT_QUERY", "", EValueType.TEXT.getValue(), "Used for providing the query towards prometheus", false);
rsc.addResourceSpecificationCharacteristicItemShort( "_MT_URL", "", EValueType.TEXT.getValue(), "Used for providing the prometheus URL", false);
rsc.addResourceSpecificationCharacteristicItemShort( "_MT_CHARACTERISTIC_NAME", "", EValueType.TEXT.getValue(), "The characteristic of the service with id _MT_SERVICEUUID that will be updated with monitoring metrics", false);
rsc.addResourceSpecificationCharacteristicItemShort( "_MT_SERVICEUUID", "", EValueType.TEXT.getValue(), "The id of the service to update", false);
rsc.addResourceSpecificationCharacteristicItemShort( "_MT_END_TIME", "", EValueType.TEXT.getValue(), "The ending time of the monitoring job", false);
rsc.addResourceSpecificationCharacteristicItemShort( "_MT_START_TIME", "", EValueType.TEXT.getValue(), "The starting time of the monitoring job", false);
rsc.addResourceSpecificationCharacteristicItemShort( "_MT_RECURRING_INTERVAL", "G_1MN", EValueType.TEXT.getValue(), "The polling interval of the monitoring source", false);
rsc.addResourceSpecificationCharacteristicItemShort( "_MT_TYPE", "PROMETHEUS", EValueType.TEXT.getValue(), "The monitoring source type", false);
rsc.addResourceSpecificationCharacteristicItemShort( "_MT_QUERY", "", EValueType.TEXT.getValue(), "The query towards the monitoring source (e.g. query=gnb_service_state)", false);
rsc.addResourceSpecificationCharacteristicItemShort( "_MT_URL", "", EValueType.TEXT.getValue(), "The monitoring source URL (e.g. https://prom.osl.etsi.org:9090)", false);
prometheusQueries.createOrUpdateResourceSpecByNameCategoryVersion(rsc);
......
......@@ -34,13 +34,13 @@ public class MetricoServiceTest {
DataAccessEndpoint dae = new DataAccessEndpoint();
dae.setApiType("PROMETHEUS");
dae.setUri(new URI("http://150.140.195.195:9090/api/v1/query?query=netdata_app_disk_physical_io_KiB_persec_average"));
dae.setUri(new URI("http://"));
dae.setUuid("123e4567-e89b-12d3-a456-426614174011");
List<DataAccessEndpoint> daeList = new ArrayList<>();
daeList.add(dae);
mcj.setDataAccessEndpoint(daeList);
//job.setDataAccessEndPointUri(new URI("http://150.140.195.195:9090/api/v1/query?query=up"));
//job.setDataAccessEndPointUri(new URI("http://"));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment