Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE3
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
5
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
bca0eb03
authored
2 years ago
by
Karsa Zoltán István
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
port post
parent
ee2742ae
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
circle/dashboard/views/vm.py
+3
-2
No files found.
circle/dashboard/views/vm.py
View file @
bca0eb03
...
...
@@ -348,9 +348,10 @@ class SetupPortREST(APIView):
vlan
=
Vlan
.
objects
.
get
(
pk
=
vlan_id
)
interface
=
Interface
.
objects
.
filter
(
instance
=
instance
)
.
filter
(
vlan
=
vlan
)
.
get
()
if
addport
.
is_valid
():
AddPortOperation
(
instance
)
.
call
(
port
=
int
(
data
[
'port_destination'
]),
proto
=
str
(
data
[
'type'
]),
host
=
interface
.
host
)
AddPortOperation
(
instance
)
.
call
(
port
=
int
(
data
[
'port_destination'
]),
proto
=
str
(
data
[
'type'
]),
host
=
interface
.
host
,
user
=
request
.
user
)
rules
=
Rule
.
objects
.
filter
(
host
=
interface
.
host
)
return
JsonResponse
({},
status
=
201
)
return
JsonResponse
(
status
=
400
)
return
JsonResponse
(
{},
status
=
400
)
def
delete
(
self
,
request
,
vm_id
,
vlan_id
,
format
=
None
):
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment