summaryrefslogtreecommitdiffstats
path: root/models-interactions/model-actors/actor.vfc/src/test
diff options
context:
space:
mode:
authorpramod.jamkhedkar <pramod@research.att.com>2019-11-13 13:21:16 -0500
committerpramod.jamkhedkar <pramod@research.att.com>2019-11-13 15:41:00 -0500
commit6de5a0c9e2acf3a799f53c9fedf8a40861b6ddbe (patch)
tree8acb76dd6de88cef955ce0914046d072c3a6d1a0 /models-interactions/model-actors/actor.vfc/src/test
parentc34a4b6b2e111462cde7f5663b8fbbc4ad86fc7e (diff)
Removing Named Query.
Removing all the related files and necessary modifications for removing named query. The code now only supports Custom Query Issue-ID: POLICY-2125 Change-Id: Ifa5ccb74142aa424359c0dea85b90bbcf70147cb Signed-off-by: pramod.jamkhedkar <pramod@research.att.com>
Diffstat (limited to 'models-interactions/model-actors/actor.vfc/src/test')
-rw-r--r--models-interactions/model-actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/VfcActorServiceProviderTest.java49
1 files changed, 0 insertions, 49 deletions
diff --git a/models-interactions/model-actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/VfcActorServiceProviderTest.java b/models-interactions/model-actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/VfcActorServiceProviderTest.java
index 300cd29f0..db224b065 100644
--- a/models-interactions/model-actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/VfcActorServiceProviderTest.java
+++ b/models-interactions/model-actors/actor.vfc/src/test/java/org/onap/policy/controlloop/actor/vfc/VfcActorServiceProviderTest.java
@@ -35,7 +35,6 @@ import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.onap.policy.aai.AaiCqResponse;
-import org.onap.policy.aai.AaiGetVnfResponse;
import org.onap.policy.common.endpoints.http.server.HttpServletServerFactoryInstance;
import org.onap.policy.controlloop.ControlLoopOperation;
import org.onap.policy.controlloop.VirtualControlLoopEvent;
@@ -45,7 +44,6 @@ import org.onap.policy.vfc.VfcRequest;
public class VfcActorServiceProviderTest {
- private static final String LOCAL_URL = "http://localhost:6666";
private static final String DOROTHY_GALE_1939 = "dorothy.gale.1939";
private static final String CQ_RESPONSE_JSON = "aai/AaiCqResponse.json";
private static final String RESTART = "Restart";
@@ -65,53 +63,6 @@ public class VfcActorServiceProviderTest {
}
@Test
- public void testConstructRequest() {
- VirtualControlLoopEvent onset = new VirtualControlLoopEvent();
- ControlLoopOperation operation = new ControlLoopOperation();
-
- Policy policy = new Policy();
- policy.setRecipe("GoToOz");
-
- assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null, null, null, null));
-
- onset.getAai().put("generic-vnf.vnf-id", DOROTHY_GALE_1939);
- assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null, null, null, null));
-
- assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null, LOCAL_URL,
- "AAI", "AAI"));
-
- UUID requestId = UUID.randomUUID();
- onset.setRequestId(requestId);
- assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null, LOCAL_URL,
- "AAI", "AAI"));
-
- onset.getAai().put("generic-vnf.vnf-name", "Dorothy");
- assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null, LOCAL_URL,
- "AAI", null));
-
- assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null, LOCAL_URL,
- "AAI", "AAI"));
-
- onset.getAai().put("service-instance.service-instance-id", "");
- assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, null, LOCAL_URL,
- "AAI", "AAI"));
-
- assertNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, new AaiGetVnfResponse(),
- LOCAL_URL, "AAI", "AAI"));
-
- policy.setRecipe(RESTART);
- assertNotNull(VfcActorServiceProvider.constructRequest(onset, operation, policy, new AaiGetVnfResponse(),
- LOCAL_URL, "AAI", "AAI"));
-
- VfcRequest request = VfcActorServiceProvider.constructRequest(onset, operation, policy, new AaiGetVnfResponse(),
- LOCAL_URL, "AAI", "AAI");
-
- assertEquals(requestId, Objects.requireNonNull(request).getRequestId());
- assertEquals(DOROTHY_GALE_1939, request.getHealRequest().getVnfInstanceId());
- assertEquals("restartvm", request.getHealRequest().getAdditionalParams().getAction());
- }
-
- @Test
public void testMethods() {
VfcActorServiceProvider sp = new VfcActorServiceProvider();
c0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
# ================================ LICENSE_START ==========================
# =========================================================================
#  Copyright (C) 2021 Nordix Foundation.
# =========================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# ================================= LICENSE_END ===========================

#################################################################
# Global Configuration Defaults.
#################################################################
global:
  nodePortPrefix: 302
  nodePortPrefixExt: 304

#################################################################
# Filebeat Configuration Defaults.
#################################################################
filebeatConfig:
  logstashServiceName: log-ls
  logstashPort: 5044

#################################################################
# InitContainer Images.
#################################################################
tlsImage: onap/org.onap.dcaegen2.deployments.tls-init-container:2.1.0
consulLoaderImage: onap/org.onap.dcaegen2.deployments.consul-loader-container:1.1.1
certPostProcessorImage: onap/org.onap.oom.platform.cert-service.oom-certservice-post-processor:2.4.0

#################################################################
# Application Configuration Defaults.
#################################################################
# Application Image
image: onap/org.onap.dcaegen2.collectors.datafile.datafile-app-server:1.6.1
pullPolicy: Always

# Log directory where logging sidecar should look for log files
# if absent, no sidecar will be deployed
logDirectory: /var/log/ONAP

# Directory where TLS certs should be stored
# if absent, no certs will be retrieved and stored
certDirectory: /opt/app/datafile/etc/cert

# TLS role -- set to true if microservice acts as server
# If true, an init container will retrieve a server cert
# and key from AAF and mount them in certDirectory.
tlsServer: true

# CMPv2 certificate
# It is used only when:
# - certDirectory is set
# - global cmpv2Enabled flag is set to true
# - flag useCmpv2Certificates is set to true
# Disabled by default
useCmpv2Certificates: false
certificates:
  - mountPath: /opt/app/datafile/etc/cert/external
    commonName: dcae-datafile-collector
    dnsNames:
      - dcae-datafile-collector
      - datafile-collector
      - datafile
    keystore:
      outputType:
        - p12
      passwordSecretRef:
        name: datafile-collector-cmpv2-keystore-password
        key: password
        create: true

# Dependencies
readinessCheck:
  wait_for:
    containers:
      - dcae-config-binding-service
      - aaf-cm
      - dmaap-bc
      - dmaap-provisioning-job

# Probe Configuration
readiness:
  initialDelaySeconds: 10
  periodSeconds: 15
  timeoutSeconds: 1
  path: /heartbeat
  scheme: HTTP
  port: 8100

# Service Configuration
service:
  type: ClusterIP
  name: datafile-collector
  ports:
    - name: https
      port: 8443
      plain_port: 8100
      port_protocol: http

# Environment variables
applicationEnv:
# Empty path forces DFC to use Consul configuration, which allows app runtime reconfiguration.
# It's a workaround because DMAAP specific env variables are not available in main container.
  CBS_CLIENT_CONFIG_PATH: ''

# Initial Application Configuration
applicationConfig:
  dmaap.certificateConfig.keyCert: /opt/app/datafile/etc/cert/cert.p12
  dmaap.certificateConfig.keyPasswordPath: /opt/app/datafile/etc/cert/p12.pass
  dmaap.certificateConfig.trustedCa: /opt/app/datafile/etc/cert/trust.jks
  dmaap.certificateConfig.trustedCaPasswordPath: /opt/app/datafile/etc/cert/trust.pass
  dmaap.dmaapConsumerConfiguration.consumerGroup: OpenDcae-c12
  dmaap.dmaapConsumerConfiguration.consumerId: C12
  dmaap.dmaapConsumerConfiguration.timeoutMs: -1
  dmaap.security.enableDmaapCertAuth: true
  dmaap.security.keyStorePasswordPath: /opt/app/datafile/etc/cert/jks.pass
  dmaap.security.keyStorePath: /opt/app/datafile/etc/cert/cert.jks
  dmaap.security.trustStorePasswordPath: /opt/app/datafile/etc/cert/trust.pass
  dmaap.security.trustStorePath: /opt/app/datafile/etc/cert/trust.jks
  service_calls: []
  sftp.security.strictHostKeyChecking: true
  streams_publishes:
    PM_MEAS_FILES:
      dmaap_info:
        publisher_id: ${DR_FILES_PUBLISHER_ID_0}
        location: loc00
        log_url: ${DR_LOG_URL_0}
        publish_url: ${DR_FILES_PUBLISHER_URL_0}
        username: ${DR_USERNAME_0}
        password: ${DR_PASSWORD_0}
      type: data_router
  streams_subscribes:
    dmaap_subscriber:
      dmaap_info:
        topic_url: "https://message-router:3905/events/unauthenticated.VES_NOTIFICATION_OUTPUT"
      type: message_router

# DataRouter Feed Configuration
drFeedConfig:
  - feedName: bulk_pm_feed
    owner: dcaecm
    feedVersion: 0.0
    asprClassification: unclassified
    feedDescription: DFC Feed Creation

# DataRouter Publisher Configuration
drPubConfig:
  - feedName: bulk_pm_feed
    dcaeLocationName: loc00

# ConfigMap Configuration for Feed, Dr_Publisher
volumes:
  - name: feeds-config
    path: /opt/app/config/feeds
  - name: drpub-config
    path: /opt/app/config/dr_pubs

# Resource Limit Flavor -By Default Using Small
flavor: small

# Segregation for Different Environment (Small and Large)
resources:
  small:
    limits:
      cpu: 1
      memory: 1Gi
    requests:
      cpu: 500m
      memory: 768Mi
  large:
    limits:
      cpu: 2
      memory: 2Gi
    requests:
      cpu: 1
      memory: 1Gi
  unlimited: {}