Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
devops
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
osm
devops
Commits
411539d7
Commit
411539d7
authored
8 years ago
by
velandy
Committed by
Gerrit Code Review
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Update status messages to fix bug 49"
parents
65770add
0348098f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vpe-router/reactive/vpe_router.py
+9
-4
9 additions, 4 deletions
vpe-router/reactive/vpe_router.py
with
9 additions
and
4 deletions
vpe-router/reactive/vpe_router.py
+
9
−
4
View file @
411539d7
...
...
@@ -39,6 +39,8 @@ def validate_config():
out
,
err
=
router
.
ssh
([
'
whoami
'
],
routerip
,
user
,
passwd
)
if
out
.
strip
()
!=
user
:
remove_state
(
'
vpe.configured
'
)
status_set
(
'
blocked
'
,
'
vpe is not configured
'
)
raise
Exception
(
'
invalid credentials
'
)
# Set the router's hostname
...
...
@@ -56,15 +58,18 @@ def validate_config():
],
routerip
,
user
,
passwd
)
set_state
(
'
vpe.configured
'
)
status_set
(
'
active
'
,
'
ready!
'
)
else
:
remove_state
(
'
vpe.configured
'
)
status_set
(
'
blocked
'
,
'
vpe is not configured
'
)
except
subprocess
.
CalledProcessError
as
e
:
remove_state
(
'
vpe.configured
'
)
status_set
(
'
blocked
'
,
'
validation failed: %s
'
%
e
)
log
(
'
Command failed: %s (%s)
'
%
(
'
'
.
join
(
e
.
cmd
),
str
(
e
.
output
)))
raise
set_state
(
'
vpe.configured
'
)
status_set
(
'
active
'
,
'
ready!
'
)
except
Exception
as
e
:
log
(
repr
(
e
))
remove_state
(
'
vpe.configured
'
)
...
...
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