KAFKA_OPTS: -Djava.security.auth.login.config=/etc/zookeeper/secrets/jaas/zk_server_jaas.conf -Dzookeeper.kerberos.removeHostFromPrincipal=true -Dzookeeper.kerberos.removeRealmFromPrincipal=true -Dzookeeper.authProvider.1=org.apache.zookeeper.server.auth.SASLAuthenticationProvider -Dzookeeper.requireClientAuthScheme=sasl
ZOOKEEPER_SERVER_ID: 1
volumes:
- - ./zk/zk_server_jaas.conf:/etc/zookeeper/secrets/jaas/zk_server_jaas.conf
+ - ./mr/zk/zk_server_jaas.conf:/etc/zookeeper/secrets/jaas/zk_server_jaas.conf
networks:
- default
# Reduced the number of partitions only to avoid the timeout error for the first subscribe call in slow environment
KAFKA_OFFSETS_TOPIC_NUM_PARTITIONS: 1
volumes:
- - ./kafka/zk_client_jaas.conf:/etc/kafka/secrets/jaas/zk_client_jaas.conf
+ - ./mr/kafka/zk_client_jaas.conf:/etc/kafka/secrets/jaas/zk_client_jaas.conf
networks:
- default
depends_on:
environment:
enableCadi: 'false'
volumes:
- - ./mr/MsgRtrApi.properties:/appl/dmaapMR1/bundleconfig/etc/appprops/MsgRtrApi.properties
- - ./mr/logback.xml:/appl/dmaapMR1/bundleconfig/etc/logback.xml
- - ./mr/cadi.properties:/appl/dmaapMR1/etc/cadi.properties
+ - ./mr/mr/MsgRtrApi.properties:/appl/dmaapMR1/bundleconfig/etc/appprops/MsgRtrApi.properties
+ - ./mr/mr/logback.xml:/appl/dmaapMR1/bundleconfig/etc/logback.xml
+ - ./mr/mr/cadi.properties:/appl/dmaapMR1/etc/cadi.properties
networks:
- default
depends_on:
- 8081:8081
- 8433:8433
volumes:
- - ./config/application_configuration.json:/opt/app/policy-agent/data/application_configuration.json:ro
+ - ./policy-service/config/application_configuration.json:/opt/app/policy-agent/data/application_configuration.json:ro
# For using own certs instead of the default ones (built into the container),
# place them in config/ directory, update the application-policyagent.yaml file, and uncomment the following lines
- # - ./config/keystore-policyagent.jks:/opt/app/policy-agent/etc/cert/keystore.jks:ro
- # - ./config/truststore-policyagent.jks:/opt/app/policy-agent/etc/cert/truststore.jks:ro
- # - ./config/application-policyagent.yaml:/opt/app/policy-agent/config/application.yaml:ro
+ # - ./policy-service/config/keystore-policyagent.jks:/opt/app/policy-agent/etc/cert/keystore.jks:ro
+ # - ./policy-service/config/truststore-policyagent.jks:/opt/app/policy-agent/etc/cert/truststore.jks:ro
+ # - ./policy-service/config/application-policyagent.yaml:/opt/app/policy-agent/config/application.yaml:ro
# For using own certs instead of the default ones (built into the container),
# place them in config/ directory, update the https-props-a1controller.properties file, and uncomment the following lines
#volumes:
- # - ./config/keystore-a1controller.jks:/etc/ssl/certs/java/keystore.jks:ro
- # - ./config/truststore-a1controller.jks:/etc/ssl/certs/java/truststore.jks:ro
- # - ./config/https-props-a1controller.properties:/opt/onap/sdnc/data/properties/https-props.properties:ro
+ # - ./sdnc/config/keystore-a1controller.jks:/etc/ssl/certs/java/keystore.jks:ro
+ # - ./sdnc/config/truststore-a1controller.jks:/etc/ssl/certs/java/truststore.jks:ro
+ # - ./sdnc/config/https-props-a1controller.properties:/opt/onap/sdnc/data/properties/https-props.properties:ro
logging:
driver: "json-file"
options:
"produces": ["application/json"],
"operationId": "putEiTypeUsingPUT",
"responses": {
- "200": {
- "schema": {"type": "object"},
- "description": "OK"
- },
+ "200": {"description": "OK"},
"201": {"description": "Created"},
+ "400": {
+ "schema": {"$ref": "#/definitions/ProblemDetails"},
+ "description": "Bad request"
+ },
"401": {"description": "Unauthorized"},
"403": {"description": "Forbidden"},
"404": {"description": "Not Found"}
"description": "Information for an EI type",
"type": "object",
"title": "producer_ei_type_info",
+ "required": ["ei_job_data_schema"],
"properties": {"ei_job_data_schema": {
"description": "Json schema for the job data",
"type": "object"
responses:
200:
description: OK
- content:
- application/json:
- schema:
- type: object
+ content: {}
201:
description: Created
content: {}
+ 400:
+ description: Bad request
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/ProblemDetails'
401:
description: Unauthorized
content: {}
type: object
producer_ei_type_info:
title: producer_ei_type_info
+ required:
+ - ei_job_data_schema
type: object
properties:
ei_job_data_schema:
}
@PutMapping(path = ProducerConsts.API_ROOT + "/eitypes/{eiTypeId}", produces = MediaType.APPLICATION_JSON_VALUE)
+ @ApiResponses(
+ value = { //
+ @ApiResponse(code = 200, message = "OK", response = VoidResponse.class), @ApiResponse(
+ code = 400, //
+ message = "Bad request",
+ response = ErrorResponse.ErrorInfo.class)})
@ApiOperation(value = "Individual EI type", notes = "")
public ResponseEntity<Object> putEiType( //
@PathVariable("eiTypeId") String eiTypeId, @RequestBody ProducerEiTypeInfo registrationInfo) {
EiType previousDefinition = this.eiTypes.get(eiTypeId);
+ if (registrationInfo.jobDataSchema == null) {
+ return ErrorResponse.create("No schema provided", HttpStatus.BAD_REQUEST);
+ }
this.eiTypes.put(new EiType(eiTypeId, registrationInfo.jobDataSchema));
return new ResponseEntity<>(previousDefinition == null ? HttpStatus.CREATED : HttpStatus.OK);
}
@ApiModel(value = "producer_ei_type_info", description = "Information for an EI type")
public class ProducerEiTypeInfo {
- @ApiModelProperty(value = "Json schema for the job data")
+ @ApiModelProperty(value = "Json schema for the job data", required = true)
@SerializedName("ei_job_data_schema")
- @JsonProperty("ei_job_data_schema")
+ @JsonProperty(value = "ei_job_data_schema", required = true)
public Object jobDataSchema;
public ProducerEiTypeInfo(Object jobDataSchema) {
assertThat(putEiType(EI_TYPE_ID)).isEqualTo(HttpStatus.OK);
}
+ @Test
+ void testPutEiType_noSchema() {
+ String url = ProducerConsts.API_ROOT + "/eitypes/" + EI_TYPE_ID;
+ String body = "{}";
+ testErrorCode(restClient().put(url, body), HttpStatus.BAD_REQUEST, "No schema provided");
+ }
+
@Test
void testGetEiType() throws Exception {
putEiProducerWithOneType(EI_PRODUCER_ID, "test");
assertThat(request.id).isEqualTo("jobId");
}
+ @Test
+ void testPutEiProducer_noType() throws Exception {
+ String url = ProducerConsts.API_ROOT + "/eiproducers/eiProducerId";
+ String body = gson.toJson(producerEiRegistratioInfo(EI_TYPE_ID));
+ testErrorCode(restClient().put(url, body), HttpStatus.NOT_FOUND, "EI type not found");
+ }
+
@Test
void testPutProducerAndEiJob() throws Exception {
this.putEiType(EI_TYPE_ID);