Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
4e4171b6
authored
Oct 17, 2016
by
Szabolcs Gelencser
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure random generated password always fits Azure's needs
parent
e70e0f22
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
circle/dashboard/models.py
+1
-1
circle/dashboard/views/template.py
+1
-1
circle/vm/models/instance.py
+1
-1
No files found.
circle/dashboard/models.py
View file @
4e4171b6
...
...
@@ -57,7 +57,7 @@ logger = getLogger(__name__)
def
pwgen
():
return
User
.
objects
.
make_random_password
()
return
User
.
objects
.
make_random_password
()
+
"aA1"
class
Message
(
TimeStampedModel
,
TimeFramedModel
):
...
...
circle/dashboard/views/template.py
View file @
4e4171b6
...
...
@@ -147,7 +147,7 @@ class TemplateCreate(SuccessMessageMixin, CreateView):
post
[
'max_ram_size'
]
=
post
[
'ram_size'
]
req_traits
=
post
.
pop
(
"req_traits"
)
tags
=
post
.
pop
(
"tags"
)
post
[
'pw'
]
=
User
.
objects
.
make_random_password
()
post
[
'pw'
]
=
User
.
objects
.
make_random_password
()
+
"aA1"
post
[
'is_base'
]
=
True
post
[
'azure_template'
]
=
AzureBuiltinVersion
.
objects
.
get
(
pk
=
post
[
'azure_template'
])
...
...
circle/vm/models/instance.py
View file @
4e4171b6
...
...
@@ -434,7 +434,7 @@ class Instance(AclBase, VirtualMachineDescModel, StatusModel, OperatedMixin,
'max_ram_size'
,
'arch'
,
'priority'
,
'boot_menu'
,
'raw_data'
,
'lease'
,
'access_method'
,
'system'
,
'has_agent'
]
params
=
dict
(
template
=
template
,
owner
=
owner
,
pw
=
pwgen
())
params
=
dict
(
template
=
template
,
owner
=
owner
,
pw
=
pwgen
()
+
"aA1"
)
params
.
update
([(
f
,
getattr
(
template
,
f
))
for
f
in
common_fields
])
params
.
update
(
kwargs
)
# override defaults w/ user supplied values
...
...
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