Skip to content

Commit

Permalink
Foreign schemas work for process pool services
Browse files Browse the repository at this point in the history
This commit brings jail service up to date with changes introduced earlier for process pool services which are able to access foreign defined schema now.
  • Loading branch information
sonicaj authored and Brandon Schneider committed Jun 26, 2019
1 parent 3bf2048 commit 2197755
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions src/middlewared/middlewared/plugins/jail.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

from middlewared.common.attachment import FSAttachmentDelegate
from middlewared.schema import Bool, Dict, Int, List, Str, accepts
from middlewared.service import CRUDService, job, private
from middlewared.service import CRUDService, job, private, filterable
from middlewared.service_exception import CallError, ValidationErrors
from middlewared.utils import filter_list
from middlewared.validators import IpInUse, MACAddr
Expand All @@ -43,13 +43,7 @@ def __init__(self, *args, **kwargs):
# We want debug for jails starting/stopping
os.environ['IOCAGE_DEBUG'] = 'TRUE'

# FIXME: foreign schemas cannot be referenced when
# using `process_pool`
# @filterable
@accepts(
List('query-filters', default=[]),
Dict('query-options', additional_attrs=True),
)
@filterable
def query(self, filters=None, options=None):
"""
Query all jails with `query-filters` and `query-options`.
Expand Down Expand Up @@ -103,7 +97,6 @@ def query(self, filters=None, options=None):
self.logger.debug('Failed to get list of jails', exc_info=True)

return filter_list(jails, filters, options)
query._fiterable = True

@accepts(
Dict(
Expand Down

0 comments on commit 2197755

Please sign in to comment.