summaryrefslogtreecommitdiffstats
path: root/vid-webpack-master/cypress/integration/iFrames/vnf.update.e2e.ts
diff options
context:
space:
mode:
Diffstat (limited to 'vid-webpack-master/cypress/integration/iFrames/vnf.update.e2e.ts')
-rw-r--r--vid-webpack-master/cypress/integration/iFrames/vnf.update.e2e.ts94
1 files changed, 94 insertions, 0 deletions
diff --git a/vid-webpack-master/cypress/integration/iFrames/vnf.update.e2e.ts b/vid-webpack-master/cypress/integration/iFrames/vnf.update.e2e.ts
new file mode 100644
index 000000000..4d2d7dbaf
--- /dev/null
+++ b/vid-webpack-master/cypress/integration/iFrames/vnf.update.e2e.ts
@@ -0,0 +1,94 @@
+///<reference path="../../../node_modules/cypress/types/index.d.ts"/>
+import {JsonBuilder} from '../../support/jsonBuilders/jsonBuilder';
+import {ServiceModel} from '../../support/jsonBuilders/models/service.model';
+import {AsyncInstantiationModel} from "../../support/jsonBuilders/models/asyncInstantiation.model";
+
+describe('Delete vnf instance', function () {
+ let jsonBuilderAndMock: JsonBuilder<ServiceModel> = new JsonBuilder<ServiceModel>();
+
+ let jsonBuilderInstantiationBuilder: JsonBuilder<AsyncInstantiationModel> = new JsonBuilder<AsyncInstantiationModel>();
+
+ beforeEach(() => {
+ cy.window().then((win) => {
+ win.sessionStorage.clear();
+ cy.preventErrorsOnLoading();
+ cy.initAAIMock();
+ cy.initVidMock();
+ cy.initZones();
+ cy.permissionVidMock();
+ cy.login();
+ });
+ });
+
+ afterEach(() => {
+ cy.screenshot();
+ });
+
+ it(`Update vnf - add 1 delete 1`, function () {
+ const SUBSCRIBER_ID: string = "e433710f-9217-458d-a79d-1c7aff376d89";
+ const SERVICE_TYPE: string = "TYLER SILVIA";
+ const SERVICE_INSTANCE_ID: string = "f8791436-8d55-4fde-b4d5-72dd2cf13cfb";
+ const SERVICE_MODEL_ID: string = '6b528779-44a3-4472-bdff-9cd15ec93450';
+
+ cy.server().route({
+ url: Cypress.config('baseUrl') + '/asyncInstantiation/bulk',
+ method: 'POST',
+ status: 200,
+ response: "[]",
+ }).as("expectedPostAsyncInstantiation");
+
+ cy.readFile('/cypress/support/jsonBuilders/mocks/jsons/serviceModels/ecompNamingFalseModel.json').then((res) => {
+ res.service.vidNotions.instantiationType = 'ALaCarte';
+ jsonBuilderAndMock.basicJson(
+ res,
+ Cypress.config('baseUrl') + "/rest/models/services/6b528779-44a3-4472-bdff-9cd15ec93450",
+ 200,
+ 0,
+ "ecompNamingFalseModel",
+ )
+ });
+
+ cy.readFile('../vid-automation/src/test/resources/aaiGetInstanceTopology/getServiceInstanceTopologyResult.json').then((res) => {
+ res.networks = {};
+ res.isALaCarte = true;
+ res.instanceId = "f8791436-8d55-4fde-b4d5-72dd2cf13cfb";
+
+ const vnf = res.vnfs['2017-488_PASQUALE-vPE 0'];
+ vnf.instanceId = "VNF_INSTANCE_ID";
+ vnf.vfModules['2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0']['2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_base_vPE_BV..module-0uvfot'].instanceId = "VF_MODULE_BASE_INSTANCE_ID";
+ vnf.vfModules['2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_vRE_BV..module-1']['2017488_pasqualevpe0..2017488PasqualeVpe..PASQUALE_vRE_BV..module-1fshmc'].instanceId = "VF_MODULE_INSTANCE_ID";
+
+ jsonBuilderAndMock.basicJson(
+ res,
+ Cypress.config('baseUrl') + "/aai_get_service_instance_topology/e433710f-9217-458d-a79d-1c7aff376d89/TYLER SILVIA/f8791436-8d55-4fde-b4d5-72dd2cf13cfb",
+ 200, 0,
+ "initServiceInstanceTopology",
+ )
+ });
+
+ cy.openIframe(`app/ui/#/servicePlanning/EDIT?serviceModelId=${SERVICE_MODEL_ID}&subscriberId=${SUBSCRIBER_ID}&serviceType=${SERVICE_TYPE}&serviceInstanceId=${SERVICE_INSTANCE_ID}`);
+
+ // add a vnf on update mode
+ cy.drawingBoardPressAddButtonByElementName('node-2017-388_PASQUALE-vPE 0').click({force: true});
+ cy.selectDropdownOptionByText('rollback', 'Rollback');
+ cy.fillVnfPopup();
+
+ // delete VNF
+ cy.drawingBoardTreeOpenContextMenuByElementDataTestId('node-69e09f68-8b63-4cc9-b9ff-860960b5db09-2017-488_PASQUALE-vPE 0', 0)
+ .drawingBoardTreeClickOnContextMenuOptionByName('Delete');
+
+ // update service
+ cy.getDrawingBoardDeployBtn().click();
+
+ cy.getReduxState().then((state) => {
+ const vnf = state.service.serviceInstance[SERVICE_MODEL_ID].vnfs["2017-388_PASQUALE-vPE 0_1"];
+ cy.wait('@expectedPostAsyncInstantiation').then(xhr => {
+ cy.readFile('../vid-automation/src/test/resources/asyncInstantiation/vidRequestDelete1Create1Vnf.json').then((expectedResult) => {
+ expectedResult.vnfs["2017-388_PASQUALE-vPE 0_1"].trackById = vnf.trackById;
+ cy.deepCompare(xhr.request.body, expectedResult);
+ });
+ });
+ });
+ });
+
+});
ng */ .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 */ }
# Copyright © 2017 Amdocs, Bell Canada
# Modifications Copyright © 2018-2019 AT&T
#
# 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.

#################################################################
# Global configuration defaults.
#################################################################
global: # global defaults
  nodePortPrefix: 302
  readinessRepository: oomk8s
  readinessImage: readiness-check:2.0.0
  loggingRepository: docker.elastic.co
  loggingImage: beats/filebeat:5.5.0

subChartsOnly:
  enabled: true

flavor: small

# application image
repository: nexus3.onap.org:10001
image: onap/clamp-frontend:4.1.3
pullPolicy: Always

# flag to enable debugging - application support required
debugEnabled: false

#################################################################
# Application configuration defaults.
#################################################################
config:
  log:
    logstashServiceName: log-ls
    logstashPort: 5044
  dataRootDir: /dockerdata-nfs

# default number of instances
replicaCount: 1

nodeSelector: {}

affinity: {}

# probe configuration parameters
liveness:
  initialDelaySeconds: 120
  periodSeconds: 10
  # necessary to disable liveness probe when setting breakpoints
  # in debugger so K8s doesn't restart unresponsive container
  enabled: true

readiness:
  initialDelaySeconds: 10
  periodSeconds: 10


service:
  type: NodePort
  name: clamp-external
  portName: clamp-external
  internalPort: 443
  nodePort: 58

  # as of 20180904 port 58 is reserved for clamp from log/logdemonode
  # see https://wiki.onap.org/display/DW/OOM+NodePort+List

  type2: ClusterIP
  name2: clamp
  portName2: clamp-internal
  internalPort2: 443
  externalPort2: 8443

ingress:
  enabled: false
  service:
    - baseaddr: "clamp"
      name: "clamp"
      port: 443
  config:
    ssl: "redirect"

#resources: {}
  # We usually recommend not to specify default resources and to leave this as a conscious
  # choice for the user. This also increases chances charts run on environments with little
  # resources, such as Minikube. If you do want to specify resources, uncomment the following
  # lines, adjust them as necessary, and remove the curly braces after 'resources:'.
  #
  # Example:
  # Configure resource requests and limits
  # ref: http://kubernetes.io/docs/user-guide/compute-resources/
  # Minimum memory for development is 2 CPU cores and 4GB memory
  # Minimum memory for production is 4 CPU cores and 8GB memory
resources:
  small:
    limits:
      cpu: 1
      memory: 200Mi
    requests:
      cpu: 10m
      memory: 50Mi
  large:
    limits:
      cpu: 1
      memory: 500Mi
    requests:
      cpu: 10m
      memory: 50Mi
  unlimited: {}