From 41f32401a7637aeee859e1960b22e185ef7463b5 Mon Sep 17 00:00:00 2001 From: Irina Peshinskaya Date: Fri, 17 Feb 2017 07:49:51 +0200 Subject: [PATCH] TT#9309 Introduce local version of the Data::HAL with default forcearray Change-Id: Ie33396a75fc6d27fd28fe8f7717caba0a476c776 --- lib/NGCP/Panel/Controller/API/Admins.pm | 4 ++-- .../Panel/Controller/API/ApplyRewrites.pm | 2 +- .../Panel/Controller/API/AutoAttendants.pm | 4 ++-- .../Controller/API/AutoAttendantsItem.pm | 2 +- .../Panel/Controller/API/BalanceIntervals.pm | 4 ++-- .../Controller/API/BalanceIntervalsItem.pm | 2 +- lib/NGCP/Panel/Controller/API/BillingFees.pm | 4 ++-- .../Panel/Controller/API/BillingNetworks.pm | 4 ++-- .../Controller/API/BillingNetworksItem.pm | 2 +- .../Panel/Controller/API/BillingProfiles.pm | 4 ++-- lib/NGCP/Panel/Controller/API/BillingZones.pm | 4 ++-- lib/NGCP/Panel/Controller/API/CCMapEntries.pm | 4 ++-- .../Panel/Controller/API/CCMapEntriesItem.pm | 2 +- .../Panel/Controller/API/CFDestinationSets.pm | 4 ++-- .../Controller/API/CFDestinationSetsItem.pm | 2 +- lib/NGCP/Panel/Controller/API/CFMappings.pm | 4 ++-- .../Panel/Controller/API/CFMappingsItem.pm | 2 +- lib/NGCP/Panel/Controller/API/CFSourceSets.pm | 4 ++-- .../Panel/Controller/API/CFSourceSetsItem.pm | 2 +- lib/NGCP/Panel/Controller/API/CFTimeSets.pm | 4 ++-- .../Panel/Controller/API/CFTimeSetsItem.pm | 2 +- lib/NGCP/Panel/Controller/API/CallControls.pm | 2 +- lib/NGCP/Panel/Controller/API/CallForwards.pm | 4 ++-- .../Panel/Controller/API/CallForwardsItem.pm | 2 +- lib/NGCP/Panel/Controller/API/CallLists.pm | 4 ++-- lib/NGCP/Panel/Controller/API/Calls.pm | 4 ++-- lib/NGCP/Panel/Controller/API/Contracts.pm | 4 ++-- .../Panel/Controller/API/ContractsItem.pm | 2 +- .../Panel/Controller/API/CustomerBalances.pm | 4 ++-- .../Panel/Controller/API/CustomerContacts.pm | 4 ++-- .../Controller/API/CustomerFraudEvents.pm | 4 ++-- .../API/CustomerFraudPreferences.pm | 4 ++-- .../Panel/Controller/API/CustomerLocations.pm | 4 ++-- .../Controller/API/CustomerLocationsItem.pm | 2 +- .../Controller/API/CustomerPreferenceDefs.pm | 4 ++-- .../Controller/API/CustomerPreferences.pm | 4 ++-- .../Controller/API/CustomerPreferencesItem.pm | 2 +- .../Panel/Controller/API/CustomerZoneCosts.pm | 4 ++-- .../Controller/API/CustomerZoneCostsItem.pm | 2 +- lib/NGCP/Panel/Controller/API/Customers.pm | 4 ++-- .../Panel/Controller/API/CustomersItem.pm | 2 +- .../Controller/API/DomainPreferenceDefs.pm | 4 ++-- .../Panel/Controller/API/DomainPreferences.pm | 4 ++-- .../Controller/API/DomainPreferencesItem.pm | 2 +- lib/NGCP/Panel/Controller/API/Domains.pm | 4 ++-- lib/NGCP/Panel/Controller/API/DomainsItem.pm | 2 +- .../Panel/Controller/API/EmailTemplates.pm | 4 ++-- .../API/EmergencyMappingContainers.pm | 4 ++-- .../Panel/Controller/API/EmergencyMappings.pm | 4 ++-- lib/NGCP/Panel/Controller/API/Events.pm | 4 ++-- .../Panel/Controller/API/FaxRecordings.pm | 2 +- lib/NGCP/Panel/Controller/API/Faxes.pm | 4 ++-- .../Panel/Controller/API/FaxserverSettings.pm | 4 ++-- .../Controller/API/FaxserverSettingsItem.pm | 2 +- .../Panel/Controller/API/Interceptions.pm | 4 ++-- .../Panel/Controller/API/InvoiceTemplates.pm | 4 ++-- lib/NGCP/Panel/Controller/API/Invoices.pm | 4 ++-- lib/NGCP/Panel/Controller/API/LnpCarriers.pm | 4 ++-- lib/NGCP/Panel/Controller/API/LnpNumbers.pm | 4 ++-- .../Panel/Controller/API/MailToFaxSettings.pm | 4 ++-- .../Controller/API/MailToFaxSettingsItem.pm | 2 +- .../Panel/Controller/API/MaliciousCalls.pm | 4 ++-- .../Panel/Controller/API/MetaConfigDefs.pm | 4 ++-- lib/NGCP/Panel/Controller/API/NcosLevels.pm | 4 ++-- .../Panel/Controller/API/NcosLnpCarriers.pm | 4 ++-- lib/NGCP/Panel/Controller/API/NcosPatterns.pm | 4 ++-- .../Panel/Controller/API/PartyCallControls.pm | 2 +- .../Controller/API/PbxDeviceConfigFiles.pm | 2 +- .../Panel/Controller/API/PbxDeviceConfigs.pm | 4 ++-- .../API/PbxDeviceFirmwareBinaries.pm | 2 +- .../Controller/API/PbxDeviceFirmwares.pm | 4 ++-- .../Controller/API/PbxDeviceModelImages.pm | 2 +- .../Panel/Controller/API/PbxDeviceModels.pm | 4 ++-- .../Controller/API/PbxDeviceModelsItem.pm | 2 +- .../Controller/API/PbxDevicePreferenceDefs.pm | 4 ++-- .../Controller/API/PbxDevicePreferences.pm | 4 ++-- .../API/PbxDevicePreferencesItem.pm | 2 +- .../API/PbxDeviceProfilePreferenceDefs.pm | 4 ++-- .../API/PbxDeviceProfilePreferences.pm | 4 ++-- .../API/PbxDeviceProfilePreferencesItem.pm | 2 +- .../Panel/Controller/API/PbxDeviceProfiles.pm | 4 ++-- .../Controller/API/PbxDeviceProfilesItem.pm | 2 +- lib/NGCP/Panel/Controller/API/PbxDevices.pm | 4 ++-- .../Panel/Controller/API/PbxDevicesItem.pm | 2 +- .../Panel/Controller/API/PeeringGroups.pm | 4 ++-- .../Controller/API/PeeringInboundRules.pm | 4 ++-- lib/NGCP/Panel/Controller/API/PeeringRules.pm | 4 ++-- .../API/PeeringServerPreferenceDefs.pm | 4 ++-- .../API/PeeringServerPreferences.pm | 4 ++-- .../API/PeeringServerPreferencesItem.pm | 2 +- .../Panel/Controller/API/PeeringServers.pm | 4 ++-- .../Panel/Controller/API/ProfilePackages.pm | 4 ++-- .../Controller/API/ProfilePreferenceDefs.pm | 4 ++-- .../Controller/API/ProfilePreferences.pm | 4 ++-- .../Controller/API/ProfilePreferencesItem.pm | 2 +- lib/NGCP/Panel/Controller/API/Reminders.pm | 4 ++-- lib/NGCP/Panel/Controller/API/Resellers.pm | 4 ++-- .../Panel/Controller/API/RewriteRuleSets.pm | 4 ++-- .../Controller/API/RewriteRuleSetsItem.pm | 2 +- lib/NGCP/Panel/Controller/API/RewriteRules.pm | 4 ++-- .../Panel/Controller/API/RewriteRulesItem.pm | 2 +- lib/NGCP/Panel/Controller/API/RtcApps.pm | 4 ++-- lib/NGCP/Panel/Controller/API/RtcAppsItem.pm | 2 +- lib/NGCP/Panel/Controller/API/RtcNetworks.pm | 4 ++-- .../Panel/Controller/API/RtcNetworksItem.pm | 2 +- lib/NGCP/Panel/Controller/API/RtcSessions.pm | 4 ++-- .../Panel/Controller/API/RtcSessionsItem.pm | 2 +- .../Controller/API/SoundFileRecordings.pm | 2 +- lib/NGCP/Panel/Controller/API/SoundFiles.pm | 4 ++-- lib/NGCP/Panel/Controller/API/SoundHandles.pm | 4 ++-- lib/NGCP/Panel/Controller/API/SoundSets.pm | 4 ++-- lib/NGCP/Panel/Controller/API/SpeedDials.pm | 4 ++-- .../Panel/Controller/API/SpeedDialsItem.pm | 2 +- .../API/SubscriberPreferenceDefs.pm | 4 ++-- .../Controller/API/SubscriberPreferences.pm | 4 ++-- .../API/SubscriberPreferencesItem.pm | 2 +- .../Controller/API/SubscriberProfileSets.pm | 4 ++-- .../Controller/API/SubscriberProfiles.pm | 4 ++-- .../Controller/API/SubscriberRegistrations.pm | 4 ++-- lib/NGCP/Panel/Controller/API/Subscribers.pm | 4 ++-- .../Panel/Controller/API/SubscribersItem.pm | 2 +- .../Panel/Controller/API/SystemContacts.pm | 4 ++-- lib/NGCP/Panel/Controller/API/TopupCash.pm | 2 +- lib/NGCP/Panel/Controller/API/TopupLogs.pm | 4 ++-- .../Panel/Controller/API/TopupVouchers.pm | 2 +- .../Panel/Controller/API/TrustedSources.pm | 4 ++-- .../Panel/Controller/API/UpnRewriteSets.pm | 4 ++-- .../Controller/API/VoicemailRecordings.pm | 2 +- .../Panel/Controller/API/VoicemailSettings.pm | 4 ++-- lib/NGCP/Panel/Controller/API/Voicemails.pm | 4 ++-- lib/NGCP/Panel/Controller/API/Vouchers.pm | 4 ++-- lib/NGCP/Panel/Role/API.pm | 4 ++-- lib/NGCP/Panel/Role/API/Admins.pm | 4 ++-- lib/NGCP/Panel/Role/API/ApplyRewrites.pm | 2 +- lib/NGCP/Panel/Role/API/AutoAttendants.pm | 4 ++-- lib/NGCP/Panel/Role/API/BalanceIntervals.pm | 4 ++-- lib/NGCP/Panel/Role/API/BillingFees.pm | 4 ++-- lib/NGCP/Panel/Role/API/BillingNetworks.pm | 4 ++-- lib/NGCP/Panel/Role/API/BillingProfiles.pm | 4 ++-- lib/NGCP/Panel/Role/API/BillingZones.pm | 4 ++-- lib/NGCP/Panel/Role/API/CCMapEntries.pm | 4 ++-- lib/NGCP/Panel/Role/API/CFDestinationSets.pm | 4 ++-- lib/NGCP/Panel/Role/API/CFMappings.pm | 4 ++-- lib/NGCP/Panel/Role/API/CFSourceSets.pm | 4 ++-- lib/NGCP/Panel/Role/API/CFTimeSets.pm | 4 ++-- lib/NGCP/Panel/Role/API/CallControls.pm | 2 +- lib/NGCP/Panel/Role/API/CallForwards.pm | 4 ++-- lib/NGCP/Panel/Role/API/CallLists.pm | 4 ++-- lib/NGCP/Panel/Role/API/Calls.pm | 4 ++-- lib/NGCP/Panel/Role/API/Contracts.pm | 4 ++-- lib/NGCP/Panel/Role/API/CustomerBalances.pm | 4 ++-- lib/NGCP/Panel/Role/API/CustomerContacts.pm | 4 ++-- .../Panel/Role/API/CustomerFraudEvents.pm | 4 ++-- .../Role/API/CustomerFraudPreferences.pm | 4 ++-- lib/NGCP/Panel/Role/API/CustomerLocations.pm | 4 ++-- lib/NGCP/Panel/Role/API/CustomerZoneCosts.pm | 4 ++-- lib/NGCP/Panel/Role/API/Customers.pm | 4 ++-- lib/NGCP/Panel/Role/API/Domains.pm | 4 ++-- lib/NGCP/Panel/Role/API/EmailTemplates.pm | 4 ++-- .../Role/API/EmergencyMappingContainers.pm | 4 ++-- lib/NGCP/Panel/Role/API/EmergencyMappings.pm | 4 ++-- lib/NGCP/Panel/Role/API/Events.pm | 4 ++-- lib/NGCP/Panel/Role/API/Faxes.pm | 4 ++-- lib/NGCP/Panel/Role/API/FaxserverSettings.pm | 4 ++-- lib/NGCP/Panel/Role/API/Interceptions.pm | 4 ++-- lib/NGCP/Panel/Role/API/InvoiceTemplates.pm | 4 ++-- lib/NGCP/Panel/Role/API/Invoices.pm | 4 ++-- lib/NGCP/Panel/Role/API/LnpCarriers.pm | 4 ++-- lib/NGCP/Panel/Role/API/LnpNumbers.pm | 4 ++-- lib/NGCP/Panel/Role/API/MailToFaxSettings.pm | 4 ++-- lib/NGCP/Panel/Role/API/MaliciousCalls.pm | 4 ++-- lib/NGCP/Panel/Role/API/NcosLevels.pm | 4 ++-- lib/NGCP/Panel/Role/API/NcosLnpCarriers.pm | 4 ++-- lib/NGCP/Panel/Role/API/NcosPatterns.pm | 4 ++-- lib/NGCP/Panel/Role/API/PartyCallControls.pm | 2 +- lib/NGCP/Panel/Role/API/PbxDeviceConfigs.pm | 4 ++-- lib/NGCP/Panel/Role/API/PbxDeviceFirmwares.pm | 4 ++-- lib/NGCP/Panel/Role/API/PbxDeviceModels.pm | 4 ++-- lib/NGCP/Panel/Role/API/PbxDeviceProfiles.pm | 4 ++-- lib/NGCP/Panel/Role/API/PbxDevices.pm | 4 ++-- lib/NGCP/Panel/Role/API/PeeringGroups.pm | 4 ++-- .../Panel/Role/API/PeeringInboundRules.pm | 4 ++-- lib/NGCP/Panel/Role/API/PeeringRules.pm | 4 ++-- lib/NGCP/Panel/Role/API/PeeringServers.pm | 4 ++-- lib/NGCP/Panel/Role/API/Preferences.pm | 4 ++-- lib/NGCP/Panel/Role/API/ProfilePackages.pm | 4 ++-- lib/NGCP/Panel/Role/API/Reminders.pm | 4 ++-- lib/NGCP/Panel/Role/API/Resellers.pm | 4 ++-- lib/NGCP/Panel/Role/API/RewriteRuleSets.pm | 4 ++-- lib/NGCP/Panel/Role/API/RewriteRules.pm | 4 ++-- lib/NGCP/Panel/Role/API/RtcApps.pm | 4 ++-- lib/NGCP/Panel/Role/API/RtcNetworks.pm | 4 ++-- lib/NGCP/Panel/Role/API/RtcSessions.pm | 4 ++-- lib/NGCP/Panel/Role/API/SoundFiles.pm | 4 ++-- lib/NGCP/Panel/Role/API/SoundHandles.pm | 4 ++-- lib/NGCP/Panel/Role/API/SoundSets.pm | 4 ++-- lib/NGCP/Panel/Role/API/SpeedDials.pm | 4 ++-- .../Panel/Role/API/SubscriberProfileSets.pm | 4 ++-- lib/NGCP/Panel/Role/API/SubscriberProfiles.pm | 4 ++-- .../Panel/Role/API/SubscriberRegistrations.pm | 4 ++-- lib/NGCP/Panel/Role/API/Subscribers.pm | 4 ++-- lib/NGCP/Panel/Role/API/SystemContacts.pm | 4 ++-- lib/NGCP/Panel/Role/API/TopupLogs.pm | 4 ++-- lib/NGCP/Panel/Role/API/TrustedSources.pm | 4 ++-- lib/NGCP/Panel/Role/API/UpnRewriteSets.pm | 4 ++-- lib/NGCP/Panel/Role/API/VoicemailSettings.pm | 4 ++-- lib/NGCP/Panel/Role/API/Voicemails.pm | 4 ++-- lib/NGCP/Panel/Role/API/Vouchers.pm | 4 ++-- lib/NGCP/Panel/Role/Entities.pm | 4 ++-- lib/NGCP/Panel/Role/EntitiesItem.pm | 2 +- lib/NGCP/Panel/Utils/DataHal.pm | 23 +++++++++++++++++++ lib/NGCP/Panel/Utils/Journal.pm | 8 +++---- t/api-rest/api-all.t | 6 ++++- 213 files changed, 404 insertions(+), 377 deletions(-) create mode 100644 lib/NGCP/Panel/Utils/DataHal.pm diff --git a/lib/NGCP/Panel/Controller/API/Admins.pm b/lib/NGCP/Panel/Controller/API/Admins.pm index 12a37d4599..f2f87bb3d9 100644 --- a/lib/NGCP/Panel/Controller/API/Admins.pm +++ b/lib/NGCP/Panel/Controller/API/Admins.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -116,7 +116,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/ApplyRewrites.pm b/lib/NGCP/Panel/Controller/API/ApplyRewrites.pm index 1001f8d20a..a345a840c9 100644 --- a/lib/NGCP/Panel/Controller/API/ApplyRewrites.pm +++ b/lib/NGCP/Panel/Controller/API/ApplyRewrites.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/AutoAttendants.pm b/lib/NGCP/Panel/Controller/API/AutoAttendants.pm index 7988527b98..413f64ebee 100644 --- a/lib/NGCP/Panel/Controller/API/AutoAttendants.pm +++ b/lib/NGCP/Panel/Controller/API/AutoAttendants.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -98,7 +98,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/AutoAttendantsItem.pm b/lib/NGCP/Panel/Controller/API/AutoAttendantsItem.pm index db6b4ba6d7..c87ff1b2a0 100644 --- a/lib/NGCP/Panel/Controller/API/AutoAttendantsItem.pm +++ b/lib/NGCP/Panel/Controller/API/AutoAttendantsItem.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/BalanceIntervals.pm b/lib/NGCP/Panel/Controller/API/BalanceIntervals.pm index a54510793f..927593b730 100644 --- a/lib/NGCP/Panel/Controller/API/BalanceIntervals.pm +++ b/lib/NGCP/Panel/Controller/API/BalanceIntervals.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -150,7 +150,7 @@ sub GET :Allow { push @links, $self->collection_nav_links($page, $rows, $total_count, $c->request->path, $c->request->query_params); - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/BalanceIntervalsItem.pm b/lib/NGCP/Panel/Controller/API/BalanceIntervalsItem.pm index 5c741f0373..fbaf51d0e1 100644 --- a/lib/NGCP/Panel/Controller/API/BalanceIntervalsItem.pm +++ b/lib/NGCP/Panel/Controller/API/BalanceIntervalsItem.pm @@ -147,7 +147,7 @@ sub GET :Allow { push @links, $self->collection_nav_links($page, $rows, $total_count, $c->request->path, $c->request->query_params); - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/BillingFees.pm b/lib/NGCP/Panel/Controller/API/BillingFees.pm index e9391376a8..fe704eb1a6 100644 --- a/lib/NGCP/Panel/Controller/API/BillingFees.pm +++ b/lib/NGCP/Panel/Controller/API/BillingFees.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -110,7 +110,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/BillingNetworks.pm b/lib/NGCP/Panel/Controller/API/BillingNetworks.pm index 6b2a638655..bb01361be0 100644 --- a/lib/NGCP/Panel/Controller/API/BillingNetworks.pm +++ b/lib/NGCP/Panel/Controller/API/BillingNetworks.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -127,7 +127,7 @@ sub GET :Allow { push @links, $self->collection_nav_links($page, $rows, $total_count, $c->request->path, $c->request->query_params); - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/BillingNetworksItem.pm b/lib/NGCP/Panel/Controller/API/BillingNetworksItem.pm index 3fce4970cc..8ce0f5ad2a 100644 --- a/lib/NGCP/Panel/Controller/API/BillingNetworksItem.pm +++ b/lib/NGCP/Panel/Controller/API/BillingNetworksItem.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/BillingProfiles.pm b/lib/NGCP/Panel/Controller/API/BillingProfiles.pm index 601b19e495..180c8a27c8 100644 --- a/lib/NGCP/Panel/Controller/API/BillingProfiles.pm +++ b/lib/NGCP/Panel/Controller/API/BillingProfiles.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -119,7 +119,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/BillingZones.pm b/lib/NGCP/Panel/Controller/API/BillingZones.pm index 26c172fab2..4397c3ffe1 100644 --- a/lib/NGCP/Panel/Controller/API/BillingZones.pm +++ b/lib/NGCP/Panel/Controller/API/BillingZones.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -117,7 +117,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/CCMapEntries.pm b/lib/NGCP/Panel/Controller/API/CCMapEntries.pm index 939ecc05a4..64da7b9a60 100644 --- a/lib/NGCP/Panel/Controller/API/CCMapEntries.pm +++ b/lib/NGCP/Panel/Controller/API/CCMapEntries.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -98,7 +98,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('%s?page=%d&rows=%d', $self->dispatch_path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/CCMapEntriesItem.pm b/lib/NGCP/Panel/Controller/API/CCMapEntriesItem.pm index 48894a4efc..885c707686 100644 --- a/lib/NGCP/Panel/Controller/API/CCMapEntriesItem.pm +++ b/lib/NGCP/Panel/Controller/API/CCMapEntriesItem.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/CFDestinationSets.pm b/lib/NGCP/Panel/Controller/API/CFDestinationSets.pm index 63d7b9d873..2dcfc519ce 100644 --- a/lib/NGCP/Panel/Controller/API/CFDestinationSets.pm +++ b/lib/NGCP/Panel/Controller/API/CFDestinationSets.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -120,7 +120,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('%s?page=%d&rows=%d', $self->dispatch_path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/CFDestinationSetsItem.pm b/lib/NGCP/Panel/Controller/API/CFDestinationSetsItem.pm index 7afa73c27f..b218f9d40f 100644 --- a/lib/NGCP/Panel/Controller/API/CFDestinationSetsItem.pm +++ b/lib/NGCP/Panel/Controller/API/CFDestinationSetsItem.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/CFMappings.pm b/lib/NGCP/Panel/Controller/API/CFMappings.pm index 63faf069ee..cbbe54379c 100644 --- a/lib/NGCP/Panel/Controller/API/CFMappings.pm +++ b/lib/NGCP/Panel/Controller/API/CFMappings.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -111,7 +111,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('%s?page=%d&rows=%d', $self->dispatch_path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/CFMappingsItem.pm b/lib/NGCP/Panel/Controller/API/CFMappingsItem.pm index 50d8c66d49..232d788df7 100644 --- a/lib/NGCP/Panel/Controller/API/CFMappingsItem.pm +++ b/lib/NGCP/Panel/Controller/API/CFMappingsItem.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/CFSourceSets.pm b/lib/NGCP/Panel/Controller/API/CFSourceSets.pm index 401c09c6f6..52b633ae43 100644 --- a/lib/NGCP/Panel/Controller/API/CFSourceSets.pm +++ b/lib/NGCP/Panel/Controller/API/CFSourceSets.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -127,7 +127,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('%s?page=%d&rows=%d', $self->dispatch_path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/CFSourceSetsItem.pm b/lib/NGCP/Panel/Controller/API/CFSourceSetsItem.pm index abb084261b..8406021d36 100644 --- a/lib/NGCP/Panel/Controller/API/CFSourceSetsItem.pm +++ b/lib/NGCP/Panel/Controller/API/CFSourceSetsItem.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/CFTimeSets.pm b/lib/NGCP/Panel/Controller/API/CFTimeSets.pm index 664d158eae..6d22324727 100644 --- a/lib/NGCP/Panel/Controller/API/CFTimeSets.pm +++ b/lib/NGCP/Panel/Controller/API/CFTimeSets.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -120,7 +120,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('%s?page=%d&rows=%d', $self->dispatch_path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/CFTimeSetsItem.pm b/lib/NGCP/Panel/Controller/API/CFTimeSetsItem.pm index 6503ee5189..349cb6733c 100644 --- a/lib/NGCP/Panel/Controller/API/CFTimeSetsItem.pm +++ b/lib/NGCP/Panel/Controller/API/CFTimeSetsItem.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/CallControls.pm b/lib/NGCP/Panel/Controller/API/CallControls.pm index 4292b1419f..90ffd08d4a 100644 --- a/lib/NGCP/Panel/Controller/API/CallControls.pm +++ b/lib/NGCP/Panel/Controller/API/CallControls.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/CallForwards.pm b/lib/NGCP/Panel/Controller/API/CallForwards.pm index 8286626d73..882751bbb1 100644 --- a/lib/NGCP/Panel/Controller/API/CallForwards.pm +++ b/lib/NGCP/Panel/Controller/API/CallForwards.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -117,7 +117,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('%s?page=%d&rows=%d', $self->dispatch_path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/CallForwardsItem.pm b/lib/NGCP/Panel/Controller/API/CallForwardsItem.pm index 9c7e304109..02e23102e1 100644 --- a/lib/NGCP/Panel/Controller/API/CallForwardsItem.pm +++ b/lib/NGCP/Panel/Controller/API/CallForwardsItem.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/CallLists.pm b/lib/NGCP/Panel/Controller/API/CallLists.pm index a2c0f6b0bc..1f315e1ad6 100644 --- a/lib/NGCP/Panel/Controller/API/CallLists.pm +++ b/lib/NGCP/Panel/Controller/API/CallLists.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -286,7 +286,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/Calls.pm b/lib/NGCP/Panel/Controller/API/Calls.pm index e6515fb478..1d3fbecb38 100644 --- a/lib/NGCP/Panel/Controller/API/Calls.pm +++ b/lib/NGCP/Panel/Controller/API/Calls.pm @@ -5,7 +5,7 @@ use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -130,7 +130,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/Contracts.pm b/lib/NGCP/Panel/Controller/API/Contracts.pm index ea972888b7..844e697159 100644 --- a/lib/NGCP/Panel/Controller/API/Contracts.pm +++ b/lib/NGCP/Panel/Controller/API/Contracts.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -143,7 +143,7 @@ sub GET :Allow { # push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); #} - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/ContractsItem.pm b/lib/NGCP/Panel/Controller/API/ContractsItem.pm index de9a0c765d..a007170970 100644 --- a/lib/NGCP/Panel/Controller/API/ContractsItem.pm +++ b/lib/NGCP/Panel/Controller/API/ContractsItem.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/CustomerBalances.pm b/lib/NGCP/Panel/Controller/API/CustomerBalances.pm index bdff01d2d2..951a693f1b 100644 --- a/lib/NGCP/Panel/Controller/API/CustomerBalances.pm +++ b/lib/NGCP/Panel/Controller/API/CustomerBalances.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -168,7 +168,7 @@ sub GET :Allow { # push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); #} - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/CustomerContacts.pm b/lib/NGCP/Panel/Controller/API/CustomerContacts.pm index 1c13289f62..2bb5125f77 100644 --- a/lib/NGCP/Panel/Controller/API/CustomerContacts.pm +++ b/lib/NGCP/Panel/Controller/API/CustomerContacts.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -118,7 +118,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/CustomerFraudEvents.pm b/lib/NGCP/Panel/Controller/API/CustomerFraudEvents.pm index 79d8ee3276..72a6e4f8b4 100644 --- a/lib/NGCP/Panel/Controller/API/CustomerFraudEvents.pm +++ b/lib/NGCP/Panel/Controller/API/CustomerFraudEvents.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -109,7 +109,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/CustomerFraudPreferences.pm b/lib/NGCP/Panel/Controller/API/CustomerFraudPreferences.pm index 2ac228f2c2..963603cc41 100644 --- a/lib/NGCP/Panel/Controller/API/CustomerFraudPreferences.pm +++ b/lib/NGCP/Panel/Controller/API/CustomerFraudPreferences.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -128,7 +128,7 @@ sub GET :Allow { push @links, $self->collection_nav_links($page, $rows, $total_count, $c->request->path, $c->request->query_params); - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/CustomerLocations.pm b/lib/NGCP/Panel/Controller/API/CustomerLocations.pm index 264cdc5156..20d6b49f67 100644 --- a/lib/NGCP/Panel/Controller/API/CustomerLocations.pm +++ b/lib/NGCP/Panel/Controller/API/CustomerLocations.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -115,7 +115,7 @@ sub GET :Allow { push @links, $self->collection_nav_links($page, $rows, $total_count, $c->request->path, $c->request->query_params); - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/CustomerLocationsItem.pm b/lib/NGCP/Panel/Controller/API/CustomerLocationsItem.pm index d09e9c9298..0dee73a603 100644 --- a/lib/NGCP/Panel/Controller/API/CustomerLocationsItem.pm +++ b/lib/NGCP/Panel/Controller/API/CustomerLocationsItem.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/CustomerPreferenceDefs.pm b/lib/NGCP/Panel/Controller/API/CustomerPreferenceDefs.pm index 078ae6160f..d9b930b805 100644 --- a/lib/NGCP/Panel/Controller/API/CustomerPreferenceDefs.pm +++ b/lib/NGCP/Panel/Controller/API/CustomerPreferenceDefs.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -70,7 +70,7 @@ sub GET :Allow { Data::HAL::Link->new(relation => 'profile', href => 'http://purl.org/sipwise/ngcp-api/'), Data::HAL::Link->new(relation => 'self', href => sprintf('%s', $self->dispatch_path)); - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [@links], ); my $resource = NGCP::Panel::Utils::Preferences::api_preferences_defs( c => $c, preferences_group => 'contract_pref' ); diff --git a/lib/NGCP/Panel/Controller/API/CustomerPreferences.pm b/lib/NGCP/Panel/Controller/API/CustomerPreferences.pm index ac669d1832..38964194c9 100644 --- a/lib/NGCP/Panel/Controller/API/CustomerPreferences.pm +++ b/lib/NGCP/Panel/Controller/API/CustomerPreferences.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -107,7 +107,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('%s?page=%d&rows=%d', $self->dispatch_path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/CustomerPreferencesItem.pm b/lib/NGCP/Panel/Controller/API/CustomerPreferencesItem.pm index 24140de4cd..a6a3f6bc05 100644 --- a/lib/NGCP/Panel/Controller/API/CustomerPreferencesItem.pm +++ b/lib/NGCP/Panel/Controller/API/CustomerPreferencesItem.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/CustomerZoneCosts.pm b/lib/NGCP/Panel/Controller/API/CustomerZoneCosts.pm index bdedb9efee..090dddad9f 100644 --- a/lib/NGCP/Panel/Controller/API/CustomerZoneCosts.pm +++ b/lib/NGCP/Panel/Controller/API/CustomerZoneCosts.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -124,7 +124,7 @@ sub GET :Allow { href => sprintf('%s?page=%d&rows=%d&%s', $self->dispatch_path, $page - 1, $rows, $query_string)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/CustomerZoneCostsItem.pm b/lib/NGCP/Panel/Controller/API/CustomerZoneCostsItem.pm index 4f554aa256..b32529cb83 100644 --- a/lib/NGCP/Panel/Controller/API/CustomerZoneCostsItem.pm +++ b/lib/NGCP/Panel/Controller/API/CustomerZoneCostsItem.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/Customers.pm b/lib/NGCP/Panel/Controller/API/Customers.pm index 644cb99c15..e2392f2e5f 100644 --- a/lib/NGCP/Panel/Controller/API/Customers.pm +++ b/lib/NGCP/Panel/Controller/API/Customers.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -179,7 +179,7 @@ sub GET :Allow { push @links, $self->collection_nav_links($page, $rows, $total_count, $c->request->path, $c->request->query_params); - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/CustomersItem.pm b/lib/NGCP/Panel/Controller/API/CustomersItem.pm index 50112bb2be..5ff5efa992 100644 --- a/lib/NGCP/Panel/Controller/API/CustomersItem.pm +++ b/lib/NGCP/Panel/Controller/API/CustomersItem.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/DomainPreferenceDefs.pm b/lib/NGCP/Panel/Controller/API/DomainPreferenceDefs.pm index 8e5b8420df..6689ffaa4a 100644 --- a/lib/NGCP/Panel/Controller/API/DomainPreferenceDefs.pm +++ b/lib/NGCP/Panel/Controller/API/DomainPreferenceDefs.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -70,7 +70,7 @@ sub GET :Allow { Data::HAL::Link->new(relation => 'profile', href => 'http://purl.org/sipwise/ngcp-api/'), Data::HAL::Link->new(relation => 'self', href => sprintf('%s', $self->dispatch_path)); - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [@links], ); my $resource = NGCP::Panel::Utils::Preferences::api_preferences_defs( c => $c, preferences_group => 'dom_pref' ); diff --git a/lib/NGCP/Panel/Controller/API/DomainPreferences.pm b/lib/NGCP/Panel/Controller/API/DomainPreferences.pm index 56105f1afc..b0e9899fb4 100644 --- a/lib/NGCP/Panel/Controller/API/DomainPreferences.pm +++ b/lib/NGCP/Panel/Controller/API/DomainPreferences.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -98,7 +98,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('%s?page=%d&rows=%d', $self->dispatch_path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/DomainPreferencesItem.pm b/lib/NGCP/Panel/Controller/API/DomainPreferencesItem.pm index a3c85aad14..e812dbebb9 100644 --- a/lib/NGCP/Panel/Controller/API/DomainPreferencesItem.pm +++ b/lib/NGCP/Panel/Controller/API/DomainPreferencesItem.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/Domains.pm b/lib/NGCP/Panel/Controller/API/Domains.pm index 06b581e320..303cfdcd6c 100644 --- a/lib/NGCP/Panel/Controller/API/Domains.pm +++ b/lib/NGCP/Panel/Controller/API/Domains.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -120,7 +120,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/DomainsItem.pm b/lib/NGCP/Panel/Controller/API/DomainsItem.pm index dbd738a06b..b7e5d5e33c 100644 --- a/lib/NGCP/Panel/Controller/API/DomainsItem.pm +++ b/lib/NGCP/Panel/Controller/API/DomainsItem.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/EmailTemplates.pm b/lib/NGCP/Panel/Controller/API/EmailTemplates.pm index 8bc7cfdcb0..7fba868814 100644 --- a/lib/NGCP/Panel/Controller/API/EmailTemplates.pm +++ b/lib/NGCP/Panel/Controller/API/EmailTemplates.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -117,7 +117,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/EmergencyMappingContainers.pm b/lib/NGCP/Panel/Controller/API/EmergencyMappingContainers.pm index ae94d4ba9a..0b73672e66 100644 --- a/lib/NGCP/Panel/Controller/API/EmergencyMappingContainers.pm +++ b/lib/NGCP/Panel/Controller/API/EmergencyMappingContainers.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -117,7 +117,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/EmergencyMappings.pm b/lib/NGCP/Panel/Controller/API/EmergencyMappings.pm index 1ca527ebd9..9d8d26dea4 100644 --- a/lib/NGCP/Panel/Controller/API/EmergencyMappings.pm +++ b/lib/NGCP/Panel/Controller/API/EmergencyMappings.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -158,7 +158,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/Events.pm b/lib/NGCP/Panel/Controller/API/Events.pm index cd80e14beb..6b88f73df3 100644 --- a/lib/NGCP/Panel/Controller/API/Events.pm +++ b/lib/NGCP/Panel/Controller/API/Events.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -151,7 +151,7 @@ sub GET :Allow { push @links, $self->collection_nav_links($page, $rows, $total_count, $c->request->path, $c->request->query_params); - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/FaxRecordings.pm b/lib/NGCP/Panel/Controller/API/FaxRecordings.pm index f277b30fe1..c0935bff9d 100644 --- a/lib/NGCP/Panel/Controller/API/FaxRecordings.pm +++ b/lib/NGCP/Panel/Controller/API/FaxRecordings.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/Faxes.pm b/lib/NGCP/Panel/Controller/API/Faxes.pm index 2252698c11..68f48af213 100644 --- a/lib/NGCP/Panel/Controller/API/Faxes.pm +++ b/lib/NGCP/Panel/Controller/API/Faxes.pm @@ -5,7 +5,7 @@ use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -157,7 +157,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/FaxserverSettings.pm b/lib/NGCP/Panel/Controller/API/FaxserverSettings.pm index f53e2a45b0..555a80d439 100644 --- a/lib/NGCP/Panel/Controller/API/FaxserverSettings.pm +++ b/lib/NGCP/Panel/Controller/API/FaxserverSettings.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -130,7 +130,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('%s?page=%d&rows=%d', $self->dispatch_path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/FaxserverSettingsItem.pm b/lib/NGCP/Panel/Controller/API/FaxserverSettingsItem.pm index 0b087764e7..e2cd5a165d 100644 --- a/lib/NGCP/Panel/Controller/API/FaxserverSettingsItem.pm +++ b/lib/NGCP/Panel/Controller/API/FaxserverSettingsItem.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/Interceptions.pm b/lib/NGCP/Panel/Controller/API/Interceptions.pm index 36118527ab..675a2c9a7a 100644 --- a/lib/NGCP/Panel/Controller/API/Interceptions.pm +++ b/lib/NGCP/Panel/Controller/API/Interceptions.pm @@ -2,7 +2,7 @@ package NGCP::Panel::Controller::API::Interceptions; use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -123,7 +123,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/InvoiceTemplates.pm b/lib/NGCP/Panel/Controller/API/InvoiceTemplates.pm index a7210c4a14..c5f552a92a 100644 --- a/lib/NGCP/Panel/Controller/API/InvoiceTemplates.pm +++ b/lib/NGCP/Panel/Controller/API/InvoiceTemplates.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -117,7 +117,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/Invoices.pm b/lib/NGCP/Panel/Controller/API/Invoices.pm index fc429490a4..90b15bf32f 100644 --- a/lib/NGCP/Panel/Controller/API/Invoices.pm +++ b/lib/NGCP/Panel/Controller/API/Invoices.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -152,7 +152,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/LnpCarriers.pm b/lib/NGCP/Panel/Controller/API/LnpCarriers.pm index 87ff71d047..ed07a3f084 100644 --- a/lib/NGCP/Panel/Controller/API/LnpCarriers.pm +++ b/lib/NGCP/Panel/Controller/API/LnpCarriers.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -118,7 +118,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/LnpNumbers.pm b/lib/NGCP/Panel/Controller/API/LnpNumbers.pm index 0b8ee6d0d2..e2b663f639 100644 --- a/lib/NGCP/Panel/Controller/API/LnpNumbers.pm +++ b/lib/NGCP/Panel/Controller/API/LnpNumbers.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -150,7 +150,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/MailToFaxSettings.pm b/lib/NGCP/Panel/Controller/API/MailToFaxSettings.pm index 6f9ca9ff2c..7d127e1804 100644 --- a/lib/NGCP/Panel/Controller/API/MailToFaxSettings.pm +++ b/lib/NGCP/Panel/Controller/API/MailToFaxSettings.pm @@ -5,7 +5,7 @@ use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -130,7 +130,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('%s?page=%d&rows=%d', $self->dispatch_path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/MailToFaxSettingsItem.pm b/lib/NGCP/Panel/Controller/API/MailToFaxSettingsItem.pm index 53cd2bc3a0..fa1d1bf980 100644 --- a/lib/NGCP/Panel/Controller/API/MailToFaxSettingsItem.pm +++ b/lib/NGCP/Panel/Controller/API/MailToFaxSettingsItem.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/MaliciousCalls.pm b/lib/NGCP/Panel/Controller/API/MaliciousCalls.pm index b5033a0db5..2f8f29ed72 100644 --- a/lib/NGCP/Panel/Controller/API/MaliciousCalls.pm +++ b/lib/NGCP/Panel/Controller/API/MaliciousCalls.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -174,7 +174,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/MetaConfigDefs.pm b/lib/NGCP/Panel/Controller/API/MetaConfigDefs.pm index 15234801e3..ad449363ea 100644 --- a/lib/NGCP/Panel/Controller/API/MetaConfigDefs.pm +++ b/lib/NGCP/Panel/Controller/API/MetaConfigDefs.pm @@ -1,7 +1,7 @@ package NGCP::Panel::Controller::API::MetaConfigDefs; use NGCP::Panel::Utils::Generic qw(:all); use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -68,7 +68,7 @@ sub GET :Allow { Data::HAL::Link->new(relation => 'profile', href => 'http://purl.org/sipwise/ngcp-api/'), Data::HAL::Link->new(relation => 'self', href => sprintf('%s', $self->dispatch_path)); - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/NcosLevels.pm b/lib/NGCP/Panel/Controller/API/NcosLevels.pm index 870d373f7f..c44ed04dbd 100644 --- a/lib/NGCP/Panel/Controller/API/NcosLevels.pm +++ b/lib/NGCP/Panel/Controller/API/NcosLevels.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -117,7 +117,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/NcosLnpCarriers.pm b/lib/NGCP/Panel/Controller/API/NcosLnpCarriers.pm index 9a755a7aa7..81479e3623 100644 --- a/lib/NGCP/Panel/Controller/API/NcosLnpCarriers.pm +++ b/lib/NGCP/Panel/Controller/API/NcosLnpCarriers.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -117,7 +117,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/NcosPatterns.pm b/lib/NGCP/Panel/Controller/API/NcosPatterns.pm index 49681d8b7d..3e2abc985c 100644 --- a/lib/NGCP/Panel/Controller/API/NcosPatterns.pm +++ b/lib/NGCP/Panel/Controller/API/NcosPatterns.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -106,7 +106,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/PartyCallControls.pm b/lib/NGCP/Panel/Controller/API/PartyCallControls.pm index 6b91432a3b..b31864a262 100644 --- a/lib/NGCP/Panel/Controller/API/PartyCallControls.pm +++ b/lib/NGCP/Panel/Controller/API/PartyCallControls.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/PbxDeviceConfigFiles.pm b/lib/NGCP/Panel/Controller/API/PbxDeviceConfigFiles.pm index 6a6782c279..f8a09d6d04 100644 --- a/lib/NGCP/Panel/Controller/API/PbxDeviceConfigFiles.pm +++ b/lib/NGCP/Panel/Controller/API/PbxDeviceConfigFiles.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/PbxDeviceConfigs.pm b/lib/NGCP/Panel/Controller/API/PbxDeviceConfigs.pm index 835e574f96..41a966ed62 100644 --- a/lib/NGCP/Panel/Controller/API/PbxDeviceConfigs.pm +++ b/lib/NGCP/Panel/Controller/API/PbxDeviceConfigs.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -128,7 +128,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/PbxDeviceFirmwareBinaries.pm b/lib/NGCP/Panel/Controller/API/PbxDeviceFirmwareBinaries.pm index 1354a3c94c..08dcdaafc0 100644 --- a/lib/NGCP/Panel/Controller/API/PbxDeviceFirmwareBinaries.pm +++ b/lib/NGCP/Panel/Controller/API/PbxDeviceFirmwareBinaries.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/PbxDeviceFirmwares.pm b/lib/NGCP/Panel/Controller/API/PbxDeviceFirmwares.pm index 7114ecfceb..0e277d55b2 100644 --- a/lib/NGCP/Panel/Controller/API/PbxDeviceFirmwares.pm +++ b/lib/NGCP/Panel/Controller/API/PbxDeviceFirmwares.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -129,7 +129,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/PbxDeviceModelImages.pm b/lib/NGCP/Panel/Controller/API/PbxDeviceModelImages.pm index 080fd78ef1..2d98a5b6d8 100644 --- a/lib/NGCP/Panel/Controller/API/PbxDeviceModelImages.pm +++ b/lib/NGCP/Panel/Controller/API/PbxDeviceModelImages.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/PbxDeviceModels.pm b/lib/NGCP/Panel/Controller/API/PbxDeviceModels.pm index ba2f3b896a..246c254616 100644 --- a/lib/NGCP/Panel/Controller/API/PbxDeviceModels.pm +++ b/lib/NGCP/Panel/Controller/API/PbxDeviceModels.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -164,7 +164,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('%s?page=%d&rows=%d', $self->dispatch_path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/PbxDeviceModelsItem.pm b/lib/NGCP/Panel/Controller/API/PbxDeviceModelsItem.pm index ac11630d79..2d5c52c637 100644 --- a/lib/NGCP/Panel/Controller/API/PbxDeviceModelsItem.pm +++ b/lib/NGCP/Panel/Controller/API/PbxDeviceModelsItem.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/PbxDevicePreferenceDefs.pm b/lib/NGCP/Panel/Controller/API/PbxDevicePreferenceDefs.pm index 81cde82b62..99fc7b0227 100644 --- a/lib/NGCP/Panel/Controller/API/PbxDevicePreferenceDefs.pm +++ b/lib/NGCP/Panel/Controller/API/PbxDevicePreferenceDefs.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -70,7 +70,7 @@ sub GET :Allow { Data::HAL::Link->new(relation => 'profile', href => 'http://purl.org/sipwise/ngcp-api/'), Data::HAL::Link->new(relation => 'self', href => sprintf('%s', $self->dispatch_path)); - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [@links], ); my $resource = NGCP::Panel::Utils::Preferences::api_preferences_defs( c => $c, preferences_group => 'dev_pref' ); diff --git a/lib/NGCP/Panel/Controller/API/PbxDevicePreferences.pm b/lib/NGCP/Panel/Controller/API/PbxDevicePreferences.pm index 6b98b08f9b..d3082edfb8 100644 --- a/lib/NGCP/Panel/Controller/API/PbxDevicePreferences.pm +++ b/lib/NGCP/Panel/Controller/API/PbxDevicePreferences.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -90,7 +90,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('%s?page=%d&rows=%d', $self->dispatch_path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/PbxDevicePreferencesItem.pm b/lib/NGCP/Panel/Controller/API/PbxDevicePreferencesItem.pm index 8929e40bc7..24cdf0324c 100644 --- a/lib/NGCP/Panel/Controller/API/PbxDevicePreferencesItem.pm +++ b/lib/NGCP/Panel/Controller/API/PbxDevicePreferencesItem.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/PbxDeviceProfilePreferenceDefs.pm b/lib/NGCP/Panel/Controller/API/PbxDeviceProfilePreferenceDefs.pm index 39808e7140..5d553f4e20 100644 --- a/lib/NGCP/Panel/Controller/API/PbxDeviceProfilePreferenceDefs.pm +++ b/lib/NGCP/Panel/Controller/API/PbxDeviceProfilePreferenceDefs.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -70,7 +70,7 @@ sub GET :Allow { Data::HAL::Link->new(relation => 'profile', href => 'http://purl.org/sipwise/ngcp-api/'), Data::HAL::Link->new(relation => 'self', href => sprintf('%s', $self->dispatch_path)); - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [@links], ); my $resource = NGCP::Panel::Utils::Preferences::api_preferences_defs( c => $c, preferences_group => 'dev_pref' ); diff --git a/lib/NGCP/Panel/Controller/API/PbxDeviceProfilePreferences.pm b/lib/NGCP/Panel/Controller/API/PbxDeviceProfilePreferences.pm index e1f6aa5b40..bb35a8b542 100644 --- a/lib/NGCP/Panel/Controller/API/PbxDeviceProfilePreferences.pm +++ b/lib/NGCP/Panel/Controller/API/PbxDeviceProfilePreferences.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -90,7 +90,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('%s?page=%d&rows=%d', $self->dispatch_path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/PbxDeviceProfilePreferencesItem.pm b/lib/NGCP/Panel/Controller/API/PbxDeviceProfilePreferencesItem.pm index fe84d2f560..13cae97ef0 100644 --- a/lib/NGCP/Panel/Controller/API/PbxDeviceProfilePreferencesItem.pm +++ b/lib/NGCP/Panel/Controller/API/PbxDeviceProfilePreferencesItem.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/PbxDeviceProfiles.pm b/lib/NGCP/Panel/Controller/API/PbxDeviceProfiles.pm index 8b82161526..17fd0b0d89 100644 --- a/lib/NGCP/Panel/Controller/API/PbxDeviceProfiles.pm +++ b/lib/NGCP/Panel/Controller/API/PbxDeviceProfiles.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -117,7 +117,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('%s?page=%d&rows=%d', $self->dispatch_path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/PbxDeviceProfilesItem.pm b/lib/NGCP/Panel/Controller/API/PbxDeviceProfilesItem.pm index b8c6331d6e..f9316d8b8d 100644 --- a/lib/NGCP/Panel/Controller/API/PbxDeviceProfilesItem.pm +++ b/lib/NGCP/Panel/Controller/API/PbxDeviceProfilesItem.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/PbxDevices.pm b/lib/NGCP/Panel/Controller/API/PbxDevices.pm index b1b72b256b..2f93a22e95 100644 --- a/lib/NGCP/Panel/Controller/API/PbxDevices.pm +++ b/lib/NGCP/Panel/Controller/API/PbxDevices.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -129,7 +129,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('%s?page=%d&rows=%d', $self->dispatch_path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/PbxDevicesItem.pm b/lib/NGCP/Panel/Controller/API/PbxDevicesItem.pm index 275889986c..edebbac4ea 100644 --- a/lib/NGCP/Panel/Controller/API/PbxDevicesItem.pm +++ b/lib/NGCP/Panel/Controller/API/PbxDevicesItem.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/PeeringGroups.pm b/lib/NGCP/Panel/Controller/API/PeeringGroups.pm index acfb352d6d..b466f715b3 100644 --- a/lib/NGCP/Panel/Controller/API/PeeringGroups.pm +++ b/lib/NGCP/Panel/Controller/API/PeeringGroups.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -107,7 +107,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/PeeringInboundRules.pm b/lib/NGCP/Panel/Controller/API/PeeringInboundRules.pm index 4dea67dbc8..2abaf175a4 100644 --- a/lib/NGCP/Panel/Controller/API/PeeringInboundRules.pm +++ b/lib/NGCP/Panel/Controller/API/PeeringInboundRules.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -129,7 +129,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/PeeringRules.pm b/lib/NGCP/Panel/Controller/API/PeeringRules.pm index 8f7d8368b6..744e76e2eb 100644 --- a/lib/NGCP/Panel/Controller/API/PeeringRules.pm +++ b/lib/NGCP/Panel/Controller/API/PeeringRules.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -129,7 +129,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/PeeringServerPreferenceDefs.pm b/lib/NGCP/Panel/Controller/API/PeeringServerPreferenceDefs.pm index b16bb75ea2..1af7e35cfd 100644 --- a/lib/NGCP/Panel/Controller/API/PeeringServerPreferenceDefs.pm +++ b/lib/NGCP/Panel/Controller/API/PeeringServerPreferenceDefs.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -70,7 +70,7 @@ sub GET :Allow { Data::HAL::Link->new(relation => 'profile', href => 'http://purl.org/sipwise/ngcp-api/'), Data::HAL::Link->new(relation => 'self', href => sprintf('%s', $self->dispatch_path)); - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [@links], ); my $resource = NGCP::Panel::Utils::Preferences::api_preferences_defs( c => $c, preferences_group => 'peer_pref' ); diff --git a/lib/NGCP/Panel/Controller/API/PeeringServerPreferences.pm b/lib/NGCP/Panel/Controller/API/PeeringServerPreferences.pm index 568bd37d1b..5ad1284fd2 100644 --- a/lib/NGCP/Panel/Controller/API/PeeringServerPreferences.pm +++ b/lib/NGCP/Panel/Controller/API/PeeringServerPreferences.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -98,7 +98,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('%s?page=%d&rows=%d', $self->dispatch_path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/PeeringServerPreferencesItem.pm b/lib/NGCP/Panel/Controller/API/PeeringServerPreferencesItem.pm index 1112b469ab..36d1246578 100644 --- a/lib/NGCP/Panel/Controller/API/PeeringServerPreferencesItem.pm +++ b/lib/NGCP/Panel/Controller/API/PeeringServerPreferencesItem.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/PeeringServers.pm b/lib/NGCP/Panel/Controller/API/PeeringServers.pm index 3688896649..94fa6bb23c 100644 --- a/lib/NGCP/Panel/Controller/API/PeeringServers.pm +++ b/lib/NGCP/Panel/Controller/API/PeeringServers.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -150,7 +150,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/ProfilePackages.pm b/lib/NGCP/Panel/Controller/API/ProfilePackages.pm index 01ba248fd4..8efa692657 100644 --- a/lib/NGCP/Panel/Controller/API/ProfilePackages.pm +++ b/lib/NGCP/Panel/Controller/API/ProfilePackages.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -139,7 +139,7 @@ sub GET :Allow { push @links, $self->collection_nav_links($page, $rows, $total_count, $c->request->path, $c->request->query_params); - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/ProfilePreferenceDefs.pm b/lib/NGCP/Panel/Controller/API/ProfilePreferenceDefs.pm index d14a74d28f..4166d34b50 100644 --- a/lib/NGCP/Panel/Controller/API/ProfilePreferenceDefs.pm +++ b/lib/NGCP/Panel/Controller/API/ProfilePreferenceDefs.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -70,7 +70,7 @@ sub GET :Allow { Data::HAL::Link->new(relation => 'profile', href => 'http://purl.org/sipwise/ngcp-api/'), Data::HAL::Link->new(relation => 'self', href => sprintf('%s', $self->dispatch_path)); - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [@links], ); my $resource = NGCP::Panel::Utils::Preferences::api_preferences_defs( c => $c, preferences_group => 'prof_pref' ); diff --git a/lib/NGCP/Panel/Controller/API/ProfilePreferences.pm b/lib/NGCP/Panel/Controller/API/ProfilePreferences.pm index a54a19dcfc..dc5786c301 100644 --- a/lib/NGCP/Panel/Controller/API/ProfilePreferences.pm +++ b/lib/NGCP/Panel/Controller/API/ProfilePreferences.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -89,7 +89,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('%s?page=%d&rows=%d', $self->dispatch_path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/ProfilePreferencesItem.pm b/lib/NGCP/Panel/Controller/API/ProfilePreferencesItem.pm index ac96d6ceb2..65ac026157 100644 --- a/lib/NGCP/Panel/Controller/API/ProfilePreferencesItem.pm +++ b/lib/NGCP/Panel/Controller/API/ProfilePreferencesItem.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/Reminders.pm b/lib/NGCP/Panel/Controller/API/Reminders.pm index 428146a45f..ba93fd5fb9 100644 --- a/lib/NGCP/Panel/Controller/API/Reminders.pm +++ b/lib/NGCP/Panel/Controller/API/Reminders.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -110,7 +110,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/Resellers.pm b/lib/NGCP/Panel/Controller/API/Resellers.pm index 000d5aa4e0..33c1d3649a 100644 --- a/lib/NGCP/Panel/Controller/API/Resellers.pm +++ b/lib/NGCP/Panel/Controller/API/Resellers.pm @@ -5,7 +5,7 @@ use Sipwise::Base; use JSON qw(); use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -109,7 +109,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/RewriteRuleSets.pm b/lib/NGCP/Panel/Controller/API/RewriteRuleSets.pm index a828820739..81787e2a53 100644 --- a/lib/NGCP/Panel/Controller/API/RewriteRuleSets.pm +++ b/lib/NGCP/Panel/Controller/API/RewriteRuleSets.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -129,7 +129,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('%s?page=%d&rows=%d', $self->dispatch_path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/RewriteRuleSetsItem.pm b/lib/NGCP/Panel/Controller/API/RewriteRuleSetsItem.pm index 5283d9f42d..fe8e435ee2 100644 --- a/lib/NGCP/Panel/Controller/API/RewriteRuleSetsItem.pm +++ b/lib/NGCP/Panel/Controller/API/RewriteRuleSetsItem.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/RewriteRules.pm b/lib/NGCP/Panel/Controller/API/RewriteRules.pm index 921afad6fe..7cae18456b 100644 --- a/lib/NGCP/Panel/Controller/API/RewriteRules.pm +++ b/lib/NGCP/Panel/Controller/API/RewriteRules.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -129,7 +129,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('%s?page=%d&rows=%d', $self->dispatch_path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/RewriteRulesItem.pm b/lib/NGCP/Panel/Controller/API/RewriteRulesItem.pm index c4075c7f2f..9642c11d90 100644 --- a/lib/NGCP/Panel/Controller/API/RewriteRulesItem.pm +++ b/lib/NGCP/Panel/Controller/API/RewriteRulesItem.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/RtcApps.pm b/lib/NGCP/Panel/Controller/API/RtcApps.pm index 47190efc44..8810f63db5 100644 --- a/lib/NGCP/Panel/Controller/API/RtcApps.pm +++ b/lib/NGCP/Panel/Controller/API/RtcApps.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -91,7 +91,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/RtcAppsItem.pm b/lib/NGCP/Panel/Controller/API/RtcAppsItem.pm index 78b3c8b426..bcfd6db58d 100644 --- a/lib/NGCP/Panel/Controller/API/RtcAppsItem.pm +++ b/lib/NGCP/Panel/Controller/API/RtcAppsItem.pm @@ -3,7 +3,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/RtcNetworks.pm b/lib/NGCP/Panel/Controller/API/RtcNetworks.pm index 3c534b5449..edd54f3e0b 100644 --- a/lib/NGCP/Panel/Controller/API/RtcNetworks.pm +++ b/lib/NGCP/Panel/Controller/API/RtcNetworks.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -91,7 +91,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/RtcNetworksItem.pm b/lib/NGCP/Panel/Controller/API/RtcNetworksItem.pm index 54beb49c6d..c06dd1c9ab 100644 --- a/lib/NGCP/Panel/Controller/API/RtcNetworksItem.pm +++ b/lib/NGCP/Panel/Controller/API/RtcNetworksItem.pm @@ -3,7 +3,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/RtcSessions.pm b/lib/NGCP/Panel/Controller/API/RtcSessions.pm index de40cd6b02..f8e1b90b6e 100644 --- a/lib/NGCP/Panel/Controller/API/RtcSessions.pm +++ b/lib/NGCP/Panel/Controller/API/RtcSessions.pm @@ -5,7 +5,7 @@ use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -95,7 +95,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/RtcSessionsItem.pm b/lib/NGCP/Panel/Controller/API/RtcSessionsItem.pm index edb7f47624..ece97055d7 100644 --- a/lib/NGCP/Panel/Controller/API/RtcSessionsItem.pm +++ b/lib/NGCP/Panel/Controller/API/RtcSessionsItem.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/SoundFileRecordings.pm b/lib/NGCP/Panel/Controller/API/SoundFileRecordings.pm index b8f1248af5..1d2e329992 100644 --- a/lib/NGCP/Panel/Controller/API/SoundFileRecordings.pm +++ b/lib/NGCP/Panel/Controller/API/SoundFileRecordings.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/SoundFiles.pm b/lib/NGCP/Panel/Controller/API/SoundFiles.pm index 70bf907a22..5a68872c56 100644 --- a/lib/NGCP/Panel/Controller/API/SoundFiles.pm +++ b/lib/NGCP/Panel/Controller/API/SoundFiles.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -108,7 +108,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/SoundHandles.pm b/lib/NGCP/Panel/Controller/API/SoundHandles.pm index 8eaba7be29..12a36a77c7 100644 --- a/lib/NGCP/Panel/Controller/API/SoundHandles.pm +++ b/lib/NGCP/Panel/Controller/API/SoundHandles.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -108,7 +108,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/SoundSets.pm b/lib/NGCP/Panel/Controller/API/SoundSets.pm index 40886035f1..92ae16234e 100644 --- a/lib/NGCP/Panel/Controller/API/SoundSets.pm +++ b/lib/NGCP/Panel/Controller/API/SoundSets.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -128,7 +128,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/SpeedDials.pm b/lib/NGCP/Panel/Controller/API/SpeedDials.pm index a8f96bfbaf..201427a050 100644 --- a/lib/NGCP/Panel/Controller/API/SpeedDials.pm +++ b/lib/NGCP/Panel/Controller/API/SpeedDials.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -112,7 +112,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/SpeedDialsItem.pm b/lib/NGCP/Panel/Controller/API/SpeedDialsItem.pm index 969f4be8a8..0645cb8312 100644 --- a/lib/NGCP/Panel/Controller/API/SpeedDialsItem.pm +++ b/lib/NGCP/Panel/Controller/API/SpeedDialsItem.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/SubscriberPreferenceDefs.pm b/lib/NGCP/Panel/Controller/API/SubscriberPreferenceDefs.pm index 848578458a..8e9f1b5994 100644 --- a/lib/NGCP/Panel/Controller/API/SubscriberPreferenceDefs.pm +++ b/lib/NGCP/Panel/Controller/API/SubscriberPreferenceDefs.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -71,7 +71,7 @@ sub GET :Allow { Data::HAL::Link->new(relation => 'profile', href => 'http://purl.org/sipwise/ngcp-api/'), Data::HAL::Link->new(relation => 'self', href => sprintf('%s', $self->dispatch_path)); - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [@links], ); my $resource = NGCP::Panel::Utils::Preferences::api_preferences_defs( c => $c, preferences_group => 'usr_pref' ); diff --git a/lib/NGCP/Panel/Controller/API/SubscriberPreferences.pm b/lib/NGCP/Panel/Controller/API/SubscriberPreferences.pm index 1dab5a1199..d633039328 100644 --- a/lib/NGCP/Panel/Controller/API/SubscriberPreferences.pm +++ b/lib/NGCP/Panel/Controller/API/SubscriberPreferences.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -144,7 +144,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('%s?page=%d&rows=%d', $self->dispatch_path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/SubscriberPreferencesItem.pm b/lib/NGCP/Panel/Controller/API/SubscriberPreferencesItem.pm index 114a7dbfee..d512c72a50 100644 --- a/lib/NGCP/Panel/Controller/API/SubscriberPreferencesItem.pm +++ b/lib/NGCP/Panel/Controller/API/SubscriberPreferencesItem.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/SubscriberProfileSets.pm b/lib/NGCP/Panel/Controller/API/SubscriberProfileSets.pm index 66ccfde9a4..d8cef41aba 100644 --- a/lib/NGCP/Panel/Controller/API/SubscriberProfileSets.pm +++ b/lib/NGCP/Panel/Controller/API/SubscriberProfileSets.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -117,7 +117,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/SubscriberProfiles.pm b/lib/NGCP/Panel/Controller/API/SubscriberProfiles.pm index 5c014d0a63..bf47bab312 100644 --- a/lib/NGCP/Panel/Controller/API/SubscriberProfiles.pm +++ b/lib/NGCP/Panel/Controller/API/SubscriberProfiles.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -117,7 +117,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/SubscriberRegistrations.pm b/lib/NGCP/Panel/Controller/API/SubscriberRegistrations.pm index e38840f7c3..06bafd8386 100644 --- a/lib/NGCP/Panel/Controller/API/SubscriberRegistrations.pm +++ b/lib/NGCP/Panel/Controller/API/SubscriberRegistrations.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -128,7 +128,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/Subscribers.pm b/lib/NGCP/Panel/Controller/API/Subscribers.pm index ce5f77e07f..85d6ca55d5 100644 --- a/lib/NGCP/Panel/Controller/API/Subscribers.pm +++ b/lib/NGCP/Panel/Controller/API/Subscribers.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -313,7 +313,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/SubscribersItem.pm b/lib/NGCP/Panel/Controller/API/SubscribersItem.pm index d966a517ff..45dedac3de 100644 --- a/lib/NGCP/Panel/Controller/API/SubscribersItem.pm +++ b/lib/NGCP/Panel/Controller/API/SubscribersItem.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/SystemContacts.pm b/lib/NGCP/Panel/Controller/API/SystemContacts.pm index 67f27aceee..0a92f2e2b7 100644 --- a/lib/NGCP/Panel/Controller/API/SystemContacts.pm +++ b/lib/NGCP/Panel/Controller/API/SystemContacts.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -106,7 +106,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/TopupCash.pm b/lib/NGCP/Panel/Controller/API/TopupCash.pm index bcd1c95db3..0a934bcf9f 100644 --- a/lib/NGCP/Panel/Controller/API/TopupCash.pm +++ b/lib/NGCP/Panel/Controller/API/TopupCash.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/TopupLogs.pm b/lib/NGCP/Panel/Controller/API/TopupLogs.pm index 2d678561be..c4b0e601b0 100644 --- a/lib/NGCP/Panel/Controller/API/TopupLogs.pm +++ b/lib/NGCP/Panel/Controller/API/TopupLogs.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -210,7 +210,7 @@ sub GET :Allow { push @links, $self->collection_nav_links($page, $rows, $total_count, $c->request->path, $c->request->query_params); - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/TopupVouchers.pm b/lib/NGCP/Panel/Controller/API/TopupVouchers.pm index 4cc09409d6..5749185397 100644 --- a/lib/NGCP/Panel/Controller/API/TopupVouchers.pm +++ b/lib/NGCP/Panel/Controller/API/TopupVouchers.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/TrustedSources.pm b/lib/NGCP/Panel/Controller/API/TrustedSources.pm index 94b5e50713..46a8942ee4 100644 --- a/lib/NGCP/Panel/Controller/API/TrustedSources.pm +++ b/lib/NGCP/Panel/Controller/API/TrustedSources.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -111,7 +111,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/UpnRewriteSets.pm b/lib/NGCP/Panel/Controller/API/UpnRewriteSets.pm index e277bf44b1..1d2b2508c7 100644 --- a/lib/NGCP/Panel/Controller/API/UpnRewriteSets.pm +++ b/lib/NGCP/Panel/Controller/API/UpnRewriteSets.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -110,7 +110,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/VoicemailRecordings.pm b/lib/NGCP/Panel/Controller/API/VoicemailRecordings.pm index 687ea15377..72f4ab5833 100644 --- a/lib/NGCP/Panel/Controller/API/VoicemailRecordings.pm +++ b/lib/NGCP/Panel/Controller/API/VoicemailRecordings.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Controller/API/VoicemailSettings.pm b/lib/NGCP/Panel/Controller/API/VoicemailSettings.pm index 9d7e535222..c6a4e3a665 100644 --- a/lib/NGCP/Panel/Controller/API/VoicemailSettings.pm +++ b/lib/NGCP/Panel/Controller/API/VoicemailSettings.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -110,7 +110,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/Voicemails.pm b/lib/NGCP/Panel/Controller/API/Voicemails.pm index e95c02895a..49ee6a4ffd 100644 --- a/lib/NGCP/Panel/Controller/API/Voicemails.pm +++ b/lib/NGCP/Panel/Controller/API/Voicemails.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -118,7 +118,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Controller/API/Vouchers.pm b/lib/NGCP/Panel/Controller/API/Vouchers.pm index 1fd6b7c3a7..ae83774283 100644 --- a/lib/NGCP/Panel/Controller/API/Vouchers.pm +++ b/lib/NGCP/Panel/Controller/API/Vouchers.pm @@ -4,7 +4,7 @@ use NGCP::Panel::Utils::Generic qw(:all); use Sipwise::Base; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Headers qw(); use HTTP::Status qw(:constants); @@ -116,7 +116,7 @@ sub GET :Allow { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Role/API.pm b/lib/NGCP/Panel/Role/API.pm index 00acb81706..8d861a1f89 100644 --- a/lib/NGCP/Panel/Role/API.pm +++ b/lib/NGCP/Panel/Role/API.pm @@ -18,7 +18,7 @@ use DateTime::Format::RFC3339 qw(); use Types::Standard qw(InstanceOf); use Regexp::Common qw(delimited); # $RE{delimited} use HTTP::Headers::Util qw(split_header_words); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use NGCP::Panel::Utils::ValidateJSON qw(); use NGCP::Panel::Utils::Journal qw(); @@ -809,7 +809,7 @@ sub hal_from_item { $resource = $self->process_hal_resource($c, $item, $resource, $form); my $links = $self->hal_links($c, $item, $resource, $form) // []; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/Admins.pm b/lib/NGCP/Panel/Role/API/Admins.pm index f969346c62..cf604d79ae 100644 --- a/lib/NGCP/Panel/Role/API/Admins.pm +++ b/lib/NGCP/Panel/Role/API/Admins.pm @@ -6,7 +6,7 @@ use Sipwise::Base; use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Utils::DateTime; @@ -42,7 +42,7 @@ sub hal_from_item { my %resource = $item->get_inflated_columns; delete $resource{md5pass}; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/ApplyRewrites.pm b/lib/NGCP/Panel/Role/API/ApplyRewrites.pm index 93e9f99fc8..3c1fc28e54 100644 --- a/lib/NGCP/Panel/Role/API/ApplyRewrites.pm +++ b/lib/NGCP/Panel/Role/API/ApplyRewrites.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Role/API/AutoAttendants.pm b/lib/NGCP/Panel/Role/API/AutoAttendants.pm index 497050350f..4186f67358 100644 --- a/lib/NGCP/Panel/Role/API/AutoAttendants.pm +++ b/lib/NGCP/Panel/Role/API/AutoAttendants.pm @@ -5,7 +5,7 @@ use Sipwise::Base; use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use JSON::Types; @@ -25,7 +25,7 @@ sub hal_from_item { my $p_subs = $item->provisioning_voip_subscriber; my $resource = { subscriber_id => $item->id, slots => $self->_autoattendants_from_subscriber($p_subs) }; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/BalanceIntervals.pm b/lib/NGCP/Panel/Role/API/BalanceIntervals.pm index 732c5aa988..7dd1ad44b5 100644 --- a/lib/NGCP/Panel/Role/API/BalanceIntervals.pm +++ b/lib/NGCP/Panel/Role/API/BalanceIntervals.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::Balance::BalanceIntervalAPI; @@ -100,7 +100,7 @@ sub hal_from_balance { $resource{is_actual} = $is_actual; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/BillingFees.pm b/lib/NGCP/Panel/Role/API/BillingFees.pm index df0a23cf50..361d95b9a3 100644 --- a/lib/NGCP/Panel/Role/API/BillingFees.pm +++ b/lib/NGCP/Panel/Role/API/BillingFees.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Utils::DateTime; @@ -45,7 +45,7 @@ sub hal_from_fee { my %resource = $fee->get_inflated_columns; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/BillingNetworks.pm b/lib/NGCP/Panel/Role/API/BillingNetworks.pm index 8153cca8a8..62d120c79f 100644 --- a/lib/NGCP/Panel/Role/API/BillingNetworks.pm +++ b/lib/NGCP/Panel/Role/API/BillingNetworks.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use JSON::Types; @@ -38,7 +38,7 @@ sub hal_from_item { } $resource{blocks} = \@blocks; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/BillingProfiles.pm b/lib/NGCP/Panel/Role/API/BillingProfiles.pm index 0931edb0e2..b866b97a30 100644 --- a/lib/NGCP/Panel/Role/API/BillingProfiles.pm +++ b/lib/NGCP/Panel/Role/API/BillingProfiles.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Utils::DateTime; @@ -56,7 +56,7 @@ sub hal_from_profile { # if the structure is returned for one single item # (make it a method flag) - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/BillingZones.pm b/lib/NGCP/Panel/Role/API/BillingZones.pm index a2d6d1fbfb..98326e84a2 100644 --- a/lib/NGCP/Panel/Role/API/BillingZones.pm +++ b/lib/NGCP/Panel/Role/API/BillingZones.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Utils::DateTime; @@ -45,7 +45,7 @@ sub hal_from_zone { my %resource = $zone->get_inflated_columns; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/CCMapEntries.pm b/lib/NGCP/Panel/Role/API/CCMapEntries.pm index 515434ebfd..6131125473 100644 --- a/lib/NGCP/Panel/Role/API/CCMapEntries.pm +++ b/lib/NGCP/Panel/Role/API/CCMapEntries.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use JSON::Types; @@ -31,7 +31,7 @@ sub hal_from_item { my %resource = (subscriber_id => $item->id); - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/CFDestinationSets.pm b/lib/NGCP/Panel/Role/API/CFDestinationSets.pm index 93cd740033..589b2904d5 100644 --- a/lib/NGCP/Panel/Role/API/CFDestinationSets.pm +++ b/lib/NGCP/Panel/Role/API/CFDestinationSets.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use JSON::Types; @@ -44,7 +44,7 @@ sub hal_from_item { my $b_subs_id = $item->subscriber->voip_subscriber->id; $resource{subscriber_id} = $b_subs_id; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/CFMappings.pm b/lib/NGCP/Panel/Role/API/CFMappings.pm index 63e751101a..eb42c14f21 100644 --- a/lib/NGCP/Panel/Role/API/CFMappings.pm +++ b/lib/NGCP/Panel/Role/API/CFMappings.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use JSON::Types; @@ -43,7 +43,7 @@ sub hal_from_item { }; } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/CFSourceSets.pm b/lib/NGCP/Panel/Role/API/CFSourceSets.pm index 09cd6afb5f..00734013a6 100644 --- a/lib/NGCP/Panel/Role/API/CFSourceSets.pm +++ b/lib/NGCP/Panel/Role/API/CFSourceSets.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use JSON::Types; @@ -34,7 +34,7 @@ sub hal_from_item { my $b_subs_id = $item->subscriber->voip_subscriber->id; $resource{subscriber_id} = $b_subs_id; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/CFTimeSets.pm b/lib/NGCP/Panel/Role/API/CFTimeSets.pm index d38a9bf694..ed33bf2690 100644 --- a/lib/NGCP/Panel/Role/API/CFTimeSets.pm +++ b/lib/NGCP/Panel/Role/API/CFTimeSets.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use JSON::Types; @@ -35,7 +35,7 @@ sub hal_from_item { my $b_subs_id = $item->subscriber->voip_subscriber->id; $resource{subscriber_id} = $b_subs_id; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/CallControls.pm b/lib/NGCP/Panel/Role/API/CallControls.pm index b84a27fb78..f09a6f945f 100644 --- a/lib/NGCP/Panel/Role/API/CallControls.pm +++ b/lib/NGCP/Panel/Role/API/CallControls.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Role/API/CallForwards.pm b/lib/NGCP/Panel/Role/API/CallForwards.pm index 1298087732..25ded05df0 100644 --- a/lib/NGCP/Panel/Role/API/CallForwards.pm +++ b/lib/NGCP/Panel/Role/API/CallForwards.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use JSON::Types; @@ -29,7 +29,7 @@ sub hal_from_item { my %resource = (subscriber_id => $prov_subs->id); - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/CallLists.pm b/lib/NGCP/Panel/Role/API/CallLists.pm index afb8305c49..132926198b 100644 --- a/lib/NGCP/Panel/Role/API/CallLists.pm +++ b/lib/NGCP/Panel/Role/API/CallLists.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use POSIX; @@ -62,7 +62,7 @@ sub hal_from_item { my ($self, $c, $item, $owner, $form, $href_data) = @_; my $resource = $self->resource_from_item($c, $item, $owner, $form); - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/Calls.pm b/lib/NGCP/Panel/Role/API/Calls.pm index 6fb00c79cf..33af25d235 100644 --- a/lib/NGCP/Panel/Role/API/Calls.pm +++ b/lib/NGCP/Panel/Role/API/Calls.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::Call::Admin; @@ -42,7 +42,7 @@ sub hal_from_item { my ($self, $c, $item, $form) = @_; my $resource = $self->resource_from_item($c, $item, $form); - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/Contracts.pm b/lib/NGCP/Panel/Role/API/Contracts.pm index 3d312acab0..390551f6fa 100644 --- a/lib/NGCP/Panel/Role/API/Contracts.pm +++ b/lib/NGCP/Panel/Role/API/Contracts.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Utils::DateTime; @@ -63,7 +63,7 @@ sub hal_from_contract { } } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/CustomerBalances.pm b/lib/NGCP/Panel/Role/API/CustomerBalances.pm index 194af44617..564a9f2e28 100644 --- a/lib/NGCP/Panel/Role/API/CustomerBalances.pm +++ b/lib/NGCP/Panel/Role/API/CustomerBalances.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::Balance::CustomerBalanceAPI; @@ -52,7 +52,7 @@ sub hal_from_item { $resource{cash_debit} = (delete $resource{cash_balance_interval}) / 100.0; $resource{free_time_spent} = delete $resource{free_time_balance_interval}; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/CustomerContacts.pm b/lib/NGCP/Panel/Role/API/CustomerContacts.pm index 39abcde0eb..1680c8dcb7 100644 --- a/lib/NGCP/Panel/Role/API/CustomerContacts.pm +++ b/lib/NGCP/Panel/Role/API/CustomerContacts.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::Contact::Admin; @@ -46,7 +46,7 @@ sub hal_from_contact { my ($self, $c, $contact, $form) = @_; my %resource = $contact->get_inflated_columns; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/CustomerFraudEvents.pm b/lib/NGCP/Panel/Role/API/CustomerFraudEvents.pm index ebf1da3e42..5ef0432b05 100644 --- a/lib/NGCP/Panel/Role/API/CustomerFraudEvents.pm +++ b/lib/NGCP/Panel/Role/API/CustomerFraudEvents.pm @@ -5,7 +5,7 @@ use Sipwise::Base; use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::CustomerFraudEvents::Admin; @@ -44,7 +44,7 @@ sub hal_from_item { my %resource = $item->get_inflated_columns; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/CustomerFraudPreferences.pm b/lib/NGCP/Panel/Role/API/CustomerFraudPreferences.pm index 54e1f263fe..edb2dd8fb3 100644 --- a/lib/NGCP/Panel/Role/API/CustomerFraudPreferences.pm +++ b/lib/NGCP/Panel/Role/API/CustomerFraudPreferences.pm @@ -6,7 +6,7 @@ use Sipwise::Base; use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use JSON::Types; @@ -23,7 +23,7 @@ sub hal_from_item { my $resource = $self->resource_from_item($c,$customer,$form); - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/CustomerLocations.pm b/lib/NGCP/Panel/Role/API/CustomerLocations.pm index 85f90a1662..ec3f6b22c6 100644 --- a/lib/NGCP/Panel/Role/API/CustomerLocations.pm +++ b/lib/NGCP/Panel/Role/API/CustomerLocations.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use JSON::Types; @@ -37,7 +37,7 @@ sub hal_from_item { } $resource{blocks} = \@blocks; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/CustomerZoneCosts.pm b/lib/NGCP/Panel/Role/API/CustomerZoneCosts.pm index a692272303..4882b02896 100644 --- a/lib/NGCP/Panel/Role/API/CustomerZoneCosts.pm +++ b/lib/NGCP/Panel/Role/API/CustomerZoneCosts.pm @@ -8,7 +8,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); use Data::HAL::Link qw(); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use DateTime::Format::Strptime; use HTTP::Status qw(:constants); use JSON::Types; @@ -33,7 +33,7 @@ sub hal_from_item { my $query_string = $self->query_param_string($c); - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/Customers.pm b/lib/NGCP/Panel/Role/API/Customers.pm index 95f82e1839..6ca29730b0 100644 --- a/lib/NGCP/Panel/Role/API/Customers.pm +++ b/lib/NGCP/Panel/Role/API/Customers.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Utils::DateTime; @@ -57,7 +57,7 @@ sub hal_from_customer { } } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/Domains.pm b/lib/NGCP/Panel/Role/API/Domains.pm index 6b37e2cdf9..1f4a11b93f 100644 --- a/lib/NGCP/Panel/Role/API/Domains.pm +++ b/lib/NGCP/Panel/Role/API/Domains.pm @@ -6,7 +6,7 @@ use Sipwise::Base; use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use JSON::Types; @@ -29,7 +29,7 @@ sub hal_from_item { my ($self, $c, $item, $form) = @_; my %resource = $item->get_inflated_columns; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/EmailTemplates.pm b/lib/NGCP/Panel/Role/API/EmailTemplates.pm index 2e69b82adf..18c6e16134 100644 --- a/lib/NGCP/Panel/Role/API/EmailTemplates.pm +++ b/lib/NGCP/Panel/Role/API/EmailTemplates.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::EmailTemplate::Admin; @@ -37,7 +37,7 @@ sub hal_from_item { my ($self, $c, $item, $form) = @_; my %resource = $item->get_inflated_columns; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/EmergencyMappingContainers.pm b/lib/NGCP/Panel/Role/API/EmergencyMappingContainers.pm index ed2faa47d0..1f88fa209f 100644 --- a/lib/NGCP/Panel/Role/API/EmergencyMappingContainers.pm +++ b/lib/NGCP/Panel/Role/API/EmergencyMappingContainers.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::EmergencyMapping::Container; @@ -41,7 +41,7 @@ sub hal_from_item { my ($self, $c, $item, $form) = @_; my %resource = $item->get_inflated_columns; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/EmergencyMappings.pm b/lib/NGCP/Panel/Role/API/EmergencyMappings.pm index b48ee4e30e..9dbeec49cd 100644 --- a/lib/NGCP/Panel/Role/API/EmergencyMappings.pm +++ b/lib/NGCP/Panel/Role/API/EmergencyMappings.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::EmergencyMapping::Mapping; @@ -35,7 +35,7 @@ sub hal_from_item { my ($self, $c, $item, $form) = @_; my %resource = $item->get_inflated_columns; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/Events.pm b/lib/NGCP/Panel/Role/API/Events.pm index e6f38ab1da..4fa5c1f69c 100644 --- a/lib/NGCP/Panel/Role/API/Events.pm +++ b/lib/NGCP/Panel/Role/API/Events.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::Event::Reseller; @@ -73,7 +73,7 @@ sub hal_from_item { $resource{non_primary_alias_username} = NGCP::Panel::Utils::Events::get_tag_value(c => $c, event => $item, type => 'non_primary_alias_username'); - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/Faxes.pm b/lib/NGCP/Panel/Role/API/Faxes.pm index ca23af8c1a..eb4a5dd6b0 100644 --- a/lib/NGCP/Panel/Role/API/Faxes.pm +++ b/lib/NGCP/Panel/Role/API/Faxes.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use DateTime::Format::Strptime; @@ -42,7 +42,7 @@ sub get_form { sub hal_from_item { my ($self, $c, $item, $form) = @_; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/FaxserverSettings.pm b/lib/NGCP/Panel/Role/API/FaxserverSettings.pm index e998672878..4a2a583a46 100644 --- a/lib/NGCP/Panel/Role/API/FaxserverSettings.pm +++ b/lib/NGCP/Panel/Role/API/FaxserverSettings.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use JSON::Types; @@ -51,7 +51,7 @@ sub hal_from_item { } $resource{destinations} = \@destinations; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/Interceptions.pm b/lib/NGCP/Panel/Role/API/Interceptions.pm index a12b50d23c..333eebaf90 100644 --- a/lib/NGCP/Panel/Role/API/Interceptions.pm +++ b/lib/NGCP/Panel/Role/API/Interceptions.pm @@ -4,7 +4,7 @@ use Sipwise::Base; use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::InterceptionAPI; @@ -30,7 +30,7 @@ sub hal_from_item { $form //= $self->get_form($c); my $resource = $self->resource_from_item($c, $item, $form); - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/InvoiceTemplates.pm b/lib/NGCP/Panel/Role/API/InvoiceTemplates.pm index 4b2631ee80..1dd0b79e8c 100644 --- a/lib/NGCP/Panel/Role/API/InvoiceTemplates.pm +++ b/lib/NGCP/Panel/Role/API/InvoiceTemplates.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::Invoice::TemplateAdmin; @@ -37,7 +37,7 @@ sub hal_from_item { my ($self, $c, $item, $form) = @_; my %resource = $item->get_inflated_columns; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/Invoices.pm b/lib/NGCP/Panel/Role/API/Invoices.pm index 90d74c16cb..5319076ba6 100644 --- a/lib/NGCP/Panel/Role/API/Invoices.pm +++ b/lib/NGCP/Panel/Role/API/Invoices.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::Invoice::InvoiceAPI; @@ -37,7 +37,7 @@ sub hal_from_item { my %resource = $item->get_inflated_columns; $resource{customer_id} = delete $resource{contract_id}; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/LnpCarriers.pm b/lib/NGCP/Panel/Role/API/LnpCarriers.pm index f0132b6ee8..dc2bdfe71f 100644 --- a/lib/NGCP/Panel/Role/API/LnpCarriers.pm +++ b/lib/NGCP/Panel/Role/API/LnpCarriers.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::Lnp::Carrier; @@ -28,7 +28,7 @@ sub hal_from_item { my ($self, $c, $item, $form) = @_; my %resource = $item->get_inflated_columns; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/LnpNumbers.pm b/lib/NGCP/Panel/Role/API/LnpNumbers.pm index f2fa32ff41..eb1a9c3ea2 100644 --- a/lib/NGCP/Panel/Role/API/LnpNumbers.pm +++ b/lib/NGCP/Panel/Role/API/LnpNumbers.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::Lnp::Number; @@ -27,7 +27,7 @@ sub hal_from_item { my ($self, $c, $item, $form) = @_; my %resource = $item->get_inflated_columns; #no bottleneck - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/MailToFaxSettings.pm b/lib/NGCP/Panel/Role/API/MailToFaxSettings.pm index 746a3cabfb..e246b3108b 100644 --- a/lib/NGCP/Panel/Role/API/MailToFaxSettings.pm +++ b/lib/NGCP/Panel/Role/API/MailToFaxSettings.pm @@ -6,7 +6,7 @@ use Sipwise::Base; use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use JSON::Types; @@ -55,7 +55,7 @@ sub hal_from_item { } $resource{acl} = \@acls; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/MaliciousCalls.pm b/lib/NGCP/Panel/Role/API/MaliciousCalls.pm index 03fe3a59b8..18d5cfb9b0 100644 --- a/lib/NGCP/Panel/Role/API/MaliciousCalls.pm +++ b/lib/NGCP/Panel/Role/API/MaliciousCalls.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::MaliciousCall::Admin; @@ -42,7 +42,7 @@ sub hal_from_item { my ($self, $c, $item, $form) = @_; my %resource = $item->get_inflated_columns; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/NcosLevels.pm b/lib/NGCP/Panel/Role/API/NcosLevels.pm index 5afb5960b3..7943db99cc 100644 --- a/lib/NGCP/Panel/Role/API/NcosLevels.pm +++ b/lib/NGCP/Panel/Role/API/NcosLevels.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::NCOS::ResellerLevelAPI; @@ -37,7 +37,7 @@ sub hal_from_item { my ($self, $c, $item, $form) = @_; my %resource = $item->get_inflated_columns; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/NcosLnpCarriers.pm b/lib/NGCP/Panel/Role/API/NcosLnpCarriers.pm index 9e5899d561..333e747798 100644 --- a/lib/NGCP/Panel/Role/API/NcosLnpCarriers.pm +++ b/lib/NGCP/Panel/Role/API/NcosLnpCarriers.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::NCOS::LnpAPI; @@ -28,7 +28,7 @@ sub hal_from_item { my ($self, $c, $item, $form) = @_; my %resource = $item->get_inflated_columns; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/NcosPatterns.pm b/lib/NGCP/Panel/Role/API/NcosPatterns.pm index e6928727ae..f01154a3e0 100644 --- a/lib/NGCP/Panel/Role/API/NcosPatterns.pm +++ b/lib/NGCP/Panel/Role/API/NcosPatterns.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::NCOS::PatternAPI; @@ -36,7 +36,7 @@ sub hal_from_item { my ($self, $c, $item, $form) = @_; my %resource = $item->get_inflated_columns; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/PartyCallControls.pm b/lib/NGCP/Panel/Role/API/PartyCallControls.pm index 7f9b3f8072..474e0e5994 100644 --- a/lib/NGCP/Panel/Role/API/PartyCallControls.pm +++ b/lib/NGCP/Panel/Role/API/PartyCallControls.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); diff --git a/lib/NGCP/Panel/Role/API/PbxDeviceConfigs.pm b/lib/NGCP/Panel/Role/API/PbxDeviceConfigs.pm index 43c1e60257..283690ec6c 100644 --- a/lib/NGCP/Panel/Role/API/PbxDeviceConfigs.pm +++ b/lib/NGCP/Panel/Role/API/PbxDeviceConfigs.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::Device::ConfigAPI; @@ -38,7 +38,7 @@ sub hal_from_item { $form //= $self->get_form($c); my $resource = $self->resource_from_item($c, $item, $form); - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/PbxDeviceFirmwares.pm b/lib/NGCP/Panel/Role/API/PbxDeviceFirmwares.pm index df0e83c1a9..7078b2d1ec 100644 --- a/lib/NGCP/Panel/Role/API/PbxDeviceFirmwares.pm +++ b/lib/NGCP/Panel/Role/API/PbxDeviceFirmwares.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::Device::FirmwareAPI; @@ -38,7 +38,7 @@ sub hal_from_item { $form //= $self->get_form($c); my $resource = $self->resource_from_item($c, $item, $form); - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/PbxDeviceModels.pm b/lib/NGCP/Panel/Role/API/PbxDeviceModels.pm index 72f945c52b..3a5991bdff 100644 --- a/lib/NGCP/Panel/Role/API/PbxDeviceModels.pm +++ b/lib/NGCP/Panel/Role/API/PbxDeviceModels.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use JSON qw(); @@ -28,7 +28,7 @@ sub hal_from_item { my $form; #my $type = 'pbxdevicemodels'; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/PbxDeviceProfiles.pm b/lib/NGCP/Panel/Role/API/PbxDeviceProfiles.pm index 20d90653a6..9712a38059 100644 --- a/lib/NGCP/Panel/Role/API/PbxDeviceProfiles.pm +++ b/lib/NGCP/Panel/Role/API/PbxDeviceProfiles.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use JSON::Types; @@ -23,7 +23,7 @@ sub hal_from_item { my $form; my $type = 'pbxdeviceprofiles'; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/PbxDevices.pm b/lib/NGCP/Panel/Role/API/PbxDevices.pm index f5437ff75f..9d72b8fe19 100644 --- a/lib/NGCP/Panel/Role/API/PbxDevices.pm +++ b/lib/NGCP/Panel/Role/API/PbxDevices.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use JSON::Types; @@ -23,7 +23,7 @@ sub hal_from_item { my $form; my $type = 'pbxdevices'; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/PeeringGroups.pm b/lib/NGCP/Panel/Role/API/PeeringGroups.pm index 91842959c1..88eb9e6127 100644 --- a/lib/NGCP/Panel/Role/API/PeeringGroups.pm +++ b/lib/NGCP/Panel/Role/API/PeeringGroups.pm @@ -6,7 +6,7 @@ use Sipwise::Base; use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::Peering::Group; @@ -32,7 +32,7 @@ sub hal_from_item { my ($self, $c, $item, $form) = @_; my %resource = $item->get_inflated_columns; $resource{contract_id} = delete $resource{peering_contract_id}; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/PeeringInboundRules.pm b/lib/NGCP/Panel/Role/API/PeeringInboundRules.pm index 5d299f3434..772406a8f2 100644 --- a/lib/NGCP/Panel/Role/API/PeeringInboundRules.pm +++ b/lib/NGCP/Panel/Role/API/PeeringInboundRules.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::Peering::InboundRuleAPI; @@ -28,7 +28,7 @@ sub hal_from_item { my ($self, $c, $item, $form) = @_; my %resource = $item->get_inflated_columns; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/PeeringRules.pm b/lib/NGCP/Panel/Role/API/PeeringRules.pm index c009415cfe..e31fbf424c 100644 --- a/lib/NGCP/Panel/Role/API/PeeringRules.pm +++ b/lib/NGCP/Panel/Role/API/PeeringRules.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::Peering::RuleAPI; @@ -28,7 +28,7 @@ sub hal_from_item { my ($self, $c, $item, $form) = @_; my %resource = $item->get_inflated_columns; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/PeeringServers.pm b/lib/NGCP/Panel/Role/API/PeeringServers.pm index bf79c2d3e6..b22f74999b 100644 --- a/lib/NGCP/Panel/Role/API/PeeringServers.pm +++ b/lib/NGCP/Panel/Role/API/PeeringServers.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::Peering::ServerAPI; @@ -28,7 +28,7 @@ sub hal_from_item { my ($self, $c, $item, $form) = @_; my %resource = $item->get_inflated_columns; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/Preferences.pm b/lib/NGCP/Panel/Role/API/Preferences.pm index 3edef36670..35a57925c0 100644 --- a/lib/NGCP/Panel/Role/API/Preferences.pm +++ b/lib/NGCP/Panel/Role/API/Preferences.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use JSON::Types; @@ -27,7 +27,7 @@ sub hal_from_item { my $print_type = $type; $print_type = "customers" if $print_type eq "contracts"; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/ProfilePackages.pm b/lib/NGCP/Panel/Role/API/ProfilePackages.pm index fc46baeac2..d8c3df45db 100644 --- a/lib/NGCP/Panel/Role/API/ProfilePackages.pm +++ b/lib/NGCP/Panel/Role/API/ProfilePackages.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use JSON::Types; @@ -56,7 +56,7 @@ sub hal_from_item { } } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/Reminders.pm b/lib/NGCP/Panel/Role/API/Reminders.pm index ea42edda23..dbf26caea0 100644 --- a/lib/NGCP/Panel/Role/API/Reminders.pm +++ b/lib/NGCP/Panel/Role/API/Reminders.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::Reminder::API; @@ -38,7 +38,7 @@ sub hal_from_item { $form //= $self->get_form($c); my $resource = $self->resource_from_item($c, $item, $form); - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/Resellers.pm b/lib/NGCP/Panel/Role/API/Resellers.pm index 200fa82442..c8f284d22a 100644 --- a/lib/NGCP/Panel/Role/API/Resellers.pm +++ b/lib/NGCP/Panel/Role/API/Resellers.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Utils::DateTime; @@ -40,7 +40,7 @@ sub hal_from_reseller { # if the structure is returned for one single item # (make it a method flag) - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/RewriteRuleSets.pm b/lib/NGCP/Panel/Role/API/RewriteRuleSets.pm index 96fe088045..a05c5f9450 100644 --- a/lib/NGCP/Panel/Role/API/RewriteRuleSets.pm +++ b/lib/NGCP/Panel/Role/API/RewriteRuleSets.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use JSON::Types; @@ -46,7 +46,7 @@ sub hal_from_item { push @rewriterules, $rule_resource; } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/RewriteRules.pm b/lib/NGCP/Panel/Role/API/RewriteRules.pm index eb2c3096ee..f40c8e4767 100644 --- a/lib/NGCP/Panel/Role/API/RewriteRules.pm +++ b/lib/NGCP/Panel/Role/API/RewriteRules.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use JSON::Types; @@ -26,7 +26,7 @@ sub hal_from_item { my %resource = $item->get_inflated_columns; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/RtcApps.pm b/lib/NGCP/Panel/Role/API/RtcApps.pm index 0dbf37e9ba..f4fdc3db30 100644 --- a/lib/NGCP/Panel/Role/API/RtcApps.pm +++ b/lib/NGCP/Panel/Role/API/RtcApps.pm @@ -5,7 +5,7 @@ use Sipwise::Base; use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use JSON::Types; @@ -37,7 +37,7 @@ sub hal_from_item { } else { } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/RtcNetworks.pm b/lib/NGCP/Panel/Role/API/RtcNetworks.pm index 80c4502ee9..422a55adb7 100644 --- a/lib/NGCP/Panel/Role/API/RtcNetworks.pm +++ b/lib/NGCP/Panel/Role/API/RtcNetworks.pm @@ -5,7 +5,7 @@ use Sipwise::Base; use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use JSON::Types; @@ -40,7 +40,7 @@ sub hal_from_item { } else { } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/RtcSessions.pm b/lib/NGCP/Panel/Role/API/RtcSessions.pm index 25862c318f..d84285d579 100644 --- a/lib/NGCP/Panel/Role/API/RtcSessions.pm +++ b/lib/NGCP/Panel/Role/API/RtcSessions.pm @@ -6,7 +6,7 @@ use Sipwise::Base; use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use JSON::Types; @@ -47,7 +47,7 @@ sub hal_from_item { return; } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/SoundFiles.pm b/lib/NGCP/Panel/Role/API/SoundFiles.pm index 01f6f60d76..cefd951147 100644 --- a/lib/NGCP/Panel/Role/API/SoundFiles.pm +++ b/lib/NGCP/Panel/Role/API/SoundFiles.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use File::Temp qw(tempfile); @@ -70,7 +70,7 @@ sub hal_from_item { $form //= $self->get_form($c); my $resource = $self->resource_from_item($c, $item, $form); - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/SoundHandles.pm b/lib/NGCP/Panel/Role/API/SoundHandles.pm index 7352a3f517..7b53cc0a57 100644 --- a/lib/NGCP/Panel/Role/API/SoundHandles.pm +++ b/lib/NGCP/Panel/Role/API/SoundHandles.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::Sound::HandleAPI; @@ -38,7 +38,7 @@ sub hal_from_item { my ($self, $c, $item, $form) = @_; my %resource = $item->get_inflated_columns; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/SoundSets.pm b/lib/NGCP/Panel/Role/API/SoundSets.pm index 36c5cd53e2..5603c08c0d 100644 --- a/lib/NGCP/Panel/Role/API/SoundSets.pm +++ b/lib/NGCP/Panel/Role/API/SoundSets.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::Sound::AdminSet; @@ -50,7 +50,7 @@ sub hal_from_item { $form //= $self->get_form($c); my $resource = $self->resource_from_item($c, $item, $form); - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/SpeedDials.pm b/lib/NGCP/Panel/Role/API/SpeedDials.pm index 2f22d40eb6..873c71da73 100644 --- a/lib/NGCP/Panel/Role/API/SpeedDials.pm +++ b/lib/NGCP/Panel/Role/API/SpeedDials.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use JSON::Types; @@ -29,7 +29,7 @@ sub hal_from_item { my $p_subs = $item->provisioning_voip_subscriber; my $resource = { subscriber_id => $item->id, speeddials => $self->speeddials_from_subscriber($p_subs) }; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/SubscriberProfileSets.pm b/lib/NGCP/Panel/Role/API/SubscriberProfileSets.pm index b8aa3eef46..06ede5f681 100644 --- a/lib/NGCP/Panel/Role/API/SubscriberProfileSets.pm +++ b/lib/NGCP/Panel/Role/API/SubscriberProfileSets.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::SubscriberProfile::SetAdmin; @@ -37,7 +37,7 @@ sub hal_from_item { my ($self, $c, $item, $form) = @_; my %resource = $item->get_inflated_columns; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/SubscriberProfiles.pm b/lib/NGCP/Panel/Role/API/SubscriberProfiles.pm index 5e02263698..4e2dab8526 100644 --- a/lib/NGCP/Panel/Role/API/SubscriberProfiles.pm +++ b/lib/NGCP/Panel/Role/API/SubscriberProfiles.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::SubscriberProfile::ApiProfile; @@ -34,7 +34,7 @@ sub hal_from_item { my ($self, $c, $item, $form) = @_; my $resource = $self->resource_from_item($c, $item, $form); - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/SubscriberRegistrations.pm b/lib/NGCP/Panel/Role/API/SubscriberRegistrations.pm index a389f9e229..388a925330 100644 --- a/lib/NGCP/Panel/Role/API/SubscriberRegistrations.pm +++ b/lib/NGCP/Panel/Role/API/SubscriberRegistrations.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::Subscriber::RegisteredAPI; @@ -48,7 +48,7 @@ sub hal_from_item { my $resource = $self->resource_from_item($c, $item, $form); return unless $resource; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/Subscribers.pm b/lib/NGCP/Panel/Role/API/Subscribers.pm index 3a9cff609e..8f2614f7e4 100644 --- a/lib/NGCP/Panel/Role/API/Subscribers.pm +++ b/lib/NGCP/Panel/Role/API/Subscribers.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use JSON::Types; @@ -113,7 +113,7 @@ sub resource_from_item { sub hal_from_item { my ($self, $c, $item, $resource, $form) = @_; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/SystemContacts.pm b/lib/NGCP/Panel/Role/API/SystemContacts.pm index bce2055650..16083c751f 100644 --- a/lib/NGCP/Panel/Role/API/SystemContacts.pm +++ b/lib/NGCP/Panel/Role/API/SystemContacts.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::Contact::Reseller; @@ -32,7 +32,7 @@ sub hal_from_contact { my %resource = $contact->get_inflated_columns; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/TopupLogs.pm b/lib/NGCP/Panel/Role/API/TopupLogs.pm index 9ac7b93e86..56a4a56161 100644 --- a/lib/NGCP/Panel/Role/API/TopupLogs.pm +++ b/lib/NGCP/Panel/Role/API/TopupLogs.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::Topup::Log; @@ -45,7 +45,7 @@ sub hal_from_item { $resource{cash_balance_before} = $resource{cash_balance_before} / 100.0 if defined $resource{cash_balance_before}; $resource{cash_balance_after} = $resource{cash_balance_after} / 100.0 if defined $resource{cash_balance_after}; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/TrustedSources.pm b/lib/NGCP/Panel/Role/API/TrustedSources.pm index 55327a7d5b..7964cc833f 100644 --- a/lib/NGCP/Panel/Role/API/TrustedSources.pm +++ b/lib/NGCP/Panel/Role/API/TrustedSources.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::Subscriber::TrustedSourceAPI; @@ -39,7 +39,7 @@ sub hal_from_item { $form //= $self->get_form($c); my $resource = $self->resource_from_item($c, $item, $form); - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/UpnRewriteSets.pm b/lib/NGCP/Panel/Role/API/UpnRewriteSets.pm index 05f061dcf0..17dd8255e8 100644 --- a/lib/NGCP/Panel/Role/API/UpnRewriteSets.pm +++ b/lib/NGCP/Panel/Role/API/UpnRewriteSets.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::Subscriber::UpnRewriteSet; @@ -39,7 +39,7 @@ sub hal_from_item { $form //= $self->get_form($c); my $resource = $self->resource_from_item($c, $item, $form); - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/VoicemailSettings.pm b/lib/NGCP/Panel/Role/API/VoicemailSettings.pm index 0f7253cbec..4f35ce87c4 100644 --- a/lib/NGCP/Panel/Role/API/VoicemailSettings.pm +++ b/lib/NGCP/Panel/Role/API/VoicemailSettings.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::Voicemail::API; @@ -46,7 +46,7 @@ sub hal_from_item { my ($self, $c, $item, $form) = @_; my $resource = $self->resource_from_item($c, $item, $form); - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/Voicemails.pm b/lib/NGCP/Panel/Role/API/Voicemails.pm index 950b440893..b8226b4bce 100644 --- a/lib/NGCP/Panel/Role/API/Voicemails.pm +++ b/lib/NGCP/Panel/Role/API/Voicemails.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::Voicemail::Meta; @@ -51,7 +51,7 @@ sub get_form { sub hal_from_item { my ($self, $c, $item, $form) = @_; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/API/Vouchers.pm b/lib/NGCP/Panel/Role/API/Vouchers.pm index ffc9bdf8e4..a5fc4df2d5 100644 --- a/lib/NGCP/Panel/Role/API/Vouchers.pm +++ b/lib/NGCP/Panel/Role/API/Vouchers.pm @@ -7,7 +7,7 @@ use parent 'NGCP::Panel::Role::API'; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use HTTP::Status qw(:constants); use NGCP::Panel::Form::Voucher::AdminAPI; @@ -38,7 +38,7 @@ sub hal_from_item { my ($self, $c, $item, $form) = @_; my %resource = $item->get_inflated_columns; - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/lib/NGCP/Panel/Role/Entities.pm b/lib/NGCP/Panel/Role/Entities.pm index 651af5e667..a919833308 100644 --- a/lib/NGCP/Panel/Role/Entities.pm +++ b/lib/NGCP/Panel/Role/Entities.pm @@ -8,7 +8,7 @@ use boolean qw(true); use Safe::Isa qw($_isa); use HTTP::Headers qw(); use HTTP::Status qw(:constants); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); #use Path::Tiny qw(path); #use TryCatch; @@ -84,7 +84,7 @@ sub get { push @links, Data::HAL::Link->new(relation => 'prev', href => sprintf('/%s?page=%d&rows=%d', $c->request->path, $page - 1, $rows)); } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); diff --git a/lib/NGCP/Panel/Role/EntitiesItem.pm b/lib/NGCP/Panel/Role/EntitiesItem.pm index 25972025f2..a70fd9b1d4 100644 --- a/lib/NGCP/Panel/Role/EntitiesItem.pm +++ b/lib/NGCP/Panel/Role/EntitiesItem.pm @@ -10,7 +10,7 @@ use Safe::Isa qw($_isa); use Path::Tiny qw(path); use HTTP::Headers qw(); use HTTP::Status qw(:constants); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use NGCP::Panel::Utils::Generic qw(:all); use NGCP::Panel::Utils::DateTime; diff --git a/lib/NGCP/Panel/Utils/DataHal.pm b/lib/NGCP/Panel/Utils/DataHal.pm new file mode 100644 index 0000000000..d844319f90 --- /dev/null +++ b/lib/NGCP/Panel/Utils/DataHal.pm @@ -0,0 +1,23 @@ +package NGCP::Panel::Utils::DataHal; + +use Moo; +extends 'Data::HAL'; + +#TODO: read parameters from the ngcp-panel config section if we will use more API format configs +#use MooseX::Configuration; +around 'BUILDARGS' => sub { + my $orig = shift; + my $class = shift; + my $params; + if ((scalar @_) == 1) { + ($params) = @_; + } else { + $params = { @_ }; + } + if( !defined $params->{forcearray_underneath} && !defined $params->{_forcearray_underneath} ){ + $params->{_forcearray_underneath} = { embedded => 1 }; + } + $class->$orig($params); +}; + +1; diff --git a/lib/NGCP/Panel/Utils/Journal.pm b/lib/NGCP/Panel/Utils/Journal.pm index c336c02227..cc79620b6d 100644 --- a/lib/NGCP/Panel/Utils/Journal.pm +++ b/lib/NGCP/Panel/Utils/Journal.pm @@ -9,7 +9,7 @@ use JSON; use HTTP::Status qw(:constants); use TryCatch; use boolean qw(true); -use Data::HAL qw(); +use NGCP::Panel::Utils::DataHal qw(); use Data::HAL::Link qw(); use Scalar::Util 'blessed'; use Storable; @@ -87,7 +87,7 @@ sub add_journal_item_hal { } else { $hal = $resource; } - if (ref $hal eq Data::HAL::) { + if (ref $hal eq NGCP::Panel::Utils::DataHal::) { $resource = $hal->resource; } if (!defined $id) { @@ -254,7 +254,7 @@ sub handle_api_journals_get { push @links, $controller->collection_nav_links($page, $rows, $total_count, $c->request->path, $c->request->query_params); - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( embedded => [@embedded], links => [@links], ); @@ -447,7 +447,7 @@ sub hal_from_journal { } } - my $hal = Data::HAL->new( + my $hal = NGCP::Panel::Utils::DataHal->new( links => [ Data::HAL::Link->new( relation => 'curies', diff --git a/t/api-rest/api-all.t b/t/api-rest/api-all.t index a43a17ee57..5a08b87c7d 100644 --- a/t/api-rest/api-all.t +++ b/t/api-rest/api-all.t @@ -23,7 +23,7 @@ my @opt_keys = keys %$opt_in; print Dumper $opt; pod2usage(1) if $opt->{help}; pod2usage(1) unless( 1 -# defined $opt->{collections} && defined $opt->{etc} +# defined $opt->{collections} && defined $opt->{etc} ); @@ -86,6 +86,9 @@ my $res = { 'tests_exclude' => \%test_exclude, 'opt' => $opt }; + +################################ RUN ############################# + foreach my $collection ( sort grep{(! ( scalar keys $opt->{collections} ) ) || $opt->{collections}->{$_} } keys %{$data} ){ if(!$opt->{collections}->{$collection}){ if($test_exists{'api-'.$collection.'.t'} && !$opt->{ignore_existence}){ @@ -120,6 +123,7 @@ foreach my $collection ( sort grep{(! ( scalar keys $opt->{collections} ) ) || $ } $test_machine->check_bundle(); + if($test_machine->{methods}->{collection}->{allowed}->{GET}){ my $item = $test_machine->get_item_hal(); #if($item->{content}->{total_count}){