aboutsummaryrefslogtreecommitdiffstats
path: root/vid-app-common/src/test/resources/WEB-INF/jsp/testMso.jsp
blob: 71130899694b803481268f74543d087eb1a868db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
<link rel="stylesheet" type="text/css" href="app/vid/test/testMso.css" />
<script src="app/vid/test/testMso.js"></script>

<link rel="stylesheet" type="text/css" href="app/vid/styles/dialogs.css" />

<script src="app/vid/scripts/controller/msoCommitController.js"></script>
<script src="app/vid/scripts/controller/detailsDialogController.js"></script>
<script src="app/vid/scripts/controller/statusDialogController.js"></script>

<script src="app/vid/scripts/services/dataService.js"></script>
<script src="app/vid/scripts/services/detailsService.js"></script>
<script src="app/vid/scripts/services/statusService.js"></script>
<script src="app/vid/scripts/services/componentService.js"></script>
<script src="app/vid/scripts/services/propertyService.js"></script>
<script src="app/vid/scripts/services/msoService.js"></script>
<script src="app/vid/scripts/services/utilityService.js"></script>

<script src="app/vid/scripts/directives/extensionsDirective.js"></script>
<script src="app/vid/scripts/directives/parameterBlockDirective.js"></script>
<script src="app/vid/scripts/directives/popupWindowDirective.js"></script>
<script src="app/vid/scripts/directives/progressBarDirective.js"></script>

<script src="app/vid/scripts/constants/componentConstants.js"></script>
<script src="app/vid/scripts/constants/fieldConstants.js"></script>
<script src="app/vid/scripts/constants/parameterConstants.js"></script>

<!--
	Read configuration properties from server-side properties settings and
	pass to the test controller via the ng-include onload event.

	Consider / investigate replacing this approach with an alternative
	REST / Angular mechanism.
-->
<%@ page import="org.onap.vid.mso.*"%>
<%@ page import="org.openecomp.portalsdk.core.util.SystemProperties"%>
<%
	String properties = "{msoMaxPolls:" + SystemProperties.getProperty(MsoProperties.MSO_MAX_POLLS)
			+ ",msoMaxPollingIntervalMsec:"
			+ SystemProperties.getProperty(MsoProperties.MSO_POLLING_INTERVAL_MSECS) + "}";
%>

<div ng-controller="testController" ng-init="init(<%=properties%>);"
	ng-cloak>
	<div popup-window class="popupContents" ngx-show="{{popup.isVisible}}"
		ng-cloak>
		<div ng-include="'app/vid/scripts/view-models/msoCommit.htm'"
			onload="autoStartCommitTest();"></div>
		<div ng-include="'app/vid/scripts/view-models/detailsDialog.htm'"
			onload="autoStartQueryTest();"></div>
	</div>

	<h1 class="heading2">
		<center>Various MSO Tests</center>
	</h1>
	<div>
		<input type="checkbox" ng-change="testMsoModeChanged();"
			ng-model="isTestMsoMode"></input> <span>Use test MSO
			controller</span>
	</div>
	<div>
		<h3>These actions are expected to return successfully.</h3>
		<button type="button" ng-click="queryServiceInstance();" att-button
			btn-type="primary" size="small">Query Service Instance</button>
		<button type="button" ng-click="createServiceInstance();" att-button
			btn-type="primary" size="small">Create Service Instance</button>
		<button type="button" ng-click="deleteServiceInstance();" att-button
			btn-type="primary" size="small">Delete Service Instance</button>
		<button type="button" ng-click="createNetworkInstance();" att-button
			btn-type="primary" size="small">Create Network Instance</button>
		<button type="button" ng-click="deleteNetworkInstance();" att-button
			btn-type="primary" size="small">Delete Network Instance</button>
		<button type="button" ng-click="createVNFInstance();" att-button
			btn-type="primary" size="small">Create VNF Instance</button>
		<button type="button" ng-click="deleteVNFInstance();" att-button
			btn-type="primary" size="small">Delete VNF Instance</button>
		<button type="button" ng-click="createVolumeGroupInstance();"
			att-button btn-type="primary" size="small">Create Volume
			Group</button>
		<button type="button" ng-click="deleteVolumeGroupInstance();"
			att-button btn-type="primary" size="small">Delete Volume
			Group</button>
		<button type="button" ng-click="createVFModuleInstance();" att-button
			btn-type="primary" size="small">Create VF Module</button>
		<button type="button" ng-click="deleteVFModuleInstance();" att-button
			btn-type="primary" size="small">Delete VF Module</button>
	</div>
	<hr />
	<h3>These actions are expected to generate errors. These tests assume the above
		"Use test MSO controller" checkbox is checked. All tests are base on the Create Service
		Instance transaction.</h3>
	<ol>
		<li>
			<button type="button"
				ng-click="generateError('ERROR_POLICY_EXCEPTION');" att-button
				btn-type="primary" size="small">Policy Exception</button> <span>Initial
				response contains policy exception</span>
		</li>
		<li>
			<button type="button"
				ng-click="generateError('ERROR_SERVICE_EXCEPTION');" att-button
				btn-type="primary" size="small">Service Exception</button> <span>Initial
				response contains service exception</span>
		</li>
		<li>
			<button type="button" ng-click="generateError('ERROR_POLL_FAILURE');"
				att-button btn-type="primary" size="small">Poll Failure</button> <span>Subsequent
				getOrchestrationRequest poll response contains MSO failure condition</span>
		</li>
		<li>
			<button type="button"
				ng-click="generateError('ERROR_INVALID_FIELD_INITIAL');" att-button
				btn-type="primary" size="small">Initial Invalid</button> <span>Initial
				response contains invalid data field</span>
		</li>
		<li>
			<button type="button"
				ng-click="generateError('ERROR_INVALID_FIELD_POLL');" att-button
				btn-type="primary" size="small">Poll Invalid</button> <span>Subsequent
				getOrchestrationRequest poll response contains invalid data field</span>
		</li>
		<li>
			<button type="button"
				ng-click="generateError('ERROR_GENERAL_SERVER_EXCEPTION');"
				att-button btn-type="primary" size="small">Server Exception</button>
			<span>VID controller code generates general exception</span>
		</li>
		<li>
			<button type="button" ng-click="generateError('ERROR_MAX_POLLS');"
				att-button btn-type="primary" size="small">Maximum Polls</button> <span>Maximum
				poll attempts exceeded</span>
		</li>
		<li>
			<button type="button"
				ng-click="generateError('ERROR_SERVER_TIMEOUT_INITIAL');" att-button
				btn-type="primary" size="small">Initial Timeout</button> <span>Timeout
				on initial response</span>
		</li>
		<li>
			<button type="button"
				ng-click="generateError('ERROR_SERVER_TIMEOUT_POLL');" att-button
				btn-type="primary" size="small">Poll Timeout</button> <span>Timeout
				on subsequent getOrchestrationRequest poll response</span>
		</li>
		<li>
			<button type="button" ng-click="generateInvalidUrl404();" att-button
				btn-type="primary" size="small">Invalid URL (404)</button> <span>GUI
				front-end specifies invalid URL - HTTP 404 response expected</span>
		</li>
		<li>
			<button type="button" ng-click="generateInvalidUrl405();" att-button
				btn-type="primary" size="small">Invalid URL (405)</button> <span>GUI
				front-end specifies invalid URL - HTTP 405 response expected</span>
		</li>
	</ol>

</div>
<!--  Temporary solution for footer overlapping the men after talking to EComp SDK developer on 06/16/2016 -->

<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>