Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
GÉANT Service Orchestrator
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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
GÉANT Orchestration and Automation Team
GAP
GÉANT Service Orchestrator
Commits
09ff7fc2
Verified
Commit
09ff7fc2
authored
1 year ago
by
Karel van Klink
Browse files
Options
Downloads
Patches
Plain Diff
update formatting of provisioning_proxy pages
parent
ffbd0a2b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!13
update formatting of provisioning_proxy pages
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gso/services/provisioning_proxy.py
+13
-8
13 additions, 8 deletions
gso/services/provisioning_proxy.py
gso/workflows/device/create_device.py
+2
-2
2 additions, 2 deletions
gso/workflows/device/create_device.py
with
15 additions
and
10 deletions
gso/services/provisioning_proxy.py
+
13
−
8
View file @
09ff7fc2
...
...
@@ -4,6 +4,7 @@ import logging
import
requests
from
orchestrator
import
inputstep
from
orchestrator.config.assignee
import
Assignee
from
orchestrator.domain
import
SubscriptionModel
# noinspection PyProtectedMember
from
orchestrator.forms
import
FormPage
,
ReadOnlyField
from
orchestrator.forms.validators
import
Accept
,
Label
,
LongText
...
...
@@ -67,7 +68,8 @@ def _send_request(endpoint: str, parameters: dict, process_id: UUIDstr,
request
=
requests
.
delete
(
url
,
json
=
parameters
)
if
request
.
status_code
!=
200
:
raise
AssertionError
(
request
.
text
)
print
(
request
.
content
)
raise
AssertionError
(
request
.
content
)
def
provision_device
(
...
...
@@ -162,15 +164,16 @@ def deprovision_ip_trunk(subscription: Iptrunk,
@inputstep
(
'
Await provisioning proxy results
'
,
assignee
=
Assignee
(
'
SYSTEM
'
))
def
await_pp_results
()
->
State
:
def
await_pp_results
(
subscription
:
SubscriptionModel
)
->
State
:
class
ProvisioningResultPage
(
FormPage
):
class
Config
:
title
=
'
D
o NOT click on confirm in this step!
'
title
=
f
'
D
eploying
{
subscription
.
product
.
name
}
...
'
warning_label
:
Label
=
'
This step relies on an external service to
'
\
'
send an update to the orchestrator, do not
'
\
'
interfere with this process please.
'
pp_run_results
:
dict
=
{
'
state
'
:
'
not_ready
'
}
warning_label
:
Label
=
f
'
{
subscription
.
product
.
description
}
is being
'
\
f
'
deployed right now. Feel free to refresh
'
\
f
'
this page every now and again. Just be
'
\
f
'
sure that you do NOT click submit!
'
pp_run_results
:
dict
=
None
confirm
:
Accept
=
Accept
(
'
INCOMPLETE
'
)
result_page
=
yield
ProvisioningResultPage
...
...
@@ -182,7 +185,9 @@ def await_pp_results() -> State:
def
confirm_pp_results
(
state
:
State
)
->
State
:
class
ConfirmRunPage
(
FormPage
):
class
Config
:
title
=
'
Execution completed, please confirm the results.
'
title
=
f
"
Execution for
"
\
f
"
{
state
[
'
subscription
'
][
'
product
'
][
'
name
'
]
}
"
\
f
"
completed, please confirm the results below.
"
run_status
:
str
=
ReadOnlyField
(
state
[
'
pp_run_results
'
][
'
status
'
])
run_results
:
LongText
=
ReadOnlyField
(
...
...
This diff is collapsed.
Click to expand it.
gso/workflows/device/create_device.py
+
2
−
2
View file @
09ff7fc2
...
...
@@ -122,8 +122,8 @@ def initialize_subscription(
'
.geant.net
'
)
subscription
.
device
.
device_fqdn
=
fqdn
subscription
.
device
.
device_role
=
device_role
subscription
.
description
=
f
'
Device
{
fqdn
}
type
\
(
{
subscription
.
device_type
}
)
'
subscription
.
description
=
f
'
Device
{
fqdn
}
'
\
f
'
(
{
subscription
.
device_type
}
)
'
subscription
=
device
.
DeviceProvisioning
.
from_other_lifecycle
(
subscription
,
SubscriptionLifecycle
.
PROVISIONING
)
...
...
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