Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F11690983
pad-delete.py
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
pad-delete.py
View Options
#!/usr/bin/env python3
# -------------------------------------------------------------
# PaaS Docker
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Created: 2018-10-10
# License: Trivial work, not eligible to copyright
# Source file: roles/paas-docker/wrappers/files/pad-delete.py
# -------------------------------------------------------------
#
# <auto-generated>
# This file is managed by our rOPS SaltStack repository.
#
# Changes to this file may cause incorrect behavior
# and will be lost if the state is redeployed.
# </auto-generated>
from
urllib.request
import
urlopen
import
json
import
sys
API_KEY_FILE
=
"/srv/pad/APIKEY.txt"
PAD_HOST
=
"pad.nasqueron.org"
# Read API key
with
open
(
API_KEY_FILE
)
as
api_file
:
key
=
api_file
.
read
()
.
strip
()
# Fire request
url
=
"https://"
+
PAD_HOST
+
"/api/1/deletePad?apikey="
+
key
+
"&padID="
+
pad
contents
=
urlopen
(
url
)
.
read
()
# Report result
result
=
json
.
loads
(
contents
)
print
(
result
[
"message"
])
sys
.
exit
(
result
[
"code"
])
File Metadata
Details
Attached
Mime Type
text/x-python
Expires
Fri, Sep 12, 19:51 (2 h, 47 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2978276
Default Alt Text
pad-delete.py (1 KB)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment