2 * ============LICENSE_START======================================================================
3 * Copyright (C) 2023 Nordix Foundation. All rights reserved.
4 * Copyright (C) 2023 OpenInfra Foundation Europe. All rights reserved.
5 * ===============================================================================================
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 * ============LICENSE_END========================================================================
20 package com.oransc.rappmanager.models.rapp;
22 import com.oransc.rappmanager.models.rappinstance.RappACMInstance;
23 import com.oransc.rappmanager.models.rappinstance.RappDMEInstance;
24 import com.oransc.rappmanager.models.rappinstance.RappInstance;
27 public class RappResourceBuilder {
29 public RappResources getResources() {
30 RappResources rappResources = new RappResources();
31 RappResources.ACMResources acmResources = new RappResources.ACMResources("compositions", Set.of());
32 acmResources.setCompositionInstances(Set.of("kserve-instance"));
33 rappResources.setAcm(acmResources);
34 RappResources.DMEResources dmeResources =
35 new RappResources.DMEResources(Set.of("json-file-data-from-filestore"),
36 Set.of("xml-file-data-from-filestore"), Set.of("json-file-data-producer"),
37 Set.of("json-file-consumer"));
38 rappResources.setDme(dmeResources);
42 public RappInstance getRappInstance() {
43 RappInstance rappInstance = new RappInstance();
44 RappACMInstance rappACMInstance = new RappACMInstance();
45 rappACMInstance.setInstance("kserve-instance");
46 rappInstance.setAcm(rappACMInstance);
47 RappDMEInstance rappDMEInstance = new RappDMEInstance();
48 rappDMEInstance.setInfoTypeConsumer("json-file-data-from-filestore");
49 rappDMEInstance.setInfoTypesProducer(Set.of("xml-file-data-from-filestore"));
50 rappDMEInstance.setInfoProducer("json-file-data-producer");
51 rappDMEInstance.setInfoConsumer("json-file-consumer");
52 rappInstance.setDme(rappDMEInstance);