Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
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
cb15e6e4
authored
Mar 07, 2018
by
Szabolcs Gelencser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement advanced network creation
parent
400534b4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
3 deletions
+9
-3
.idea/workspace.xml
+0
-0
circle/network/templates/network/vxlan-create.html
+1
-1
circle/network/views.py
+8
-2
No files found.
.idea/workspace.xml
View file @
cb15e6e4
This diff is collapsed.
Click to expand it.
circle/network/templates/network/vxlan-create.html
View file @
cb15e6e4
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
<div
v-cloak
v-if=
"isAdvancedConfig"
>
<div
v-cloak
v-if=
"isAdvancedConfig"
>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
for=
"id_network_address"
>
Network address
<i
class=
"asteriskField"
>
*
</i></label>
<label
for=
"id_network_address"
>
Network address
<i
class=
"asteriskField"
>
*
</i></label>
<input
type=
"text"
name=
"n
ame
"
required
class=
"form-control textinput textInput form-control"
id=
"id_network_address"
>
<input
type=
"text"
name=
"n
etworkAddress
"
required
class=
"form-control textinput textInput form-control"
id=
"id_network_address"
>
<input
name=
"isDhcpEnabled"
type=
"checkbox"
v-model=
"isDhcpEnabled"
>
Enable DHCP
<input
name=
"isDhcpEnabled"
type=
"checkbox"
v-model=
"isDhcpEnabled"
>
Enable DHCP
</div>
</div>
...
...
circle/network/views.py
View file @
cb15e6e4
...
@@ -999,10 +999,16 @@ class VxlanCreate(LoginRequiredMixin, FormView):
...
@@ -999,10 +999,16 @@ class VxlanCreate(LoginRequiredMixin, FormView):
def
form_valid
(
self
,
form
):
def
form_valid
(
self
,
form
):
network_created
=
openstack_api
.
neutron
.
network_create
(
self
.
request
,
name
=
form
.
cleaned_data
[
'name'
])
network_created
=
openstack_api
.
neutron
.
network_create
(
self
.
request
,
name
=
form
.
cleaned_data
[
'name'
])
try
:
if
form
.
cleaned_data
[
'isAdvancedConfig'
]:
if
form
.
cleaned_data
[
'isAdvancedConfig'
]:
pass
openstack_api
.
neutron
.
subnet_create
(
self
.
request
,
network_created
.
id
,
ip_version
=
4
,
#TODO: there should be a radio button for protocol
cidr
=
form
.
cleaned_data
[
'networkAddress'
],
enable_dhcp
=
form
.
cleaned_data
[
'isDhcpEnabled'
],
)
else
:
else
:
try
:
# TODO: default ip version should read from SETTINGS
# TODO: default ip version should read from SETTINGS
openstack_api
.
neutron
.
subnet_create
(
openstack_api
.
neutron
.
subnet_create
(
self
.
request
,
self
.
request
,
...
...
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