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
7af3e5f6
authored
Jan 27, 2014
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vm: remove vm api
parent
11610612
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
31 deletions
+0
-31
circle/circle/urls.py
+0
-1
circle/vm/urls.py
+0
-9
circle/vm/views.py
+0
-21
No files found.
circle/circle/urls.py
View file @
7af3e5f6
...
...
@@ -21,7 +21,6 @@ urlpatterns = patterns(
url
(
r'^network/'
,
include
(
'network.urls'
)),
url
(
r'^dashboard/'
,
include
(
'dashboard.urls'
)),
url
(
r'^accounts/'
,
include
(
'django.contrib.auth.urls'
)),
url
(
r'^vm-api/'
,
include
(
'vm.urls'
)),
)
...
...
circle/vm/urls.py
deleted
100644 → 0
View file @
11610612
from
django.conf.urls
import
patterns
,
url
from
.views
import
BootUrl
urlpatterns
=
patterns
(
''
,
url
(
r'^b/(?P<token>.*)/$'
,
BootUrl
.
as_view
()),
)
circle/vm/views.py
deleted
100644 → 0
View file @
11610612
from
django.views.generic.base
import
View
from
django.http
import
HttpResponse
from
django.core
import
signing
from
django.shortcuts
import
get_object_or_404
from
vm.models
import
Instance
from
datetime
import
datetime
class
BootUrl
(
View
):
def
get
(
self
,
request
,
token
):
try
:
id
=
signing
.
loads
(
token
,
salt
=
'activate'
)
except
:
return
HttpResponse
(
"Invalid token."
)
inst
=
get_object_or_404
(
Instance
,
id
=
id
)
if
inst
.
active_since
:
return
HttpResponse
(
"Already booted?"
)
else
:
inst
.
active_since
=
datetime
.
now
()
inst
.
save
()
return
HttpResponse
(
"KTHXBYE"
)
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