Open Kilda Java Documentation
Common.java
Go to the documentation of this file.
1
/* Copyright 2017 Telstra Open Source
2
*
3
* Licensed under the Apache License, Version 2.0 (the "License");
4
* you may not use this file except in compliance with the License.
5
* You may obtain a copy of the License at
6
*
7
* http://www.apache.org/licenses/LICENSE-2.0
8
*
9
* Unless required by applicable law or agreed to in writing, software
10
* distributed under the License is distributed on an "AS IS" BASIS,
11
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
* See the License for the specific language governing permissions and
13
* limitations under the License.
14
*/
15
16
package
org.openkilda.atdd;
17
18
import
cucumber.api.java.en.Given;
19
import
org
.
openkilda
.
flow
.
FlowUtils
;
20
import
org
.
openkilda
.
messaging
.
payload
.
FeatureTogglePayload
;
21
import
org
.
openkilda
.
topo
.
TestUtils
;
22
26
public
class
Common
{
27
31
public
static
Common
latest
;
32
33
public
String
kildaHost
=
"localhost"
;
34
35
36
public
Common
() {
37
latest
=
this
;
38
}
39
40
public
Common
setHost
(String
kildaHost
) {
41
this.kildaHost =
kildaHost
;
42
return
this
;
43
}
44
48
@Given(
"^a clean controller$"
)
49
public
void
a_clean_controller
() throws Throwable {
50
// Write code here that turns the phrase above into concrete actions
51
setHost
(System.getProperty(
"kilda.host"
,
kildaHost
));
52
53
TestUtils
.
clearEverything
(
kildaHost
);
54
}
55
59
@Given(
"^a clean flow topology$"
)
60
public
void
a_clean_flow_topology
() throws Throwable {
61
FlowUtils
.
cleanupFlows
();
62
63
FeatureTogglePayload
features =
new
FeatureTogglePayload
(
true
,
true
,
true
,
true
,
true
,
true
,
64
true
);
65
FlowUtils
.
updateFeaturesStatus
(features);
66
}
67
}
org.openkilda.messaging.payload
Definition:
FeatureTogglePayload.java:16
org.openkilda.topo.TestUtils
Definition:
TestUtils.java:40
org.openkilda.messaging
Definition:
BaseMessage.java:16
org.openkilda.flow
Definition:
FlowOperationException.java:1
org.openkilda.atdd.Common.Common
Common()
Definition:
Common.java:36
org
org.openkilda.flow.FlowUtils.cleanupFlows
static void cleanupFlows()
Definition:
FlowUtils.java:531
org.openkilda.atdd.Common.a_clean_controller
void a_clean_controller()
Definition:
Common.java:49
org.openkilda.topo
org.openkilda.flow.FlowUtils
Definition:
FlowUtils.java:74
org.openkilda.atdd.Common.a_clean_flow_topology
void a_clean_flow_topology()
Definition:
Common.java:60
org.openkilda.flow.FlowUtils.updateFeaturesStatus
static FeatureTogglePayload updateFeaturesStatus(FeatureTogglePayload desired)
Definition:
FlowUtils.java:621
org.openkilda.messaging.payload.FeatureTogglePayload
Definition:
FeatureTogglePayload.java:22
org.openkilda
org.openkilda.topo.TestUtils.clearEverything
static void clearEverything()
Definition:
TestUtils.java:178
org.openkilda.atdd.Common
Definition:
Common.java:26
org.openkilda.atdd.Common.kildaHost
String kildaHost
Definition:
Common.java:33
org.openkilda.atdd.Common.latest
static Common latest
Definition:
Common.java:31
org.openkilda.atdd.Common.setHost
Common setHost(String kildaHost)
Definition:
Common.java:40
open-kilda-develop
services
src
atdd
src
test
java
org
openkilda
atdd
Common.java
Generated by
1.8.14