Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos-mynij-dev
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mynij
slapos-mynij-dev
Commits
a7562af8
Commit
a7562af8
authored
Oct 24, 2011
by
Antoine Catton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add promises on davstorage recipe
parent
ec468f81
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
slapos/recipe/davstorage/__init__.py
slapos/recipe/davstorage/__init__.py
+26
-0
No files found.
slapos/recipe/davstorage/__init__.py
View file @
a7562af8
...
...
@@ -25,6 +25,8 @@
#
##############################################################################
import
subprocess
import
httplib
import
base64
from
slapos.recipe.librecipe
import
GenericBaseRecipe
...
...
@@ -82,4 +84,28 @@ class Recipe(GenericBaseRecipe):
[
self
.
options
[
'apache-binary'
],
'-f'
,
config_file
,
'-DFOREGROUND'
])
path_list
.
append
(
wrapper
)
promise
=
self
.
createPythonScript
(
self
.
options
[
'promise'
],
__name__
+
'.promise'
,
dict
(
host
=
self
.
options
[
'ip'
],
port
=
int
(
self
.
options
[
'port'
]),
user
=
self
.
options
[
'user'
],
password
=
self
.
options
[
'password'
])
)
path_list
.
append
(
promise
)
return
path_list
def
promise
(
args
):
host
=
args
[
'host'
]
port
=
args
[
'port'
]
user
=
args
[
'user'
]
password
=
args
[
'password'
]
connection
=
httplib
.
HTTPSConnection
(
host
,
port
)
auth
=
base64
.
b64encode
(
'%s:%s'
%
(
user
,
password
))
connection
.
request
(
'OPTIONS'
,
'/'
,
headers
=
dict
(
Authorization
=
'Basic %s'
%
auth
,
)
)
connection
.
getresponse
()
return
0
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