Merge pull request #10386 from HJianBo/refactor-directoires
refactor(gw): rename all gateway application name
This commit is contained in:
commit
a0cfac3a1a
|
@ -68,11 +68,11 @@ end_per_testcase(_TestCase, _Config) ->
|
||||||
|
|
||||||
t_registered_gateway(_) ->
|
t_registered_gateway(_) ->
|
||||||
[
|
[
|
||||||
{coap, #{cbkmod := emqx_coap}},
|
{coap, #{cbkmod := emqx_gateway_coap}},
|
||||||
{exproto, #{cbkmod := emqx_exproto}},
|
{exproto, #{cbkmod := emqx_gateway_exproto}},
|
||||||
{lwm2m, #{cbkmod := emqx_lwm2m}},
|
{lwm2m, #{cbkmod := emqx_gateway_lwm2m}},
|
||||||
{mqttsn, #{cbkmod := emqx_mqttsn}},
|
{mqttsn, #{cbkmod := emqx_gateway_mqttsn}},
|
||||||
{stomp, #{cbkmod := emqx_stomp}}
|
{stomp, #{cbkmod := emqx_gateway_stomp}}
|
||||||
] = emqx_gateway:registered_gateway().
|
] = emqx_gateway:registered_gateway().
|
||||||
|
|
||||||
t_load_unload_list_lookup(_) ->
|
t_load_unload_list_lookup(_) ->
|
||||||
|
@ -192,7 +192,7 @@ setup_fake_usage_data(Lwm2mDataDir) ->
|
||||||
[
|
[
|
||||||
emqx_common_test_helpers:proj_root(),
|
emqx_common_test_helpers:proj_root(),
|
||||||
"apps",
|
"apps",
|
||||||
"emqx_lwm2m",
|
"emqx_gateway_lwm2m",
|
||||||
"lwm2m_xml"
|
"lwm2m_xml"
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
|
|
|
@ -219,7 +219,7 @@ t_gateway_lwm2m(_) ->
|
||||||
[
|
[
|
||||||
emqx_common_test_helpers:proj_root(),
|
emqx_common_test_helpers:proj_root(),
|
||||||
"apps",
|
"apps",
|
||||||
"emqx_lwm2m",
|
"emqx_gateway_lwm2m",
|
||||||
"lwm2m_xml"
|
"lwm2m_xml"
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
|
|
|
@ -117,11 +117,11 @@ t_gateway_registry_usage(_) ->
|
||||||
t_gateway_registry_list(_) ->
|
t_gateway_registry_list(_) ->
|
||||||
emqx_gateway_cli:'gateway-registry'(["list"]),
|
emqx_gateway_cli:'gateway-registry'(["list"]),
|
||||||
?assertEqual(
|
?assertEqual(
|
||||||
"Registered Name: coap, Callback Module: emqx_coap\n"
|
"Registered Name: coap, Callback Module: emqx_gateway_coap\n"
|
||||||
"Registered Name: exproto, Callback Module: emqx_exproto\n"
|
"Registered Name: exproto, Callback Module: emqx_gateway_exproto\n"
|
||||||
"Registered Name: lwm2m, Callback Module: emqx_lwm2m\n"
|
"Registered Name: lwm2m, Callback Module: emqx_gateway_lwm2m\n"
|
||||||
"Registered Name: mqttsn, Callback Module: emqx_mqttsn\n"
|
"Registered Name: mqttsn, Callback Module: emqx_gateway_mqttsn\n"
|
||||||
"Registered Name: stomp, Callback Module: emqx_stomp\n",
|
"Registered Name: stomp, Callback Module: emqx_gateway_stomp\n",
|
||||||
acc_print()
|
acc_print()
|
||||||
).
|
).
|
||||||
|
|
||||||
|
|
|
@ -102,11 +102,11 @@ assert_fields_exist(Ks, Map) ->
|
||||||
Ks
|
Ks
|
||||||
).
|
).
|
||||||
load_all_gateway_apps() ->
|
load_all_gateway_apps() ->
|
||||||
application:load(emqx_stomp),
|
application:load(emqx_gateway_stomp),
|
||||||
application:load(emqx_mqttsn),
|
application:load(emqx_gateway_mqttsn),
|
||||||
application:load(emqx_coap),
|
application:load(emqx_gateway_coap),
|
||||||
application:load(emqx_lwm2m),
|
application:load(emqx_gateway_lwm2m),
|
||||||
application:load(emqx_exproto).
|
application:load(emqx_gateway_exproto).
|
||||||
|
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
%% http
|
%% http
|
||||||
|
|
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 75 KiB |
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
Before Width: | Height: | Size: 148 KiB After Width: | Height: | Size: 148 KiB |
|
@ -1,4 +1,4 @@
|
||||||
{application, emqx_coap, [
|
{application, emqx_gateway_coap, [
|
||||||
{description, "CoAP Gateway"},
|
{description, "CoAP Gateway"},
|
||||||
{vsn, "0.1.0"},
|
{vsn, "0.1.0"},
|
||||||
{registered, []},
|
{registered, []},
|
|
@ -15,7 +15,7 @@
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
|
|
||||||
%% @doc The CoAP Gateway implement
|
%% @doc The CoAP Gateway implement
|
||||||
-module(emqx_coap).
|
-module(emqx_gateway_coap).
|
||||||
|
|
||||||
-include_lib("emqx/include/logger.hrl").
|
-include_lib("emqx/include/logger.hrl").
|
||||||
-include_lib("emqx_gateway/include/emqx_gateway.hrl").
|
-include_lib("emqx_gateway/include/emqx_gateway.hrl").
|
|
@ -56,7 +56,7 @@
|
||||||
all() -> emqx_common_test_helpers:all(?MODULE).
|
all() -> emqx_common_test_helpers:all(?MODULE).
|
||||||
|
|
||||||
init_per_suite(Config) ->
|
init_per_suite(Config) ->
|
||||||
application:load(emqx_coap),
|
application:load(emqx_gateway_coap),
|
||||||
ok = emqx_common_test_helpers:load_config(emqx_gateway_schema, ?CONF_DEFAULT),
|
ok = emqx_common_test_helpers:load_config(emqx_gateway_schema, ?CONF_DEFAULT),
|
||||||
emqx_mgmt_api_test_util:init_suite([emqx_authn, emqx_gateway]),
|
emqx_mgmt_api_test_util:init_suite([emqx_authn, emqx_gateway]),
|
||||||
ok = meck:new(emqx_access_control, [passthrough, no_history, no_link]),
|
ok = meck:new(emqx_access_control, [passthrough, no_history, no_link]),
|
|
@ -56,7 +56,7 @@ all() ->
|
||||||
emqx_common_test_helpers:all(?MODULE).
|
emqx_common_test_helpers:all(?MODULE).
|
||||||
|
|
||||||
init_per_suite(Config) ->
|
init_per_suite(Config) ->
|
||||||
application:load(emqx_coap),
|
application:load(emqx_gateway_coap),
|
||||||
ok = emqx_common_test_helpers:load_config(emqx_gateway_schema, ?CONF_DEFAULT),
|
ok = emqx_common_test_helpers:load_config(emqx_gateway_schema, ?CONF_DEFAULT),
|
||||||
emqx_mgmt_api_test_util:init_suite([emqx_authn, emqx_gateway]),
|
emqx_mgmt_api_test_util:init_suite([emqx_authn, emqx_gateway]),
|
||||||
Config.
|
Config.
|
|
@ -1,4 +1,4 @@
|
||||||
{application, emqx_exproto, [
|
{application, emqx_gateway_exproto, [
|
||||||
{description, "ExProto Gateway"},
|
{description, "ExProto Gateway"},
|
||||||
{vsn, "0.1.0"},
|
{vsn, "0.1.0"},
|
||||||
{registered, []},
|
{registered, []},
|
|
@ -15,7 +15,7 @@
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
|
|
||||||
%% @doc The ExProto Gateway implement
|
%% @doc The ExProto Gateway implement
|
||||||
-module(emqx_exproto).
|
-module(emqx_gateway_exproto).
|
||||||
|
|
||||||
-include_lib("emqx/include/logger.hrl").
|
-include_lib("emqx/include/logger.hrl").
|
||||||
-include_lib("emqx_gateway/include/emqx_gateway.hrl").
|
-include_lib("emqx_gateway/include/emqx_gateway.hrl").
|
|
@ -76,7 +76,7 @@ metrics() ->
|
||||||
[tcp, ssl, udp, dtls].
|
[tcp, ssl, udp, dtls].
|
||||||
|
|
||||||
init_per_group(GrpName, Cfg) ->
|
init_per_group(GrpName, Cfg) ->
|
||||||
application:load(emqx_exproto),
|
application:load(emqx_gateway_exproto),
|
||||||
put(grpname, GrpName),
|
put(grpname, GrpName),
|
||||||
Svrs = emqx_exproto_echo_svr:start(),
|
Svrs = emqx_exproto_echo_svr:start(),
|
||||||
emqx_common_test_helpers:start_apps([emqx_authn, emqx_gateway], fun set_special_cfg/1),
|
emqx_common_test_helpers:start_apps([emqx_authn, emqx_gateway], fun set_special_cfg/1),
|
|
@ -1,8 +1,8 @@
|
||||||
{application, emqx_lwm2m, [
|
{application, emqx_gateway_lwm2m, [
|
||||||
{description, "LwM2M Gateway"},
|
{description, "LwM2M Gateway"},
|
||||||
{vsn, "0.1.0"},
|
{vsn, "0.1.0"},
|
||||||
{registered, []},
|
{registered, []},
|
||||||
{applications, [kernel, stdlib, emqx, emqx_gateway, emqx_coap]},
|
{applications, [kernel, stdlib, emqx, emqx_gateway, emqx_gateway_coap]},
|
||||||
{env, []},
|
{env, []},
|
||||||
{modules, []},
|
{modules, []},
|
||||||
{licenses, ["Apache 2.0"]},
|
{licenses, ["Apache 2.0"]},
|
|
@ -15,7 +15,7 @@
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
|
|
||||||
%% @doc The LwM2M Gateway implement
|
%% @doc The LwM2M Gateway implement
|
||||||
-module(emqx_lwm2m).
|
-module(emqx_gateway_lwm2m).
|
||||||
|
|
||||||
-include_lib("emqx/include/logger.hrl").
|
-include_lib("emqx/include/logger.hrl").
|
||||||
-include_lib("emqx_gateway/include/emqx_gateway.hrl").
|
-include_lib("emqx_gateway/include/emqx_gateway.hrl").
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
-include("emqx_lwm2m.hrl").
|
-include("emqx_lwm2m.hrl").
|
||||||
-include_lib("emqx/include/logger.hrl").
|
-include_lib("emqx/include/logger.hrl").
|
||||||
-include_lib("emqx_coap/include/emqx_coap.hrl").
|
-include_lib("emqx_gateway_coap/include/emqx_coap.hrl").
|
||||||
|
|
||||||
%% API
|
%% API
|
||||||
-export([
|
-export([
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
-include("emqx_lwm2m.hrl").
|
-include("emqx_lwm2m.hrl").
|
||||||
-include_lib("emqx/include/logger.hrl").
|
-include_lib("emqx/include/logger.hrl").
|
||||||
-include_lib("emqx_coap/include/emqx_coap.hrl").
|
-include_lib("emqx_gateway_coap/include/emqx_coap.hrl").
|
||||||
|
|
||||||
-export([
|
-export([
|
||||||
mqtt_to_coap/2,
|
mqtt_to_coap/2,
|
|
@ -20,7 +20,7 @@
|
||||||
-include_lib("emqx/include/emqx.hrl").
|
-include_lib("emqx/include/emqx.hrl").
|
||||||
-include_lib("emqx/include/emqx_mqtt.hrl").
|
-include_lib("emqx/include/emqx_mqtt.hrl").
|
||||||
-include_lib("snabbkaffe/include/snabbkaffe.hrl").
|
-include_lib("snabbkaffe/include/snabbkaffe.hrl").
|
||||||
-include_lib("emqx_coap/include/emqx_coap.hrl").
|
-include_lib("emqx_gateway_coap/include/emqx_coap.hrl").
|
||||||
|
|
||||||
%% API
|
%% API
|
||||||
-export([
|
-export([
|
|
@ -32,7 +32,7 @@
|
||||||
-define(LOGT(Format, Args), ct:pal("TEST_SUITE: " ++ Format, Args)).
|
-define(LOGT(Format, Args), ct:pal("TEST_SUITE: " ++ Format, Args)).
|
||||||
|
|
||||||
-include("emqx_lwm2m.hrl").
|
-include("emqx_lwm2m.hrl").
|
||||||
-include_lib("emqx_coap/include/emqx_coap.hrl").
|
-include_lib("emqx_gateway_coap/include/emqx_coap.hrl").
|
||||||
-include_lib("eunit/include/eunit.hrl").
|
-include_lib("eunit/include/eunit.hrl").
|
||||||
-include_lib("common_test/include/ct.hrl").
|
-include_lib("common_test/include/ct.hrl").
|
||||||
-include_lib("snabbkaffe/include/snabbkaffe.hrl").
|
-include_lib("snabbkaffe/include/snabbkaffe.hrl").
|
||||||
|
@ -134,7 +134,7 @@ groups() ->
|
||||||
init_per_suite(Config) ->
|
init_per_suite(Config) ->
|
||||||
%% load application first for minirest api searching
|
%% load application first for minirest api searching
|
||||||
application:load(emqx_gateway),
|
application:load(emqx_gateway),
|
||||||
application:load(emqx_lwm2m),
|
application:load(emqx_gateway_lwm2m),
|
||||||
emqx_mgmt_api_test_util:init_suite([emqx_conf, emqx_authn]),
|
emqx_mgmt_api_test_util:init_suite([emqx_conf, emqx_authn]),
|
||||||
Config.
|
Config.
|
||||||
|
|
||||||
|
@ -181,7 +181,7 @@ default_config(Overrides) ->
|
||||||
[
|
[
|
||||||
emqx_common_test_helpers:proj_root(),
|
emqx_common_test_helpers:proj_root(),
|
||||||
"apps",
|
"apps",
|
||||||
"emqx_lwm2m",
|
"emqx_gateway_lwm2m",
|
||||||
"lwm2m_xml"
|
"lwm2m_xml"
|
||||||
]
|
]
|
||||||
),
|
),
|
|
@ -24,7 +24,7 @@
|
||||||
-define(LOGT(Format, Args), ct:pal("TEST_SUITE: " ++ Format, Args)).
|
-define(LOGT(Format, Args), ct:pal("TEST_SUITE: " ++ Format, Args)).
|
||||||
|
|
||||||
-include("emqx_lwm2m.hrl").
|
-include("emqx_lwm2m.hrl").
|
||||||
-include("emqx_coap/include/emqx_coap.hrl").
|
-include("emqx_gateway_coap/include/emqx_coap.hrl").
|
||||||
-include_lib("eunit/include/eunit.hrl").
|
-include_lib("eunit/include/eunit.hrl").
|
||||||
-include_lib("common_test/include/ct.hrl").
|
-include_lib("common_test/include/ct.hrl").
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ all() ->
|
||||||
|
|
||||||
init_per_suite(Config) ->
|
init_per_suite(Config) ->
|
||||||
application:load(emqx_gateway),
|
application:load(emqx_gateway),
|
||||||
application:load(emqx_lwm2m),
|
application:load(emqx_gateway_lwm2m),
|
||||||
DefaultConfig = emqx_lwm2m_SUITE:default_config(),
|
DefaultConfig = emqx_lwm2m_SUITE:default_config(),
|
||||||
ok = emqx_common_test_helpers:load_config(emqx_gateway_schema, DefaultConfig),
|
ok = emqx_common_test_helpers:load_config(emqx_gateway_schema, DefaultConfig),
|
||||||
emqx_mgmt_api_test_util:init_suite([emqx_conf, emqx_authn]),
|
emqx_mgmt_api_test_util:init_suite([emqx_conf, emqx_authn]),
|
|
@ -22,7 +22,7 @@
|
||||||
-define(LOGT(Format, Args), logger:debug("TEST_SUITE: " ++ Format, Args)).
|
-define(LOGT(Format, Args), logger:debug("TEST_SUITE: " ++ Format, Args)).
|
||||||
|
|
||||||
-include("emqx_lwm2m.hrl").
|
-include("emqx_lwm2m.hrl").
|
||||||
-include("emqx_coap/include/emqx_coap.hrl").
|
-include("emqx_gateway_coap/include/emqx_coap.hrl").
|
||||||
-include_lib("eunit/include/eunit.hrl").
|
-include_lib("eunit/include/eunit.hrl").
|
||||||
|
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
|
@ -1,4 +1,4 @@
|
||||||
{application, emqx_mqttsn, [
|
{application, emqx_gateway_mqttsn, [
|
||||||
{description, "MQTT-SN Gateway"},
|
{description, "MQTT-SN Gateway"},
|
||||||
{vsn, "0.1.0"},
|
{vsn, "0.1.0"},
|
||||||
{registered, []},
|
{registered, []},
|
|
@ -15,7 +15,7 @@
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
|
|
||||||
%% @doc The MQTT-SN Gateway implement interface
|
%% @doc The MQTT-SN Gateway implement interface
|
||||||
-module(emqx_mqttsn).
|
-module(emqx_gateway_mqttsn).
|
||||||
|
|
||||||
-include_lib("emqx/include/logger.hrl").
|
-include_lib("emqx/include/logger.hrl").
|
||||||
|
|
|
@ -97,7 +97,7 @@ all() ->
|
||||||
emqx_common_test_helpers:all(?MODULE).
|
emqx_common_test_helpers:all(?MODULE).
|
||||||
|
|
||||||
init_per_suite(Config) ->
|
init_per_suite(Config) ->
|
||||||
application:load(emqx_mqttsn),
|
application:load(emqx_gateway_mqttsn),
|
||||||
ok = emqx_common_test_helpers:load_config(emqx_gateway_schema, ?CONF_DEFAULT),
|
ok = emqx_common_test_helpers:load_config(emqx_gateway_schema, ?CONF_DEFAULT),
|
||||||
emqx_mgmt_api_test_util:init_suite([emqx_conf, emqx_authn, emqx_gateway]),
|
emqx_mgmt_api_test_util:init_suite([emqx_conf, emqx_authn, emqx_gateway]),
|
||||||
Config.
|
Config.
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue