From ab2f91c71d4d640f94ab0e3944584e8252094927 Mon Sep 17 00:00:00 2001 From: TeoV Date: Tue, 18 Aug 2020 14:49:11 +0300 Subject: [PATCH] Uniformize the commands in cgr-console between profile and subsystem --- console/{attributes.go => attribute_profile.go} | 2 +- console/{attributes_ids.go => attribute_profile_ids.go} | 2 +- console/{attributes_remove.go => attribute_profile_rem.go} | 2 +- console/{attributes_set.go => attribute_profile_set.go} | 2 +- console/{chargers.go => charger_profile.go} | 2 +- console/{charger_ids.go => charger_profile_ids.go} | 2 +- console/{chargers_remove.go => charger_profile_rem.go} | 2 +- console/{chargers_set.go => charger_profile_set.go} | 2 +- console/{dispatcher_host_remove.go => dispatcher_host_rem.go} | 2 +- console/{dispatcherprofile_get.go => dispatcher_profile.go} | 2 +- console/{dispatcherprofile_ids.go => dispatcher_profile_ids.go} | 2 +- .../{dispatcherprofile_remove.go => dispatcher_profile_rem.go} | 2 +- console/{dispatcherprofile_set.go => dispatcher_profile_set.go} | 2 +- console/{dispatcherprofile.go => dispatchers_for_event.go} | 2 +- console/{filter_remove.go => filter_rem.go} | 2 +- console/{rateprofiles.go => rate_profile.go} | 2 +- console/{rateprofile_ids.go => rate_profile_ids.go} | 2 +- console/{rateprofile_remove.go => rate_profile_rem.go} | 2 +- console/{rateprofile_set.go => rate_profile_set.go} | 2 +- console/{resource_remove.go => resource_profile_rem.go} | 2 +- console/{resource_set.go => resource_profile_set.go} | 2 +- console/{route_get.go => route_profile.go} | 2 +- console/{route_remove.go => route_profile_rem.go} | 2 +- console/{route_set.go => route_profile_set.go} | 2 +- console/{statqueue.go => statqueue_profile.go} | 0 console/{statqueue_remove.go => statqueue_profile_rem.go} | 2 +- console/{statqueue_set.go => statqueue_profile_set.go} | 2 +- console/{threshold_remove.go => threshold_profile_rem.go} | 2 +- console/{threshold_set.go => threshold_profile_set.go} | 2 +- packages/debian/changelog | 1 + 30 files changed, 29 insertions(+), 28 deletions(-) rename console/{attributes.go => attribute_profile.go} (97%) rename console/{attributes_ids.go => attribute_profile_ids.go} (97%) rename console/{attributes_remove.go => attribute_profile_rem.go} (97%) rename console/{attributes_set.go => attribute_profile_set.go} (97%) rename console/{chargers.go => charger_profile.go} (98%) rename console/{charger_ids.go => charger_profile_ids.go} (97%) rename console/{chargers_remove.go => charger_profile_rem.go} (97%) rename console/{chargers_set.go => charger_profile_set.go} (97%) rename console/{dispatcher_host_remove.go => dispatcher_host_rem.go} (97%) rename console/{dispatcherprofile_get.go => dispatcher_profile.go} (97%) rename console/{dispatcherprofile_ids.go => dispatcher_profile_ids.go} (97%) rename console/{dispatcherprofile_remove.go => dispatcher_profile_rem.go} (97%) rename console/{dispatcherprofile_set.go => dispatcher_profile_set.go} (97%) rename console/{dispatcherprofile.go => dispatchers_for_event.go} (97%) rename console/{filter_remove.go => filter_rem.go} (98%) rename console/{rateprofiles.go => rate_profile.go} (98%) rename console/{rateprofile_ids.go => rate_profile_ids.go} (98%) rename console/{rateprofile_remove.go => rate_profile_rem.go} (97%) rename console/{rateprofile_set.go => rate_profile_set.go} (98%) rename console/{resource_remove.go => resource_profile_rem.go} (97%) rename console/{resource_set.go => resource_profile_set.go} (97%) rename console/{route_get.go => route_profile.go} (98%) rename console/{route_remove.go => route_profile_rem.go} (97%) rename console/{route_set.go => route_profile_set.go} (97%) rename console/{statqueue.go => statqueue_profile.go} (100%) rename console/{statqueue_remove.go => statqueue_profile_rem.go} (97%) rename console/{statqueue_set.go => statqueue_profile_set.go} (97%) rename console/{threshold_remove.go => threshold_profile_rem.go} (97%) rename console/{threshold_set.go => threshold_profile_set.go} (97%) diff --git a/console/attributes.go b/console/attribute_profile.go similarity index 97% rename from console/attributes.go rename to console/attribute_profile.go index 39690f745..659550874 100644 --- a/console/attributes.go +++ b/console/attribute_profile.go @@ -25,7 +25,7 @@ import ( func init() { c := &CmdGetAttributes{ - name: "attributes", + name: "attribute_profile", rpcMethod: utils.APIerSv1GetAttributeProfile, rpcParams: &utils.TenantID{}, } diff --git a/console/attributes_ids.go b/console/attribute_profile_ids.go similarity index 97% rename from console/attributes_ids.go rename to console/attribute_profile_ids.go index 4d3f01e54..362b20bbf 100644 --- a/console/attributes_ids.go +++ b/console/attribute_profile_ids.go @@ -24,7 +24,7 @@ import ( func init() { c := &CmdGetAttributeIDs{ - name: "attribute_ids", + name: "attribute_profile_ids", rpcMethod: utils.APIerSv1GetAttributeProfileIDs, rpcParams: &utils.TenantArgWithPaginator{}, } diff --git a/console/attributes_remove.go b/console/attribute_profile_rem.go similarity index 97% rename from console/attributes_remove.go rename to console/attribute_profile_rem.go index ace8a8701..6c50c6c65 100644 --- a/console/attributes_remove.go +++ b/console/attribute_profile_rem.go @@ -22,7 +22,7 @@ import "github.com/cgrates/cgrates/utils" func init() { c := &CmdRemoveAttributes{ - name: "attributes_remove", + name: "attribute_profile_rem", rpcMethod: utils.APIerSv1RemoveAttributeProfile, rpcParams: &utils.TenantIDWithCache{}, } diff --git a/console/attributes_set.go b/console/attribute_profile_set.go similarity index 97% rename from console/attributes_set.go rename to console/attribute_profile_set.go index 5d4f7c179..2fe0ee64f 100644 --- a/console/attributes_set.go +++ b/console/attribute_profile_set.go @@ -26,7 +26,7 @@ import ( func init() { c := &CmdSetAttributes{ - name: "attributes_set", + name: "attribute_profile_set", rpcMethod: utils.APIerSv2SetAttributeProfile, rpcParams: &v2.AttributeWithCache{}, } diff --git a/console/chargers.go b/console/charger_profile.go similarity index 98% rename from console/chargers.go rename to console/charger_profile.go index 112e09151..f56a70a3b 100644 --- a/console/chargers.go +++ b/console/charger_profile.go @@ -25,7 +25,7 @@ import ( func init() { c := &CmdGetChargers{ - name: "chargers", + name: "charger_profile", rpcMethod: utils.APIerSv1GetChargerProfile, rpcParams: &utils.TenantID{}, } diff --git a/console/charger_ids.go b/console/charger_profile_ids.go similarity index 97% rename from console/charger_ids.go rename to console/charger_profile_ids.go index 4d036749c..ce1641fcb 100644 --- a/console/charger_ids.go +++ b/console/charger_profile_ids.go @@ -24,7 +24,7 @@ import ( func init() { c := &CmdGetChargerIDs{ - name: "chargers_ids", + name: "charger_profile_ids", rpcMethod: utils.APIerSv1GetChargerProfileIDs, rpcParams: &utils.TenantArgWithPaginator{}, } diff --git a/console/chargers_remove.go b/console/charger_profile_rem.go similarity index 97% rename from console/chargers_remove.go rename to console/charger_profile_rem.go index 9a7c75887..bdac93bc0 100644 --- a/console/chargers_remove.go +++ b/console/charger_profile_rem.go @@ -22,7 +22,7 @@ import "github.com/cgrates/cgrates/utils" func init() { c := &CmdRemoveChargers{ - name: "chargers_remove", + name: "charger_profile_rem", rpcMethod: utils.APIerSv1RemoveChargerProfile, rpcParams: &utils.TenantID{}, } diff --git a/console/chargers_set.go b/console/charger_profile_set.go similarity index 97% rename from console/chargers_set.go rename to console/charger_profile_set.go index a6a19a9fb..b6a48f042 100644 --- a/console/chargers_set.go +++ b/console/charger_profile_set.go @@ -26,7 +26,7 @@ import ( func init() { c := &CmdSetChargers{ - name: "chargers_set", + name: "charger_profile_set", rpcMethod: utils.APIerSv1SetChargerProfile, rpcParams: &v1.ChargerWithCache{}, } diff --git a/console/dispatcher_host_remove.go b/console/dispatcher_host_rem.go similarity index 97% rename from console/dispatcher_host_remove.go rename to console/dispatcher_host_rem.go index e90668043..7b298dc8e 100644 --- a/console/dispatcher_host_remove.go +++ b/console/dispatcher_host_rem.go @@ -24,7 +24,7 @@ import ( func init() { c := &CmdRemoveDispatcherHost{ - name: "dispatcher_host_remove", + name: "dispatcher_host_rem", rpcMethod: utils.APIerSv1RemoveDispatcherHost, } commands[c.Name()] = c diff --git a/console/dispatcherprofile_get.go b/console/dispatcher_profile.go similarity index 97% rename from console/dispatcherprofile_get.go rename to console/dispatcher_profile.go index 2e9374e04..aa9805068 100644 --- a/console/dispatcherprofile_get.go +++ b/console/dispatcher_profile.go @@ -25,7 +25,7 @@ import ( func init() { c := &CmdGetDispatcherProfile{ - name: "dispatcherprofile_get", + name: "dispatcher_profile", rpcMethod: utils.APIerSv1GetDispatcherProfile, } commands[c.Name()] = c diff --git a/console/dispatcherprofile_ids.go b/console/dispatcher_profile_ids.go similarity index 97% rename from console/dispatcherprofile_ids.go rename to console/dispatcher_profile_ids.go index bfbcb4bcf..447089fc3 100644 --- a/console/dispatcherprofile_ids.go +++ b/console/dispatcher_profile_ids.go @@ -24,7 +24,7 @@ import ( func init() { c := &CmdGetDispatcherProfileIDs{ - name: "dispatcherprofile_ids", + name: "dispatcher_profile_ids", rpcMethod: utils.APIerSv1GetDispatcherProfileIDs, } commands[c.Name()] = c diff --git a/console/dispatcherprofile_remove.go b/console/dispatcher_profile_rem.go similarity index 97% rename from console/dispatcherprofile_remove.go rename to console/dispatcher_profile_rem.go index 988055151..4e0d64cd5 100644 --- a/console/dispatcherprofile_remove.go +++ b/console/dispatcher_profile_rem.go @@ -24,7 +24,7 @@ import ( func init() { c := &CmdRemoveDispatcherProfile{ - name: "dispatcherprofile_remove", + name: "dispatcher_profile_rem", rpcMethod: utils.APIerSv1RemoveDispatcherProfile, } commands[c.Name()] = c diff --git a/console/dispatcherprofile_set.go b/console/dispatcher_profile_set.go similarity index 97% rename from console/dispatcherprofile_set.go rename to console/dispatcher_profile_set.go index ef4cddd93..137c4973c 100644 --- a/console/dispatcherprofile_set.go +++ b/console/dispatcher_profile_set.go @@ -25,7 +25,7 @@ import ( func init() { c := &CmdSetDispatcherProfile{ - name: "dispatcherprofile_set", + name: "dispatcher_profile_set", rpcMethod: utils.APIerSv1SetDispatcherProfile, } commands[c.Name()] = c diff --git a/console/dispatcherprofile.go b/console/dispatchers_for_event.go similarity index 97% rename from console/dispatcherprofile.go rename to console/dispatchers_for_event.go index 47d8b1eca..07565d25e 100644 --- a/console/dispatcherprofile.go +++ b/console/dispatchers_for_event.go @@ -25,7 +25,7 @@ import ( func init() { c := &CmdDispatcherProfile{ - name: "dispatcherprofile", + name: "dispatches_for_event", rpcMethod: utils.DispatcherSv1GetProfileForEvent, } commands[c.Name()] = c diff --git a/console/filter_remove.go b/console/filter_rem.go similarity index 98% rename from console/filter_remove.go rename to console/filter_rem.go index 58d7ba296..e62c8343a 100644 --- a/console/filter_remove.go +++ b/console/filter_rem.go @@ -22,7 +22,7 @@ import "github.com/cgrates/cgrates/utils" func init() { c := &CmdRemoveFilter{ - name: "filter_remove", + name: "filter_rem", rpcMethod: utils.APIerSv1RemoveFilter, rpcParams: &utils.TenantIDWithCache{}, } diff --git a/console/rateprofiles.go b/console/rate_profile.go similarity index 98% rename from console/rateprofiles.go rename to console/rate_profile.go index 3feea2556..3d100c7e7 100644 --- a/console/rateprofiles.go +++ b/console/rate_profile.go @@ -25,7 +25,7 @@ import ( func init() { c := &CmdGetRateProfile{ - name: "rateprofile", + name: "rate_profile", rpcMethod: utils.APIerSv1GetRateProfile, rpcParams: &utils.TenantID{}, } diff --git a/console/rateprofile_ids.go b/console/rate_profile_ids.go similarity index 98% rename from console/rateprofile_ids.go rename to console/rate_profile_ids.go index 3bc20a9b4..824c209fa 100644 --- a/console/rateprofile_ids.go +++ b/console/rate_profile_ids.go @@ -24,7 +24,7 @@ import ( func init() { c := &CmdRateProfileIDs{ - name: "rateprofile_ids", + name: "rate_profile_ids", rpcMethod: utils.APIerSv1GetRateProfileIDs, rpcParams: &utils.TenantArgWithPaginator{}, } diff --git a/console/rateprofile_remove.go b/console/rate_profile_rem.go similarity index 97% rename from console/rateprofile_remove.go rename to console/rate_profile_rem.go index dbf1fe7d9..82f5ce71b 100644 --- a/console/rateprofile_remove.go +++ b/console/rate_profile_rem.go @@ -22,7 +22,7 @@ import "github.com/cgrates/cgrates/utils" func init() { c := &CmdRemoveRateProfile{ - name: "rateprofile_remove", + name: "rate_profile_remove", rpcMethod: utils.APIerSv1RemoveRateProfile, rpcParams: &utils.TenantIDWithCache{}, } diff --git a/console/rateprofile_set.go b/console/rate_profile_set.go similarity index 98% rename from console/rateprofile_set.go rename to console/rate_profile_set.go index 307906f7b..7fcbdcf8e 100644 --- a/console/rateprofile_set.go +++ b/console/rate_profile_set.go @@ -26,7 +26,7 @@ import ( func init() { c := &CmdSetRateProfile{ - name: "rateprofile_set", + name: "rate_profile_set", rpcMethod: utils.APIerSv1SetRateProfile, rpcParams: &v1.RateProfileWithCache{}, } diff --git a/console/resource_remove.go b/console/resource_profile_rem.go similarity index 97% rename from console/resource_remove.go rename to console/resource_profile_rem.go index f3907fa7e..9bb750993 100644 --- a/console/resource_remove.go +++ b/console/resource_profile_rem.go @@ -22,7 +22,7 @@ import "github.com/cgrates/cgrates/utils" func init() { c := &CmdRemoveResource{ - name: "resource_remove", + name: "resource_profile_rem", rpcMethod: utils.APIerSv1RemoveResourceProfile, rpcParams: &utils.TenantIDWithCache{}, } diff --git a/console/resource_set.go b/console/resource_profile_set.go similarity index 97% rename from console/resource_set.go rename to console/resource_profile_set.go index 298e02203..d6c189c9d 100644 --- a/console/resource_set.go +++ b/console/resource_profile_set.go @@ -25,7 +25,7 @@ import ( func init() { c := &CmdSetResource{ - name: "resource_set", + name: "resource_profile_set", rpcMethod: utils.APIerSv1SetResourceProfile, rpcParams: &v1.ResourceWithCache{}, } diff --git a/console/route_get.go b/console/route_profile.go similarity index 98% rename from console/route_get.go rename to console/route_profile.go index 4f4498a0e..5f024f44a 100644 --- a/console/route_get.go +++ b/console/route_profile.go @@ -25,7 +25,7 @@ import ( func init() { c := &CmdGetRoute{ - name: "route_get", + name: "route_profile", rpcMethod: utils.APIerSv1GetRouteProfile, rpcParams: &utils.TenantID{}, } diff --git a/console/route_remove.go b/console/route_profile_rem.go similarity index 97% rename from console/route_remove.go rename to console/route_profile_rem.go index 3a1017e2d..76101a17d 100644 --- a/console/route_remove.go +++ b/console/route_profile_rem.go @@ -22,7 +22,7 @@ import "github.com/cgrates/cgrates/utils" func init() { c := &CmdRemoveRoute{ - name: "route_remove", + name: "route_profile_rem", rpcMethod: utils.APIerSv1RemoveRouteProfile, rpcParams: &utils.TenantIDWithCache{}, } diff --git a/console/route_set.go b/console/route_profile_set.go similarity index 97% rename from console/route_set.go rename to console/route_profile_set.go index c26c33823..0e95e577a 100644 --- a/console/route_set.go +++ b/console/route_profile_set.go @@ -26,7 +26,7 @@ import ( func init() { c := &CmdSetRoute{ - name: "route_set", + name: "route_profile_set", rpcMethod: utils.APIerSv1SetRouteProfile, rpcParams: &v1.RouteWithCache{}, } diff --git a/console/statqueue.go b/console/statqueue_profile.go similarity index 100% rename from console/statqueue.go rename to console/statqueue_profile.go diff --git a/console/statqueue_remove.go b/console/statqueue_profile_rem.go similarity index 97% rename from console/statqueue_remove.go rename to console/statqueue_profile_rem.go index fe88f973e..ba952c89f 100644 --- a/console/statqueue_remove.go +++ b/console/statqueue_profile_rem.go @@ -22,7 +22,7 @@ import "github.com/cgrates/cgrates/utils" func init() { c := &CmdRemoveStatQueue{ - name: "statqueue_remove", + name: "statqueue_profile_rem", rpcMethod: utils.APIerSv1RemoveStatQueueProfile, rpcParams: &utils.TenantIDWithCache{}, } diff --git a/console/statqueue_set.go b/console/statqueue_profile_set.go similarity index 97% rename from console/statqueue_set.go rename to console/statqueue_profile_set.go index 7fc97db36..dde6b4851 100644 --- a/console/statqueue_set.go +++ b/console/statqueue_profile_set.go @@ -25,7 +25,7 @@ import ( func init() { c := &CmdSetStatQueue{ - name: "statqueue_set", + name: "statqueue_profile_set", rpcMethod: utils.APIerSv1SetStatQueueProfile, rpcParams: &engine.StatQueueWithCache{}, } diff --git a/console/threshold_remove.go b/console/threshold_profile_rem.go similarity index 97% rename from console/threshold_remove.go rename to console/threshold_profile_rem.go index 2da1e327a..6b4c8b471 100644 --- a/console/threshold_remove.go +++ b/console/threshold_profile_rem.go @@ -22,7 +22,7 @@ import "github.com/cgrates/cgrates/utils" func init() { c := &CmdRemoveThreshold{ - name: "threshold_remove", + name: "threshold_profile_rem", rpcMethod: utils.APIerSv1RemoveThresholdProfile, rpcParams: &utils.TenantIDWithCache{}, } diff --git a/console/threshold_set.go b/console/threshold_profile_set.go similarity index 97% rename from console/threshold_set.go rename to console/threshold_profile_set.go index c92e38c1b..312dd29a4 100644 --- a/console/threshold_set.go +++ b/console/threshold_profile_set.go @@ -25,7 +25,7 @@ import ( func init() { c := &CmdSetThreshold{ - name: "threshold_set", + name: "threshold_profile_set", rpcMethod: utils.APIerSv1SetThresholdProfile, rpcParams: &engine.ThresholdWithCache{}, } diff --git a/packages/debian/changelog b/packages/debian/changelog index 88f8122ef..0c5ee9bb1 100644 --- a/packages/debian/changelog +++ b/packages/debian/changelog @@ -92,6 +92,7 @@ cgrates (0.11.0~dev) UNRELEASED; urgency=medium * [LoaderS] In case of empty output directory path don't move the processed file * [FilterS] Added *ipnet filter to check if the network contains the IP * [CacheS] Updated ReloadCache and LoadCache APIs to use a map instead of a structure to be compatible with gob encoding + * [CGR-CONSOLE] Uniformize the commands between profile and subsystem -- DanB Wed, 19 Feb 2020 13:25:52 +0200