Format based on updated Black
This commit is contained in:
parent
dfcfe4df4a
commit
311bb69785
|
@ -80,6 +80,7 @@ celery.conf.update(app.config)
|
||||||
# Custom decorators
|
# Custom decorators
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
# Request parser decorator
|
# Request parser decorator
|
||||||
class RequestParser(object):
|
class RequestParser(object):
|
||||||
def __init__(self, reqargs):
|
def __init__(self, reqargs):
|
||||||
|
@ -164,6 +165,7 @@ def run_benchmark(self, pool):
|
||||||
# API Root/Authentication
|
# API Root/Authentication
|
||||||
##########################################################
|
##########################################################
|
||||||
|
|
||||||
|
|
||||||
# /
|
# /
|
||||||
class API_Root(Resource):
|
class API_Root(Resource):
|
||||||
def get(self):
|
def get(self):
|
||||||
|
@ -586,6 +588,7 @@ api.add_resource(API_Status, "/status")
|
||||||
# Client API - Node
|
# Client API - Node
|
||||||
##########################################################
|
##########################################################
|
||||||
|
|
||||||
|
|
||||||
# /node
|
# /node
|
||||||
class API_Node_Root(Resource):
|
class API_Node_Root(Resource):
|
||||||
@RequestParser(
|
@RequestParser(
|
||||||
|
@ -1014,6 +1017,7 @@ api.add_resource(API_Node_Log, "/node/<node>/log")
|
||||||
# Client API - VM
|
# Client API - VM
|
||||||
##########################################################
|
##########################################################
|
||||||
|
|
||||||
|
|
||||||
# /vm
|
# /vm
|
||||||
class API_VM_Root(Resource):
|
class API_VM_Root(Resource):
|
||||||
@RequestParser(
|
@RequestParser(
|
||||||
|
@ -2293,6 +2297,7 @@ api.add_resource(API_VM_Device, "/vm/<vm>/device")
|
||||||
# Client API - Network
|
# Client API - Network
|
||||||
##########################################################
|
##########################################################
|
||||||
|
|
||||||
|
|
||||||
# /network
|
# /network
|
||||||
class API_Network_Root(Resource):
|
class API_Network_Root(Resource):
|
||||||
@RequestParser([{"name": "limit"}])
|
@RequestParser([{"name": "limit"}])
|
||||||
|
@ -3261,6 +3266,7 @@ api.add_resource(API_Network_ACL_Element, "/network/<vni>/acl/<description>")
|
||||||
# Client API - SR-IOV
|
# Client API - SR-IOV
|
||||||
##########################################################
|
##########################################################
|
||||||
|
|
||||||
|
|
||||||
# /sriov
|
# /sriov
|
||||||
class API_SRIOV_Root(Resource):
|
class API_SRIOV_Root(Resource):
|
||||||
@Authenticator
|
@Authenticator
|
||||||
|
@ -3588,6 +3594,7 @@ api.add_resource(API_SRIOV_VF_Element, "/sriov/vf/<node>/<vf>")
|
||||||
# (i.e. it references Ceph-specific concepts), this makes more
|
# (i.e. it references Ceph-specific concepts), this makes more
|
||||||
# sense in the long-term.#
|
# sense in the long-term.#
|
||||||
|
|
||||||
|
|
||||||
# /storage
|
# /storage
|
||||||
class API_Storage_Root(Resource):
|
class API_Storage_Root(Resource):
|
||||||
@Authenticator
|
@Authenticator
|
||||||
|
@ -5400,6 +5407,7 @@ api.add_resource(
|
||||||
# Provisioner API
|
# Provisioner API
|
||||||
##########################################################
|
##########################################################
|
||||||
|
|
||||||
|
|
||||||
# /provisioner
|
# /provisioner
|
||||||
class API_Provisioner_Root(Resource):
|
class API_Provisioner_Root(Resource):
|
||||||
@Authenticator
|
@Authenticator
|
||||||
|
|
|
@ -44,6 +44,7 @@ import pvcapid.provisioner as provisioner
|
||||||
# Common functions
|
# Common functions
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
# Database connections
|
# Database connections
|
||||||
def open_database(config):
|
def open_database(config):
|
||||||
conn = psycopg2.connect(
|
conn = psycopg2.connect(
|
||||||
|
|
|
@ -59,6 +59,7 @@ class ProvisioningError(Exception):
|
||||||
# Common functions
|
# Common functions
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
# Database connections
|
# Database connections
|
||||||
def open_database(config):
|
def open_database(config):
|
||||||
conn = psycopg2.connect(
|
conn = psycopg2.connect(
|
||||||
|
|
|
@ -35,6 +35,7 @@ import daemon_lib.common as common
|
||||||
# Supplemental functions
|
# Supplemental functions
|
||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
# Verify OSD is valid in cluster
|
# Verify OSD is valid in cluster
|
||||||
def verifyOSD(zkhandler, osd_id):
|
def verifyOSD(zkhandler, osd_id):
|
||||||
return zkhandler.exists(("osd", osd_id))
|
return zkhandler.exists(("osd", osd_id))
|
||||||
|
|
|
@ -37,6 +37,7 @@ from functools import wraps
|
||||||
# Performance Profiler decorator
|
# Performance Profiler decorator
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
|
||||||
# Get performance statistics on a function or class
|
# Get performance statistics on a function or class
|
||||||
class Profiler(object):
|
class Profiler(object):
|
||||||
def __init__(self, config):
|
def __init__(self, config):
|
||||||
|
@ -104,6 +105,7 @@ class Profiler(object):
|
||||||
# Supplemental functions
|
# Supplemental functions
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Run a local OS daemon in the background
|
# Run a local OS daemon in the background
|
||||||
#
|
#
|
||||||
|
|
|
@ -112,7 +112,6 @@ class Logger(object):
|
||||||
|
|
||||||
# Output function
|
# Output function
|
||||||
def out(self, message, state=None, prefix=""):
|
def out(self, message, state=None, prefix=""):
|
||||||
|
|
||||||
# Get the date
|
# Get the date
|
||||||
if self.config["log_dates"]:
|
if self.config["log_dates"]:
|
||||||
date = "{} ".format(datetime.now().strftime("%Y/%m/%d %H:%M:%S.%f"))
|
date = "{} ".format(datetime.now().strftime("%Y/%m/%d %H:%M:%S.%f"))
|
||||||
|
|
Loading…
Reference in New Issue