Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
DNI-Meta-Model
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Descartes Research
DNI-Meta-Model
Commits
62d4bea4
Commit
62d4bea4
authored
8 years ago
by
Maximilian Kiesner
Browse files
Options
Downloads
Patches
Plain Diff
Improve model checking
parent
4f2144bd
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
DNI3/etl/DNI-model-check.etl
+47
-0
47 additions, 0 deletions
DNI3/etl/DNI-model-check.etl
with
47 additions
and
0 deletions
DNI3/etl/DNI-model-check.etl
+
47
−
0
View file @
62d4bea4
...
...
@@ -133,6 +133,53 @@ pre check_sdn_controller_applications {
}
}
pre check_sdn_flow_rules {
var flow_rules = DNI.getAllOfKind("SdnFlowRule");
for (fr in flow_rules) {
if (fr.sdnSwitch.isUndefined()) {
throw "No sdnSwitch defined for flow rule!";
} else if (fr.flow.isUndefined()) {
throw "No flow defined for flow rule!";
} else if (fr.controllerApplication.isUndefined()) {
throw "No controllerApplication defined for flow rule!";
}
}
}
pre check_node {
var nodes = DNI.getAllOfKind("Node");
for (n in nodes) {
if (n.name.isUndefined()) {
throw "No name defined for node!";
} else if (n.interfaces.isUndefined() or n.interfaces.size() == 0) {
throw "No interfaces defined for node " + n.name;
} else if (n.sdntype.isUndefined()) {
throw "No sdntype defined for node " + n.name;
} else if (n.hosts.isDefined() and n.hosts.size() > 0 and n.isHostedOn.isDefined()) {
throw "Node " + n.name + " is hosted on a node and hosts other nodes at the same time!";
} else if (n.end.isUndefined() and n.intermediate.isUndefined()) {
throw "Node " + n.name + " is neither End nor Intermediate!";
} else if (n.sdntype.eClass.name <> "SDN" and n.end.isDefined() and n.intermediate.isDefined()) {
throw "Node " + n.name + " is End and Intermediate but not an SDN switch!";
} else if (n.isPhysical == "true" and n.isHostedOn.isDefined()) {
throw "Node " + n.name + " is physical but hosted on another node!";
} else if (n.isPhysical == "false" and n.isHostedOn.isUndefined()) {
throw "Node " + n.name + " is virtual but not hosted on another node!";
}
}
}
pre check_end {
var ends = DNI.getAllOfKind("End");
for (end in ends) {
if (end.node.isUndefined()) {
throw "End has no node attribute!";
} else if (end.performance.isUndefined()) {
throw "No performance defined for End!";
}
}
}
post {
"Done running model check! Everything seems fine.".println();
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment