Commit 1906a14e authored by Pawel Wodkowski's avatar Pawel Wodkowski Committed by Jim Harris
Browse files

rpc/load_config: handle empty config



Subsystems should be started anyway when empty configuration is
provided.

Change-Id: Iabc85d319b11d19be7ec182d1f6fa4f40eacf7e2
Signed-off-by: default avatarPawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/432552


Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarKarol Latecki <karol.latecki@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent ef7a97de
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -85,6 +85,10 @@ def load_config(client, fd):

    # check if methods in the config file are known
    allowed_methods = client.call('get_rpc_methods')
    if not subsystems and 'start_subsystem_init' in allowed_methods:
        start_subsystem_init(client)
        return

    for subsystem in list(subsystems):
        config = subsystem['config']
        for elem in list(config):
@@ -109,7 +113,7 @@ def load_config(client, fd):
                subsystems.remove(subsystem)

        if 'start_subsystem_init' in allowed_methods:
            client.call('start_subsystem_init')
            start_subsystem_init(client)
            allowed_found = True

        if not allowed_found: