Format based on updated Black

This commit is contained in:
Joshua Boniface 2023-09-12 16:41:02 -04:00
parent dfcfe4df4a
commit 311bb69785
6 changed files with 13 additions and 1 deletions

View File

@ -80,6 +80,7 @@ celery.conf.update(app.config)
# Custom decorators
#
# Request parser decorator
class RequestParser(object):
def __init__(self, reqargs):
@ -164,6 +165,7 @@ def run_benchmark(self, pool):
# API Root/Authentication
##########################################################
# /
class API_Root(Resource):
def get(self):
@ -586,6 +588,7 @@ api.add_resource(API_Status, "/status")
# Client API - Node
##########################################################
# /node
class API_Node_Root(Resource):
@RequestParser(
@ -1014,6 +1017,7 @@ api.add_resource(API_Node_Log, "/node/<node>/log")
# Client API - VM
##########################################################
# /vm
class API_VM_Root(Resource):
@RequestParser(
@ -2293,6 +2297,7 @@ api.add_resource(API_VM_Device, "/vm/<vm>/device")
# Client API - Network
##########################################################
# /network
class API_Network_Root(Resource):
@RequestParser([{"name": "limit"}])
@ -3261,6 +3266,7 @@ api.add_resource(API_Network_ACL_Element, "/network/<vni>/acl/<description>")
# Client API - SR-IOV
##########################################################
# /sriov
class API_SRIOV_Root(Resource):
@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
# sense in the long-term.#
# /storage
class API_Storage_Root(Resource):
@Authenticator
@ -5400,6 +5407,7 @@ api.add_resource(
# Provisioner API
##########################################################
# /provisioner
class API_Provisioner_Root(Resource):
@Authenticator

View File

@ -44,6 +44,7 @@ import pvcapid.provisioner as provisioner
# Common functions
#
# Database connections
def open_database(config):
conn = psycopg2.connect(

View File

@ -59,6 +59,7 @@ class ProvisioningError(Exception):
# Common functions
#
# Database connections
def open_database(config):
conn = psycopg2.connect(

View File

@ -35,6 +35,7 @@ import daemon_lib.common as common
# Supplemental functions
#
# Verify OSD is valid in cluster
def verifyOSD(zkhandler, osd_id):
return zkhandler.exists(("osd", osd_id))

View File

@ -37,6 +37,7 @@ from functools import wraps
# Performance Profiler decorator
###############################################################################
# Get performance statistics on a function or class
class Profiler(object):
def __init__(self, config):
@ -104,6 +105,7 @@ class Profiler(object):
# Supplemental functions
###############################################################################
#
# Run a local OS daemon in the background
#

View File

@ -112,7 +112,6 @@ class Logger(object):
# Output function
def out(self, message, state=None, prefix=""):
# Get the date
if self.config["log_dates"]:
date = "{} ".format(datetime.now().strftime("%Y/%m/%d %H:%M:%S.%f"))