* API now has own GroupAPI form with the correct fields for API * db/form field name conversion is moved to the newly added resource_from_item() and process_form_resource() functions * simplify code for GET/POST/PUT/PATCH operations Change-Id: I99b76801a2894c8a4821513186796627db728189mr11.4
parent
8ebe7f735c
commit
c5b288a9da
@ -0,0 +1,51 @@
|
||||
package NGCP::Panel::Form::Peering::GroupAPI;
|
||||
|
||||
use HTML::FormHandler::Moose;
|
||||
extends 'HTML::FormHandler';
|
||||
|
||||
has_field 'contract_id' => (
|
||||
type => 'PosInteger',
|
||||
required => 1,
|
||||
element_attr => {
|
||||
rel => ['tooltip'],
|
||||
title => ['The contract used for this peering group.']
|
||||
},
|
||||
);
|
||||
|
||||
has_field 'name' => (
|
||||
type => 'Text',
|
||||
required => 1,
|
||||
element_attr => {
|
||||
rel => ['tooltip'],
|
||||
title => ['Peering group name.']
|
||||
},
|
||||
);
|
||||
|
||||
has_field 'priority' => (
|
||||
type => 'IntRange',
|
||||
required => 0,
|
||||
range_start => '1',
|
||||
range_end => '9',
|
||||
);
|
||||
|
||||
has_field 'time_set_id' => (
|
||||
type => 'PosInteger',
|
||||
required => 0,
|
||||
element_attr => {
|
||||
rel => ['tooltip'],
|
||||
title => ['By specifying a TimeSet the periods during which this group is active can be restricted.']
|
||||
},
|
||||
);
|
||||
|
||||
has_field 'description' => (
|
||||
type => 'Text',
|
||||
required => 0,
|
||||
element_attr => {
|
||||
rel => ['tooltip'],
|
||||
title => ['Peering group description'],
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
1;
|
||||
# vim: set tabstop=4 expandtab:
|
||||
Loading…
Reference in new issue