diff --git a/apps/pvx/restapi/mode/httphits.pm b/apps/pvx/restapi/mode/httphits.pm index fd49502a3..16e1b99b0 100644 --- a/apps/pvx/restapi/mode/httphits.pm +++ b/apps/pvx/restapi/mode/httphits.pm @@ -88,6 +88,11 @@ sub check_options { my ($self, %options) = @_; $self->SUPER::check_options(%options); + if (!defined($self->{option_results}->{from}) || $self->{option_results}->{from} eq '') { + $self->{output}->add_option_msg(short_msg => "Need to specify --from option as a PVQL object."); + $self->{output}->option_exit(); + } + if (!defined($self->{option_results}->{instance}) || $self->{option_results}->{instance} eq '') { $self->{output}->add_option_msg(short_msg => "Need to specify --instance option as a PVQL object."); $self->{output}->option_exit(); diff --git a/apps/pvx/restapi/mode/networkconnection.pm b/apps/pvx/restapi/mode/networkconnection.pm index c0692da69..792005e08 100644 --- a/apps/pvx/restapi/mode/networkconnection.pm +++ b/apps/pvx/restapi/mode/networkconnection.pm @@ -97,6 +97,11 @@ sub check_options { my ($self, %options) = @_; $self->SUPER::check_options(%options); + if (!defined($self->{option_results}->{from}) || $self->{option_results}->{from} eq '') { + $self->{output}->add_option_msg(short_msg => "Need to specify --from option as a PVQL object."); + $self->{output}->option_exit(); + } + if (!defined($self->{option_results}->{instance}) || $self->{option_results}->{instance} eq '') { $self->{output}->add_option_msg(short_msg => "Need to specify --instance option as a PVQL object."); $self->{output}->option_exit(); diff --git a/apps/pvx/restapi/mode/networktraffic.pm b/apps/pvx/restapi/mode/networktraffic.pm index aecdbda04..41ec25d51 100644 --- a/apps/pvx/restapi/mode/networktraffic.pm +++ b/apps/pvx/restapi/mode/networktraffic.pm @@ -132,6 +132,11 @@ sub check_options { my ($self, %options) = @_; $self->SUPER::check_options(%options); + if (!defined($self->{option_results}->{from}) || $self->{option_results}->{from} eq '') { + $self->{output}->add_option_msg(short_msg => "Need to specify --from option as a PVQL object."); + $self->{output}->option_exit(); + } + if (!defined($self->{option_results}->{instance}) || $self->{option_results}->{instance} eq '') { $self->{output}->add_option_msg(short_msg => "Need to specify --instance option as a PVQL object."); $self->{output}->option_exit(); diff --git a/apps/pvx/restapi/mode/networkuserexperience.pm b/apps/pvx/restapi/mode/networkuserexperience.pm index 6110bbfbc..afe36432e 100644 --- a/apps/pvx/restapi/mode/networkuserexperience.pm +++ b/apps/pvx/restapi/mode/networkuserexperience.pm @@ -75,7 +75,7 @@ sub check_options { $self->{output}->option_exit(); } - if (!defined($self->{option_results}->{from}) || $self->{option_results}->{instance} eq '') { + if (!defined($self->{option_results}->{instance}) || $self->{option_results}->{instance} eq '') { $self->{output}->add_option_msg(short_msg => "Need to specify --instance option as a PVQL object."); $self->{output}->option_exit(); }