diff --git a/.gitlab-ci.yml.bak b/.gitlab-ci.yml.bak deleted file mode 100644 index 4b87522663fe35cfeee52026a928ed7971b0ddfa..0000000000000000000000000000000000000000 --- a/.gitlab-ci.yml.bak +++ /dev/null @@ -1,17 +0,0 @@ -image: quay.io/goswagger/swagger:latest - -before_script: - - mkdir .ssh - - echo $SSH_PRIVATE_KEY > .ssh/gitlab-ci - - echo "Host code.fbi.h-da.de" > .ssh/config - - echo " Hostname code.fbi.h-da.de" >> .ssh/config - - echo " User git" >> .ssh/config - - echo " IdentityFile ~/.ssh/gitlab-ci" >> .ssh/config - - git config --global url.ssh://git@code.fbi.h-da.de/.insteadOf https://code.fbi.h-da.de/ - -Build: - stage: build - script: - - go mod init code.fbi.h-da.de/cocsn/cocsn-api - - swagger generate server -A cocsn -f ./cocsn-v0.0.1.yml - - git push origin HEAD:$CI_COMMIT_REF_NAME \ No newline at end of file diff --git a/api/models/data_cocsn_arp_table.go b/api/models/data_cocsn_arp_table.go deleted file mode 100644 index 2a47148a82a3379ab12b769161223f6442d423e0..0000000000000000000000000000000000000000 --- a/api/models/data_cocsn_arp_table.go +++ /dev/null @@ -1,177 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DataCocsnArpTable data cocsn arp table -// -// swagger:model data_cocsn_arp-table -type DataCocsnArpTable struct { - - // cocsn arp table - CocsnArpTable *DataCocsnArpTableCocsnArpTable `json:"cocsn:arp-table,omitempty"` -} - -// Validate validates this data cocsn arp table -func (m *DataCocsnArpTable) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCocsnArpTable(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataCocsnArpTable) validateCocsnArpTable(formats strfmt.Registry) error { - - if swag.IsZero(m.CocsnArpTable) { // not required - return nil - } - - if m.CocsnArpTable != nil { - if err := m.CocsnArpTable.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cocsn:arp-table") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnArpTable) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnArpTable) UnmarshalBinary(b []byte) error { - var res DataCocsnArpTable - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// DataCocsnArpTableCocsnArpTable (non-presence) -// -// swagger:model DataCocsnArpTableCocsnArpTable -type DataCocsnArpTableCocsnArpTable struct { - - // (list) - ArpEntry []*DataCocsnArpTableCocsnArpTableArpEntryItems0 `json:"arp-entry"` -} - -// Validate validates this data cocsn arp table cocsn arp table -func (m *DataCocsnArpTableCocsnArpTable) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateArpEntry(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataCocsnArpTableCocsnArpTable) validateArpEntry(formats strfmt.Registry) error { - - if swag.IsZero(m.ArpEntry) { // not required - return nil - } - - for i := 0; i < len(m.ArpEntry); i++ { - if swag.IsZero(m.ArpEntry[i]) { // not required - continue - } - - if m.ArpEntry[i] != nil { - if err := m.ArpEntry[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cocsn:arp-table" + "." + "arp-entry" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnArpTableCocsnArpTable) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnArpTableCocsnArpTable) UnmarshalBinary(b []byte) error { - var res DataCocsnArpTableCocsnArpTable - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// DataCocsnArpTableCocsnArpTableArpEntryItems0 data cocsn arp table cocsn arp table arp entry items0 -// -// swagger:model DataCocsnArpTableCocsnArpTableArpEntryItems0 -type DataCocsnArpTableCocsnArpTableArpEntryItems0 struct { - - // IP address of the arp entry (leaf) - Address string `json:"address,omitempty"` - - // Interface of the arp entry (leaf) - Interface string `json:"interface,omitempty"` - - // MAC address of the arp entry (leaf) - PhsAddress string `json:"phs-address,omitempty"` -} - -// Validate validates this data cocsn arp table cocsn arp table arp entry items0 -func (m *DataCocsnArpTableCocsnArpTableArpEntryItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnArpTableCocsnArpTableArpEntryItems0) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnArpTableCocsnArpTableArpEntryItems0) UnmarshalBinary(b []byte) error { - var res DataCocsnArpTableCocsnArpTableArpEntryItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/models/data_cocsn_arp_table_arp_entry.go b/api/models/data_cocsn_arp_table_arp_entry.go deleted file mode 100644 index 66ffc8bcfb817bb6204be6b604ebaf53157133f0..0000000000000000000000000000000000000000 --- a/api/models/data_cocsn_arp_table_arp_entry.go +++ /dev/null @@ -1,118 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DataCocsnArpTableArpEntry data cocsn arp table arp entry -// -// swagger:model data_cocsn_arp-table_arp-entry -type DataCocsnArpTableArpEntry struct { - - // (list) - CocsnArpEntry []*DataCocsnArpTableArpEntryCocsnArpEntryItems0 `json:"cocsn:arp-entry"` -} - -// Validate validates this data cocsn arp table arp entry -func (m *DataCocsnArpTableArpEntry) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCocsnArpEntry(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataCocsnArpTableArpEntry) validateCocsnArpEntry(formats strfmt.Registry) error { - - if swag.IsZero(m.CocsnArpEntry) { // not required - return nil - } - - for i := 0; i < len(m.CocsnArpEntry); i++ { - if swag.IsZero(m.CocsnArpEntry[i]) { // not required - continue - } - - if m.CocsnArpEntry[i] != nil { - if err := m.CocsnArpEntry[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cocsn:arp-entry" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnArpTableArpEntry) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnArpTableArpEntry) UnmarshalBinary(b []byte) error { - var res DataCocsnArpTableArpEntry - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// DataCocsnArpTableArpEntryCocsnArpEntryItems0 data cocsn arp table arp entry cocsn arp entry items0 -// -// swagger:model DataCocsnArpTableArpEntryCocsnArpEntryItems0 -type DataCocsnArpTableArpEntryCocsnArpEntryItems0 struct { - - // IP address of the arp entry (leaf) - Address string `json:"address,omitempty"` - - // Interface of the arp entry (leaf) - Interface string `json:"interface,omitempty"` - - // MAC address of the arp entry (leaf) - PhsAddress string `json:"phs-address,omitempty"` -} - -// Validate validates this data cocsn arp table arp entry cocsn arp entry items0 -func (m *DataCocsnArpTableArpEntryCocsnArpEntryItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnArpTableArpEntryCocsnArpEntryItems0) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnArpTableArpEntryCocsnArpEntryItems0) UnmarshalBinary(b []byte) error { - var res DataCocsnArpTableArpEntryCocsnArpEntryItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/models/data_cocsn_arp_table_arp_entry_arp_entry_address.go b/api/models/data_cocsn_arp_table_arp_entry_arp_entry_address.go deleted file mode 100644 index e89e5007a1a56eb016b09f7c5e5b11190f4ab8c4..0000000000000000000000000000000000000000 --- a/api/models/data_cocsn_arp_table_arp_entry_arp_entry_address.go +++ /dev/null @@ -1,118 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DataCocsnArpTableArpEntryArpEntryAddress data cocsn arp table arp entry arp entry address -// -// swagger:model data_cocsn_arp-table_arp-entry_arp-entry-address -type DataCocsnArpTableArpEntryArpEntryAddress struct { - - // (list) - CocsnArpEntry []*DataCocsnArpTableArpEntryArpEntryAddressCocsnArpEntryItems0 `json:"cocsn:arp-entry"` -} - -// Validate validates this data cocsn arp table arp entry arp entry address -func (m *DataCocsnArpTableArpEntryArpEntryAddress) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCocsnArpEntry(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataCocsnArpTableArpEntryArpEntryAddress) validateCocsnArpEntry(formats strfmt.Registry) error { - - if swag.IsZero(m.CocsnArpEntry) { // not required - return nil - } - - for i := 0; i < len(m.CocsnArpEntry); i++ { - if swag.IsZero(m.CocsnArpEntry[i]) { // not required - continue - } - - if m.CocsnArpEntry[i] != nil { - if err := m.CocsnArpEntry[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cocsn:arp-entry" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnArpTableArpEntryArpEntryAddress) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnArpTableArpEntryArpEntryAddress) UnmarshalBinary(b []byte) error { - var res DataCocsnArpTableArpEntryArpEntryAddress - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// DataCocsnArpTableArpEntryArpEntryAddressCocsnArpEntryItems0 data cocsn arp table arp entry arp entry address cocsn arp entry items0 -// -// swagger:model DataCocsnArpTableArpEntryArpEntryAddressCocsnArpEntryItems0 -type DataCocsnArpTableArpEntryArpEntryAddressCocsnArpEntryItems0 struct { - - // IP address of the arp entry (leaf) - Address string `json:"address,omitempty"` - - // Interface of the arp entry (leaf) - Interface string `json:"interface,omitempty"` - - // MAC address of the arp entry (leaf) - PhsAddress string `json:"phs-address,omitempty"` -} - -// Validate validates this data cocsn arp table arp entry arp entry address cocsn arp entry items0 -func (m *DataCocsnArpTableArpEntryArpEntryAddressCocsnArpEntryItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnArpTableArpEntryArpEntryAddressCocsnArpEntryItems0) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnArpTableArpEntryArpEntryAddressCocsnArpEntryItems0) UnmarshalBinary(b []byte) error { - var res DataCocsnArpTableArpEntryArpEntryAddressCocsnArpEntryItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/models/data_cocsn_arp_table_arp_entry_arp_entry_address_address.go b/api/models/data_cocsn_arp_table_arp_entry_arp_entry_address_address.go deleted file mode 100644 index ddf70f5e3437b245d40da99112d34dbd59179650..0000000000000000000000000000000000000000 --- a/api/models/data_cocsn_arp_table_arp_entry_arp_entry_address_address.go +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DataCocsnArpTableArpEntryArpEntryAddressAddress data cocsn arp table arp entry arp entry address address -// -// swagger:model data_cocsn_arp-table_arp-entry_arp-entry-address_address -type DataCocsnArpTableArpEntryArpEntryAddressAddress struct { - - // IP address of the arp entry (leaf) - CocsnAddress string `json:"cocsn:address,omitempty"` -} - -// Validate validates this data cocsn arp table arp entry arp entry address address -func (m *DataCocsnArpTableArpEntryArpEntryAddressAddress) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnArpTableArpEntryArpEntryAddressAddress) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnArpTableArpEntryArpEntryAddressAddress) UnmarshalBinary(b []byte) error { - var res DataCocsnArpTableArpEntryArpEntryAddressAddress - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/models/data_cocsn_arp_table_arp_entry_arp_entry_address_interface.go b/api/models/data_cocsn_arp_table_arp_entry_arp_entry_address_interface.go deleted file mode 100644 index c6811a7fe130e4ed352ba6ee3131a3fe174961e7..0000000000000000000000000000000000000000 --- a/api/models/data_cocsn_arp_table_arp_entry_arp_entry_address_interface.go +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DataCocsnArpTableArpEntryArpEntryAddressInterface data cocsn arp table arp entry arp entry address interface -// -// swagger:model data_cocsn_arp-table_arp-entry_arp-entry-address_interface -type DataCocsnArpTableArpEntryArpEntryAddressInterface struct { - - // Interface of the arp entry (leaf) - CocsnInterface string `json:"cocsn:interface,omitempty"` -} - -// Validate validates this data cocsn arp table arp entry arp entry address interface -func (m *DataCocsnArpTableArpEntryArpEntryAddressInterface) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnArpTableArpEntryArpEntryAddressInterface) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnArpTableArpEntryArpEntryAddressInterface) UnmarshalBinary(b []byte) error { - var res DataCocsnArpTableArpEntryArpEntryAddressInterface - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/models/data_cocsn_arp_table_arp_entry_arp_entry_address_phs_address.go b/api/models/data_cocsn_arp_table_arp_entry_arp_entry_address_phs_address.go deleted file mode 100644 index c4237e04f66941a2aa1c579f5b5b87471751b17d..0000000000000000000000000000000000000000 --- a/api/models/data_cocsn_arp_table_arp_entry_arp_entry_address_phs_address.go +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DataCocsnArpTableArpEntryArpEntryAddressPhsAddress data cocsn arp table arp entry arp entry address phs address -// -// swagger:model data_cocsn_arp-table_arp-entry_arp-entry-address_phs-address -type DataCocsnArpTableArpEntryArpEntryAddressPhsAddress struct { - - // MAC address of the arp entry (leaf) - CocsnPhsAddress string `json:"cocsn:phs-address,omitempty"` -} - -// Validate validates this data cocsn arp table arp entry arp entry address phs address -func (m *DataCocsnArpTableArpEntryArpEntryAddressPhsAddress) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnArpTableArpEntryArpEntryAddressPhsAddress) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnArpTableArpEntryArpEntryAddressPhsAddress) UnmarshalBinary(b []byte) error { - var res DataCocsnArpTableArpEntryArpEntryAddressPhsAddress - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/models/data_cocsn_arp_table_post.go b/api/models/data_cocsn_arp_table_post.go deleted file mode 100644 index 162ac740332c41bc313f27ede62cce7abea06615..0000000000000000000000000000000000000000 --- a/api/models/data_cocsn_arp_table_post.go +++ /dev/null @@ -1,118 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DataCocsnArpTablePost data cocsn arp table post -// -// swagger:model data_cocsn_arp-table-post -type DataCocsnArpTablePost struct { - - // (list) - CocsnArpEntry []*DataCocsnArpTablePostCocsnArpEntryItems0 `json:"cocsn:arp-entry"` -} - -// Validate validates this data cocsn arp table post -func (m *DataCocsnArpTablePost) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCocsnArpEntry(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataCocsnArpTablePost) validateCocsnArpEntry(formats strfmt.Registry) error { - - if swag.IsZero(m.CocsnArpEntry) { // not required - return nil - } - - for i := 0; i < len(m.CocsnArpEntry); i++ { - if swag.IsZero(m.CocsnArpEntry[i]) { // not required - continue - } - - if m.CocsnArpEntry[i] != nil { - if err := m.CocsnArpEntry[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cocsn:arp-entry" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnArpTablePost) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnArpTablePost) UnmarshalBinary(b []byte) error { - var res DataCocsnArpTablePost - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// DataCocsnArpTablePostCocsnArpEntryItems0 data cocsn arp table post cocsn arp entry items0 -// -// swagger:model DataCocsnArpTablePostCocsnArpEntryItems0 -type DataCocsnArpTablePostCocsnArpEntryItems0 struct { - - // IP address of the arp entry (leaf) - Address string `json:"address,omitempty"` - - // Interface of the arp entry (leaf) - Interface string `json:"interface,omitempty"` - - // MAC address of the arp entry (leaf) - PhsAddress string `json:"phs-address,omitempty"` -} - -// Validate validates this data cocsn arp table post cocsn arp entry items0 -func (m *DataCocsnArpTablePostCocsnArpEntryItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnArpTablePostCocsnArpEntryItems0) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnArpTablePostCocsnArpEntryItems0) UnmarshalBinary(b []byte) error { - var res DataCocsnArpTablePostCocsnArpEntryItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/models/data_cocsn_interfaces_interface.go b/api/models/data_cocsn_interfaces_interface.go deleted file mode 100644 index 196295ccda5f1873d802c4aed7f012533a8bc360..0000000000000000000000000000000000000000 --- a/api/models/data_cocsn_interfaces_interface.go +++ /dev/null @@ -1,185 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// DataCocsnInterfacesInterface data cocsn interfaces interface -// -// swagger:model data_cocsn_interfaces_interface -type DataCocsnInterfacesInterface struct { - - // (list) - CocsnInterface []*DataCocsnInterfacesInterfaceCocsnInterfaceItems0 `json:"cocsn:interface"` -} - -// Validate validates this data cocsn interfaces interface -func (m *DataCocsnInterfacesInterface) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCocsnInterface(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataCocsnInterfacesInterface) validateCocsnInterface(formats strfmt.Registry) error { - - if swag.IsZero(m.CocsnInterface) { // not required - return nil - } - - for i := 0; i < len(m.CocsnInterface); i++ { - if swag.IsZero(m.CocsnInterface[i]) { // not required - continue - } - - if m.CocsnInterface[i] != nil { - if err := m.CocsnInterface[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cocsn:interface" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnInterfacesInterface) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnInterfacesInterface) UnmarshalBinary(b []byte) error { - var res DataCocsnInterfacesInterface - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// DataCocsnInterfacesInterfaceCocsnInterfaceItems0 data cocsn interfaces interface cocsn interface items0 -// -// swagger:model DataCocsnInterfacesInterfaceCocsnInterfaceItems0 -type DataCocsnInterfacesInterfaceCocsnInterfaceItems0 struct { - - // addresses - Addresses []string `json:"addresses"` - - // Enable or disable the interface. Example value: true (leaf) - Enabled bool `json:"enabled,omitempty"` - - // Interface name. Example value: en0 (leaf) - Name string `json:"name,omitempty"` - - // Describes whether the interface is physically up or down (leaf) - // Enum: [up down] - OperStatus *string `json:"oper-status,omitempty"` - - // The interface's address at its protocol sub-layer. For - // example, for an 802.x interface, this object normally - // contains a Media Access Control (MAC) address. The - // interface's media-specific modules must define the bit - // and byte ordering and the format of the value of this - // object. For interfaces that do not have such an address - // (e.g., a serial line), this node is not present. (leaf) - PhysAddress string `json:"phys-address,omitempty"` -} - -// Validate validates this data cocsn interfaces interface cocsn interface items0 -func (m *DataCocsnInterfacesInterfaceCocsnInterfaceItems0) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateOperStatus(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -var dataCocsnInterfacesInterfaceCocsnInterfaceItems0TypeOperStatusPropEnum []interface{} - -func init() { - var res []string - if err := json.Unmarshal([]byte(`["up","down"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - dataCocsnInterfacesInterfaceCocsnInterfaceItems0TypeOperStatusPropEnum = append(dataCocsnInterfacesInterfaceCocsnInterfaceItems0TypeOperStatusPropEnum, v) - } -} - -const ( - - // DataCocsnInterfacesInterfaceCocsnInterfaceItems0OperStatusUp captures enum value "up" - DataCocsnInterfacesInterfaceCocsnInterfaceItems0OperStatusUp string = "up" - - // DataCocsnInterfacesInterfaceCocsnInterfaceItems0OperStatusDown captures enum value "down" - DataCocsnInterfacesInterfaceCocsnInterfaceItems0OperStatusDown string = "down" -) - -// prop value enum -func (m *DataCocsnInterfacesInterfaceCocsnInterfaceItems0) validateOperStatusEnum(path, location string, value string) error { - if err := validate.EnumCase(path, location, value, dataCocsnInterfacesInterfaceCocsnInterfaceItems0TypeOperStatusPropEnum, true); err != nil { - return err - } - return nil -} - -func (m *DataCocsnInterfacesInterfaceCocsnInterfaceItems0) validateOperStatus(formats strfmt.Registry) error { - - if swag.IsZero(m.OperStatus) { // not required - return nil - } - - // value enum - if err := m.validateOperStatusEnum("oper-status", "body", *m.OperStatus); err != nil { - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnInterfacesInterfaceCocsnInterfaceItems0) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnInterfacesInterfaceCocsnInterfaceItems0) UnmarshalBinary(b []byte) error { - var res DataCocsnInterfacesInterfaceCocsnInterfaceItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/models/data_cocsn_interfaces_interface_interface_name_addresses.go b/api/models/data_cocsn_interfaces_interface_interface_name_addresses.go deleted file mode 100644 index e7c13abb2700a6b2db3fd9adac1baa67d5629570..0000000000000000000000000000000000000000 --- a/api/models/data_cocsn_interfaces_interface_interface_name_addresses.go +++ /dev/null @@ -1,43 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DataCocsnInterfacesInterfaceInterfaceNameAddresses data cocsn interfaces interface interface name addresses -// -// swagger:model data_cocsn_interfaces_interface_interface-name_addresses -type DataCocsnInterfacesInterfaceInterfaceNameAddresses struct { - - // cocsn addresses - CocsnAddresses []string `json:"cocsn:addresses"` -} - -// Validate validates this data cocsn interfaces interface interface name addresses -func (m *DataCocsnInterfacesInterfaceInterfaceNameAddresses) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnInterfacesInterfaceInterfaceNameAddresses) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnInterfacesInterfaceInterfaceNameAddresses) UnmarshalBinary(b []byte) error { - var res DataCocsnInterfacesInterfaceInterfaceNameAddresses - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/models/data_cocsn_routes_route.go b/api/models/data_cocsn_routes_route.go deleted file mode 100644 index c2c0581c80fd5ca1f451f762486040a5e757b9b3..0000000000000000000000000000000000000000 --- a/api/models/data_cocsn_routes_route.go +++ /dev/null @@ -1,124 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// DataCocsnRoutesRoute data cocsn routes route -// -// swagger:model data_cocsn_routes_route -type DataCocsnRoutesRoute struct { - - // (list) - CocsnRoute []*DataCocsnRoutesRouteCocsnRouteItems0 `json:"cocsn:route"` -} - -// Validate validates this data cocsn routes route -func (m *DataCocsnRoutesRoute) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateCocsnRoute(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataCocsnRoutesRoute) validateCocsnRoute(formats strfmt.Registry) error { - - if swag.IsZero(m.CocsnRoute) { // not required - return nil - } - - for i := 0; i < len(m.CocsnRoute); i++ { - if swag.IsZero(m.CocsnRoute[i]) { // not required - continue - } - - if m.CocsnRoute[i] != nil { - if err := m.CocsnRoute[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cocsn:route" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnRoutesRoute) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnRoutesRoute) UnmarshalBinary(b []byte) error { - var res DataCocsnRoutesRoute - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// DataCocsnRoutesRouteCocsnRouteItems0 data cocsn routes route cocsn route items0 -// -// swagger:model DataCocsnRoutesRouteCocsnRouteItems0 -type DataCocsnRoutesRouteCocsnRouteItems0 struct { - - // Route destination. IP network (leaf) - Destination string `json:"destination,omitempty"` - - // Expiration timer of the route (leaf) - Expire string `json:"expire,omitempty"` - - // Flags of the route (leaf) - Flags string `json:"flags,omitempty"` - - // Route gateway. IP address or host name (leaf) - Gateway string `json:"gateway,omitempty"` - - // Interface used for the route (leaf) - Interface string `json:"interface,omitempty"` -} - -// Validate validates this data cocsn routes route cocsn route items0 -func (m *DataCocsnRoutesRouteCocsnRouteItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataCocsnRoutesRouteCocsnRouteItems0) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataCocsnRoutesRouteCocsnRouteItems0) UnmarshalBinary(b []byte) error { - var res DataCocsnRoutesRouteCocsnRouteItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/api/models/data_post.go b/api/models/data_post.go index 1b2e91146ea06aa9f42f2de6b68c65c6881bfc5b..a1eea82e2ae6a6fd29f2cdb94115cb98011f0d99 100644 --- a/api/models/data_post.go +++ b/api/models/data_post.go @@ -20,9 +20,6 @@ import ( // swagger:model data-post type DataPost struct { - // cocsn arp table - CocsnArpTable *DataPostCocsnArpTable `json:"cocsn:arp-table,omitempty"` - // cocsn interfaces CocsnInterfaces *DataPostCocsnInterfaces `json:"cocsn:interfaces,omitempty"` @@ -34,10 +31,6 @@ type DataPost struct { func (m *DataPost) Validate(formats strfmt.Registry) error { var res []error - if err := m.validateCocsnArpTable(formats); err != nil { - res = append(res, err) - } - if err := m.validateCocsnInterfaces(formats); err != nil { res = append(res, err) } @@ -52,24 +45,6 @@ func (m *DataPost) Validate(formats strfmt.Registry) error { return nil } -func (m *DataPost) validateCocsnArpTable(formats strfmt.Registry) error { - - if swag.IsZero(m.CocsnArpTable) { // not required - return nil - } - - if m.CocsnArpTable != nil { - if err := m.CocsnArpTable.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cocsn:arp-table") - } - return err - } - } - - return nil -} - func (m *DataPost) validateCocsnInterfaces(formats strfmt.Registry) error { if swag.IsZero(m.CocsnInterfaces) { // not required @@ -124,110 +99,6 @@ func (m *DataPost) UnmarshalBinary(b []byte) error { return nil } -// DataPostCocsnArpTable (non-presence) -// -// swagger:model DataPostCocsnArpTable -type DataPostCocsnArpTable struct { - - // (list) - ArpEntry []*DataPostCocsnArpTableArpEntryItems0 `json:"arp-entry"` -} - -// Validate validates this data post cocsn arp table -func (m *DataPostCocsnArpTable) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateArpEntry(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataPostCocsnArpTable) validateArpEntry(formats strfmt.Registry) error { - - if swag.IsZero(m.ArpEntry) { // not required - return nil - } - - for i := 0; i < len(m.ArpEntry); i++ { - if swag.IsZero(m.ArpEntry[i]) { // not required - continue - } - - if m.ArpEntry[i] != nil { - if err := m.ArpEntry[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("cocsn:arp-table" + "." + "arp-entry" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataPostCocsnArpTable) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataPostCocsnArpTable) UnmarshalBinary(b []byte) error { - var res DataPostCocsnArpTable - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// DataPostCocsnArpTableArpEntryItems0 data post cocsn arp table arp entry items0 -// -// swagger:model DataPostCocsnArpTableArpEntryItems0 -type DataPostCocsnArpTableArpEntryItems0 struct { - - // IP address of the arp entry (leaf) - Address string `json:"address,omitempty"` - - // Interface of the arp entry (leaf) - Interface string `json:"interface,omitempty"` - - // MAC address of the arp entry (leaf) - PhsAddress string `json:"phs-address,omitempty"` -} - -// Validate validates this data post cocsn arp table arp entry items0 -func (m *DataPostCocsnArpTableArpEntryItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataPostCocsnArpTableArpEntryItems0) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataPostCocsnArpTableArpEntryItems0) UnmarshalBinary(b []byte) error { - var res DataPostCocsnArpTableArpEntryItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - // DataPostCocsnInterfaces (non-presence) // // swagger:model DataPostCocsnInterfaces diff --git a/api/models/data_put_patch.go b/api/models/data_put_patch.go index 9bd8c8153344dace534ea0f646e82ffce35ebf0f..0c921a84c5b39b395e381c14deb402daa95fb394 100644 --- a/api/models/data_put_patch.go +++ b/api/models/data_put_patch.go @@ -79,9 +79,6 @@ func (m *DataPutPatch) UnmarshalBinary(b []byte) error { // swagger:model DataPutPatchIetfRestconfData type DataPutPatchIetfRestconfData struct { - // cocsn arp table - CocsnArpTable *DataPutPatchIetfRestconfDataCocsnArpTable `json:"cocsn:arp-table,omitempty"` - // cocsn interfaces CocsnInterfaces *DataPutPatchIetfRestconfDataCocsnInterfaces `json:"cocsn:interfaces,omitempty"` @@ -93,10 +90,6 @@ type DataPutPatchIetfRestconfData struct { func (m *DataPutPatchIetfRestconfData) Validate(formats strfmt.Registry) error { var res []error - if err := m.validateCocsnArpTable(formats); err != nil { - res = append(res, err) - } - if err := m.validateCocsnInterfaces(formats); err != nil { res = append(res, err) } @@ -111,24 +104,6 @@ func (m *DataPutPatchIetfRestconfData) Validate(formats strfmt.Registry) error { return nil } -func (m *DataPutPatchIetfRestconfData) validateCocsnArpTable(formats strfmt.Registry) error { - - if swag.IsZero(m.CocsnArpTable) { // not required - return nil - } - - if m.CocsnArpTable != nil { - if err := m.CocsnArpTable.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ietf-restconf:data" + "." + "cocsn:arp-table") - } - return err - } - } - - return nil -} - func (m *DataPutPatchIetfRestconfData) validateCocsnInterfaces(formats strfmt.Registry) error { if swag.IsZero(m.CocsnInterfaces) { // not required @@ -183,110 +158,6 @@ func (m *DataPutPatchIetfRestconfData) UnmarshalBinary(b []byte) error { return nil } -// DataPutPatchIetfRestconfDataCocsnArpTable (non-presence) -// -// swagger:model DataPutPatchIetfRestconfDataCocsnArpTable -type DataPutPatchIetfRestconfDataCocsnArpTable struct { - - // (list) - ArpEntry []*DataPutPatchIetfRestconfDataCocsnArpTableArpEntryItems0 `json:"arp-entry"` -} - -// Validate validates this data put patch ietf restconf data cocsn arp table -func (m *DataPutPatchIetfRestconfDataCocsnArpTable) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateArpEntry(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *DataPutPatchIetfRestconfDataCocsnArpTable) validateArpEntry(formats strfmt.Registry) error { - - if swag.IsZero(m.ArpEntry) { // not required - return nil - } - - for i := 0; i < len(m.ArpEntry); i++ { - if swag.IsZero(m.ArpEntry[i]) { // not required - continue - } - - if m.ArpEntry[i] != nil { - if err := m.ArpEntry[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ietf-restconf:data" + "." + "cocsn:arp-table" + "." + "arp-entry" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *DataPutPatchIetfRestconfDataCocsnArpTable) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataPutPatchIetfRestconfDataCocsnArpTable) UnmarshalBinary(b []byte) error { - var res DataPutPatchIetfRestconfDataCocsnArpTable - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - -// DataPutPatchIetfRestconfDataCocsnArpTableArpEntryItems0 data put patch ietf restconf data cocsn arp table arp entry items0 -// -// swagger:model DataPutPatchIetfRestconfDataCocsnArpTableArpEntryItems0 -type DataPutPatchIetfRestconfDataCocsnArpTableArpEntryItems0 struct { - - // IP address of the arp entry (leaf) - Address string `json:"address,omitempty"` - - // Interface of the arp entry (leaf) - Interface string `json:"interface,omitempty"` - - // MAC address of the arp entry (leaf) - PhsAddress string `json:"phs-address,omitempty"` -} - -// Validate validates this data put patch ietf restconf data cocsn arp table arp entry items0 -func (m *DataPutPatchIetfRestconfDataCocsnArpTableArpEntryItems0) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *DataPutPatchIetfRestconfDataCocsnArpTableArpEntryItems0) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *DataPutPatchIetfRestconfDataCocsnArpTableArpEntryItems0) UnmarshalBinary(b []byte) error { - var res DataPutPatchIetfRestconfDataCocsnArpTableArpEntryItems0 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} - // DataPutPatchIetfRestconfDataCocsnInterfaces (non-presence) // // swagger:model DataPutPatchIetfRestconfDataCocsnInterfaces diff --git a/api/restapi/configure_cocsn.go b/api/restapi/configure_cocsn.go index 9c38b2dda259451cd80dd1eb2b4882a06010700c..36fdaa748891db845c29bfecc4ca8b840014a867 100644 --- a/api/restapi/configure_cocsn.go +++ b/api/restapi/configure_cocsn.go @@ -53,56 +53,6 @@ func configureAPI(api *operations.CocsnAPI) http.Handler { // // Example: // api.APIAuthorizer = security.Authorized() - if api.DataDataCocsnArpTableArpEntryArpEntryAddressAddressGetHandler == nil { - api.DataDataCocsnArpTableArpEntryArpEntryAddressAddressGetHandler = data.DataCocsnArpTableArpEntryArpEntryAddressAddressGetHandlerFunc(func(params data.DataCocsnArpTableArpEntryArpEntryAddressAddressGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnArpTableArpEntryArpEntryAddressAddressGet has not yet been implemented") - }) - } - if api.DataDataCocsnArpTableArpEntryArpEntryAddressGetHandler == nil { - api.DataDataCocsnArpTableArpEntryArpEntryAddressGetHandler = data.DataCocsnArpTableArpEntryArpEntryAddressGetHandlerFunc(func(params data.DataCocsnArpTableArpEntryArpEntryAddressGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnArpTableArpEntryArpEntryAddressGet has not yet been implemented") - }) - } - if api.DataDataCocsnArpTableArpEntryArpEntryAddressInterfaceGetHandler == nil { - api.DataDataCocsnArpTableArpEntryArpEntryAddressInterfaceGetHandler = data.DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetHandlerFunc(func(params data.DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnArpTableArpEntryArpEntryAddressInterfaceGet has not yet been implemented") - }) - } - if api.DataDataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetHandler == nil { - api.DataDataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetHandler = data.DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetHandlerFunc(func(params data.DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGet has not yet been implemented") - }) - } - if api.DataDataCocsnArpTableArpEntryGetHandler == nil { - api.DataDataCocsnArpTableArpEntryGetHandler = data.DataCocsnArpTableArpEntryGetHandlerFunc(func(params data.DataCocsnArpTableArpEntryGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnArpTableArpEntryGet has not yet been implemented") - }) - } - if api.DataDataCocsnArpTableDeleteHandler == nil { - api.DataDataCocsnArpTableDeleteHandler = data.DataCocsnArpTableDeleteHandlerFunc(func(params data.DataCocsnArpTableDeleteParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnArpTableDelete has not yet been implemented") - }) - } - if api.DataDataCocsnArpTableGetHandler == nil { - api.DataDataCocsnArpTableGetHandler = data.DataCocsnArpTableGetHandlerFunc(func(params data.DataCocsnArpTableGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnArpTableGet has not yet been implemented") - }) - } - if api.DataDataCocsnArpTablePatchHandler == nil { - api.DataDataCocsnArpTablePatchHandler = data.DataCocsnArpTablePatchHandlerFunc(func(params data.DataCocsnArpTablePatchParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnArpTablePatch has not yet been implemented") - }) - } - if api.DataDataCocsnArpTablePostHandler == nil { - api.DataDataCocsnArpTablePostHandler = data.DataCocsnArpTablePostHandlerFunc(func(params data.DataCocsnArpTablePostParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnArpTablePost has not yet been implemented") - }) - } - if api.DataDataCocsnArpTablePutHandler == nil { - api.DataDataCocsnArpTablePutHandler = data.DataCocsnArpTablePutHandlerFunc(func(params data.DataCocsnArpTablePutParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnArpTablePut has not yet been implemented") - }) - } if api.DataDataCocsnInterfacesDeleteHandler == nil { api.DataDataCocsnInterfacesDeleteHandler = data.DataCocsnInterfacesDeleteHandlerFunc(func(params data.DataCocsnInterfacesDeleteParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation data.DataCocsnInterfacesDelete has not yet been implemented") @@ -113,9 +63,9 @@ func configureAPI(api *operations.CocsnAPI) http.Handler { return middleware.NotImplemented("operation data.DataCocsnInterfacesGet has not yet been implemented") }) } - if api.DataDataCocsnInterfacesInterfaceGetHandler == nil { - api.DataDataCocsnInterfacesInterfaceGetHandler = data.DataCocsnInterfacesInterfaceGetHandlerFunc(func(params data.DataCocsnInterfacesInterfaceGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceGet has not yet been implemented") + if api.DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteHandler == nil { + api.DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteHandler = data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDelete has not yet been implemented") }) } if api.DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetHandler == nil { @@ -123,9 +73,24 @@ func configureAPI(api *operations.CocsnAPI) http.Handler { return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGet has not yet been implemented") }) } - if api.DataDataCocsnInterfacesInterfaceInterfaceNameAddressesGetHandler == nil { - api.DataDataCocsnInterfacesInterfaceInterfaceNameAddressesGetHandler = data.DataCocsnInterfacesInterfaceInterfaceNameAddressesGetHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameAddressesGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameAddressesGet has not yet been implemented") + if api.DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchHandler == nil { + api.DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchHandler = data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatch has not yet been implemented") + }) + } + if api.DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutHandler == nil { + api.DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutHandler = data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPut has not yet been implemented") + }) + } + if api.DataDataCocsnInterfacesInterfaceInterfaceNameDeleteHandler == nil { + api.DataDataCocsnInterfacesInterfaceInterfaceNameDeleteHandler = data.DataCocsnInterfacesInterfaceInterfaceNameDeleteHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameDeleteParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameDelete has not yet been implemented") + }) + } + if api.DataDataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteHandler == nil { + api.DataDataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteHandler = data.DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameEnabledDelete has not yet been implemented") }) } if api.DataDataCocsnInterfacesInterfaceInterfaceNameEnabledGetHandler == nil { @@ -133,26 +98,76 @@ func configureAPI(api *operations.CocsnAPI) http.Handler { return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameEnabledGet has not yet been implemented") }) } + if api.DataDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchHandler == nil { + api.DataDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchHandler = data.DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameEnabledPatch has not yet been implemented") + }) + } + if api.DataDataCocsnInterfacesInterfaceInterfaceNameEnabledPutHandler == nil { + api.DataDataCocsnInterfacesInterfaceInterfaceNameEnabledPutHandler = data.DataCocsnInterfacesInterfaceInterfaceNameEnabledPutHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameEnabledPutParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameEnabledPut has not yet been implemented") + }) + } if api.DataDataCocsnInterfacesInterfaceInterfaceNameGetHandler == nil { api.DataDataCocsnInterfacesInterfaceInterfaceNameGetHandler = data.DataCocsnInterfacesInterfaceInterfaceNameGetHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameGetParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameGet has not yet been implemented") }) } + if api.DataDataCocsnInterfacesInterfaceInterfaceNameNameDeleteHandler == nil { + api.DataDataCocsnInterfacesInterfaceInterfaceNameNameDeleteHandler = data.DataCocsnInterfacesInterfaceInterfaceNameNameDeleteHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameNameDeleteParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameNameDelete has not yet been implemented") + }) + } if api.DataDataCocsnInterfacesInterfaceInterfaceNameNameGetHandler == nil { api.DataDataCocsnInterfacesInterfaceInterfaceNameNameGetHandler = data.DataCocsnInterfacesInterfaceInterfaceNameNameGetHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameNameGetParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameNameGet has not yet been implemented") }) } + if api.DataDataCocsnInterfacesInterfaceInterfaceNameNamePatchHandler == nil { + api.DataDataCocsnInterfacesInterfaceInterfaceNameNamePatchHandler = data.DataCocsnInterfacesInterfaceInterfaceNameNamePatchHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameNamePatchParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameNamePatch has not yet been implemented") + }) + } + if api.DataDataCocsnInterfacesInterfaceInterfaceNameNamePutHandler == nil { + api.DataDataCocsnInterfacesInterfaceInterfaceNameNamePutHandler = data.DataCocsnInterfacesInterfaceInterfaceNameNamePutHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameNamePutParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameNamePut has not yet been implemented") + }) + } + if api.DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteHandler == nil { + api.DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteHandler = data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusDelete has not yet been implemented") + }) + } if api.DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusGetHandler == nil { api.DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusGetHandler = data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusGet has not yet been implemented") }) } + if api.DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchHandler == nil { + api.DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchHandler = data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatch has not yet been implemented") + }) + } + if api.DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutHandler == nil { + api.DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutHandler = data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusPut has not yet been implemented") + }) + } + if api.DataDataCocsnInterfacesInterfaceInterfaceNamePatchHandler == nil { + api.DataDataCocsnInterfacesInterfaceInterfaceNamePatchHandler = data.DataCocsnInterfacesInterfaceInterfaceNamePatchHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNamePatchParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNamePatch has not yet been implemented") + }) + } if api.DataDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetHandler == nil { api.DataDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetHandler = data.DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGet has not yet been implemented") }) } + if api.DataDataCocsnInterfacesInterfaceInterfaceNamePutHandler == nil { + api.DataDataCocsnInterfacesInterfaceInterfaceNamePutHandler = data.DataCocsnInterfacesInterfaceInterfaceNamePutHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNamePutParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNamePut has not yet been implemented") + }) + } if api.DataDataCocsnInterfacesPatchHandler == nil { api.DataDataCocsnInterfacesPatchHandler = data.DataCocsnInterfacesPatchHandlerFunc(func(params data.DataCocsnInterfacesPatchParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation data.DataCocsnInterfacesPatch has not yet been implemented") @@ -193,9 +208,14 @@ func configureAPI(api *operations.CocsnAPI) http.Handler { return middleware.NotImplemented("operation data.DataCocsnRoutesPut has not yet been implemented") }) } - if api.DataDataCocsnRoutesRouteGetHandler == nil { - api.DataDataCocsnRoutesRouteGetHandler = data.DataCocsnRoutesRouteGetHandlerFunc(func(params data.DataCocsnRoutesRouteGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteGet has not yet been implemented") + if api.DataDataCocsnRoutesRouteRouteDestinationDeleteHandler == nil { + api.DataDataCocsnRoutesRouteRouteDestinationDeleteHandler = data.DataCocsnRoutesRouteRouteDestinationDeleteHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationDeleteParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationDelete has not yet been implemented") + }) + } + if api.DataDataCocsnRoutesRouteRouteDestinationDestinationDeleteHandler == nil { + api.DataDataCocsnRoutesRouteRouteDestinationDestinationDeleteHandler = data.DataCocsnRoutesRouteRouteDestinationDestinationDeleteHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationDestinationDeleteParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationDestinationDelete has not yet been implemented") }) } if api.DataDataCocsnRoutesRouteRouteDestinationDestinationGetHandler == nil { @@ -203,31 +223,111 @@ func configureAPI(api *operations.CocsnAPI) http.Handler { return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationDestinationGet has not yet been implemented") }) } + if api.DataDataCocsnRoutesRouteRouteDestinationDestinationPatchHandler == nil { + api.DataDataCocsnRoutesRouteRouteDestinationDestinationPatchHandler = data.DataCocsnRoutesRouteRouteDestinationDestinationPatchHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationDestinationPatchParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationDestinationPatch has not yet been implemented") + }) + } + if api.DataDataCocsnRoutesRouteRouteDestinationDestinationPutHandler == nil { + api.DataDataCocsnRoutesRouteRouteDestinationDestinationPutHandler = data.DataCocsnRoutesRouteRouteDestinationDestinationPutHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationDestinationPutParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationDestinationPut has not yet been implemented") + }) + } + if api.DataDataCocsnRoutesRouteRouteDestinationExpireDeleteHandler == nil { + api.DataDataCocsnRoutesRouteRouteDestinationExpireDeleteHandler = data.DataCocsnRoutesRouteRouteDestinationExpireDeleteHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationExpireDeleteParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationExpireDelete has not yet been implemented") + }) + } if api.DataDataCocsnRoutesRouteRouteDestinationExpireGetHandler == nil { api.DataDataCocsnRoutesRouteRouteDestinationExpireGetHandler = data.DataCocsnRoutesRouteRouteDestinationExpireGetHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationExpireGetParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationExpireGet has not yet been implemented") }) } + if api.DataDataCocsnRoutesRouteRouteDestinationExpirePatchHandler == nil { + api.DataDataCocsnRoutesRouteRouteDestinationExpirePatchHandler = data.DataCocsnRoutesRouteRouteDestinationExpirePatchHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationExpirePatchParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationExpirePatch has not yet been implemented") + }) + } + if api.DataDataCocsnRoutesRouteRouteDestinationExpirePutHandler == nil { + api.DataDataCocsnRoutesRouteRouteDestinationExpirePutHandler = data.DataCocsnRoutesRouteRouteDestinationExpirePutHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationExpirePutParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationExpirePut has not yet been implemented") + }) + } + if api.DataDataCocsnRoutesRouteRouteDestinationFlagsDeleteHandler == nil { + api.DataDataCocsnRoutesRouteRouteDestinationFlagsDeleteHandler = data.DataCocsnRoutesRouteRouteDestinationFlagsDeleteHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationFlagsDeleteParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationFlagsDelete has not yet been implemented") + }) + } if api.DataDataCocsnRoutesRouteRouteDestinationFlagsGetHandler == nil { api.DataDataCocsnRoutesRouteRouteDestinationFlagsGetHandler = data.DataCocsnRoutesRouteRouteDestinationFlagsGetHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationFlagsGetParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationFlagsGet has not yet been implemented") }) } + if api.DataDataCocsnRoutesRouteRouteDestinationFlagsPatchHandler == nil { + api.DataDataCocsnRoutesRouteRouteDestinationFlagsPatchHandler = data.DataCocsnRoutesRouteRouteDestinationFlagsPatchHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationFlagsPatchParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationFlagsPatch has not yet been implemented") + }) + } + if api.DataDataCocsnRoutesRouteRouteDestinationFlagsPutHandler == nil { + api.DataDataCocsnRoutesRouteRouteDestinationFlagsPutHandler = data.DataCocsnRoutesRouteRouteDestinationFlagsPutHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationFlagsPutParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationFlagsPut has not yet been implemented") + }) + } + if api.DataDataCocsnRoutesRouteRouteDestinationGatewayDeleteHandler == nil { + api.DataDataCocsnRoutesRouteRouteDestinationGatewayDeleteHandler = data.DataCocsnRoutesRouteRouteDestinationGatewayDeleteHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationGatewayDeleteParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationGatewayDelete has not yet been implemented") + }) + } if api.DataDataCocsnRoutesRouteRouteDestinationGatewayGetHandler == nil { api.DataDataCocsnRoutesRouteRouteDestinationGatewayGetHandler = data.DataCocsnRoutesRouteRouteDestinationGatewayGetHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationGatewayGetParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationGatewayGet has not yet been implemented") }) } + if api.DataDataCocsnRoutesRouteRouteDestinationGatewayPatchHandler == nil { + api.DataDataCocsnRoutesRouteRouteDestinationGatewayPatchHandler = data.DataCocsnRoutesRouteRouteDestinationGatewayPatchHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationGatewayPatchParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationGatewayPatch has not yet been implemented") + }) + } + if api.DataDataCocsnRoutesRouteRouteDestinationGatewayPutHandler == nil { + api.DataDataCocsnRoutesRouteRouteDestinationGatewayPutHandler = data.DataCocsnRoutesRouteRouteDestinationGatewayPutHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationGatewayPutParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationGatewayPut has not yet been implemented") + }) + } if api.DataDataCocsnRoutesRouteRouteDestinationGetHandler == nil { api.DataDataCocsnRoutesRouteRouteDestinationGetHandler = data.DataCocsnRoutesRouteRouteDestinationGetHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationGetParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationGet has not yet been implemented") }) } + if api.DataDataCocsnRoutesRouteRouteDestinationInterfaceDeleteHandler == nil { + api.DataDataCocsnRoutesRouteRouteDestinationInterfaceDeleteHandler = data.DataCocsnRoutesRouteRouteDestinationInterfaceDeleteHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationInterfaceDeleteParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationInterfaceDelete has not yet been implemented") + }) + } if api.DataDataCocsnRoutesRouteRouteDestinationInterfaceGetHandler == nil { api.DataDataCocsnRoutesRouteRouteDestinationInterfaceGetHandler = data.DataCocsnRoutesRouteRouteDestinationInterfaceGetHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationInterfaceGetParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationInterfaceGet has not yet been implemented") }) } + if api.DataDataCocsnRoutesRouteRouteDestinationInterfacePatchHandler == nil { + api.DataDataCocsnRoutesRouteRouteDestinationInterfacePatchHandler = data.DataCocsnRoutesRouteRouteDestinationInterfacePatchHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationInterfacePatchParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationInterfacePatch has not yet been implemented") + }) + } + if api.DataDataCocsnRoutesRouteRouteDestinationInterfacePutHandler == nil { + api.DataDataCocsnRoutesRouteRouteDestinationInterfacePutHandler = data.DataCocsnRoutesRouteRouteDestinationInterfacePutHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationInterfacePutParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationInterfacePut has not yet been implemented") + }) + } + if api.DataDataCocsnRoutesRouteRouteDestinationPatchHandler == nil { + api.DataDataCocsnRoutesRouteRouteDestinationPatchHandler = data.DataCocsnRoutesRouteRouteDestinationPatchHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationPatchParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationPatch has not yet been implemented") + }) + } + if api.DataDataCocsnRoutesRouteRouteDestinationPutHandler == nil { + api.DataDataCocsnRoutesRouteRouteDestinationPutHandler = data.DataCocsnRoutesRouteRouteDestinationPutHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationPutParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationPut has not yet been implemented") + }) + } if api.DataDataGetHandler == nil { api.DataDataGetHandler = data.DataGetHandlerFunc(func(params data.DataGetParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation data.DataGet has not yet been implemented") diff --git a/api/restapi/embedded_spec.go b/api/restapi/embedded_spec.go index eda4f3ca48d63dee5538ac45ce61f5abff5b2478..a8af8349647194c5e6d5021bc397e136ccffbeac 100644 --- a/api/restapi/embedded_spec.go +++ b/api/restapi/embedded_spec.go @@ -252,7 +252,7 @@ func init() { } } }, - "/data/cocsn:arp-table": { + "/data/cocsn:interfaces": { "get": { "security": [ { @@ -266,7 +266,7 @@ func init() { "data", "get" ], - "operationId": "data_cocsn_arp_table_get", + "operationId": "data_cocsn_interfaces_get", "parameters": [ { "$ref": "#/parameters/content" @@ -288,7 +288,7 @@ func init() { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/data_cocsn_arp-table" + "$ref": "#/definitions/data_cocsn_interfaces" } }, "204": { @@ -324,15 +324,15 @@ func init() { "data", "put" ], - "operationId": "data_cocsn_arp_table_put", + "operationId": "data_cocsn_interfaces_put", "parameters": [ { - "$ref": "#/parameters/data_cocsn_arp-table" + "$ref": "#/parameters/data_cocsn_interfaces" } ], "responses": { "201": { - "description": "container arp-table created or replaced" + "description": "container interfaces created or replaced" }, "204": { "$ref": "#/responses/204" @@ -367,15 +367,15 @@ func init() { "data", "post" ], - "operationId": "data_cocsn_arp_table_post", + "operationId": "data_cocsn_interfaces_post", "parameters": [ { - "$ref": "#/parameters/data_cocsn_arp-table-post" + "$ref": "#/parameters/data_cocsn_interfaces-post" } ], "responses": { "201": { - "description": "container arp-table created" + "description": "container interfaces created" }, "204": { "$ref": "#/responses/204" @@ -410,7 +410,7 @@ func init() { "data", "delete" ], - "operationId": "data_cocsn_arp_table_delete", + "operationId": "data_cocsn_interfaces_delete", "responses": { "204": { "$ref": "#/responses/204" @@ -430,15 +430,15 @@ func init() { "data", "patch" ], - "operationId": "data_cocsn_arp_table_patch", + "operationId": "data_cocsn_interfaces_patch", "parameters": [ { - "$ref": "#/parameters/data_cocsn_arp-table" + "$ref": "#/parameters/data_cocsn_interfaces" } ], "responses": { "204": { - "description": "container arp-table updated" + "description": "container interfaces updated" }, "400": { "$ref": "#/responses/400" @@ -458,7 +458,8 @@ func init() { } } }, - "/data/cocsn:arp-table/arp-entry": { + "/data/cocsn:interfaces/interface": {}, + "/data/cocsn:interfaces/interface={interface-name}": { "get": { "security": [ { @@ -472,8 +473,11 @@ func init() { "data", "get" ], - "operationId": "data_cocsn_arp_table_arp_entry_get", + "operationId": "data_cocsn_interfaces_interface_interface_name_get", "parameters": [ + { + "$ref": "#/parameters/interface-name" + }, { "$ref": "#/parameters/content" }, @@ -494,7 +498,7 @@ func init() { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/data_cocsn_arp-table_arp-entry" + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name" } }, "204": { @@ -516,10 +520,8 @@ func init() { "$ref": "#/responses/409" } } - } - }, - "/data/cocsn:arp-table/arp-entry={arp-entry-address}": { - "get": { + }, + "put": { "security": [ { "basicAuth": [] @@ -530,35 +532,26 @@ func init() { ], "tags": [ "data", - "get" + "put" ], - "operationId": "data_cocsn_arp_table_arp_entry_arp_entry_address_get", + "operationId": "data_cocsn_interfaces_interface_interface_name_put", "parameters": [ { - "$ref": "#/parameters/arp-entry-address" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" + "$ref": "#/parameters/interface-name" }, { - "$ref": "#/parameters/fields" + "$ref": "#/parameters/data_cocsn_interfaces_interface_interface-name" }, { - "$ref": "#/parameters/filter" + "$ref": "#/parameters/insert" }, { - "$ref": "#/parameters/with-defaults" + "$ref": "#/parameters/point" } ], "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/data_cocsn_arp-table_arp-entry_arp-entry-address" - } + "201": { + "description": "list interface created or replaced" }, "204": { "$ref": "#/responses/204" @@ -579,54 +572,57 @@ func init() { "$ref": "#/responses/409" } } - } - }, - "/data/cocsn:arp-table/arp-entry={arp-entry-address}/address": { - "get": { + }, + "delete": { "security": [ { "basicAuth": [] } ], - "description": "IP address of the arp entry", "produces": [ "application/yang-data+json" ], "tags": [ "data", - "get" + "delete" ], - "summary": "IP address of the arp entry", - "operationId": "data_cocsn_arp_table_arp_entry_arp_entry_address_address_get", + "operationId": "data_cocsn_interfaces_interface_interface_name_delete", "parameters": [ { - "$ref": "#/parameters/arp-entry-address" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, + "$ref": "#/parameters/interface-name" + } + ], + "responses": { + "204": { + "$ref": "#/responses/204" + } + } + }, + "patch": { + "security": [ { - "$ref": "#/parameters/fields" - }, + "basicAuth": [] + } + ], + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "patch" + ], + "operationId": "data_cocsn_interfaces_interface_interface_name_patch", + "parameters": [ { - "$ref": "#/parameters/filter" + "$ref": "#/parameters/interface-name" }, { - "$ref": "#/parameters/with-defaults" + "$ref": "#/parameters/data_cocsn_interfaces_interface_interface-name" } ], "responses": { - "200": { - "description": "IP address of the arp entry", - "schema": { - "$ref": "#/definitions/data_cocsn_arp-table_arp-entry_arp-entry-address_address" - } - }, "204": { - "$ref": "#/responses/204" + "description": "list interface updated" }, "400": { "$ref": "#/responses/400" @@ -646,14 +642,15 @@ func init() { } } }, - "/data/cocsn:arp-table/arp-entry={arp-entry-address}/interface": { + "/data/cocsn:interfaces/interface={interface-name}/addresses": {}, + "/data/cocsn:interfaces/interface={interface-name}/addresses={addresses-id}": { "get": { "security": [ { "basicAuth": [] } ], - "description": "Interface of the arp entry", + "description": "Interface IP address. Example value: 10.10.10.1", "produces": [ "application/yang-data+json" ], @@ -661,11 +658,14 @@ func init() { "data", "get" ], - "summary": "Interface of the arp entry", - "operationId": "data_cocsn_arp_table_arp_entry_arp_entry_address_interface_get", + "summary": "Interface IP address. Example value: 10.10.10.1", + "operationId": "data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_get", "parameters": [ { - "$ref": "#/parameters/arp-entry-address" + "$ref": "#/parameters/interface-name" + }, + { + "$ref": "#/parameters/addresses-id" }, { "$ref": "#/parameters/content" @@ -685,9 +685,9 @@ func init() { ], "responses": { "200": { - "description": "Interface of the arp entry", + "description": "Interface IP address. Example value: 10.10.10.1", "schema": { - "$ref": "#/definitions/data_cocsn_arp-table_arp-entry_arp-entry-address_interface" + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_addresses_addresses-id" } }, "204": { @@ -709,51 +709,43 @@ func init() { "$ref": "#/responses/409" } } - } - }, - "/data/cocsn:arp-table/arp-entry={arp-entry-address}/phs-address": { - "get": { + }, + "put": { "security": [ { "basicAuth": [] } ], - "description": "MAC address of the arp entry", + "description": "Interface IP address. Example value: 10.10.10.1", "produces": [ "application/yang-data+json" ], "tags": [ "data", - "get" + "put" ], - "summary": "MAC address of the arp entry", - "operationId": "data_cocsn_arp_table_arp_entry_arp_entry_address_phs_address_get", + "summary": "Interface IP address. Example value: 10.10.10.1", + "operationId": "data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_put", "parameters": [ { - "$ref": "#/parameters/arp-entry-address" - }, - { - "$ref": "#/parameters/content" + "$ref": "#/parameters/interface-name" }, { - "$ref": "#/parameters/depth" + "$ref": "#/parameters/addresses-id" }, { - "$ref": "#/parameters/fields" + "$ref": "#/parameters/data_cocsn_interfaces_interface_interface-name_addresses_addresses-id" }, { - "$ref": "#/parameters/filter" + "$ref": "#/parameters/insert" }, { - "$ref": "#/parameters/with-defaults" + "$ref": "#/parameters/point" } ], "responses": { - "200": { - "description": "MAC address of the arp entry", - "schema": { - "$ref": "#/definitions/data_cocsn_arp-table_arp-entry_arp-entry-address_phs-address" - } + "201": { + "description": "leaf-list addresses created or replaced" }, "204": { "$ref": "#/responses/204" @@ -774,49 +766,67 @@ func init() { "$ref": "#/responses/409" } } - } - }, - "/data/cocsn:interfaces": { - "get": { + }, + "delete": { "security": [ { "basicAuth": [] } ], + "description": "Interface IP address. Example value: 10.10.10.1", "produces": [ "application/yang-data+json" ], "tags": [ "data", - "get" + "delete" ], - "operationId": "data_cocsn_interfaces_get", + "summary": "Interface IP address. Example value: 10.10.10.1", + "operationId": "data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_delete", "parameters": [ { - "$ref": "#/parameters/content" + "$ref": "#/parameters/interface-name" }, { - "$ref": "#/parameters/depth" - }, + "$ref": "#/parameters/addresses-id" + } + ], + "responses": { + "204": { + "$ref": "#/responses/204" + } + } + }, + "patch": { + "security": [ { - "$ref": "#/parameters/fields" + "basicAuth": [] + } + ], + "description": "Interface IP address. Example value: 10.10.10.1", + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "patch" + ], + "summary": "Interface IP address. Example value: 10.10.10.1", + "operationId": "data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_patch", + "parameters": [ + { + "$ref": "#/parameters/interface-name" }, { - "$ref": "#/parameters/filter" + "$ref": "#/parameters/addresses-id" }, { - "$ref": "#/parameters/with-defaults" + "$ref": "#/parameters/data_cocsn_interfaces_interface_interface-name_addresses_addresses-id" } ], "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces" - } - }, "204": { - "$ref": "#/responses/204" + "description": "leaf-list addresses updated" }, "400": { "$ref": "#/responses/400" @@ -834,29 +844,51 @@ func init() { "$ref": "#/responses/409" } } - }, - "put": { + } + }, + "/data/cocsn:interfaces/interface={interface-name}/enabled": { + "get": { "security": [ { "basicAuth": [] } ], + "description": "Enable or disable the interface. Example value: true", "produces": [ "application/yang-data+json" ], "tags": [ "data", - "put" + "get" ], - "operationId": "data_cocsn_interfaces_put", + "summary": "Enable or disable the interface. Example value: true", + "operationId": "data_cocsn_interfaces_interface_interface_name_enabled_get", "parameters": [ { - "$ref": "#/parameters/data_cocsn_interfaces" + "$ref": "#/parameters/interface-name" + }, + { + "$ref": "#/parameters/content" + }, + { + "$ref": "#/parameters/depth" + }, + { + "$ref": "#/parameters/fields" + }, + { + "$ref": "#/parameters/filter" + }, + { + "$ref": "#/parameters/with-defaults" } ], "responses": { - "201": { - "description": "container interfaces created or replaced" + "200": { + "description": "Enable or disable the interface. Example value: true", + "schema": { + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_enabled" + } }, "204": { "$ref": "#/responses/204" @@ -878,28 +910,33 @@ func init() { } } }, - "post": { + "put": { "security": [ { "basicAuth": [] } ], + "description": "Enable or disable the interface. Example value: true", "produces": [ "application/yang-data+json" ], "tags": [ "data", - "post" + "put" ], - "operationId": "data_cocsn_interfaces_post", + "summary": "Enable or disable the interface. Example value: true", + "operationId": "data_cocsn_interfaces_interface_interface_name_enabled_put", "parameters": [ { - "$ref": "#/parameters/data_cocsn_interfaces-post" + "$ref": "#/parameters/interface-name" + }, + { + "$ref": "#/parameters/data_cocsn_interfaces_interface_interface-name_enabled" } ], "responses": { "201": { - "description": "container interfaces created" + "description": "leaf enabled created or replaced" }, "204": { "$ref": "#/responses/204" @@ -927,6 +964,7 @@ func init() { "basicAuth": [] } ], + "description": "Enable or disable the interface. Example value: true", "produces": [ "application/yang-data+json" ], @@ -934,7 +972,13 @@ func init() { "data", "delete" ], - "operationId": "data_cocsn_interfaces_delete", + "summary": "Enable or disable the interface. Example value: true", + "operationId": "data_cocsn_interfaces_interface_interface_name_enabled_delete", + "parameters": [ + { + "$ref": "#/parameters/interface-name" + } + ], "responses": { "204": { "$ref": "#/responses/204" @@ -947,6 +991,7 @@ func init() { "basicAuth": [] } ], + "description": "Enable or disable the interface. Example value: true", "produces": [ "application/yang-data+json" ], @@ -954,15 +999,19 @@ func init() { "data", "patch" ], - "operationId": "data_cocsn_interfaces_patch", + "summary": "Enable or disable the interface. Example value: true", + "operationId": "data_cocsn_interfaces_interface_interface_name_enabled_patch", "parameters": [ { - "$ref": "#/parameters/data_cocsn_interfaces" + "$ref": "#/parameters/interface-name" + }, + { + "$ref": "#/parameters/data_cocsn_interfaces_interface_interface-name_enabled" } ], "responses": { "204": { - "description": "container interfaces updated" + "description": "leaf enabled updated" }, "400": { "$ref": "#/responses/400" @@ -982,13 +1031,14 @@ func init() { } } }, - "/data/cocsn:interfaces/interface": { + "/data/cocsn:interfaces/interface={interface-name}/name": { "get": { "security": [ { "basicAuth": [] } ], + "description": "Interface name. Example value: en0", "produces": [ "application/yang-data+json" ], @@ -996,8 +1046,12 @@ func init() { "data", "get" ], - "operationId": "data_cocsn_interfaces_interface_get", + "summary": "Interface name. Example value: en0", + "operationId": "data_cocsn_interfaces_interface_interface_name_name_get", "parameters": [ + { + "$ref": "#/parameters/interface-name" + }, { "$ref": "#/parameters/content" }, @@ -1016,9 +1070,9 @@ func init() { ], "responses": { "200": { - "description": "OK", + "description": "Interface name. Example value: en0", "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface" + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_name" } }, "204": { @@ -1040,49 +1094,34 @@ func init() { "$ref": "#/responses/409" } } - } - }, - "/data/cocsn:interfaces/interface={interface-name}": { - "get": { + }, + "put": { "security": [ { "basicAuth": [] } ], + "description": "Interface name. Example value: en0", "produces": [ "application/yang-data+json" ], "tags": [ "data", - "get" + "put" ], - "operationId": "data_cocsn_interfaces_interface_interface_name_get", + "summary": "Interface name. Example value: en0", + "operationId": "data_cocsn_interfaces_interface_interface_name_name_put", "parameters": [ { "$ref": "#/parameters/interface-name" }, { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" + "$ref": "#/parameters/data_cocsn_interfaces_interface_interface-name_name" } ], "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name" - } + "201": { + "description": "leaf name created or replaced" }, "204": { "$ref": "#/responses/204" @@ -1103,122 +1142,61 @@ func init() { "$ref": "#/responses/409" } } - } - }, - "/data/cocsn:interfaces/interface={interface-name}/addresses": { - "get": { + }, + "delete": { "security": [ { "basicAuth": [] } ], - "description": "Interface IP address. Example value: 10.10.10.1", + "description": "Interface name. Example value: en0", "produces": [ "application/yang-data+json" ], "tags": [ "data", - "get" + "delete" ], - "summary": "Interface IP address. Example value: 10.10.10.1", - "operationId": "data_cocsn_interfaces_interface_interface_name_addresses_get", + "summary": "Interface name. Example value: en0", + "operationId": "data_cocsn_interfaces_interface_interface_name_name_delete", "parameters": [ { "$ref": "#/parameters/interface-name" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" } ], "responses": { - "200": { - "description": "Interface IP address. Example value: 10.10.10.1", - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_addresses" - } - }, "204": { "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" } } - } - }, - "/data/cocsn:interfaces/interface={interface-name}/addresses={addresses-id}": { - "get": { + }, + "patch": { "security": [ { "basicAuth": [] } ], - "description": "Interface IP address. Example value: 10.10.10.1", + "description": "Interface name. Example value: en0", "produces": [ "application/yang-data+json" ], "tags": [ "data", - "get" + "patch" ], - "summary": "Interface IP address. Example value: 10.10.10.1", - "operationId": "data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_get", + "summary": "Interface name. Example value: en0", + "operationId": "data_cocsn_interfaces_interface_interface_name_name_patch", "parameters": [ { "$ref": "#/parameters/interface-name" }, { - "$ref": "#/parameters/addresses-id" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" + "$ref": "#/parameters/data_cocsn_interfaces_interface_interface-name_name" } ], "responses": { - "200": { - "description": "Interface IP address. Example value: 10.10.10.1", - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_addresses_addresses-id" - } - }, "204": { - "$ref": "#/responses/204" + "description": "leaf name updated" }, "400": { "$ref": "#/responses/400" @@ -1238,14 +1216,14 @@ func init() { } } }, - "/data/cocsn:interfaces/interface={interface-name}/enabled": { + "/data/cocsn:interfaces/interface={interface-name}/oper-status": { "get": { "security": [ { "basicAuth": [] } ], - "description": "Enable or disable the interface. Example value: true", + "description": "Describes whether the interface is physically up or down", "produces": [ "application/yang-data+json" ], @@ -1253,8 +1231,8 @@ func init() { "data", "get" ], - "summary": "Enable or disable the interface. Example value: true", - "operationId": "data_cocsn_interfaces_interface_interface_name_enabled_get", + "summary": "Describes whether the interface is physically up or down", + "operationId": "data_cocsn_interfaces_interface_interface_name_oper_status_get", "parameters": [ { "$ref": "#/parameters/interface-name" @@ -1277,9 +1255,9 @@ func init() { ], "responses": { "200": { - "description": "Enable or disable the interface. Example value: true", + "description": "Describes whether the interface is physically up or down", "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_enabled" + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_oper-status" } }, "204": { @@ -1301,51 +1279,34 @@ func init() { "$ref": "#/responses/409" } } - } - }, - "/data/cocsn:interfaces/interface={interface-name}/name": { - "get": { + }, + "put": { "security": [ { "basicAuth": [] } ], - "description": "Interface name. Example value: en0", + "description": "Describes whether the interface is physically up or down", "produces": [ "application/yang-data+json" ], "tags": [ "data", - "get" + "put" ], - "summary": "Interface name. Example value: en0", - "operationId": "data_cocsn_interfaces_interface_interface_name_name_get", + "summary": "Describes whether the interface is physically up or down", + "operationId": "data_cocsn_interfaces_interface_interface_name_oper_status_put", "parameters": [ { "$ref": "#/parameters/interface-name" }, { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" + "$ref": "#/parameters/data_cocsn_interfaces_interface_interface-name_oper-status" } ], "responses": { - "200": { - "description": "Interface name. Example value: en0", - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_name" - } + "201": { + "description": "leaf oper-status created or replaced" }, "204": { "$ref": "#/responses/204" @@ -1366,10 +1327,8 @@ func init() { "$ref": "#/responses/409" } } - } - }, - "/data/cocsn:interfaces/interface={interface-name}/oper-status": { - "get": { + }, + "delete": { "security": [ { "basicAuth": [] @@ -1381,39 +1340,48 @@ func init() { ], "tags": [ "data", - "get" + "delete" ], "summary": "Describes whether the interface is physically up or down", - "operationId": "data_cocsn_interfaces_interface_interface_name_oper_status_get", + "operationId": "data_cocsn_interfaces_interface_interface_name_oper_status_delete", "parameters": [ { "$ref": "#/parameters/interface-name" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, + } + ], + "responses": { + "204": { + "$ref": "#/responses/204" + } + } + }, + "patch": { + "security": [ { - "$ref": "#/parameters/fields" - }, + "basicAuth": [] + } + ], + "description": "Describes whether the interface is physically up or down", + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "patch" + ], + "summary": "Describes whether the interface is physically up or down", + "operationId": "data_cocsn_interfaces_interface_interface_name_oper_status_patch", + "parameters": [ { - "$ref": "#/parameters/filter" + "$ref": "#/parameters/interface-name" }, { - "$ref": "#/parameters/with-defaults" + "$ref": "#/parameters/data_cocsn_interfaces_interface_interface-name_oper-status" } ], "responses": { - "200": { - "description": "Describes whether the interface is physically up or down", - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_oper-status" - } - }, "204": { - "$ref": "#/responses/204" + "description": "leaf oper-status updated" }, "400": { "$ref": "#/responses/400" @@ -1704,7 +1672,8 @@ func init() { } } }, - "/data/cocsn:routes/route": { + "/data/cocsn:routes/route": {}, + "/data/cocsn:routes/route={route-destination}": { "get": { "security": [ { @@ -1718,8 +1687,11 @@ func init() { "data", "get" ], - "operationId": "data_cocsn_routes_route_get", + "operationId": "data_cocsn_routes_route_route_destination_get", "parameters": [ + { + "$ref": "#/parameters/route-destination" + }, { "$ref": "#/parameters/content" }, @@ -1740,7 +1712,7 @@ func init() { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/data_cocsn_routes_route" + "$ref": "#/definitions/data_cocsn_routes_route_route-destination" } }, "204": { @@ -1762,10 +1734,8 @@ func init() { "$ref": "#/responses/409" } } - } - }, - "/data/cocsn:routes/route={route-destination}": { - "get": { + }, + "put": { "security": [ { "basicAuth": [] @@ -1776,35 +1746,26 @@ func init() { ], "tags": [ "data", - "get" + "put" ], - "operationId": "data_cocsn_routes_route_route_destination_get", + "operationId": "data_cocsn_routes_route_route_destination_put", "parameters": [ { "$ref": "#/parameters/route-destination" }, { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" + "$ref": "#/parameters/data_cocsn_routes_route_route-destination" }, { - "$ref": "#/parameters/filter" + "$ref": "#/parameters/insert" }, { - "$ref": "#/parameters/with-defaults" + "$ref": "#/parameters/point" } ], "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination" - } + "201": { + "description": "list route created or replaced" }, "204": { "$ref": "#/responses/204" @@ -1825,54 +1786,57 @@ func init() { "$ref": "#/responses/409" } } - } - }, - "/data/cocsn:routes/route={route-destination}/destination": { - "get": { + }, + "delete": { "security": [ { "basicAuth": [] } ], - "description": "Route destination. IP network", "produces": [ "application/yang-data+json" ], "tags": [ "data", - "get" + "delete" ], - "summary": "Route destination. IP network", - "operationId": "data_cocsn_routes_route_route_destination_destination_get", + "operationId": "data_cocsn_routes_route_route_destination_delete", "parameters": [ { "$ref": "#/parameters/route-destination" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" } ], "responses": { - "200": { - "description": "Route destination. IP network", - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_destination" - } - }, "204": { "$ref": "#/responses/204" + } + } + }, + "patch": { + "security": [ + { + "basicAuth": [] + } + ], + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "patch" + ], + "operationId": "data_cocsn_routes_route_route_destination_patch", + "parameters": [ + { + "$ref": "#/parameters/route-destination" + }, + { + "$ref": "#/parameters/data_cocsn_routes_route_route-destination" + } + ], + "responses": { + "204": { + "description": "list route updated" }, "400": { "$ref": "#/responses/400" @@ -1892,14 +1856,14 @@ func init() { } } }, - "/data/cocsn:routes/route={route-destination}/expire": { + "/data/cocsn:routes/route={route-destination}/destination": { "get": { "security": [ { "basicAuth": [] } ], - "description": "Expiration timer of the route", + "description": "Route destination. IP network", "produces": [ "application/yang-data+json" ], @@ -1907,8 +1871,8 @@ func init() { "data", "get" ], - "summary": "Expiration timer of the route", - "operationId": "data_cocsn_routes_route_route_destination_expire_get", + "summary": "Route destination. IP network", + "operationId": "data_cocsn_routes_route_route_destination_destination_get", "parameters": [ { "$ref": "#/parameters/route-destination" @@ -1931,9 +1895,9 @@ func init() { ], "responses": { "200": { - "description": "Expiration timer of the route", + "description": "Route destination. IP network", "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_expire" + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_destination" } }, "204": { @@ -1955,51 +1919,34 @@ func init() { "$ref": "#/responses/409" } } - } - }, - "/data/cocsn:routes/route={route-destination}/flags": { - "get": { + }, + "put": { "security": [ { "basicAuth": [] } ], - "description": "Flags of the route", + "description": "Route destination. IP network", "produces": [ "application/yang-data+json" ], "tags": [ "data", - "get" + "put" ], - "summary": "Flags of the route", - "operationId": "data_cocsn_routes_route_route_destination_flags_get", + "summary": "Route destination. IP network", + "operationId": "data_cocsn_routes_route_route_destination_destination_put", "parameters": [ { "$ref": "#/parameters/route-destination" }, { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" + "$ref": "#/parameters/data_cocsn_routes_route_route-destination_destination" } ], "responses": { - "200": { - "description": "Flags of the route", - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_flags" - } + "201": { + "description": "leaf destination created or replaced" }, "204": { "$ref": "#/responses/204" @@ -2020,54 +1967,61 @@ func init() { "$ref": "#/responses/409" } } - } - }, - "/data/cocsn:routes/route={route-destination}/gateway": { - "get": { + }, + "delete": { "security": [ { "basicAuth": [] } ], - "description": "Route gateway. IP address or host name", + "description": "Route destination. IP network", "produces": [ "application/yang-data+json" ], "tags": [ "data", - "get" + "delete" ], - "summary": "Route gateway. IP address or host name", - "operationId": "data_cocsn_routes_route_route_destination_gateway_get", + "summary": "Route destination. IP network", + "operationId": "data_cocsn_routes_route_route_destination_destination_delete", "parameters": [ { "$ref": "#/parameters/route-destination" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, + } + ], + "responses": { + "204": { + "$ref": "#/responses/204" + } + } + }, + "patch": { + "security": [ { - "$ref": "#/parameters/fields" - }, + "basicAuth": [] + } + ], + "description": "Route destination. IP network", + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "patch" + ], + "summary": "Route destination. IP network", + "operationId": "data_cocsn_routes_route_route_destination_destination_patch", + "parameters": [ { - "$ref": "#/parameters/filter" + "$ref": "#/parameters/route-destination" }, { - "$ref": "#/parameters/with-defaults" + "$ref": "#/parameters/data_cocsn_routes_route_route-destination_destination" } ], "responses": { - "200": { - "description": "Route gateway. IP address or host name", - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_gateway" - } - }, "204": { - "$ref": "#/responses/204" + "description": "leaf destination updated" }, "400": { "$ref": "#/responses/400" @@ -2087,14 +2041,14 @@ func init() { } } }, - "/data/cocsn:routes/route={route-destination}/interface": { + "/data/cocsn:routes/route={route-destination}/expire": { "get": { "security": [ { "basicAuth": [] } ], - "description": "Interface used for the route", + "description": "Expiration timer of the route", "produces": [ "application/yang-data+json" ], @@ -2102,8 +2056,8 @@ func init() { "data", "get" ], - "summary": "Interface used for the route", - "operationId": "data_cocsn_routes_route_route_destination_interface_get", + "summary": "Expiration timer of the route", + "operationId": "data_cocsn_routes_route_route_destination_expire_get", "parameters": [ { "$ref": "#/parameters/route-destination" @@ -2126,9 +2080,9 @@ func init() { ], "responses": { "200": { - "description": "Interface used for the route", + "description": "Expiration timer of the route", "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_interface" + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_expire" } }, "204": { @@ -2150,31 +2104,34 @@ func init() { "$ref": "#/responses/409" } } - } - }, - "/operations": { - "get": { + }, + "put": { "security": [ { "basicAuth": [] } ], - "description": "This YANG module represents the CoCSN API", + "description": "Expiration timer of the route", "produces": [ "application/yang-data+json" ], "tags": [ - "operations", - "get" + "data", + "put" + ], + "summary": "Expiration timer of the route", + "operationId": "data_cocsn_routes_route_route_destination_expire_put", + "parameters": [ + { + "$ref": "#/parameters/route-destination" + }, + { + "$ref": "#/parameters/data_cocsn_routes_route_route-destination_expire" + } ], - "summary": "This YANG module represents the CoCSN API", - "operationId": "operations_get", "responses": { - "200": { - "description": "This YANG module represents the CoCSN API", - "schema": { - "$ref": "#/definitions/operations" - } + "201": { + "description": "leaf expire created or replaced" }, "204": { "$ref": "#/responses/204" @@ -2195,34 +2152,61 @@ func init() { "$ref": "#/responses/409" } } - } - }, - "/yang-library-version": { - "get": { + }, + "delete": { "security": [ { "basicAuth": [] } ], - "description": "This YANG module represents the CoCSN API", + "description": "Expiration timer of the route", "produces": [ "application/yang-data+json" ], "tags": [ - "yang-library-version", - "get" + "data", + "delete" + ], + "summary": "Expiration timer of the route", + "operationId": "data_cocsn_routes_route_route_destination_expire_delete", + "parameters": [ + { + "$ref": "#/parameters/route-destination" + } ], - "summary": "This YANG module represents the CoCSN API", - "operationId": "yang_library_version_get", "responses": { - "200": { - "description": "This YANG module represents the CoCSN API", - "schema": { - "$ref": "#/definitions/yang-library-version" - } - }, "204": { "$ref": "#/responses/204" + } + } + }, + "patch": { + "security": [ + { + "basicAuth": [] + } + ], + "description": "Expiration timer of the route", + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "patch" + ], + "summary": "Expiration timer of the route", + "operationId": "data_cocsn_routes_route_route_destination_expire_patch", + "parameters": [ + { + "$ref": "#/parameters/route-destination" + }, + { + "$ref": "#/parameters/data_cocsn_routes_route_route-destination_expire" + } + ], + "responses": { + "204": { + "description": "leaf expire updated" }, "400": { "$ref": "#/responses/400" @@ -2241,257 +2225,810 @@ func init() { } } } - } - }, - "definitions": { - "data": { - "type": "object", - "properties": { - "ietf-restconf:data": { - "description": "This resource represents the combined configuration and state data resources that can be accessed by a client and cannot be created or deleted by the client. See RESTCONF RFC 8040 for further information.", - "type": "object", - "x-yang": { - "type": "datastore" - } - } - } }, - "data-post": { - "type": "object", - "properties": { - "cocsn:arp-table": { - "description": "(non-presence)", - "type": "object", - "properties": { - "arp-entry": { - "description": "(list)", - "type": "array", - "items": { - "type": "object", - "properties": { - "address": { - "description": "IP address of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "interface": { - "description": "Interface of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "phs-address": { - "description": "MAC address of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "x-yang": { - "type": "list" - } - } + "/data/cocsn:routes/route={route-destination}/flags": { + "get": { + "security": [ + { + "basicAuth": [] + } + ], + "description": "Flags of the route", + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "get" + ], + "summary": "Flags of the route", + "operationId": "data_cocsn_routes_route_route_destination_flags_get", + "parameters": [ + { + "$ref": "#/parameters/route-destination" }, - "x-yang": { - "is_presence": "false", - "type": "container" + { + "$ref": "#/parameters/content" + }, + { + "$ref": "#/parameters/depth" + }, + { + "$ref": "#/parameters/fields" + }, + { + "$ref": "#/parameters/filter" + }, + { + "$ref": "#/parameters/with-defaults" } - }, - "cocsn:interfaces": { - "description": "(non-presence)", - "type": "object", - "properties": { - "interface": { - "description": "(list)", - "type": "array", - "items": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "description": "Interface IP address. Example value: 10.10.10.1 (leaf-list)", - "type": "string", - "format": "string" - }, - "x-yang": { - "type": "leaf-list" - } - }, - "enabled": { - "description": "Enable or disable the interface. Example value: true (leaf)", - "type": "string", - "format": "boolean", - "x-yang": { - "type": "leaf" - } - }, - "name": { - "description": "Interface name. Example value: en0 (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "oper-status": { - "description": "Describes whether the interface is physically up or down (leaf)", - "type": "string", - "format": "enumeration", - "default": "up", - "enum": [ - "up", - "down" - ], - "x-yang": { - "type": "leaf" - } - }, - "phys-address": { - "description": "The interface's address at its protocol sub-layer. For\nexample, for an 802.x interface, this object normally\ncontains a Media Access Control (MAC) address. The\ninterface's media-specific modules must define the bit\nand byte ordering and the format of the value of this\nobject. For interfaces that do not have such an address\n(e.g., a serial line), this node is not present. (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "x-yang": { - "type": "list" - } + ], + "responses": { + "200": { + "description": "Flags of the route", + "schema": { + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_flags" } }, - "x-yang": { - "is_presence": "false", - "type": "container" + "204": { + "$ref": "#/responses/204" + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "404": { + "$ref": "#/responses/404" + }, + "405": { + "$ref": "#/responses/405" + }, + "409": { + "$ref": "#/responses/409" } - }, - "cocsn:routes": { - "description": "(non-presence)", - "type": "object", - "properties": { - "route": { - "description": "(list)", - "type": "array", - "items": { - "type": "object", - "properties": { - "destination": { - "description": "Route destination. IP network (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "expire": { - "description": "Expiration timer of the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "flags": { - "description": "Flags of the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "gateway": { - "description": "Route gateway. IP address or host name (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "interface": { - "description": "Interface used for the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "x-yang": { - "type": "list" - } - } + } + }, + "put": { + "security": [ + { + "basicAuth": [] + } + ], + "description": "Flags of the route", + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "put" + ], + "summary": "Flags of the route", + "operationId": "data_cocsn_routes_route_route_destination_flags_put", + "parameters": [ + { + "$ref": "#/parameters/route-destination" }, - "x-yang": { - "is_presence": "false", - "type": "container" + { + "$ref": "#/parameters/data_cocsn_routes_route_route-destination_flags" + } + ], + "responses": { + "201": { + "description": "leaf flags created or replaced" + }, + "204": { + "$ref": "#/responses/204" + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "404": { + "$ref": "#/responses/404" + }, + "405": { + "$ref": "#/responses/405" + }, + "409": { + "$ref": "#/responses/409" } } - } - }, - "data-put-patch": { - "type": "object", - "properties": { - "ietf-restconf:data": { - "description": "This YANG module represents the CoCSN API", - "type": "object", - "properties": { - "cocsn:arp-table": { - "description": "(non-presence)", - "type": "object", - "properties": { - "arp-entry": { - "description": "(list)", - "type": "array", - "items": { - "type": "object", - "properties": { - "address": { - "description": "IP address of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "interface": { - "description": "Interface of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "phs-address": { - "description": "MAC address of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } + }, + "delete": { + "security": [ + { + "basicAuth": [] + } + ], + "description": "Flags of the route", + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "delete" + ], + "summary": "Flags of the route", + "operationId": "data_cocsn_routes_route_route_destination_flags_delete", + "parameters": [ + { + "$ref": "#/parameters/route-destination" + } + ], + "responses": { + "204": { + "$ref": "#/responses/204" + } + } + }, + "patch": { + "security": [ + { + "basicAuth": [] + } + ], + "description": "Flags of the route", + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "patch" + ], + "summary": "Flags of the route", + "operationId": "data_cocsn_routes_route_route_destination_flags_patch", + "parameters": [ + { + "$ref": "#/parameters/route-destination" + }, + { + "$ref": "#/parameters/data_cocsn_routes_route_route-destination_flags" + } + ], + "responses": { + "204": { + "description": "leaf flags updated" + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "404": { + "$ref": "#/responses/404" + }, + "405": { + "$ref": "#/responses/405" + }, + "409": { + "$ref": "#/responses/409" + } + } + } + }, + "/data/cocsn:routes/route={route-destination}/gateway": { + "get": { + "security": [ + { + "basicAuth": [] + } + ], + "description": "Route gateway. IP address or host name", + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "get" + ], + "summary": "Route gateway. IP address or host name", + "operationId": "data_cocsn_routes_route_route_destination_gateway_get", + "parameters": [ + { + "$ref": "#/parameters/route-destination" + }, + { + "$ref": "#/parameters/content" + }, + { + "$ref": "#/parameters/depth" + }, + { + "$ref": "#/parameters/fields" + }, + { + "$ref": "#/parameters/filter" + }, + { + "$ref": "#/parameters/with-defaults" + } + ], + "responses": { + "200": { + "description": "Route gateway. IP address or host name", + "schema": { + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_gateway" + } + }, + "204": { + "$ref": "#/responses/204" + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "404": { + "$ref": "#/responses/404" + }, + "405": { + "$ref": "#/responses/405" + }, + "409": { + "$ref": "#/responses/409" + } + } + }, + "put": { + "security": [ + { + "basicAuth": [] + } + ], + "description": "Route gateway. IP address or host name", + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "put" + ], + "summary": "Route gateway. IP address or host name", + "operationId": "data_cocsn_routes_route_route_destination_gateway_put", + "parameters": [ + { + "$ref": "#/parameters/route-destination" + }, + { + "$ref": "#/parameters/data_cocsn_routes_route_route-destination_gateway" + } + ], + "responses": { + "201": { + "description": "leaf gateway created or replaced" + }, + "204": { + "$ref": "#/responses/204" + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "404": { + "$ref": "#/responses/404" + }, + "405": { + "$ref": "#/responses/405" + }, + "409": { + "$ref": "#/responses/409" + } + } + }, + "delete": { + "security": [ + { + "basicAuth": [] + } + ], + "description": "Route gateway. IP address or host name", + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "delete" + ], + "summary": "Route gateway. IP address or host name", + "operationId": "data_cocsn_routes_route_route_destination_gateway_delete", + "parameters": [ + { + "$ref": "#/parameters/route-destination" + } + ], + "responses": { + "204": { + "$ref": "#/responses/204" + } + } + }, + "patch": { + "security": [ + { + "basicAuth": [] + } + ], + "description": "Route gateway. IP address or host name", + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "patch" + ], + "summary": "Route gateway. IP address or host name", + "operationId": "data_cocsn_routes_route_route_destination_gateway_patch", + "parameters": [ + { + "$ref": "#/parameters/route-destination" + }, + { + "$ref": "#/parameters/data_cocsn_routes_route_route-destination_gateway" + } + ], + "responses": { + "204": { + "description": "leaf gateway updated" + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "404": { + "$ref": "#/responses/404" + }, + "405": { + "$ref": "#/responses/405" + }, + "409": { + "$ref": "#/responses/409" + } + } + } + }, + "/data/cocsn:routes/route={route-destination}/interface": { + "get": { + "security": [ + { + "basicAuth": [] + } + ], + "description": "Interface used for the route", + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "get" + ], + "summary": "Interface used for the route", + "operationId": "data_cocsn_routes_route_route_destination_interface_get", + "parameters": [ + { + "$ref": "#/parameters/route-destination" + }, + { + "$ref": "#/parameters/content" + }, + { + "$ref": "#/parameters/depth" + }, + { + "$ref": "#/parameters/fields" + }, + { + "$ref": "#/parameters/filter" + }, + { + "$ref": "#/parameters/with-defaults" + } + ], + "responses": { + "200": { + "description": "Interface used for the route", + "schema": { + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_interface" + } + }, + "204": { + "$ref": "#/responses/204" + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "404": { + "$ref": "#/responses/404" + }, + "405": { + "$ref": "#/responses/405" + }, + "409": { + "$ref": "#/responses/409" + } + } + }, + "put": { + "security": [ + { + "basicAuth": [] + } + ], + "description": "Interface used for the route", + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "put" + ], + "summary": "Interface used for the route", + "operationId": "data_cocsn_routes_route_route_destination_interface_put", + "parameters": [ + { + "$ref": "#/parameters/route-destination" + }, + { + "$ref": "#/parameters/data_cocsn_routes_route_route-destination_interface" + } + ], + "responses": { + "201": { + "description": "leaf interface created or replaced" + }, + "204": { + "$ref": "#/responses/204" + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "404": { + "$ref": "#/responses/404" + }, + "405": { + "$ref": "#/responses/405" + }, + "409": { + "$ref": "#/responses/409" + } + } + }, + "delete": { + "security": [ + { + "basicAuth": [] + } + ], + "description": "Interface used for the route", + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "delete" + ], + "summary": "Interface used for the route", + "operationId": "data_cocsn_routes_route_route_destination_interface_delete", + "parameters": [ + { + "$ref": "#/parameters/route-destination" + } + ], + "responses": { + "204": { + "$ref": "#/responses/204" + } + } + }, + "patch": { + "security": [ + { + "basicAuth": [] + } + ], + "description": "Interface used for the route", + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "patch" + ], + "summary": "Interface used for the route", + "operationId": "data_cocsn_routes_route_route_destination_interface_patch", + "parameters": [ + { + "$ref": "#/parameters/route-destination" + }, + { + "$ref": "#/parameters/data_cocsn_routes_route_route-destination_interface" + } + ], + "responses": { + "204": { + "description": "leaf interface updated" + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "404": { + "$ref": "#/responses/404" + }, + "405": { + "$ref": "#/responses/405" + }, + "409": { + "$ref": "#/responses/409" + } + } + } + }, + "/operations": { + "get": { + "security": [ + { + "basicAuth": [] + } + ], + "description": "This YANG module represents the CoCSN API", + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "operations", + "get" + ], + "summary": "This YANG module represents the CoCSN API", + "operationId": "operations_get", + "responses": { + "200": { + "description": "This YANG module represents the CoCSN API", + "schema": { + "$ref": "#/definitions/operations" + } + }, + "204": { + "$ref": "#/responses/204" + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "404": { + "$ref": "#/responses/404" + }, + "405": { + "$ref": "#/responses/405" + }, + "409": { + "$ref": "#/responses/409" + } + } + } + }, + "/yang-library-version": { + "get": { + "security": [ + { + "basicAuth": [] + } + ], + "description": "This YANG module represents the CoCSN API", + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "yang-library-version", + "get" + ], + "summary": "This YANG module represents the CoCSN API", + "operationId": "yang_library_version_get", + "responses": { + "200": { + "description": "This YANG module represents the CoCSN API", + "schema": { + "$ref": "#/definitions/yang-library-version" + } + }, + "204": { + "$ref": "#/responses/204" + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "404": { + "$ref": "#/responses/404" + }, + "405": { + "$ref": "#/responses/405" + }, + "409": { + "$ref": "#/responses/409" + } + } + } + } + }, + "definitions": { + "data": { + "type": "object", + "properties": { + "ietf-restconf:data": { + "description": "This resource represents the combined configuration and state data resources that can be accessed by a client and cannot be created or deleted by the client. See RESTCONF RFC 8040 for further information.", + "type": "object", + "x-yang": { + "type": "datastore" + } + } + } + }, + "data-post": { + "type": "object", + "properties": { + "cocsn:interfaces": { + "description": "(non-presence)", + "type": "object", + "properties": { + "interface": { + "description": "(list)", + "type": "array", + "items": { + "type": "object", + "properties": { + "addresses": { + "type": "array", + "items": { + "description": "Interface IP address. Example value: 10.10.10.1 (leaf-list)", + "type": "string", + "format": "string" + }, + "x-yang": { + "type": "leaf-list" + } + }, + "enabled": { + "description": "Enable or disable the interface. Example value: true (leaf)", + "type": "string", + "format": "boolean", + "x-yang": { + "type": "leaf" + } + }, + "name": { + "description": "Interface name. Example value: en0 (leaf)", + "type": "string", + "format": "string", + "x-yang": { + "type": "leaf" + } + }, + "oper-status": { + "description": "Describes whether the interface is physically up or down (leaf)", + "type": "string", + "format": "enumeration", + "default": "up", + "enum": [ + "up", + "down" + ], + "x-yang": { + "type": "leaf" } }, - "x-yang": { - "type": "list" + "phys-address": { + "description": "The interface's address at its protocol sub-layer. For\nexample, for an 802.x interface, this object normally\ncontains a Media Access Control (MAC) address. The\ninterface's media-specific modules must define the bit\nand byte ordering and the format of the value of this\nobject. For interfaces that do not have such an address\n(e.g., a serial line), this node is not present. (leaf)", + "type": "string", + "format": "string", + "x-yang": { + "type": "leaf" + } } } }, "x-yang": { - "is_presence": "false", - "type": "container" + "type": "list" } - }, + } + }, + "x-yang": { + "is_presence": "false", + "type": "container" + } + }, + "cocsn:routes": { + "description": "(non-presence)", + "type": "object", + "properties": { + "route": { + "description": "(list)", + "type": "array", + "items": { + "type": "object", + "properties": { + "destination": { + "description": "Route destination. IP network (leaf)", + "type": "string", + "format": "string", + "x-yang": { + "type": "leaf" + } + }, + "expire": { + "description": "Expiration timer of the route (leaf)", + "type": "string", + "format": "string", + "x-yang": { + "type": "leaf" + } + }, + "flags": { + "description": "Flags of the route (leaf)", + "type": "string", + "format": "string", + "x-yang": { + "type": "leaf" + } + }, + "gateway": { + "description": "Route gateway. IP address or host name (leaf)", + "type": "string", + "format": "string", + "x-yang": { + "type": "leaf" + } + }, + "interface": { + "description": "Interface used for the route (leaf)", + "type": "string", + "format": "string", + "x-yang": { + "type": "leaf" + } + } + } + }, + "x-yang": { + "type": "list" + } + } + }, + "x-yang": { + "is_presence": "false", + "type": "container" + } + } + } + }, + "data-put-patch": { + "type": "object", + "properties": { + "ietf-restconf:data": { + "description": "This YANG module represents the CoCSN API", + "type": "object", + "properties": { "cocsn:interfaces": { "description": "(non-presence)", "type": "object", @@ -2607,239 +3144,26 @@ func init() { "interface": { "description": "Interface used for the route (leaf)", "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "x-yang": { - "type": "list" - } - } - }, - "x-yang": { - "is_presence": "false", - "type": "container" - } - } - }, - "x-yang": { - "type": "datastore" - } - } - } - }, - "data_cocsn_arp-table": { - "type": "object", - "properties": { - "cocsn:arp-table": { - "description": "(non-presence)", - "type": "object", - "properties": { - "arp-entry": { - "description": "(list)", - "type": "array", - "items": { - "type": "object", - "properties": { - "address": { - "description": "IP address of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "interface": { - "description": "Interface of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "phs-address": { - "description": "MAC address of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "x-yang": { - "type": "list" - } - } - }, - "x-yang": { - "is_presence": "false", - "type": "container" - } - } - } - }, - "data_cocsn_arp-table-post": { - "type": "object", - "properties": { - "cocsn:arp-entry": { - "description": "(list)", - "type": "array", - "items": { - "type": "object", - "properties": { - "address": { - "description": "IP address of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "interface": { - "description": "Interface of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "phs-address": { - "description": "MAC address of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "x-yang": { - "type": "list" - } - } - } - }, - "data_cocsn_arp-table_arp-entry": { - "type": "object", - "properties": { - "cocsn:arp-entry": { - "description": "(list)", - "type": "array", - "items": { - "type": "object", - "properties": { - "address": { - "description": "IP address of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "interface": { - "description": "Interface of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "phs-address": { - "description": "MAC address of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "x-yang": { - "type": "list" - } - } - } - }, - "data_cocsn_arp-table_arp-entry_arp-entry-address": { - "type": "object", - "properties": { - "cocsn:arp-entry": { - "description": "(list)", - "type": "array", - "items": { - "type": "object", - "properties": { - "address": { - "description": "IP address of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "interface": { - "description": "Interface of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" + "format": "string", + "x-yang": { + "type": "leaf" + } + } + } + }, + "x-yang": { + "type": "list" + } } }, - "phs-address": { - "description": "MAC address of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } + "x-yang": { + "is_presence": "false", + "type": "container" } } }, "x-yang": { - "type": "list" - } - } - } - }, - "data_cocsn_arp-table_arp-entry_arp-entry-address_address": { - "type": "object", - "properties": { - "cocsn:address": { - "description": "IP address of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "data_cocsn_arp-table_arp-entry_arp-entry-address_interface": { - "type": "object", - "properties": { - "cocsn:interface": { - "description": "Interface of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "data_cocsn_arp-table_arp-entry_arp-entry-address_phs-address": { - "type": "object", - "properties": { - "cocsn:phs-address": { - "description": "MAC address of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" + "type": "datastore" } } } @@ -2984,71 +3308,6 @@ func init() { } } }, - "data_cocsn_interfaces_interface": { - "type": "object", - "properties": { - "cocsn:interface": { - "description": "(list)", - "type": "array", - "items": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "description": "Interface IP address. Example value: 10.10.10.1 (leaf-list)", - "type": "string", - "format": "string" - }, - "x-yang": { - "type": "leaf-list" - } - }, - "enabled": { - "description": "Enable or disable the interface. Example value: true (leaf)", - "type": "string", - "format": "boolean", - "x-yang": { - "type": "leaf" - } - }, - "name": { - "description": "Interface name. Example value: en0 (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "oper-status": { - "description": "Describes whether the interface is physically up or down (leaf)", - "type": "string", - "format": "enumeration", - "default": "up", - "enum": [ - "up", - "down" - ], - "x-yang": { - "type": "leaf" - } - }, - "phys-address": { - "description": "The interface's address at its protocol sub-layer. For\nexample, for an 802.x interface, this object normally\ncontains a Media Access Control (MAC) address. The\ninterface's media-specific modules must define the bit\nand byte ordering and the format of the value of this\nobject. For interfaces that do not have such an address\n(e.g., a serial line), this node is not present. (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "x-yang": { - "type": "list" - } - } - } - }, "data_cocsn_interfaces_interface_interface-name": { "type": "object", "properties": { @@ -3114,22 +3373,6 @@ func init() { } } }, - "data_cocsn_interfaces_interface_interface-name_addresses": { - "type": "object", - "properties": { - "cocsn:addresses": { - "type": "array", - "items": { - "description": "Interface IP address. Example value: 10.10.10.1 (leaf-list)", - "type": "string", - "format": "string" - }, - "x-yang": { - "type": "leaf-list" - } - } - } - }, "data_cocsn_interfaces_interface_interface-name_addresses_addresses-id": { "type": "object", "properties": { @@ -3327,63 +3570,6 @@ func init() { } } }, - "data_cocsn_routes_route": { - "type": "object", - "properties": { - "cocsn:route": { - "description": "(list)", - "type": "array", - "items": { - "type": "object", - "properties": { - "destination": { - "description": "Route destination. IP network (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "expire": { - "description": "Expiration timer of the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "flags": { - "description": "Flags of the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "gateway": { - "description": "Route gateway. IP address or host name (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "interface": { - "description": "Interface used for the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "x-yang": { - "type": "list" - } - } - } - }, "data_cocsn_routes_route_route-destination": { "type": "object", "properties": { @@ -3563,14 +3749,6 @@ func init() { "in": "path", "required": true }, - "arp-entry-address": { - "type": "string", - "format": "string", - "description": "IP address of the arp entry", - "name": "arp-entry-address", - "in": "path", - "required": true - }, "content": { "enum": [ "config", @@ -3602,52 +3780,133 @@ func init() { "$ref": "#/definitions/data-put-patch" } }, - "data_cocsn_arp-table": { - "name": "arp-table", + "data_cocsn_interfaces": { + "name": "interfaces", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_interfaces" + } + }, + "data_cocsn_interfaces-post": { + "name": "interfaces", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_interfaces-post" + } + }, + "data_cocsn_interfaces_interface_interface-name": { + "name": "interface", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name" + } + }, + "data_cocsn_interfaces_interface_interface-name_addresses_addresses-id": { + "description": "Interface IP address. Example value: 10.10.10.1", + "name": "addresses", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_addresses_addresses-id" + } + }, + "data_cocsn_interfaces_interface_interface-name_enabled": { + "description": "Enable or disable the interface. Example value: true", + "name": "enabled", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_enabled" + } + }, + "data_cocsn_interfaces_interface_interface-name_name": { + "description": "Interface name. Example value: en0", + "name": "name", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_name" + } + }, + "data_cocsn_interfaces_interface_interface-name_oper-status": { + "description": "Describes whether the interface is physically up or down", + "name": "oper-status", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_oper-status" + } + }, + "data_cocsn_routes": { + "name": "routes", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_routes" + } + }, + "data_cocsn_routes-post": { + "name": "routes", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_routes-post" + } + }, + "data_cocsn_routes_route_route-destination": { + "name": "route", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/data_cocsn_arp-table" + "$ref": "#/definitions/data_cocsn_routes_route_route-destination" } }, - "data_cocsn_arp-table-post": { - "name": "arp-table", + "data_cocsn_routes_route_route-destination_destination": { + "description": "Route destination. IP network", + "name": "destination", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/data_cocsn_arp-table-post" + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_destination" } }, - "data_cocsn_interfaces": { - "name": "interfaces", + "data_cocsn_routes_route_route-destination_expire": { + "description": "Expiration timer of the route", + "name": "expire", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/data_cocsn_interfaces" + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_expire" } }, - "data_cocsn_interfaces-post": { - "name": "interfaces", + "data_cocsn_routes_route_route-destination_flags": { + "description": "Flags of the route", + "name": "flags", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/data_cocsn_interfaces-post" + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_flags" } }, - "data_cocsn_routes": { - "name": "routes", + "data_cocsn_routes_route_route-destination_gateway": { + "description": "Route gateway. IP address or host name", + "name": "gateway", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/data_cocsn_routes" + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_gateway" } }, - "data_cocsn_routes-post": { - "name": "routes", + "data_cocsn_routes_route_route-destination_interface": { + "description": "Interface used for the route", + "name": "interface", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/data_cocsn_routes-post" + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_interface" } }, "depth": { @@ -3783,57 +4042,500 @@ func init() { "description": "put resources", "name": "put" }, - { - "description": "delete resources", - "name": "delete" - } - ] -}`)) - FlatSwaggerJSON = json.RawMessage([]byte(`{ - "consumes": [ - "application/yang-data+json" - ], - "produces": [ - "application/yang-data+json" - ], - "schemes": [ - "http", - "https" - ], - "swagger": "2.0", - "info": { - "description": "This YANG module represents the CoCSN API", - "title": "cocsn", - "version": "2020-08-17" - }, - "basePath": "/restconf", - "paths": { - "/": { + { + "description": "delete resources", + "name": "delete" + } + ] +}`)) + FlatSwaggerJSON = json.RawMessage([]byte(`{ + "consumes": [ + "application/yang-data+json" + ], + "produces": [ + "application/yang-data+json" + ], + "schemes": [ + "http", + "https" + ], + "swagger": "2.0", + "info": { + "description": "This YANG module represents the CoCSN API", + "title": "cocsn", + "version": "2020-08-17" + }, + "basePath": "/restconf", + "paths": { + "/": { + "get": { + "security": [ + { + "basicAuth": [] + } + ], + "description": "This YANG module represents the CoCSN API", + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "root", + "get" + ], + "summary": "This YANG module represents the CoCSN API", + "operationId": "root_get", + "responses": { + "200": { + "description": "This YANG module represents the CoCSN API", + "schema": { + "$ref": "#/definitions/root" + } + }, + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "405": { + "description": "Method Not Allowed" + }, + "409": { + "description": "Conflict" + } + } + } + }, + "/data": { + "get": { + "security": [ + { + "basicAuth": [] + } + ], + "description": "This YANG module represents the CoCSN API", + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "get" + ], + "summary": "This YANG module represents the CoCSN API", + "operationId": "data_get", + "responses": { + "200": { + "description": "This YANG module represents the CoCSN API", + "schema": { + "$ref": "#/definitions/data" + } + }, + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "405": { + "description": "Method Not Allowed" + }, + "409": { + "description": "Conflict" + } + } + }, + "put": { + "security": [ + { + "basicAuth": [] + } + ], + "description": "This YANG module represents the CoCSN API", + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "put" + ], + "summary": "This YANG module represents the CoCSN API", + "operationId": "data_put", + "parameters": [ + { + "description": "This YANG module represents the CoCSN API", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/data-put-patch" + } + } + ], + "responses": { + "201": { + "description": "This YANG module represents the CoCSN API" + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "405": { + "description": "Method Not Allowed" + }, + "409": { + "description": "Conflict" + } + } + }, + "post": { + "security": [ + { + "basicAuth": [] + } + ], + "description": "This YANG module represents the CoCSN API", + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "post" + ], + "summary": "This YANG module represents the CoCSN API", + "operationId": "data_post", + "parameters": [ + { + "description": "This YANG module represents the CoCSN API", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/data-post" + } + } + ], + "responses": { + "201": { + "description": "This YANG module represents the CoCSN API" + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "405": { + "description": "Method Not Allowed" + }, + "409": { + "description": "Conflict" + } + } + }, + "patch": { + "security": [ + { + "basicAuth": [] + } + ], + "description": "This YANG module represents the CoCSN API", + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "patch" + ], + "summary": "This YANG module represents the CoCSN API", + "operationId": "data_patch", + "parameters": [ + { + "description": "This YANG module represents the CoCSN API", + "name": "data", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/data-put-patch" + } + } + ], + "responses": { + "204": { + "description": "This YANG module represents the CoCSN API" + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "405": { + "description": "Method Not Allowed" + }, + "409": { + "description": "Conflict" + } + } + } + }, + "/data/cocsn:interfaces": { "get": { "security": [ { "basicAuth": [] } ], - "description": "This YANG module represents the CoCSN API", "produces": [ "application/yang-data+json" ], "tags": [ - "root", - "get" + "data", + "get" + ], + "operationId": "data_cocsn_interfaces_get", + "parameters": [ + { + "enum": [ + "config", + "nonconfig", + "all" + ], + "type": "string", + "format": "enumeration", + "default": "config", + "description": "controlling descendant nodes in response", + "name": "content", + "in": "query" + }, + { + "type": "integer", + "format": "uint16", + "description": "limit the depth of nodes in response", + "name": "depth", + "in": "query" + }, + { + "type": "string", + "format": "string", + "description": "optionally identify specific data nodes in response", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "format": "string", + "description": "xpath expression to filter data nodes in response", + "name": "filter", + "in": "query" + }, + { + "enum": [ + "report-all", + "trim", + "explicit", + "report-all-tagged" + ], + "type": "string", + "format": "enumeration", + "default": "report-all", + "description": "controlling default values in response", + "name": "with-defaults", + "in": "query" + } + ], + "responses": { + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/data_cocsn_interfaces" + } + }, + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "405": { + "description": "Method Not Allowed" + }, + "409": { + "description": "Conflict" + } + } + }, + "put": { + "security": [ + { + "basicAuth": [] + } + ], + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "put" + ], + "operationId": "data_cocsn_interfaces_put", + "parameters": [ + { + "name": "interfaces", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_interfaces" + } + } + ], + "responses": { + "201": { + "description": "container interfaces created or replaced" + }, + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "405": { + "description": "Method Not Allowed" + }, + "409": { + "description": "Conflict" + } + } + }, + "post": { + "security": [ + { + "basicAuth": [] + } + ], + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "post" + ], + "operationId": "data_cocsn_interfaces_post", + "parameters": [ + { + "name": "interfaces", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_interfaces-post" + } + } + ], + "responses": { + "201": { + "description": "container interfaces created" + }, + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "405": { + "description": "Method Not Allowed" + }, + "409": { + "description": "Conflict" + } + } + }, + "delete": { + "security": [ + { + "basicAuth": [] + } + ], + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "delete" + ], + "operationId": "data_cocsn_interfaces_delete", + "responses": { + "204": { + "description": "No Content" + } + } + }, + "patch": { + "security": [ + { + "basicAuth": [] + } + ], + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "patch" ], - "summary": "This YANG module represents the CoCSN API", - "operationId": "root_get", - "responses": { - "200": { - "description": "This YANG module represents the CoCSN API", + "operationId": "data_cocsn_interfaces_patch", + "parameters": [ + { + "name": "interfaces", + "in": "body", + "required": true, "schema": { - "$ref": "#/definitions/root" + "$ref": "#/definitions/data_cocsn_interfaces" } - }, + } + ], + "responses": { "204": { - "description": "No Content" + "description": "container interfaces updated" }, "400": { "description": "Bad Request" @@ -3853,14 +4555,14 @@ func init() { } } }, - "/data": { + "/data/cocsn:interfaces/interface": {}, + "/data/cocsn:interfaces/interface={interface-name}": { "get": { "security": [ { "basicAuth": [] } ], - "description": "This YANG module represents the CoCSN API", "produces": [ "application/yang-data+json" ], @@ -3868,13 +4570,70 @@ func init() { "data", "get" ], - "summary": "This YANG module represents the CoCSN API", - "operationId": "data_get", + "operationId": "data_cocsn_interfaces_interface_interface_name_get", + "parameters": [ + { + "type": "string", + "format": "string", + "description": "Interface name. Example value: en0", + "name": "interface-name", + "in": "path", + "required": true + }, + { + "enum": [ + "config", + "nonconfig", + "all" + ], + "type": "string", + "format": "enumeration", + "default": "config", + "description": "controlling descendant nodes in response", + "name": "content", + "in": "query" + }, + { + "type": "integer", + "format": "uint16", + "description": "limit the depth of nodes in response", + "name": "depth", + "in": "query" + }, + { + "type": "string", + "format": "string", + "description": "optionally identify specific data nodes in response", + "name": "fields", + "in": "query" + }, + { + "type": "string", + "format": "string", + "description": "xpath expression to filter data nodes in response", + "name": "filter", + "in": "query" + }, + { + "enum": [ + "report-all", + "trim", + "explicit", + "report-all-tagged" + ], + "type": "string", + "format": "enumeration", + "default": "report-all", + "description": "controlling default values in response", + "name": "with-defaults", + "in": "query" + } + ], "responses": { "200": { - "description": "This YANG module represents the CoCSN API", + "description": "OK", "schema": { - "$ref": "#/definitions/data" + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name" } }, "204": { @@ -3903,7 +4662,6 @@ func init() { "basicAuth": [] } ], - "description": "This YANG module represents the CoCSN API", "produces": [ "application/yang-data+json" ], @@ -3911,22 +4669,52 @@ func init() { "data", "put" ], - "summary": "This YANG module represents the CoCSN API", - "operationId": "data_put", + "operationId": "data_cocsn_interfaces_interface_interface_name_put", "parameters": [ { - "description": "This YANG module represents the CoCSN API", - "name": "data", + "type": "string", + "format": "string", + "description": "Interface name. Example value: en0", + "name": "interface-name", + "in": "path", + "required": true + }, + { + "name": "interface", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/data-put-patch" + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name" } + }, + { + "enum": [ + "first", + "last", + "before", + "after" + ], + "type": "string", + "format": "enumeration", + "default": "first", + "description": "controlling the order when adding new list elements", + "name": "insert", + "in": "query" + }, + { + "type": "string", + "format": "string", + "description": "used to specify the insertion point", + "name": "point", + "in": "query" } ], "responses": { "201": { - "description": "This YANG module represents the CoCSN API" + "description": "list interface created or replaced" + }, + "204": { + "description": "No Content" }, "400": { "description": "Bad Request" @@ -3945,51 +4733,33 @@ func init() { } } }, - "post": { + "delete": { "security": [ { "basicAuth": [] } ], - "description": "This YANG module represents the CoCSN API", "produces": [ "application/yang-data+json" ], "tags": [ "data", - "post" + "delete" ], - "summary": "This YANG module represents the CoCSN API", - "operationId": "data_post", + "operationId": "data_cocsn_interfaces_interface_interface_name_delete", "parameters": [ { - "description": "This YANG module represents the CoCSN API", - "name": "data", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data-post" - } + "type": "string", + "format": "string", + "description": "Interface name. Example value: en0", + "name": "interface-name", + "in": "path", + "required": true } ], "responses": { - "201": { - "description": "This YANG module represents the CoCSN API" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" + "204": { + "description": "No Content" } } }, @@ -3999,7 +4769,6 @@ func init() { "basicAuth": [] } ], - "description": "This YANG module represents the CoCSN API", "produces": [ "application/yang-data+json" ], @@ -4007,22 +4776,28 @@ func init() { "data", "patch" ], - "summary": "This YANG module represents the CoCSN API", - "operationId": "data_patch", + "operationId": "data_cocsn_interfaces_interface_interface_name_patch", "parameters": [ { - "description": "This YANG module represents the CoCSN API", - "name": "data", + "type": "string", + "format": "string", + "description": "Interface name. Example value: en0", + "name": "interface-name", + "in": "path", + "required": true + }, + { + "name": "interface", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/data-put-patch" + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name" } } ], "responses": { "204": { - "description": "This YANG module represents the CoCSN API" + "description": "list interface updated" }, "400": { "description": "Bad Request" @@ -4042,13 +4817,15 @@ func init() { } } }, - "/data/cocsn:arp-table": { + "/data/cocsn:interfaces/interface={interface-name}/addresses": {}, + "/data/cocsn:interfaces/interface={interface-name}/addresses={addresses-id}": { "get": { "security": [ { "basicAuth": [] } ], + "description": "Interface IP address. Example value: 10.10.10.1", "produces": [ "application/yang-data+json" ], @@ -4056,8 +4833,25 @@ func init() { "data", "get" ], - "operationId": "data_cocsn_arp_table_get", + "summary": "Interface IP address. Example value: 10.10.10.1", + "operationId": "data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_get", "parameters": [ + { + "type": "string", + "format": "string", + "description": "Interface name. Example value: en0", + "name": "interface-name", + "in": "path", + "required": true + }, + { + "type": "string", + "format": "string", + "description": "Interface IP address. Example value: 10.10.10.1", + "name": "addresses-id", + "in": "path", + "required": true + }, { "enum": [ "config", @@ -4093,74 +4887,26 @@ func init() { "in": "query" }, { - "enum": [ - "report-all", - "trim", - "explicit", - "report-all-tagged" - ], - "type": "string", - "format": "enumeration", - "default": "report-all", - "description": "controlling default values in response", - "name": "with-defaults", - "in": "query" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/data_cocsn_arp-table" - } - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - } - }, - "put": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "put" - ], - "operationId": "data_cocsn_arp_table_put", - "parameters": [ - { - "name": "arp-table", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_arp-table" - } + "enum": [ + "report-all", + "trim", + "explicit", + "report-all-tagged" + ], + "type": "string", + "format": "enumeration", + "default": "report-all", + "description": "controlling default values in response", + "name": "with-defaults", + "in": "query" } ], "responses": { - "201": { - "description": "container arp-table created or replaced" + "200": { + "description": "Interface IP address. Example value: 10.10.10.1", + "schema": { + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_addresses_addresses-id" + } }, "204": { "description": "No Content" @@ -4182,33 +4928,73 @@ func init() { } } }, - "post": { + "put": { "security": [ { "basicAuth": [] } ], + "description": "Interface IP address. Example value: 10.10.10.1", "produces": [ "application/yang-data+json" ], "tags": [ "data", - "post" + "put" ], - "operationId": "data_cocsn_arp_table_post", + "summary": "Interface IP address. Example value: 10.10.10.1", + "operationId": "data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_put", "parameters": [ { - "name": "arp-table", + "type": "string", + "format": "string", + "description": "Interface name. Example value: en0", + "name": "interface-name", + "in": "path", + "required": true + }, + { + "type": "string", + "format": "string", + "description": "Interface IP address. Example value: 10.10.10.1", + "name": "addresses-id", + "in": "path", + "required": true + }, + { + "description": "Interface IP address. Example value: 10.10.10.1", + "name": "addresses", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/data_cocsn_arp-table-post" + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_addresses_addresses-id" } + }, + { + "enum": [ + "first", + "last", + "before", + "after" + ], + "type": "string", + "format": "enumeration", + "default": "first", + "description": "controlling the order when adding new list elements", + "name": "insert", + "in": "query" + }, + { + "type": "string", + "format": "string", + "description": "used to specify the insertion point", + "name": "point", + "in": "query" } ], "responses": { "201": { - "description": "container arp-table created" + "description": "leaf-list addresses created or replaced" }, "204": { "description": "No Content" @@ -4236,6 +5022,7 @@ func init() { "basicAuth": [] } ], + "description": "Interface IP address. Example value: 10.10.10.1", "produces": [ "application/yang-data+json" ], @@ -4243,7 +5030,26 @@ func init() { "data", "delete" ], - "operationId": "data_cocsn_arp_table_delete", + "summary": "Interface IP address. Example value: 10.10.10.1", + "operationId": "data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_delete", + "parameters": [ + { + "type": "string", + "format": "string", + "description": "Interface name. Example value: en0", + "name": "interface-name", + "in": "path", + "required": true + }, + { + "type": "string", + "format": "string", + "description": "Interface IP address. Example value: 10.10.10.1", + "name": "addresses-id", + "in": "path", + "required": true + } + ], "responses": { "204": { "description": "No Content" @@ -4256,6 +5062,7 @@ func init() { "basicAuth": [] } ], + "description": "Interface IP address. Example value: 10.10.10.1", "produces": [ "application/yang-data+json" ], @@ -4263,20 +5070,38 @@ func init() { "data", "patch" ], - "operationId": "data_cocsn_arp_table_patch", + "summary": "Interface IP address. Example value: 10.10.10.1", + "operationId": "data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_patch", "parameters": [ { - "name": "arp-table", + "type": "string", + "format": "string", + "description": "Interface name. Example value: en0", + "name": "interface-name", + "in": "path", + "required": true + }, + { + "type": "string", + "format": "string", + "description": "Interface IP address. Example value: 10.10.10.1", + "name": "addresses-id", + "in": "path", + "required": true + }, + { + "description": "Interface IP address. Example value: 10.10.10.1", + "name": "addresses", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/data_cocsn_arp-table" + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_addresses_addresses-id" } } ], "responses": { "204": { - "description": "container arp-table updated" + "description": "leaf-list addresses updated" }, "400": { "description": "Bad Request" @@ -4296,13 +5121,14 @@ func init() { } } }, - "/data/cocsn:arp-table/arp-entry": { + "/data/cocsn:interfaces/interface={interface-name}/enabled": { "get": { "security": [ { "basicAuth": [] } ], + "description": "Enable or disable the interface. Example value: true", "produces": [ "application/yang-data+json" ], @@ -4310,8 +5136,17 @@ func init() { "data", "get" ], - "operationId": "data_cocsn_arp_table_arp_entry_get", + "summary": "Enable or disable the interface. Example value: true", + "operationId": "data_cocsn_interfaces_interface_interface_name_enabled_get", "parameters": [ + { + "type": "string", + "format": "string", + "description": "Interface name. Example value: en0", + "name": "interface-name", + "in": "path", + "required": true + }, { "enum": [ "config", @@ -4363,9 +5198,9 @@ func init() { ], "responses": { "200": { - "description": "OK", + "description": "Enable or disable the interface. Example value: true", "schema": { - "$ref": "#/definitions/data_cocsn_arp-table_arp-entry" + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_enabled" } }, "204": { @@ -4387,87 +5222,45 @@ func init() { "description": "Conflict" } } - } - }, - "/data/cocsn:arp-table/arp-entry={arp-entry-address}": { - "get": { + }, + "put": { "security": [ { "basicAuth": [] } ], + "description": "Enable or disable the interface. Example value: true", "produces": [ "application/yang-data+json" ], "tags": [ "data", - "get" + "put" ], - "operationId": "data_cocsn_arp_table_arp_entry_arp_entry_address_get", + "summary": "Enable or disable the interface. Example value: true", + "operationId": "data_cocsn_interfaces_interface_interface_name_enabled_put", "parameters": [ { "type": "string", "format": "string", - "description": "IP address of the arp entry", - "name": "arp-entry-address", + "description": "Interface name. Example value: en0", + "name": "interface-name", "in": "path", "required": true }, { - "enum": [ - "config", - "nonconfig", - "all" - ], - "type": "string", - "format": "enumeration", - "default": "config", - "description": "controlling descendant nodes in response", - "name": "content", - "in": "query" - }, - { - "type": "integer", - "format": "uint16", - "description": "limit the depth of nodes in response", - "name": "depth", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "optionally identify specific data nodes in response", - "name": "fields", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "xpath expression to filter data nodes in response", - "name": "filter", - "in": "query" - }, - { - "enum": [ - "report-all", - "trim", - "explicit", - "report-all-tagged" - ], - "type": "string", - "format": "enumeration", - "default": "report-all", - "description": "controlling default values in response", - "name": "with-defaults", - "in": "query" + "description": "Enable or disable the interface. Example value: true", + "name": "enabled", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_enabled" + } } ], "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/data_cocsn_arp-table_arp-entry_arp-entry-address" - } + "201": { + "description": "leaf enabled created or replaced" }, "204": { "description": "No Content" @@ -4488,92 +5281,77 @@ func init() { "description": "Conflict" } } - } - }, - "/data/cocsn:arp-table/arp-entry={arp-entry-address}/address": { - "get": { + }, + "delete": { "security": [ { "basicAuth": [] } ], - "description": "IP address of the arp entry", + "description": "Enable or disable the interface. Example value: true", "produces": [ "application/yang-data+json" ], "tags": [ "data", - "get" + "delete" ], - "summary": "IP address of the arp entry", - "operationId": "data_cocsn_arp_table_arp_entry_arp_entry_address_address_get", + "summary": "Enable or disable the interface. Example value: true", + "operationId": "data_cocsn_interfaces_interface_interface_name_enabled_delete", "parameters": [ { "type": "string", "format": "string", - "description": "IP address of the arp entry", - "name": "arp-entry-address", + "description": "Interface name. Example value: en0", + "name": "interface-name", "in": "path", "required": true - }, - { - "enum": [ - "config", - "nonconfig", - "all" - ], - "type": "string", - "format": "enumeration", - "default": "config", - "description": "controlling descendant nodes in response", - "name": "content", - "in": "query" - }, - { - "type": "integer", - "format": "uint16", - "description": "limit the depth of nodes in response", - "name": "depth", - "in": "query" - }, + } + ], + "responses": { + "204": { + "description": "No Content" + } + } + }, + "patch": { + "security": [ { - "type": "string", - "format": "string", - "description": "optionally identify specific data nodes in response", - "name": "fields", - "in": "query" - }, + "basicAuth": [] + } + ], + "description": "Enable or disable the interface. Example value: true", + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "patch" + ], + "summary": "Enable or disable the interface. Example value: true", + "operationId": "data_cocsn_interfaces_interface_interface_name_enabled_patch", + "parameters": [ { "type": "string", "format": "string", - "description": "xpath expression to filter data nodes in response", - "name": "filter", - "in": "query" - }, - { - "enum": [ - "report-all", - "trim", - "explicit", - "report-all-tagged" - ], - "type": "string", - "format": "enumeration", - "default": "report-all", - "description": "controlling default values in response", - "name": "with-defaults", - "in": "query" + "description": "Interface name. Example value: en0", + "name": "interface-name", + "in": "path", + "required": true + }, + { + "description": "Enable or disable the interface. Example value: true", + "name": "enabled", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_enabled" + } } ], "responses": { - "200": { - "description": "IP address of the arp entry", - "schema": { - "$ref": "#/definitions/data_cocsn_arp-table_arp-entry_arp-entry-address_address" - } - }, "204": { - "description": "No Content" + "description": "leaf enabled updated" }, "400": { "description": "Bad Request" @@ -4593,14 +5371,14 @@ func init() { } } }, - "/data/cocsn:arp-table/arp-entry={arp-entry-address}/interface": { + "/data/cocsn:interfaces/interface={interface-name}/name": { "get": { "security": [ { "basicAuth": [] } ], - "description": "Interface of the arp entry", + "description": "Interface name. Example value: en0", "produces": [ "application/yang-data+json" ], @@ -4608,14 +5386,14 @@ func init() { "data", "get" ], - "summary": "Interface of the arp entry", - "operationId": "data_cocsn_arp_table_arp_entry_arp_entry_address_interface_get", + "summary": "Interface name. Example value: en0", + "operationId": "data_cocsn_interfaces_interface_interface_name_name_get", "parameters": [ { "type": "string", "format": "string", - "description": "IP address of the arp entry", - "name": "arp-entry-address", + "description": "Interface name. Example value: en0", + "name": "interface-name", "in": "path", "required": true }, @@ -4670,9 +5448,9 @@ func init() { ], "responses": { "200": { - "description": "Interface of the arp entry", + "description": "Interface name. Example value: en0", "schema": { - "$ref": "#/definitions/data_cocsn_arp-table_arp-entry_arp-entry-address_interface" + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_name" } }, "204": { @@ -4694,92 +5472,136 @@ func init() { "description": "Conflict" } } - } - }, - "/data/cocsn:arp-table/arp-entry={arp-entry-address}/phs-address": { - "get": { + }, + "put": { "security": [ { "basicAuth": [] } ], - "description": "MAC address of the arp entry", + "description": "Interface name. Example value: en0", "produces": [ "application/yang-data+json" ], "tags": [ "data", - "get" + "put" ], - "summary": "MAC address of the arp entry", - "operationId": "data_cocsn_arp_table_arp_entry_arp_entry_address_phs_address_get", + "summary": "Interface name. Example value: en0", + "operationId": "data_cocsn_interfaces_interface_interface_name_name_put", "parameters": [ { "type": "string", "format": "string", - "description": "IP address of the arp entry", - "name": "arp-entry-address", + "description": "Interface name. Example value: en0", + "name": "interface-name", "in": "path", "required": true }, { - "enum": [ - "config", - "nonconfig", - "all" - ], - "type": "string", - "format": "enumeration", - "default": "config", - "description": "controlling descendant nodes in response", - "name": "content", - "in": "query" + "description": "Interface name. Example value: en0", + "name": "name", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_name" + } + } + ], + "responses": { + "201": { + "description": "leaf name created or replaced" }, - { - "type": "integer", - "format": "uint16", - "description": "limit the depth of nodes in response", - "name": "depth", - "in": "query" + "204": { + "description": "No Content" }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "405": { + "description": "Method Not Allowed" + }, + "409": { + "description": "Conflict" + } + } + }, + "delete": { + "security": [ + { + "basicAuth": [] + } + ], + "description": "Interface name. Example value: en0", + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "delete" + ], + "summary": "Interface name. Example value: en0", + "operationId": "data_cocsn_interfaces_interface_interface_name_name_delete", + "parameters": [ { "type": "string", "format": "string", - "description": "optionally identify specific data nodes in response", - "name": "fields", - "in": "query" - }, + "description": "Interface name. Example value: en0", + "name": "interface-name", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "No Content" + } + } + }, + "patch": { + "security": [ + { + "basicAuth": [] + } + ], + "description": "Interface name. Example value: en0", + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "patch" + ], + "summary": "Interface name. Example value: en0", + "operationId": "data_cocsn_interfaces_interface_interface_name_name_patch", + "parameters": [ { "type": "string", "format": "string", - "description": "xpath expression to filter data nodes in response", - "name": "filter", - "in": "query" + "description": "Interface name. Example value: en0", + "name": "interface-name", + "in": "path", + "required": true }, { - "enum": [ - "report-all", - "trim", - "explicit", - "report-all-tagged" - ], - "type": "string", - "format": "enumeration", - "default": "report-all", - "description": "controlling default values in response", - "name": "with-defaults", - "in": "query" + "description": "Interface name. Example value: en0", + "name": "name", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_name" + } } ], "responses": { - "200": { - "description": "MAC address of the arp entry", - "schema": { - "$ref": "#/definitions/data_cocsn_arp-table_arp-entry_arp-entry-address_phs-address" - } - }, "204": { - "description": "No Content" + "description": "leaf name updated" }, "400": { "description": "Bad Request" @@ -4799,13 +5621,14 @@ func init() { } } }, - "/data/cocsn:interfaces": { + "/data/cocsn:interfaces/interface={interface-name}/oper-status": { "get": { "security": [ { "basicAuth": [] } ], + "description": "Describes whether the interface is physically up or down", "produces": [ "application/yang-data+json" ], @@ -4813,8 +5636,17 @@ func init() { "data", "get" ], - "operationId": "data_cocsn_interfaces_get", + "summary": "Describes whether the interface is physically up or down", + "operationId": "data_cocsn_interfaces_interface_interface_name_oper_status_get", "parameters": [ + { + "type": "string", + "format": "string", + "description": "Interface name. Example value: en0", + "name": "interface-name", + "in": "path", + "required": true + }, { "enum": [ "config", @@ -4866,9 +5698,9 @@ func init() { ], "responses": { "200": { - "description": "OK", + "description": "Describes whether the interface is physically up or down", "schema": { - "$ref": "#/definitions/data_cocsn_interfaces" + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_oper-status" } }, "204": { @@ -4897,6 +5729,7 @@ func init() { "basicAuth": [] } ], + "description": "Describes whether the interface is physically up or down", "produces": [ "application/yang-data+json" ], @@ -4904,68 +5737,30 @@ func init() { "data", "put" ], - "operationId": "data_cocsn_interfaces_put", + "summary": "Describes whether the interface is physically up or down", + "operationId": "data_cocsn_interfaces_interface_interface_name_oper_status_put", "parameters": [ { - "name": "interfaces", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces" - } - } - ], - "responses": { - "201": { - "description": "container interfaces created or replaced" - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" + "type": "string", + "format": "string", + "description": "Interface name. Example value: en0", + "name": "interface-name", + "in": "path", + "required": true }, - "409": { - "description": "Conflict" - } - } - }, - "post": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "post" - ], - "operationId": "data_cocsn_interfaces_post", - "parameters": [ { - "name": "interfaces", + "description": "Describes whether the interface is physically up or down", + "name": "oper-status", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/data_cocsn_interfaces-post" + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_oper-status" } } ], "responses": { "201": { - "description": "container interfaces created" + "description": "leaf oper-status created or replaced" }, "204": { "description": "No Content" @@ -4993,6 +5788,7 @@ func init() { "basicAuth": [] } ], + "description": "Describes whether the interface is physically up or down", "produces": [ "application/yang-data+json" ], @@ -5000,7 +5796,18 @@ func init() { "data", "delete" ], - "operationId": "data_cocsn_interfaces_delete", + "summary": "Describes whether the interface is physically up or down", + "operationId": "data_cocsn_interfaces_interface_interface_name_oper_status_delete", + "parameters": [ + { + "type": "string", + "format": "string", + "description": "Interface name. Example value: en0", + "name": "interface-name", + "in": "path", + "required": true + } + ], "responses": { "204": { "description": "No Content" @@ -5013,6 +5820,7 @@ func init() { "basicAuth": [] } ], + "description": "Describes whether the interface is physically up or down", "produces": [ "application/yang-data+json" ], @@ -5020,20 +5828,30 @@ func init() { "data", "patch" ], - "operationId": "data_cocsn_interfaces_patch", + "summary": "Describes whether the interface is physically up or down", + "operationId": "data_cocsn_interfaces_interface_interface_name_oper_status_patch", "parameters": [ { - "name": "interfaces", + "type": "string", + "format": "string", + "description": "Interface name. Example value: en0", + "name": "interface-name", + "in": "path", + "required": true + }, + { + "description": "Describes whether the interface is physically up or down", + "name": "oper-status", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/data_cocsn_interfaces" + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_oper-status" } } ], "responses": { "204": { - "description": "container interfaces updated" + "description": "leaf oper-status updated" }, "400": { "description": "Bad Request" @@ -5053,13 +5871,14 @@ func init() { } } }, - "/data/cocsn:interfaces/interface": { + "/data/cocsn:interfaces/interface={interface-name}/phys-address": { "get": { "security": [ { "basicAuth": [] } ], + "description": "The interface's address at its protocol sub-layer. For\nexample, for an 802.x interface, this object normally\ncontains a Media Access Control (MAC) address. The\ninterface's media-specific modules must define the bit\nand byte ordering and the format of the value of this\nobject. For interfaces that do not have such an address\n(e.g., a serial line), this node is not present.", "produces": [ "application/yang-data+json" ], @@ -5067,8 +5886,17 @@ func init() { "data", "get" ], - "operationId": "data_cocsn_interfaces_interface_get", + "summary": "The interface's address at its protocol sub-layer. For\nexample, for an 802.x interface, this object normally\ncontains a Media Access Control (MAC) address. The\ninterface's media-specific modules must define the bit\nand byte ordering and the format of the value of this\nobject. For interfaces that do not have such an address\n(e.g., a serial line), this node is not present.", + "operationId": "data_cocsn_interfaces_interface_interface_name_phys_address_get", "parameters": [ + { + "type": "string", + "format": "string", + "description": "Interface name. Example value: en0", + "name": "interface-name", + "in": "path", + "required": true + }, { "enum": [ "config", @@ -5120,9 +5948,9 @@ func init() { ], "responses": { "200": { - "description": "OK", + "description": "The interface's address at its protocol sub-layer. For\nexample, for an 802.x interface, this object normally\ncontains a Media Access Control (MAC) address. The\ninterface's media-specific modules must define the bit\nand byte ordering and the format of the value of this\nobject. For interfaces that do not have such an address\n(e.g., a serial line), this node is not present.", "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface" + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_phys-address" } }, "204": { @@ -5146,7 +5974,7 @@ func init() { } } }, - "/data/cocsn:interfaces/interface={interface-name}": { + "/data/cocsn:routes": { "get": { "security": [ { @@ -5160,16 +5988,8 @@ func init() { "data", "get" ], - "operationId": "data_cocsn_interfaces_interface_interface_name_get", + "operationId": "data_cocsn_routes_get", "parameters": [ - { - "type": "string", - "format": "string", - "description": "Interface name. Example value: en0", - "name": "interface-name", - "in": "path", - "required": true - }, { "enum": [ "config", @@ -5223,7 +6043,7 @@ func init() { "200": { "description": "OK", "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name" + "$ref": "#/definitions/data_cocsn_routes" } }, "204": { @@ -5245,89 +6065,34 @@ func init() { "description": "Conflict" } } - } - }, - "/data/cocsn:interfaces/interface={interface-name}/addresses": { - "get": { + }, + "put": { "security": [ { "basicAuth": [] } ], - "description": "Interface IP address. Example value: 10.10.10.1", "produces": [ "application/yang-data+json" ], "tags": [ "data", - "get" + "put" ], - "summary": "Interface IP address. Example value: 10.10.10.1", - "operationId": "data_cocsn_interfaces_interface_interface_name_addresses_get", + "operationId": "data_cocsn_routes_put", "parameters": [ { - "type": "string", - "format": "string", - "description": "Interface name. Example value: en0", - "name": "interface-name", - "in": "path", - "required": true - }, - { - "enum": [ - "config", - "nonconfig", - "all" - ], - "type": "string", - "format": "enumeration", - "default": "config", - "description": "controlling descendant nodes in response", - "name": "content", - "in": "query" - }, - { - "type": "integer", - "format": "uint16", - "description": "limit the depth of nodes in response", - "name": "depth", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "optionally identify specific data nodes in response", - "name": "fields", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "xpath expression to filter data nodes in response", - "name": "filter", - "in": "query" - }, - { - "enum": [ - "report-all", - "trim", - "explicit", - "report-all-tagged" - ], - "type": "string", - "format": "enumeration", - "default": "report-all", - "description": "controlling default values in response", - "name": "with-defaults", - "in": "query" + "name": "routes", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_routes" + } } ], "responses": { - "200": { - "description": "Interface IP address. Example value: 10.10.10.1", - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_addresses" - } + "201": { + "description": "container routes created or replaced" }, "204": { "description": "No Content" @@ -5348,100 +6113,102 @@ func init() { "description": "Conflict" } } - } - }, - "/data/cocsn:interfaces/interface={interface-name}/addresses={addresses-id}": { - "get": { + }, + "post": { "security": [ { "basicAuth": [] } ], - "description": "Interface IP address. Example value: 10.10.10.1", "produces": [ "application/yang-data+json" ], "tags": [ "data", - "get" + "post" ], - "summary": "Interface IP address. Example value: 10.10.10.1", - "operationId": "data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_get", + "operationId": "data_cocsn_routes_post", "parameters": [ { - "type": "string", - "format": "string", - "description": "Interface name. Example value: en0", - "name": "interface-name", - "in": "path", - "required": true + "name": "routes", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_routes-post" + } + } + ], + "responses": { + "201": { + "description": "container routes created" }, - { - "type": "string", - "format": "string", - "description": "Interface IP address. Example value: 10.10.10.1", - "name": "addresses-id", - "in": "path", - "required": true + "204": { + "description": "No Content" }, - { - "enum": [ - "config", - "nonconfig", - "all" - ], - "type": "string", - "format": "enumeration", - "default": "config", - "description": "controlling descendant nodes in response", - "name": "content", - "in": "query" + "400": { + "description": "Bad Request" }, - { - "type": "integer", - "format": "uint16", - "description": "limit the depth of nodes in response", - "name": "depth", - "in": "query" + "401": { + "description": "Unauthorized" }, - { - "type": "string", - "format": "string", - "description": "optionally identify specific data nodes in response", - "name": "fields", - "in": "query" + "404": { + "description": "Not Found" }, - { - "type": "string", - "format": "string", - "description": "xpath expression to filter data nodes in response", - "name": "filter", - "in": "query" + "405": { + "description": "Method Not Allowed" }, + "409": { + "description": "Conflict" + } + } + }, + "delete": { + "security": [ { - "enum": [ - "report-all", - "trim", - "explicit", - "report-all-tagged" - ], - "type": "string", - "format": "enumeration", - "default": "report-all", - "description": "controlling default values in response", - "name": "with-defaults", - "in": "query" + "basicAuth": [] } ], + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "delete" + ], + "operationId": "data_cocsn_routes_delete", "responses": { - "200": { - "description": "Interface IP address. Example value: 10.10.10.1", + "204": { + "description": "No Content" + } + } + }, + "patch": { + "security": [ + { + "basicAuth": [] + } + ], + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "patch" + ], + "operationId": "data_cocsn_routes_patch", + "parameters": [ + { + "name": "routes", + "in": "body", + "required": true, "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_addresses_addresses-id" + "$ref": "#/definitions/data_cocsn_routes" } - }, + } + ], + "responses": { "204": { - "description": "No Content" + "description": "container routes updated" }, "400": { "description": "Bad Request" @@ -5461,14 +6228,14 @@ func init() { } } }, - "/data/cocsn:interfaces/interface={interface-name}/enabled": { + "/data/cocsn:routes/route": {}, + "/data/cocsn:routes/route={route-destination}": { "get": { "security": [ { "basicAuth": [] } ], - "description": "Enable or disable the interface. Example value: true", "produces": [ "application/yang-data+json" ], @@ -5476,14 +6243,13 @@ func init() { "data", "get" ], - "summary": "Enable or disable the interface. Example value: true", - "operationId": "data_cocsn_interfaces_interface_interface_name_enabled_get", + "operationId": "data_cocsn_routes_route_route_destination_get", "parameters": [ { "type": "string", "format": "string", - "description": "Interface name. Example value: en0", - "name": "interface-name", + "description": "Route destination. IP network", + "name": "route-destination", "in": "path", "required": true }, @@ -5538,9 +6304,9 @@ func init() { ], "responses": { "200": { - "description": "Enable or disable the interface. Example value: true", + "description": "OK", "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_enabled" + "$ref": "#/definitions/data_cocsn_routes_route_route-destination" } }, "204": { @@ -5562,92 +6328,149 @@ func init() { "description": "Conflict" } } - } - }, - "/data/cocsn:interfaces/interface={interface-name}/name": { - "get": { + }, + "put": { "security": [ { "basicAuth": [] } ], - "description": "Interface name. Example value: en0", "produces": [ "application/yang-data+json" ], "tags": [ "data", - "get" + "put" ], - "summary": "Interface name. Example value: en0", - "operationId": "data_cocsn_interfaces_interface_interface_name_name_get", + "operationId": "data_cocsn_routes_route_route_destination_put", "parameters": [ { "type": "string", "format": "string", - "description": "Interface name. Example value: en0", - "name": "interface-name", + "description": "Route destination. IP network", + "name": "route-destination", "in": "path", "required": true }, + { + "name": "route", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_routes_route_route-destination" + } + }, { "enum": [ - "config", - "nonconfig", - "all" + "first", + "last", + "before", + "after" ], "type": "string", "format": "enumeration", - "default": "config", - "description": "controlling descendant nodes in response", - "name": "content", + "default": "first", + "description": "controlling the order when adding new list elements", + "name": "insert", "in": "query" }, { - "type": "integer", - "format": "uint16", - "description": "limit the depth of nodes in response", - "name": "depth", + "type": "string", + "format": "string", + "description": "used to specify the insertion point", + "name": "point", "in": "query" + } + ], + "responses": { + "201": { + "description": "list route created or replaced" + }, + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "405": { + "description": "Method Not Allowed" }, + "409": { + "description": "Conflict" + } + } + }, + "delete": { + "security": [ + { + "basicAuth": [] + } + ], + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "delete" + ], + "operationId": "data_cocsn_routes_route_route_destination_delete", + "parameters": [ { "type": "string", "format": "string", - "description": "optionally identify specific data nodes in response", - "name": "fields", - "in": "query" - }, + "description": "Route destination. IP network", + "name": "route-destination", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "No Content" + } + } + }, + "patch": { + "security": [ + { + "basicAuth": [] + } + ], + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "patch" + ], + "operationId": "data_cocsn_routes_route_route_destination_patch", + "parameters": [ { "type": "string", "format": "string", - "description": "xpath expression to filter data nodes in response", - "name": "filter", - "in": "query" + "description": "Route destination. IP network", + "name": "route-destination", + "in": "path", + "required": true }, { - "enum": [ - "report-all", - "trim", - "explicit", - "report-all-tagged" - ], - "type": "string", - "format": "enumeration", - "default": "report-all", - "description": "controlling default values in response", - "name": "with-defaults", - "in": "query" + "name": "route", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_routes_route_route-destination" + } } ], "responses": { - "200": { - "description": "Interface name. Example value: en0", - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_name" - } - }, "204": { - "description": "No Content" + "description": "list route updated" }, "400": { "description": "Bad Request" @@ -5667,14 +6490,14 @@ func init() { } } }, - "/data/cocsn:interfaces/interface={interface-name}/oper-status": { + "/data/cocsn:routes/route={route-destination}/destination": { "get": { "security": [ { "basicAuth": [] } ], - "description": "Describes whether the interface is physically up or down", + "description": "Route destination. IP network", "produces": [ "application/yang-data+json" ], @@ -5682,14 +6505,14 @@ func init() { "data", "get" ], - "summary": "Describes whether the interface is physically up or down", - "operationId": "data_cocsn_interfaces_interface_interface_name_oper_status_get", + "summary": "Route destination. IP network", + "operationId": "data_cocsn_routes_route_route_destination_destination_get", "parameters": [ { "type": "string", "format": "string", - "description": "Interface name. Example value: en0", - "name": "interface-name", + "description": "Route destination. IP network", + "name": "route-destination", "in": "path", "required": true }, @@ -5744,9 +6567,9 @@ func init() { ], "responses": { "200": { - "description": "Describes whether the interface is physically up or down", + "description": "Route destination. IP network", "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_oper-status" + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_destination" } }, "204": { @@ -5768,92 +6591,136 @@ func init() { "description": "Conflict" } } - } - }, - "/data/cocsn:interfaces/interface={interface-name}/phys-address": { - "get": { + }, + "put": { "security": [ { "basicAuth": [] } ], - "description": "The interface's address at its protocol sub-layer. For\nexample, for an 802.x interface, this object normally\ncontains a Media Access Control (MAC) address. The\ninterface's media-specific modules must define the bit\nand byte ordering and the format of the value of this\nobject. For interfaces that do not have such an address\n(e.g., a serial line), this node is not present.", + "description": "Route destination. IP network", "produces": [ "application/yang-data+json" ], "tags": [ "data", - "get" + "put" ], - "summary": "The interface's address at its protocol sub-layer. For\nexample, for an 802.x interface, this object normally\ncontains a Media Access Control (MAC) address. The\ninterface's media-specific modules must define the bit\nand byte ordering and the format of the value of this\nobject. For interfaces that do not have such an address\n(e.g., a serial line), this node is not present.", - "operationId": "data_cocsn_interfaces_interface_interface_name_phys_address_get", + "summary": "Route destination. IP network", + "operationId": "data_cocsn_routes_route_route_destination_destination_put", "parameters": [ { "type": "string", "format": "string", - "description": "Interface name. Example value: en0", - "name": "interface-name", + "description": "Route destination. IP network", + "name": "route-destination", "in": "path", "required": true }, { - "enum": [ - "config", - "nonconfig", - "all" - ], - "type": "string", - "format": "enumeration", - "default": "config", - "description": "controlling descendant nodes in response", - "name": "content", - "in": "query" + "description": "Route destination. IP network", + "name": "destination", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_destination" + } + } + ], + "responses": { + "201": { + "description": "leaf destination created or replaced" }, - { - "type": "integer", - "format": "uint16", - "description": "limit the depth of nodes in response", - "name": "depth", - "in": "query" + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "405": { + "description": "Method Not Allowed" }, + "409": { + "description": "Conflict" + } + } + }, + "delete": { + "security": [ + { + "basicAuth": [] + } + ], + "description": "Route destination. IP network", + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "delete" + ], + "summary": "Route destination. IP network", + "operationId": "data_cocsn_routes_route_route_destination_destination_delete", + "parameters": [ { "type": "string", "format": "string", - "description": "optionally identify specific data nodes in response", - "name": "fields", - "in": "query" - }, + "description": "Route destination. IP network", + "name": "route-destination", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "No Content" + } + } + }, + "patch": { + "security": [ + { + "basicAuth": [] + } + ], + "description": "Route destination. IP network", + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "patch" + ], + "summary": "Route destination. IP network", + "operationId": "data_cocsn_routes_route_route_destination_destination_patch", + "parameters": [ { "type": "string", "format": "string", - "description": "xpath expression to filter data nodes in response", - "name": "filter", - "in": "query" + "description": "Route destination. IP network", + "name": "route-destination", + "in": "path", + "required": true }, { - "enum": [ - "report-all", - "trim", - "explicit", - "report-all-tagged" - ], - "type": "string", - "format": "enumeration", - "default": "report-all", - "description": "controlling default values in response", - "name": "with-defaults", - "in": "query" + "description": "Route destination. IP network", + "name": "destination", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_destination" + } } ], "responses": { - "200": { - "description": "The interface's address at its protocol sub-layer. For\nexample, for an 802.x interface, this object normally\ncontains a Media Access Control (MAC) address. The\ninterface's media-specific modules must define the bit\nand byte ordering and the format of the value of this\nobject. For interfaces that do not have such an address\n(e.g., a serial line), this node is not present.", - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_phys-address" - } - }, "204": { - "description": "No Content" + "description": "leaf destination updated" }, "400": { "description": "Bad Request" @@ -5873,13 +6740,14 @@ func init() { } } }, - "/data/cocsn:routes": { + "/data/cocsn:routes/route={route-destination}/expire": { "get": { "security": [ { "basicAuth": [] } ], + "description": "Expiration timer of the route", "produces": [ "application/yang-data+json" ], @@ -5887,8 +6755,17 @@ func init() { "data", "get" ], - "operationId": "data_cocsn_routes_get", + "summary": "Expiration timer of the route", + "operationId": "data_cocsn_routes_route_route_destination_expire_get", "parameters": [ + { + "type": "string", + "format": "string", + "description": "Route destination. IP network", + "name": "route-destination", + "in": "path", + "required": true + }, { "enum": [ "config", @@ -5940,9 +6817,9 @@ func init() { ], "responses": { "200": { - "description": "OK", + "description": "Expiration timer of the route", "schema": { - "$ref": "#/definitions/data_cocsn_routes" + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_expire" } }, "204": { @@ -5971,6 +6848,7 @@ func init() { "basicAuth": [] } ], + "description": "Expiration timer of the route", "produces": [ "application/yang-data+json" ], @@ -5978,68 +6856,30 @@ func init() { "data", "put" ], - "operationId": "data_cocsn_routes_put", + "summary": "Expiration timer of the route", + "operationId": "data_cocsn_routes_route_route_destination_expire_put", "parameters": [ { - "name": "routes", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/data_cocsn_routes" - } - } - ], - "responses": { - "201": { - "description": "container routes created or replaced" - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" + "type": "string", + "format": "string", + "description": "Route destination. IP network", + "name": "route-destination", + "in": "path", + "required": true }, - "409": { - "description": "Conflict" - } - } - }, - "post": { - "security": [ - { - "basicAuth": [] - } - ], - "produces": [ - "application/yang-data+json" - ], - "tags": [ - "data", - "post" - ], - "operationId": "data_cocsn_routes_post", - "parameters": [ { - "name": "routes", + "description": "Expiration timer of the route", + "name": "expire", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/data_cocsn_routes-post" + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_expire" } } ], "responses": { "201": { - "description": "container routes created" + "description": "leaf expire created or replaced" }, "204": { "description": "No Content" @@ -6067,6 +6907,7 @@ func init() { "basicAuth": [] } ], + "description": "Expiration timer of the route", "produces": [ "application/yang-data+json" ], @@ -6074,7 +6915,18 @@ func init() { "data", "delete" ], - "operationId": "data_cocsn_routes_delete", + "summary": "Expiration timer of the route", + "operationId": "data_cocsn_routes_route_route_destination_expire_delete", + "parameters": [ + { + "type": "string", + "format": "string", + "description": "Route destination. IP network", + "name": "route-destination", + "in": "path", + "required": true + } + ], "responses": { "204": { "description": "No Content" @@ -6087,6 +6939,7 @@ func init() { "basicAuth": [] } ], + "description": "Expiration timer of the route", "produces": [ "application/yang-data+json" ], @@ -6094,20 +6947,30 @@ func init() { "data", "patch" ], - "operationId": "data_cocsn_routes_patch", + "summary": "Expiration timer of the route", + "operationId": "data_cocsn_routes_route_route_destination_expire_patch", "parameters": [ { - "name": "routes", + "type": "string", + "format": "string", + "description": "Route destination. IP network", + "name": "route-destination", + "in": "path", + "required": true + }, + { + "description": "Expiration timer of the route", + "name": "expire", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/data_cocsn_routes" + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_expire" } } ], "responses": { "204": { - "description": "container routes updated" + "description": "leaf expire updated" }, "400": { "description": "Bad Request" @@ -6127,13 +6990,14 @@ func init() { } } }, - "/data/cocsn:routes/route": { + "/data/cocsn:routes/route={route-destination}/flags": { "get": { "security": [ { "basicAuth": [] } ], + "description": "Flags of the route", "produces": [ "application/yang-data+json" ], @@ -6141,8 +7005,17 @@ func init() { "data", "get" ], - "operationId": "data_cocsn_routes_route_get", + "summary": "Flags of the route", + "operationId": "data_cocsn_routes_route_route_destination_flags_get", "parameters": [ + { + "type": "string", + "format": "string", + "description": "Route destination. IP network", + "name": "route-destination", + "in": "path", + "required": true + }, { "enum": [ "config", @@ -6194,10 +7067,69 @@ func init() { ], "responses": { "200": { - "description": "OK", + "description": "Flags of the route", + "schema": { + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_flags" + } + }, + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "405": { + "description": "Method Not Allowed" + }, + "409": { + "description": "Conflict" + } + } + }, + "put": { + "security": [ + { + "basicAuth": [] + } + ], + "description": "Flags of the route", + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "put" + ], + "summary": "Flags of the route", + "operationId": "data_cocsn_routes_route_route_destination_flags_put", + "parameters": [ + { + "type": "string", + "format": "string", + "description": "Route destination. IP network", + "name": "route-destination", + "in": "path", + "required": true + }, + { + "description": "Flags of the route", + "name": "flags", + "in": "body", + "required": true, "schema": { - "$ref": "#/definitions/data_cocsn_routes_route" + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_flags" } + } + ], + "responses": { + "201": { + "description": "leaf flags created or replaced" }, "204": { "description": "No Content" @@ -6218,23 +7150,55 @@ func init() { "description": "Conflict" } } - } - }, - "/data/cocsn:routes/route={route-destination}": { - "get": { + }, + "delete": { + "security": [ + { + "basicAuth": [] + } + ], + "description": "Flags of the route", + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "delete" + ], + "summary": "Flags of the route", + "operationId": "data_cocsn_routes_route_route_destination_flags_delete", + "parameters": [ + { + "type": "string", + "format": "string", + "description": "Route destination. IP network", + "name": "route-destination", + "in": "path", + "required": true + } + ], + "responses": { + "204": { + "description": "No Content" + } + } + }, + "patch": { "security": [ { "basicAuth": [] } ], + "description": "Flags of the route", "produces": [ "application/yang-data+json" ], "tags": [ "data", - "get" + "patch" ], - "operationId": "data_cocsn_routes_route_route_destination_get", + "summary": "Flags of the route", + "operationId": "data_cocsn_routes_route_route_destination_flags_patch", "parameters": [ { "type": "string", @@ -6245,63 +7209,18 @@ func init() { "required": true }, { - "enum": [ - "config", - "nonconfig", - "all" - ], - "type": "string", - "format": "enumeration", - "default": "config", - "description": "controlling descendant nodes in response", - "name": "content", - "in": "query" - }, - { - "type": "integer", - "format": "uint16", - "description": "limit the depth of nodes in response", - "name": "depth", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "optionally identify specific data nodes in response", - "name": "fields", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "xpath expression to filter data nodes in response", - "name": "filter", - "in": "query" - }, - { - "enum": [ - "report-all", - "trim", - "explicit", - "report-all-tagged" - ], - "type": "string", - "format": "enumeration", - "default": "report-all", - "description": "controlling default values in response", - "name": "with-defaults", - "in": "query" + "description": "Flags of the route", + "name": "flags", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_flags" + } } ], "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination" - } - }, "204": { - "description": "No Content" + "description": "leaf flags updated" }, "400": { "description": "Bad Request" @@ -6321,14 +7240,14 @@ func init() { } } }, - "/data/cocsn:routes/route={route-destination}/destination": { + "/data/cocsn:routes/route={route-destination}/gateway": { "get": { "security": [ { "basicAuth": [] } ], - "description": "Route destination. IP network", + "description": "Route gateway. IP address or host name", "produces": [ "application/yang-data+json" ], @@ -6336,8 +7255,8 @@ func init() { "data", "get" ], - "summary": "Route destination. IP network", - "operationId": "data_cocsn_routes_route_route_destination_destination_get", + "summary": "Route gateway. IP address or host name", + "operationId": "data_cocsn_routes_route_route_destination_gateway_get", "parameters": [ { "type": "string", @@ -6398,9 +7317,9 @@ func init() { ], "responses": { "200": { - "description": "Route destination. IP network", + "description": "Route gateway. IP address or host name", "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_destination" + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_gateway" } }, "204": { @@ -6422,25 +7341,23 @@ func init() { "description": "Conflict" } } - } - }, - "/data/cocsn:routes/route={route-destination}/expire": { - "get": { + }, + "put": { "security": [ { "basicAuth": [] } ], - "description": "Expiration timer of the route", + "description": "Route gateway. IP address or host name", "produces": [ "application/yang-data+json" ], "tags": [ "data", - "get" + "put" ], - "summary": "Expiration timer of the route", - "operationId": "data_cocsn_routes_route_route_destination_expire_get", + "summary": "Route gateway. IP address or host name", + "operationId": "data_cocsn_routes_route_route_destination_gateway_put", "parameters": [ { "type": "string", @@ -6451,60 +7368,18 @@ func init() { "required": true }, { - "enum": [ - "config", - "nonconfig", - "all" - ], - "type": "string", - "format": "enumeration", - "default": "config", - "description": "controlling descendant nodes in response", - "name": "content", - "in": "query" - }, - { - "type": "integer", - "format": "uint16", - "description": "limit the depth of nodes in response", - "name": "depth", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "optionally identify specific data nodes in response", - "name": "fields", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "xpath expression to filter data nodes in response", - "name": "filter", - "in": "query" - }, - { - "enum": [ - "report-all", - "trim", - "explicit", - "report-all-tagged" - ], - "type": "string", - "format": "enumeration", - "default": "report-all", - "description": "controlling default values in response", - "name": "with-defaults", - "in": "query" + "description": "Route gateway. IP address or host name", + "name": "gateway", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_gateway" + } } ], "responses": { - "200": { - "description": "Expiration timer of the route", - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_expire" - } + "201": { + "description": "leaf gateway created or replaced" }, "204": { "description": "No Content" @@ -6525,25 +7400,23 @@ func init() { "description": "Conflict" } } - } - }, - "/data/cocsn:routes/route={route-destination}/flags": { - "get": { + }, + "delete": { "security": [ { "basicAuth": [] } ], - "description": "Flags of the route", + "description": "Route gateway. IP address or host name", "produces": [ "application/yang-data+json" ], "tags": [ "data", - "get" + "delete" ], - "summary": "Flags of the route", - "operationId": "data_cocsn_routes_route_route_destination_flags_get", + "summary": "Route gateway. IP address or host name", + "operationId": "data_cocsn_routes_route_route_destination_gateway_delete", "parameters": [ { "type": "string", @@ -6552,65 +7425,52 @@ func init() { "name": "route-destination", "in": "path", "required": true - }, - { - "enum": [ - "config", - "nonconfig", - "all" - ], - "type": "string", - "format": "enumeration", - "default": "config", - "description": "controlling descendant nodes in response", - "name": "content", - "in": "query" - }, - { - "type": "integer", - "format": "uint16", - "description": "limit the depth of nodes in response", - "name": "depth", - "in": "query" - }, + } + ], + "responses": { + "204": { + "description": "No Content" + } + } + }, + "patch": { + "security": [ { - "type": "string", - "format": "string", - "description": "optionally identify specific data nodes in response", - "name": "fields", - "in": "query" - }, + "basicAuth": [] + } + ], + "description": "Route gateway. IP address or host name", + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "patch" + ], + "summary": "Route gateway. IP address or host name", + "operationId": "data_cocsn_routes_route_route_destination_gateway_patch", + "parameters": [ { "type": "string", "format": "string", - "description": "xpath expression to filter data nodes in response", - "name": "filter", - "in": "query" + "description": "Route destination. IP network", + "name": "route-destination", + "in": "path", + "required": true }, { - "enum": [ - "report-all", - "trim", - "explicit", - "report-all-tagged" - ], - "type": "string", - "format": "enumeration", - "default": "report-all", - "description": "controlling default values in response", - "name": "with-defaults", - "in": "query" + "description": "Route gateway. IP address or host name", + "name": "gateway", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_gateway" + } } ], "responses": { - "200": { - "description": "Flags of the route", - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_flags" - } - }, "204": { - "description": "No Content" + "description": "leaf gateway updated" }, "400": { "description": "Bad Request" @@ -6630,14 +7490,14 @@ func init() { } } }, - "/data/cocsn:routes/route={route-destination}/gateway": { + "/data/cocsn:routes/route={route-destination}/interface": { "get": { "security": [ { "basicAuth": [] } ], - "description": "Route gateway. IP address or host name", + "description": "Interface used for the route", "produces": [ "application/yang-data+json" ], @@ -6645,8 +7505,8 @@ func init() { "data", "get" ], - "summary": "Route gateway. IP address or host name", - "operationId": "data_cocsn_routes_route_route_destination_gateway_get", + "summary": "Interface used for the route", + "operationId": "data_cocsn_routes_route_route_destination_interface_get", "parameters": [ { "type": "string", @@ -6707,9 +7567,9 @@ func init() { ], "responses": { "200": { - "description": "Route gateway. IP address or host name", + "description": "Interface used for the route", "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_gateway" + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_interface" } }, "204": { @@ -6731,10 +7591,8 @@ func init() { "description": "Conflict" } } - } - }, - "/data/cocsn:routes/route={route-destination}/interface": { - "get": { + }, + "put": { "security": [ { "basicAuth": [] @@ -6746,10 +7604,10 @@ func init() { ], "tags": [ "data", - "get" + "put" ], "summary": "Interface used for the route", - "operationId": "data_cocsn_routes_route_route_destination_interface_get", + "operationId": "data_cocsn_routes_route_route_destination_interface_put", "parameters": [ { "type": "string", @@ -6760,60 +7618,18 @@ func init() { "required": true }, { - "enum": [ - "config", - "nonconfig", - "all" - ], - "type": "string", - "format": "enumeration", - "default": "config", - "description": "controlling descendant nodes in response", - "name": "content", - "in": "query" - }, - { - "type": "integer", - "format": "uint16", - "description": "limit the depth of nodes in response", - "name": "depth", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "optionally identify specific data nodes in response", - "name": "fields", - "in": "query" - }, - { - "type": "string", - "format": "string", - "description": "xpath expression to filter data nodes in response", - "name": "filter", - "in": "query" - }, - { - "enum": [ - "report-all", - "trim", - "explicit", - "report-all-tagged" - ], - "type": "string", - "format": "enumeration", - "default": "report-all", - "description": "controlling default values in response", - "name": "with-defaults", - "in": "query" - } - ], - "responses": { - "200": { "description": "Interface used for the route", + "name": "interface", + "in": "body", + "required": true, "schema": { "$ref": "#/definitions/data_cocsn_routes_route_route-destination_interface" } + } + ], + "responses": { + "201": { + "description": "leaf interface created or replaced" }, "204": { "description": "No Content" @@ -6834,34 +7650,77 @@ func init() { "description": "Conflict" } } - } - }, - "/operations": { - "get": { + }, + "delete": { "security": [ { "basicAuth": [] } ], - "description": "This YANG module represents the CoCSN API", + "description": "Interface used for the route", "produces": [ "application/yang-data+json" ], "tags": [ - "operations", - "get" + "data", + "delete" + ], + "summary": "Interface used for the route", + "operationId": "data_cocsn_routes_route_route_destination_interface_delete", + "parameters": [ + { + "type": "string", + "format": "string", + "description": "Route destination. IP network", + "name": "route-destination", + "in": "path", + "required": true + } ], - "summary": "This YANG module represents the CoCSN API", - "operationId": "operations_get", "responses": { - "200": { - "description": "This YANG module represents the CoCSN API", + "204": { + "description": "No Content" + } + } + }, + "patch": { + "security": [ + { + "basicAuth": [] + } + ], + "description": "Interface used for the route", + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "data", + "patch" + ], + "summary": "Interface used for the route", + "operationId": "data_cocsn_routes_route_route_destination_interface_patch", + "parameters": [ + { + "type": "string", + "format": "string", + "description": "Route destination. IP network", + "name": "route-destination", + "in": "path", + "required": true + }, + { + "description": "Interface used for the route", + "name": "interface", + "in": "body", + "required": true, "schema": { - "$ref": "#/definitions/operations" + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_interface" } - }, + } + ], + "responses": { "204": { - "description": "No Content" + "description": "leaf interface updated" }, "400": { "description": "Bad Request" @@ -6881,7 +7740,7 @@ func init() { } } }, - "/yang-library-version": { + "/operations": { "get": { "security": [ { @@ -6893,16 +7752,16 @@ func init() { "application/yang-data+json" ], "tags": [ - "yang-library-version", + "operations", "get" ], "summary": "This YANG module represents the CoCSN API", - "operationId": "yang_library_version_get", + "operationId": "operations_get", "responses": { "200": { "description": "This YANG module represents the CoCSN API", "schema": { - "$ref": "#/definitions/yang-library-version" + "$ref": "#/definitions/operations" } }, "204": { @@ -6921,149 +7780,58 @@ func init() { "description": "Method Not Allowed" }, "409": { - "description": "Conflict" - } - } - } - } - }, - "definitions": { - "DataCocsnArpTableArpEntryArpEntryAddressCocsnArpEntryItems0": { - "type": "object", - "properties": { - "address": { - "description": "IP address of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "interface": { - "description": "Interface of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "phs-address": { - "description": "MAC address of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "DataCocsnArpTableArpEntryCocsnArpEntryItems0": { - "type": "object", - "properties": { - "address": { - "description": "IP address of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "interface": { - "description": "Interface of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "phs-address": { - "description": "MAC address of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "DataCocsnArpTableCocsnArpTable": { - "description": "(non-presence)", - "type": "object", - "properties": { - "arp-entry": { - "description": "(list)", - "type": "array", - "items": { - "$ref": "#/definitions/DataCocsnArpTableCocsnArpTableArpEntryItems0" - }, - "x-yang": { - "type": "list" - } - } - }, - "x-yang": { - "is_presence": "false", - "type": "container" - } - }, - "DataCocsnArpTableCocsnArpTableArpEntryItems0": { - "type": "object", - "properties": { - "address": { - "description": "IP address of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "interface": { - "description": "Interface of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "phs-address": { - "description": "MAC address of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "DataCocsnArpTablePostCocsnArpEntryItems0": { - "type": "object", - "properties": { - "address": { - "description": "IP address of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "interface": { - "description": "Interface of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "phs-address": { - "description": "MAC address of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" + "description": "Conflict" } } } }, + "/yang-library-version": { + "get": { + "security": [ + { + "basicAuth": [] + } + ], + "description": "This YANG module represents the CoCSN API", + "produces": [ + "application/yang-data+json" + ], + "tags": [ + "yang-library-version", + "get" + ], + "summary": "This YANG module represents the CoCSN API", + "operationId": "yang_library_version_get", + "responses": { + "200": { + "description": "This YANG module represents the CoCSN API", + "schema": { + "$ref": "#/definitions/yang-library-version" + } + }, + "204": { + "description": "No Content" + }, + "400": { + "description": "Bad Request" + }, + "401": { + "description": "Unauthorized" + }, + "404": { + "description": "Not Found" + }, + "405": { + "description": "Method Not Allowed" + }, + "409": { + "description": "Conflict" + } + } + } + } + }, + "definitions": { "DataCocsnInterfacesCocsnInterfaces": { "description": "(non-presence)", "type": "object", @@ -7137,59 +7905,6 @@ func init() { } } }, - "DataCocsnInterfacesInterfaceCocsnInterfaceItems0": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "items": { - "description": "Interface IP address. Example value: 10.10.10.1 (leaf-list)", - "type": "string", - "format": "string" - }, - "x-yang": { - "type": "leaf-list" - } - }, - "enabled": { - "description": "Enable or disable the interface. Example value: true (leaf)", - "type": "string", - "format": "boolean", - "x-yang": { - "type": "leaf" - } - }, - "name": { - "description": "Interface name. Example value: en0 (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "oper-status": { - "description": "Describes whether the interface is physically up or down (leaf)", - "type": "string", - "format": "enumeration", - "default": "up", - "enum": [ - "up", - "down" - ], - "x-yang": { - "type": "leaf" - } - }, - "phys-address": { - "description": "The interface's address at its protocol sub-layer. For\nexample, for an 802.x interface, this object normally\ncontains a Media Access Control (MAC) address. The\ninterface's media-specific modules must define the bit\nand byte ordering and the format of the value of this\nobject. For interfaces that do not have such an address\n(e.g., a serial line), this node is not present. (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, "DataCocsnInterfacesInterfaceInterfaceNameCocsnInterfaceItems0": { "type": "object", "properties": { @@ -7406,51 +8121,6 @@ func init() { } } }, - "DataCocsnRoutesRouteCocsnRouteItems0": { - "type": "object", - "properties": { - "destination": { - "description": "Route destination. IP network (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "expire": { - "description": "Expiration timer of the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "flags": { - "description": "Flags of the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "gateway": { - "description": "Route gateway. IP address or host name (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "interface": { - "description": "Interface used for the route (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, "DataCocsnRoutesRouteRouteDestinationCocsnRouteItems0": { "type": "object", "properties": { @@ -7496,55 +8166,6 @@ func init() { } } }, - "DataPostCocsnArpTable": { - "description": "(non-presence)", - "type": "object", - "properties": { - "arp-entry": { - "description": "(list)", - "type": "array", - "items": { - "$ref": "#/definitions/DataPostCocsnArpTableArpEntryItems0" - }, - "x-yang": { - "type": "list" - } - } - }, - "x-yang": { - "is_presence": "false", - "type": "container" - } - }, - "DataPostCocsnArpTableArpEntryItems0": { - "type": "object", - "properties": { - "address": { - "description": "IP address of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "interface": { - "description": "Interface of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "phs-address": { - "description": "MAC address of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, "DataPostCocsnInterfaces": { "description": "(non-presence)", "type": "object", @@ -7687,26 +8308,6 @@ func init() { "description": "This YANG module represents the CoCSN API", "type": "object", "properties": { - "cocsn:arp-table": { - "description": "(non-presence)", - "type": "object", - "properties": { - "arp-entry": { - "description": "(list)", - "type": "array", - "items": { - "$ref": "#/definitions/DataPutPatchIetfRestconfDataCocsnArpTableArpEntryItems0" - }, - "x-yang": { - "type": "list" - } - } - }, - "x-yang": { - "is_presence": "false", - "type": "container" - } - }, "cocsn:interfaces": { "description": "(non-presence)", "type": "object", @@ -7731,74 +8332,25 @@ func init() { "description": "(non-presence)", "type": "object", "properties": { - "route": { - "description": "(list)", - "type": "array", - "items": { - "$ref": "#/definitions/DataPutPatchIetfRestconfDataCocsnRoutesRouteItems0" - }, - "x-yang": { - "type": "list" - } - } - }, - "x-yang": { - "is_presence": "false", - "type": "container" - } - } - }, - "x-yang": { - "type": "datastore" - } - }, - "DataPutPatchIetfRestconfDataCocsnArpTable": { - "description": "(non-presence)", - "type": "object", - "properties": { - "arp-entry": { - "description": "(list)", - "type": "array", - "items": { - "$ref": "#/definitions/DataPutPatchIetfRestconfDataCocsnArpTableArpEntryItems0" - }, - "x-yang": { - "type": "list" - } - } - }, - "x-yang": { - "is_presence": "false", - "type": "container" - } - }, - "DataPutPatchIetfRestconfDataCocsnArpTableArpEntryItems0": { - "type": "object", - "properties": { - "address": { - "description": "IP address of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "interface": { - "description": "Interface of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - }, - "phs-address": { - "description": "MAC address of the arp entry (leaf)", - "type": "string", - "format": "string", + "route": { + "description": "(list)", + "type": "array", + "items": { + "$ref": "#/definitions/DataPutPatchIetfRestconfDataCocsnRoutesRouteItems0" + }, + "x-yang": { + "type": "list" + } + } + }, "x-yang": { - "type": "leaf" + "is_presence": "false", + "type": "container" } } + }, + "x-yang": { + "type": "datastore" } }, "DataPutPatchIetfRestconfDataCocsnInterfaces": { @@ -7972,26 +8524,6 @@ func init() { "data-post": { "type": "object", "properties": { - "cocsn:arp-table": { - "description": "(non-presence)", - "type": "object", - "properties": { - "arp-entry": { - "description": "(list)", - "type": "array", - "items": { - "$ref": "#/definitions/DataPostCocsnArpTableArpEntryItems0" - }, - "x-yang": { - "type": "list" - } - } - }, - "x-yang": { - "is_presence": "false", - "type": "container" - } - }, "cocsn:interfaces": { "description": "(non-presence)", "type": "object", @@ -8041,26 +8573,6 @@ func init() { "description": "This YANG module represents the CoCSN API", "type": "object", "properties": { - "cocsn:arp-table": { - "description": "(non-presence)", - "type": "object", - "properties": { - "arp-entry": { - "description": "(list)", - "type": "array", - "items": { - "$ref": "#/definitions/DataPutPatchIetfRestconfDataCocsnArpTableArpEntryItems0" - }, - "x-yang": { - "type": "list" - } - } - }, - "x-yang": { - "is_presence": "false", - "type": "container" - } - }, "cocsn:interfaces": { "description": "(non-presence)", "type": "object", @@ -8108,115 +8620,6 @@ func init() { } } }, - "data_cocsn_arp-table": { - "type": "object", - "properties": { - "cocsn:arp-table": { - "description": "(non-presence)", - "type": "object", - "properties": { - "arp-entry": { - "description": "(list)", - "type": "array", - "items": { - "$ref": "#/definitions/DataCocsnArpTableCocsnArpTableArpEntryItems0" - }, - "x-yang": { - "type": "list" - } - } - }, - "x-yang": { - "is_presence": "false", - "type": "container" - } - } - } - }, - "data_cocsn_arp-table-post": { - "type": "object", - "properties": { - "cocsn:arp-entry": { - "description": "(list)", - "type": "array", - "items": { - "$ref": "#/definitions/DataCocsnArpTablePostCocsnArpEntryItems0" - }, - "x-yang": { - "type": "list" - } - } - } - }, - "data_cocsn_arp-table_arp-entry": { - "type": "object", - "properties": { - "cocsn:arp-entry": { - "description": "(list)", - "type": "array", - "items": { - "$ref": "#/definitions/DataCocsnArpTableArpEntryCocsnArpEntryItems0" - }, - "x-yang": { - "type": "list" - } - } - } - }, - "data_cocsn_arp-table_arp-entry_arp-entry-address": { - "type": "object", - "properties": { - "cocsn:arp-entry": { - "description": "(list)", - "type": "array", - "items": { - "$ref": "#/definitions/DataCocsnArpTableArpEntryArpEntryAddressCocsnArpEntryItems0" - }, - "x-yang": { - "type": "list" - } - } - } - }, - "data_cocsn_arp-table_arp-entry_arp-entry-address_address": { - "type": "object", - "properties": { - "cocsn:address": { - "description": "IP address of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "data_cocsn_arp-table_arp-entry_arp-entry-address_interface": { - "type": "object", - "properties": { - "cocsn:interface": { - "description": "Interface of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, - "data_cocsn_arp-table_arp-entry_arp-entry-address_phs-address": { - "type": "object", - "properties": { - "cocsn:phs-address": { - "description": "MAC address of the arp entry (leaf)", - "type": "string", - "format": "string", - "x-yang": { - "type": "leaf" - } - } - } - }, "data_cocsn_interfaces": { "type": "object", "properties": { @@ -8257,21 +8660,6 @@ func init() { } } }, - "data_cocsn_interfaces_interface": { - "type": "object", - "properties": { - "cocsn:interface": { - "description": "(list)", - "type": "array", - "items": { - "$ref": "#/definitions/DataCocsnInterfacesInterfaceCocsnInterfaceItems0" - }, - "x-yang": { - "type": "list" - } - } - } - }, "data_cocsn_interfaces_interface_interface-name": { "type": "object", "properties": { @@ -8287,22 +8675,6 @@ func init() { } } }, - "data_cocsn_interfaces_interface_interface-name_addresses": { - "type": "object", - "properties": { - "cocsn:addresses": { - "type": "array", - "items": { - "description": "Interface IP address. Example value: 10.10.10.1 (leaf-list)", - "type": "string", - "format": "string" - }, - "x-yang": { - "type": "leaf-list" - } - } - } - }, "data_cocsn_interfaces_interface_interface-name_addresses_addresses-id": { "type": "object", "properties": { @@ -8416,21 +8788,6 @@ func init() { } } }, - "data_cocsn_routes_route": { - "type": "object", - "properties": { - "cocsn:route": { - "description": "(list)", - "type": "array", - "items": { - "$ref": "#/definitions/DataCocsnRoutesRouteCocsnRouteItems0" - }, - "x-yang": { - "type": "list" - } - } - } - }, "data_cocsn_routes_route_route-destination": { "type": "object", "properties": { @@ -8568,14 +8925,6 @@ func init() { "in": "path", "required": true }, - "arp-entry-address": { - "type": "string", - "format": "string", - "description": "IP address of the arp entry", - "name": "arp-entry-address", - "in": "path", - "required": true - }, "content": { "enum": [ "config", @@ -8607,36 +8956,64 @@ func init() { "$ref": "#/definitions/data-put-patch" } }, - "data_cocsn_arp-table": { - "name": "arp-table", + "data_cocsn_interfaces": { + "name": "interfaces", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/data_cocsn_arp-table" + "$ref": "#/definitions/data_cocsn_interfaces" } }, - "data_cocsn_arp-table-post": { - "name": "arp-table", + "data_cocsn_interfaces-post": { + "name": "interfaces", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/data_cocsn_arp-table-post" + "$ref": "#/definitions/data_cocsn_interfaces-post" } }, - "data_cocsn_interfaces": { - "name": "interfaces", + "data_cocsn_interfaces_interface_interface-name": { + "name": "interface", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/data_cocsn_interfaces" + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name" } }, - "data_cocsn_interfaces-post": { - "name": "interfaces", + "data_cocsn_interfaces_interface_interface-name_addresses_addresses-id": { + "description": "Interface IP address. Example value: 10.10.10.1", + "name": "addresses", "in": "body", "required": true, "schema": { - "$ref": "#/definitions/data_cocsn_interfaces-post" + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_addresses_addresses-id" + } + }, + "data_cocsn_interfaces_interface_interface-name_enabled": { + "description": "Enable or disable the interface. Example value: true", + "name": "enabled", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_enabled" + } + }, + "data_cocsn_interfaces_interface_interface-name_name": { + "description": "Interface name. Example value: en0", + "name": "name", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_name" + } + }, + "data_cocsn_interfaces_interface_interface-name_oper-status": { + "description": "Describes whether the interface is physically up or down", + "name": "oper-status", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_oper-status" } }, "data_cocsn_routes": { @@ -8655,6 +9032,59 @@ func init() { "$ref": "#/definitions/data_cocsn_routes-post" } }, + "data_cocsn_routes_route_route-destination": { + "name": "route", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_routes_route_route-destination" + } + }, + "data_cocsn_routes_route_route-destination_destination": { + "description": "Route destination. IP network", + "name": "destination", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_destination" + } + }, + "data_cocsn_routes_route_route-destination_expire": { + "description": "Expiration timer of the route", + "name": "expire", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_expire" + } + }, + "data_cocsn_routes_route_route-destination_flags": { + "description": "Flags of the route", + "name": "flags", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_flags" + } + }, + "data_cocsn_routes_route_route-destination_gateway": { + "description": "Route gateway. IP address or host name", + "name": "gateway", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_gateway" + } + }, + "data_cocsn_routes_route_route-destination_interface": { + "description": "Interface used for the route", + "name": "interface", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_interface" + } + }, "depth": { "type": "integer", "format": "uint16", diff --git a/api/restapi/operations/cocsn_api.go b/api/restapi/operations/cocsn_api.go index 393b7688be1b9e78fd9c2e455b8e28397c66759d..be8aa0b381d2de49fc62f18b37aaddf296e53a7f 100644 --- a/api/restapi/operations/cocsn_api.go +++ b/api/restapi/operations/cocsn_api.go @@ -47,66 +47,75 @@ func NewCocsnAPI(spec *loads.Document) *CocsnAPI { JSONProducer: runtime.JSONProducer(), - DataDataCocsnArpTableArpEntryArpEntryAddressAddressGetHandler: data.DataCocsnArpTableArpEntryArpEntryAddressAddressGetHandlerFunc(func(params data.DataCocsnArpTableArpEntryArpEntryAddressAddressGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnArpTableArpEntryArpEntryAddressAddressGet has not yet been implemented") - }), - DataDataCocsnArpTableArpEntryArpEntryAddressGetHandler: data.DataCocsnArpTableArpEntryArpEntryAddressGetHandlerFunc(func(params data.DataCocsnArpTableArpEntryArpEntryAddressGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnArpTableArpEntryArpEntryAddressGet has not yet been implemented") - }), - DataDataCocsnArpTableArpEntryArpEntryAddressInterfaceGetHandler: data.DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetHandlerFunc(func(params data.DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnArpTableArpEntryArpEntryAddressInterfaceGet has not yet been implemented") - }), - DataDataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetHandler: data.DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetHandlerFunc(func(params data.DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGet has not yet been implemented") - }), - DataDataCocsnArpTableArpEntryGetHandler: data.DataCocsnArpTableArpEntryGetHandlerFunc(func(params data.DataCocsnArpTableArpEntryGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnArpTableArpEntryGet has not yet been implemented") - }), - DataDataCocsnArpTableDeleteHandler: data.DataCocsnArpTableDeleteHandlerFunc(func(params data.DataCocsnArpTableDeleteParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnArpTableDelete has not yet been implemented") - }), - DataDataCocsnArpTableGetHandler: data.DataCocsnArpTableGetHandlerFunc(func(params data.DataCocsnArpTableGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnArpTableGet has not yet been implemented") - }), - DataDataCocsnArpTablePatchHandler: data.DataCocsnArpTablePatchHandlerFunc(func(params data.DataCocsnArpTablePatchParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnArpTablePatch has not yet been implemented") - }), - DataDataCocsnArpTablePostHandler: data.DataCocsnArpTablePostHandlerFunc(func(params data.DataCocsnArpTablePostParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnArpTablePost has not yet been implemented") - }), - DataDataCocsnArpTablePutHandler: data.DataCocsnArpTablePutHandlerFunc(func(params data.DataCocsnArpTablePutParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnArpTablePut has not yet been implemented") - }), DataDataCocsnInterfacesDeleteHandler: data.DataCocsnInterfacesDeleteHandlerFunc(func(params data.DataCocsnInterfacesDeleteParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation data.DataCocsnInterfacesDelete has not yet been implemented") }), DataDataCocsnInterfacesGetHandler: data.DataCocsnInterfacesGetHandlerFunc(func(params data.DataCocsnInterfacesGetParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation data.DataCocsnInterfacesGet has not yet been implemented") }), - DataDataCocsnInterfacesInterfaceGetHandler: data.DataCocsnInterfacesInterfaceGetHandlerFunc(func(params data.DataCocsnInterfacesInterfaceGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceGet has not yet been implemented") + DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteHandler: data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDelete has not yet been implemented") }), DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetHandler: data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGet has not yet been implemented") }), - DataDataCocsnInterfacesInterfaceInterfaceNameAddressesGetHandler: data.DataCocsnInterfacesInterfaceInterfaceNameAddressesGetHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameAddressesGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameAddressesGet has not yet been implemented") + DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchHandler: data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatch has not yet been implemented") + }), + DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutHandler: data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPut has not yet been implemented") + }), + DataDataCocsnInterfacesInterfaceInterfaceNameDeleteHandler: data.DataCocsnInterfacesInterfaceInterfaceNameDeleteHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameDeleteParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameDelete has not yet been implemented") + }), + DataDataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteHandler: data.DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameEnabledDelete has not yet been implemented") }), DataDataCocsnInterfacesInterfaceInterfaceNameEnabledGetHandler: data.DataCocsnInterfacesInterfaceInterfaceNameEnabledGetHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameEnabledGetParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameEnabledGet has not yet been implemented") }), + DataDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchHandler: data.DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameEnabledPatch has not yet been implemented") + }), + DataDataCocsnInterfacesInterfaceInterfaceNameEnabledPutHandler: data.DataCocsnInterfacesInterfaceInterfaceNameEnabledPutHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameEnabledPutParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameEnabledPut has not yet been implemented") + }), DataDataCocsnInterfacesInterfaceInterfaceNameGetHandler: data.DataCocsnInterfacesInterfaceInterfaceNameGetHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameGetParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameGet has not yet been implemented") }), + DataDataCocsnInterfacesInterfaceInterfaceNameNameDeleteHandler: data.DataCocsnInterfacesInterfaceInterfaceNameNameDeleteHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameNameDeleteParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameNameDelete has not yet been implemented") + }), DataDataCocsnInterfacesInterfaceInterfaceNameNameGetHandler: data.DataCocsnInterfacesInterfaceInterfaceNameNameGetHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameNameGetParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameNameGet has not yet been implemented") }), + DataDataCocsnInterfacesInterfaceInterfaceNameNamePatchHandler: data.DataCocsnInterfacesInterfaceInterfaceNameNamePatchHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameNamePatchParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameNamePatch has not yet been implemented") + }), + DataDataCocsnInterfacesInterfaceInterfaceNameNamePutHandler: data.DataCocsnInterfacesInterfaceInterfaceNameNamePutHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameNamePutParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameNamePut has not yet been implemented") + }), + DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteHandler: data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusDelete has not yet been implemented") + }), DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusGetHandler: data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusGet has not yet been implemented") }), + DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchHandler: data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatch has not yet been implemented") + }), + DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutHandler: data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusPut has not yet been implemented") + }), + DataDataCocsnInterfacesInterfaceInterfaceNamePatchHandler: data.DataCocsnInterfacesInterfaceInterfaceNamePatchHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNamePatchParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNamePatch has not yet been implemented") + }), DataDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetHandler: data.DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGet has not yet been implemented") }), + DataDataCocsnInterfacesInterfaceInterfaceNamePutHandler: data.DataCocsnInterfacesInterfaceInterfaceNamePutHandlerFunc(func(params data.DataCocsnInterfacesInterfaceInterfaceNamePutParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnInterfacesInterfaceInterfaceNamePut has not yet been implemented") + }), DataDataCocsnInterfacesPatchHandler: data.DataCocsnInterfacesPatchHandlerFunc(func(params data.DataCocsnInterfacesPatchParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation data.DataCocsnInterfacesPatch has not yet been implemented") }), @@ -131,27 +140,78 @@ func NewCocsnAPI(spec *loads.Document) *CocsnAPI { DataDataCocsnRoutesPutHandler: data.DataCocsnRoutesPutHandlerFunc(func(params data.DataCocsnRoutesPutParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation data.DataCocsnRoutesPut has not yet been implemented") }), - DataDataCocsnRoutesRouteGetHandler: data.DataCocsnRoutesRouteGetHandlerFunc(func(params data.DataCocsnRoutesRouteGetParams, principal interface{}) middleware.Responder { - return middleware.NotImplemented("operation data.DataCocsnRoutesRouteGet has not yet been implemented") + DataDataCocsnRoutesRouteRouteDestinationDeleteHandler: data.DataCocsnRoutesRouteRouteDestinationDeleteHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationDeleteParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationDelete has not yet been implemented") + }), + DataDataCocsnRoutesRouteRouteDestinationDestinationDeleteHandler: data.DataCocsnRoutesRouteRouteDestinationDestinationDeleteHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationDestinationDeleteParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationDestinationDelete has not yet been implemented") }), DataDataCocsnRoutesRouteRouteDestinationDestinationGetHandler: data.DataCocsnRoutesRouteRouteDestinationDestinationGetHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationDestinationGetParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationDestinationGet has not yet been implemented") }), + DataDataCocsnRoutesRouteRouteDestinationDestinationPatchHandler: data.DataCocsnRoutesRouteRouteDestinationDestinationPatchHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationDestinationPatchParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationDestinationPatch has not yet been implemented") + }), + DataDataCocsnRoutesRouteRouteDestinationDestinationPutHandler: data.DataCocsnRoutesRouteRouteDestinationDestinationPutHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationDestinationPutParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationDestinationPut has not yet been implemented") + }), + DataDataCocsnRoutesRouteRouteDestinationExpireDeleteHandler: data.DataCocsnRoutesRouteRouteDestinationExpireDeleteHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationExpireDeleteParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationExpireDelete has not yet been implemented") + }), DataDataCocsnRoutesRouteRouteDestinationExpireGetHandler: data.DataCocsnRoutesRouteRouteDestinationExpireGetHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationExpireGetParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationExpireGet has not yet been implemented") }), + DataDataCocsnRoutesRouteRouteDestinationExpirePatchHandler: data.DataCocsnRoutesRouteRouteDestinationExpirePatchHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationExpirePatchParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationExpirePatch has not yet been implemented") + }), + DataDataCocsnRoutesRouteRouteDestinationExpirePutHandler: data.DataCocsnRoutesRouteRouteDestinationExpirePutHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationExpirePutParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationExpirePut has not yet been implemented") + }), + DataDataCocsnRoutesRouteRouteDestinationFlagsDeleteHandler: data.DataCocsnRoutesRouteRouteDestinationFlagsDeleteHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationFlagsDeleteParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationFlagsDelete has not yet been implemented") + }), DataDataCocsnRoutesRouteRouteDestinationFlagsGetHandler: data.DataCocsnRoutesRouteRouteDestinationFlagsGetHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationFlagsGetParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationFlagsGet has not yet been implemented") }), + DataDataCocsnRoutesRouteRouteDestinationFlagsPatchHandler: data.DataCocsnRoutesRouteRouteDestinationFlagsPatchHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationFlagsPatchParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationFlagsPatch has not yet been implemented") + }), + DataDataCocsnRoutesRouteRouteDestinationFlagsPutHandler: data.DataCocsnRoutesRouteRouteDestinationFlagsPutHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationFlagsPutParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationFlagsPut has not yet been implemented") + }), + DataDataCocsnRoutesRouteRouteDestinationGatewayDeleteHandler: data.DataCocsnRoutesRouteRouteDestinationGatewayDeleteHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationGatewayDeleteParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationGatewayDelete has not yet been implemented") + }), DataDataCocsnRoutesRouteRouteDestinationGatewayGetHandler: data.DataCocsnRoutesRouteRouteDestinationGatewayGetHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationGatewayGetParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationGatewayGet has not yet been implemented") }), + DataDataCocsnRoutesRouteRouteDestinationGatewayPatchHandler: data.DataCocsnRoutesRouteRouteDestinationGatewayPatchHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationGatewayPatchParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationGatewayPatch has not yet been implemented") + }), + DataDataCocsnRoutesRouteRouteDestinationGatewayPutHandler: data.DataCocsnRoutesRouteRouteDestinationGatewayPutHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationGatewayPutParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationGatewayPut has not yet been implemented") + }), DataDataCocsnRoutesRouteRouteDestinationGetHandler: data.DataCocsnRoutesRouteRouteDestinationGetHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationGetParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationGet has not yet been implemented") }), + DataDataCocsnRoutesRouteRouteDestinationInterfaceDeleteHandler: data.DataCocsnRoutesRouteRouteDestinationInterfaceDeleteHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationInterfaceDeleteParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationInterfaceDelete has not yet been implemented") + }), DataDataCocsnRoutesRouteRouteDestinationInterfaceGetHandler: data.DataCocsnRoutesRouteRouteDestinationInterfaceGetHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationInterfaceGetParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationInterfaceGet has not yet been implemented") }), + DataDataCocsnRoutesRouteRouteDestinationInterfacePatchHandler: data.DataCocsnRoutesRouteRouteDestinationInterfacePatchHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationInterfacePatchParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationInterfacePatch has not yet been implemented") + }), + DataDataCocsnRoutesRouteRouteDestinationInterfacePutHandler: data.DataCocsnRoutesRouteRouteDestinationInterfacePutHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationInterfacePutParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationInterfacePut has not yet been implemented") + }), + DataDataCocsnRoutesRouteRouteDestinationPatchHandler: data.DataCocsnRoutesRouteRouteDestinationPatchHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationPatchParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationPatch has not yet been implemented") + }), + DataDataCocsnRoutesRouteRouteDestinationPutHandler: data.DataCocsnRoutesRouteRouteDestinationPutHandlerFunc(func(params data.DataCocsnRoutesRouteRouteDestinationPutParams, principal interface{}) middleware.Responder { + return middleware.NotImplemented("operation data.DataCocsnRoutesRouteRouteDestinationPut has not yet been implemented") + }), DataDataGetHandler: data.DataGetHandlerFunc(func(params data.DataGetParams, principal interface{}) middleware.Responder { return middleware.NotImplemented("operation data.DataGet has not yet been implemented") }), @@ -221,46 +281,52 @@ type CocsnAPI struct { // APIAuthorizer provides access control (ACL/RBAC/ABAC) by providing access to the request and authenticated principal APIAuthorizer runtime.Authorizer - // DataDataCocsnArpTableArpEntryArpEntryAddressAddressGetHandler sets the operation handler for the data cocsn arp table arp entry arp entry address address get operation - DataDataCocsnArpTableArpEntryArpEntryAddressAddressGetHandler data.DataCocsnArpTableArpEntryArpEntryAddressAddressGetHandler - // DataDataCocsnArpTableArpEntryArpEntryAddressGetHandler sets the operation handler for the data cocsn arp table arp entry arp entry address get operation - DataDataCocsnArpTableArpEntryArpEntryAddressGetHandler data.DataCocsnArpTableArpEntryArpEntryAddressGetHandler - // DataDataCocsnArpTableArpEntryArpEntryAddressInterfaceGetHandler sets the operation handler for the data cocsn arp table arp entry arp entry address interface get operation - DataDataCocsnArpTableArpEntryArpEntryAddressInterfaceGetHandler data.DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetHandler - // DataDataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetHandler sets the operation handler for the data cocsn arp table arp entry arp entry address phs address get operation - DataDataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetHandler data.DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetHandler - // DataDataCocsnArpTableArpEntryGetHandler sets the operation handler for the data cocsn arp table arp entry get operation - DataDataCocsnArpTableArpEntryGetHandler data.DataCocsnArpTableArpEntryGetHandler - // DataDataCocsnArpTableDeleteHandler sets the operation handler for the data cocsn arp table delete operation - DataDataCocsnArpTableDeleteHandler data.DataCocsnArpTableDeleteHandler - // DataDataCocsnArpTableGetHandler sets the operation handler for the data cocsn arp table get operation - DataDataCocsnArpTableGetHandler data.DataCocsnArpTableGetHandler - // DataDataCocsnArpTablePatchHandler sets the operation handler for the data cocsn arp table patch operation - DataDataCocsnArpTablePatchHandler data.DataCocsnArpTablePatchHandler - // DataDataCocsnArpTablePostHandler sets the operation handler for the data cocsn arp table post operation - DataDataCocsnArpTablePostHandler data.DataCocsnArpTablePostHandler - // DataDataCocsnArpTablePutHandler sets the operation handler for the data cocsn arp table put operation - DataDataCocsnArpTablePutHandler data.DataCocsnArpTablePutHandler // DataDataCocsnInterfacesDeleteHandler sets the operation handler for the data cocsn interfaces delete operation DataDataCocsnInterfacesDeleteHandler data.DataCocsnInterfacesDeleteHandler // DataDataCocsnInterfacesGetHandler sets the operation handler for the data cocsn interfaces get operation DataDataCocsnInterfacesGetHandler data.DataCocsnInterfacesGetHandler - // DataDataCocsnInterfacesInterfaceGetHandler sets the operation handler for the data cocsn interfaces interface get operation - DataDataCocsnInterfacesInterfaceGetHandler data.DataCocsnInterfacesInterfaceGetHandler + // DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteHandler sets the operation handler for the data cocsn interfaces interface interface name addresses addresses id delete operation + DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteHandler data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteHandler // DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetHandler sets the operation handler for the data cocsn interfaces interface interface name addresses addresses id get operation DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetHandler data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetHandler - // DataDataCocsnInterfacesInterfaceInterfaceNameAddressesGetHandler sets the operation handler for the data cocsn interfaces interface interface name addresses get operation - DataDataCocsnInterfacesInterfaceInterfaceNameAddressesGetHandler data.DataCocsnInterfacesInterfaceInterfaceNameAddressesGetHandler + // DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchHandler sets the operation handler for the data cocsn interfaces interface interface name addresses addresses id patch operation + DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchHandler data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchHandler + // DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutHandler sets the operation handler for the data cocsn interfaces interface interface name addresses addresses id put operation + DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutHandler data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutHandler + // DataDataCocsnInterfacesInterfaceInterfaceNameDeleteHandler sets the operation handler for the data cocsn interfaces interface interface name delete operation + DataDataCocsnInterfacesInterfaceInterfaceNameDeleteHandler data.DataCocsnInterfacesInterfaceInterfaceNameDeleteHandler + // DataDataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteHandler sets the operation handler for the data cocsn interfaces interface interface name enabled delete operation + DataDataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteHandler data.DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteHandler // DataDataCocsnInterfacesInterfaceInterfaceNameEnabledGetHandler sets the operation handler for the data cocsn interfaces interface interface name enabled get operation DataDataCocsnInterfacesInterfaceInterfaceNameEnabledGetHandler data.DataCocsnInterfacesInterfaceInterfaceNameEnabledGetHandler + // DataDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchHandler sets the operation handler for the data cocsn interfaces interface interface name enabled patch operation + DataDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchHandler data.DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchHandler + // DataDataCocsnInterfacesInterfaceInterfaceNameEnabledPutHandler sets the operation handler for the data cocsn interfaces interface interface name enabled put operation + DataDataCocsnInterfacesInterfaceInterfaceNameEnabledPutHandler data.DataCocsnInterfacesInterfaceInterfaceNameEnabledPutHandler // DataDataCocsnInterfacesInterfaceInterfaceNameGetHandler sets the operation handler for the data cocsn interfaces interface interface name get operation DataDataCocsnInterfacesInterfaceInterfaceNameGetHandler data.DataCocsnInterfacesInterfaceInterfaceNameGetHandler + // DataDataCocsnInterfacesInterfaceInterfaceNameNameDeleteHandler sets the operation handler for the data cocsn interfaces interface interface name name delete operation + DataDataCocsnInterfacesInterfaceInterfaceNameNameDeleteHandler data.DataCocsnInterfacesInterfaceInterfaceNameNameDeleteHandler // DataDataCocsnInterfacesInterfaceInterfaceNameNameGetHandler sets the operation handler for the data cocsn interfaces interface interface name name get operation DataDataCocsnInterfacesInterfaceInterfaceNameNameGetHandler data.DataCocsnInterfacesInterfaceInterfaceNameNameGetHandler + // DataDataCocsnInterfacesInterfaceInterfaceNameNamePatchHandler sets the operation handler for the data cocsn interfaces interface interface name name patch operation + DataDataCocsnInterfacesInterfaceInterfaceNameNamePatchHandler data.DataCocsnInterfacesInterfaceInterfaceNameNamePatchHandler + // DataDataCocsnInterfacesInterfaceInterfaceNameNamePutHandler sets the operation handler for the data cocsn interfaces interface interface name name put operation + DataDataCocsnInterfacesInterfaceInterfaceNameNamePutHandler data.DataCocsnInterfacesInterfaceInterfaceNameNamePutHandler + // DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteHandler sets the operation handler for the data cocsn interfaces interface interface name oper status delete operation + DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteHandler data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteHandler // DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusGetHandler sets the operation handler for the data cocsn interfaces interface interface name oper status get operation DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusGetHandler data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetHandler + // DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchHandler sets the operation handler for the data cocsn interfaces interface interface name oper status patch operation + DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchHandler data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchHandler + // DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutHandler sets the operation handler for the data cocsn interfaces interface interface name oper status put operation + DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutHandler data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutHandler + // DataDataCocsnInterfacesInterfaceInterfaceNamePatchHandler sets the operation handler for the data cocsn interfaces interface interface name patch operation + DataDataCocsnInterfacesInterfaceInterfaceNamePatchHandler data.DataCocsnInterfacesInterfaceInterfaceNamePatchHandler // DataDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetHandler sets the operation handler for the data cocsn interfaces interface interface name phys address get operation DataDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetHandler data.DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetHandler + // DataDataCocsnInterfacesInterfaceInterfaceNamePutHandler sets the operation handler for the data cocsn interfaces interface interface name put operation + DataDataCocsnInterfacesInterfaceInterfaceNamePutHandler data.DataCocsnInterfacesInterfaceInterfaceNamePutHandler // DataDataCocsnInterfacesPatchHandler sets the operation handler for the data cocsn interfaces patch operation DataDataCocsnInterfacesPatchHandler data.DataCocsnInterfacesPatchHandler // DataDataCocsnInterfacesPostHandler sets the operation handler for the data cocsn interfaces post operation @@ -277,20 +343,54 @@ type CocsnAPI struct { DataDataCocsnRoutesPostHandler data.DataCocsnRoutesPostHandler // DataDataCocsnRoutesPutHandler sets the operation handler for the data cocsn routes put operation DataDataCocsnRoutesPutHandler data.DataCocsnRoutesPutHandler - // DataDataCocsnRoutesRouteGetHandler sets the operation handler for the data cocsn routes route get operation - DataDataCocsnRoutesRouteGetHandler data.DataCocsnRoutesRouteGetHandler + // DataDataCocsnRoutesRouteRouteDestinationDeleteHandler sets the operation handler for the data cocsn routes route route destination delete operation + DataDataCocsnRoutesRouteRouteDestinationDeleteHandler data.DataCocsnRoutesRouteRouteDestinationDeleteHandler + // DataDataCocsnRoutesRouteRouteDestinationDestinationDeleteHandler sets the operation handler for the data cocsn routes route route destination destination delete operation + DataDataCocsnRoutesRouteRouteDestinationDestinationDeleteHandler data.DataCocsnRoutesRouteRouteDestinationDestinationDeleteHandler // DataDataCocsnRoutesRouteRouteDestinationDestinationGetHandler sets the operation handler for the data cocsn routes route route destination destination get operation DataDataCocsnRoutesRouteRouteDestinationDestinationGetHandler data.DataCocsnRoutesRouteRouteDestinationDestinationGetHandler + // DataDataCocsnRoutesRouteRouteDestinationDestinationPatchHandler sets the operation handler for the data cocsn routes route route destination destination patch operation + DataDataCocsnRoutesRouteRouteDestinationDestinationPatchHandler data.DataCocsnRoutesRouteRouteDestinationDestinationPatchHandler + // DataDataCocsnRoutesRouteRouteDestinationDestinationPutHandler sets the operation handler for the data cocsn routes route route destination destination put operation + DataDataCocsnRoutesRouteRouteDestinationDestinationPutHandler data.DataCocsnRoutesRouteRouteDestinationDestinationPutHandler + // DataDataCocsnRoutesRouteRouteDestinationExpireDeleteHandler sets the operation handler for the data cocsn routes route route destination expire delete operation + DataDataCocsnRoutesRouteRouteDestinationExpireDeleteHandler data.DataCocsnRoutesRouteRouteDestinationExpireDeleteHandler // DataDataCocsnRoutesRouteRouteDestinationExpireGetHandler sets the operation handler for the data cocsn routes route route destination expire get operation DataDataCocsnRoutesRouteRouteDestinationExpireGetHandler data.DataCocsnRoutesRouteRouteDestinationExpireGetHandler + // DataDataCocsnRoutesRouteRouteDestinationExpirePatchHandler sets the operation handler for the data cocsn routes route route destination expire patch operation + DataDataCocsnRoutesRouteRouteDestinationExpirePatchHandler data.DataCocsnRoutesRouteRouteDestinationExpirePatchHandler + // DataDataCocsnRoutesRouteRouteDestinationExpirePutHandler sets the operation handler for the data cocsn routes route route destination expire put operation + DataDataCocsnRoutesRouteRouteDestinationExpirePutHandler data.DataCocsnRoutesRouteRouteDestinationExpirePutHandler + // DataDataCocsnRoutesRouteRouteDestinationFlagsDeleteHandler sets the operation handler for the data cocsn routes route route destination flags delete operation + DataDataCocsnRoutesRouteRouteDestinationFlagsDeleteHandler data.DataCocsnRoutesRouteRouteDestinationFlagsDeleteHandler // DataDataCocsnRoutesRouteRouteDestinationFlagsGetHandler sets the operation handler for the data cocsn routes route route destination flags get operation DataDataCocsnRoutesRouteRouteDestinationFlagsGetHandler data.DataCocsnRoutesRouteRouteDestinationFlagsGetHandler + // DataDataCocsnRoutesRouteRouteDestinationFlagsPatchHandler sets the operation handler for the data cocsn routes route route destination flags patch operation + DataDataCocsnRoutesRouteRouteDestinationFlagsPatchHandler data.DataCocsnRoutesRouteRouteDestinationFlagsPatchHandler + // DataDataCocsnRoutesRouteRouteDestinationFlagsPutHandler sets the operation handler for the data cocsn routes route route destination flags put operation + DataDataCocsnRoutesRouteRouteDestinationFlagsPutHandler data.DataCocsnRoutesRouteRouteDestinationFlagsPutHandler + // DataDataCocsnRoutesRouteRouteDestinationGatewayDeleteHandler sets the operation handler for the data cocsn routes route route destination gateway delete operation + DataDataCocsnRoutesRouteRouteDestinationGatewayDeleteHandler data.DataCocsnRoutesRouteRouteDestinationGatewayDeleteHandler // DataDataCocsnRoutesRouteRouteDestinationGatewayGetHandler sets the operation handler for the data cocsn routes route route destination gateway get operation DataDataCocsnRoutesRouteRouteDestinationGatewayGetHandler data.DataCocsnRoutesRouteRouteDestinationGatewayGetHandler + // DataDataCocsnRoutesRouteRouteDestinationGatewayPatchHandler sets the operation handler for the data cocsn routes route route destination gateway patch operation + DataDataCocsnRoutesRouteRouteDestinationGatewayPatchHandler data.DataCocsnRoutesRouteRouteDestinationGatewayPatchHandler + // DataDataCocsnRoutesRouteRouteDestinationGatewayPutHandler sets the operation handler for the data cocsn routes route route destination gateway put operation + DataDataCocsnRoutesRouteRouteDestinationGatewayPutHandler data.DataCocsnRoutesRouteRouteDestinationGatewayPutHandler // DataDataCocsnRoutesRouteRouteDestinationGetHandler sets the operation handler for the data cocsn routes route route destination get operation DataDataCocsnRoutesRouteRouteDestinationGetHandler data.DataCocsnRoutesRouteRouteDestinationGetHandler + // DataDataCocsnRoutesRouteRouteDestinationInterfaceDeleteHandler sets the operation handler for the data cocsn routes route route destination interface delete operation + DataDataCocsnRoutesRouteRouteDestinationInterfaceDeleteHandler data.DataCocsnRoutesRouteRouteDestinationInterfaceDeleteHandler // DataDataCocsnRoutesRouteRouteDestinationInterfaceGetHandler sets the operation handler for the data cocsn routes route route destination interface get operation DataDataCocsnRoutesRouteRouteDestinationInterfaceGetHandler data.DataCocsnRoutesRouteRouteDestinationInterfaceGetHandler + // DataDataCocsnRoutesRouteRouteDestinationInterfacePatchHandler sets the operation handler for the data cocsn routes route route destination interface patch operation + DataDataCocsnRoutesRouteRouteDestinationInterfacePatchHandler data.DataCocsnRoutesRouteRouteDestinationInterfacePatchHandler + // DataDataCocsnRoutesRouteRouteDestinationInterfacePutHandler sets the operation handler for the data cocsn routes route route destination interface put operation + DataDataCocsnRoutesRouteRouteDestinationInterfacePutHandler data.DataCocsnRoutesRouteRouteDestinationInterfacePutHandler + // DataDataCocsnRoutesRouteRouteDestinationPatchHandler sets the operation handler for the data cocsn routes route route destination patch operation + DataDataCocsnRoutesRouteRouteDestinationPatchHandler data.DataCocsnRoutesRouteRouteDestinationPatchHandler + // DataDataCocsnRoutesRouteRouteDestinationPutHandler sets the operation handler for the data cocsn routes route route destination put operation + DataDataCocsnRoutesRouteRouteDestinationPutHandler data.DataCocsnRoutesRouteRouteDestinationPutHandler // DataDataGetHandler sets the operation handler for the data get operation DataDataGetHandler data.DataGetHandler // DataDataPatchHandler sets the operation handler for the data patch operation @@ -385,66 +485,75 @@ func (o *CocsnAPI) Validate() error { unregistered = append(unregistered, "BasicAuthAuth") } - if o.DataDataCocsnArpTableArpEntryArpEntryAddressAddressGetHandler == nil { - unregistered = append(unregistered, "data.DataCocsnArpTableArpEntryArpEntryAddressAddressGetHandler") - } - if o.DataDataCocsnArpTableArpEntryArpEntryAddressGetHandler == nil { - unregistered = append(unregistered, "data.DataCocsnArpTableArpEntryArpEntryAddressGetHandler") - } - if o.DataDataCocsnArpTableArpEntryArpEntryAddressInterfaceGetHandler == nil { - unregistered = append(unregistered, "data.DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetHandler") - } - if o.DataDataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetHandler == nil { - unregistered = append(unregistered, "data.DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetHandler") - } - if o.DataDataCocsnArpTableArpEntryGetHandler == nil { - unregistered = append(unregistered, "data.DataCocsnArpTableArpEntryGetHandler") - } - if o.DataDataCocsnArpTableDeleteHandler == nil { - unregistered = append(unregistered, "data.DataCocsnArpTableDeleteHandler") - } - if o.DataDataCocsnArpTableGetHandler == nil { - unregistered = append(unregistered, "data.DataCocsnArpTableGetHandler") - } - if o.DataDataCocsnArpTablePatchHandler == nil { - unregistered = append(unregistered, "data.DataCocsnArpTablePatchHandler") - } - if o.DataDataCocsnArpTablePostHandler == nil { - unregistered = append(unregistered, "data.DataCocsnArpTablePostHandler") - } - if o.DataDataCocsnArpTablePutHandler == nil { - unregistered = append(unregistered, "data.DataCocsnArpTablePutHandler") - } if o.DataDataCocsnInterfacesDeleteHandler == nil { unregistered = append(unregistered, "data.DataCocsnInterfacesDeleteHandler") } if o.DataDataCocsnInterfacesGetHandler == nil { unregistered = append(unregistered, "data.DataCocsnInterfacesGetHandler") } - if o.DataDataCocsnInterfacesInterfaceGetHandler == nil { - unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceGetHandler") + if o.DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteHandler == nil { + unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteHandler") } if o.DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetHandler == nil { unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetHandler") } - if o.DataDataCocsnInterfacesInterfaceInterfaceNameAddressesGetHandler == nil { - unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNameAddressesGetHandler") + if o.DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchHandler == nil { + unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchHandler") + } + if o.DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutHandler == nil { + unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutHandler") + } + if o.DataDataCocsnInterfacesInterfaceInterfaceNameDeleteHandler == nil { + unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNameDeleteHandler") + } + if o.DataDataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteHandler == nil { + unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteHandler") } if o.DataDataCocsnInterfacesInterfaceInterfaceNameEnabledGetHandler == nil { unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNameEnabledGetHandler") } + if o.DataDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchHandler == nil { + unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchHandler") + } + if o.DataDataCocsnInterfacesInterfaceInterfaceNameEnabledPutHandler == nil { + unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNameEnabledPutHandler") + } if o.DataDataCocsnInterfacesInterfaceInterfaceNameGetHandler == nil { unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNameGetHandler") } + if o.DataDataCocsnInterfacesInterfaceInterfaceNameNameDeleteHandler == nil { + unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNameNameDeleteHandler") + } if o.DataDataCocsnInterfacesInterfaceInterfaceNameNameGetHandler == nil { unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNameNameGetHandler") } + if o.DataDataCocsnInterfacesInterfaceInterfaceNameNamePatchHandler == nil { + unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNameNamePatchHandler") + } + if o.DataDataCocsnInterfacesInterfaceInterfaceNameNamePutHandler == nil { + unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNameNamePutHandler") + } + if o.DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteHandler == nil { + unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteHandler") + } if o.DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusGetHandler == nil { unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusGetHandler") } + if o.DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchHandler == nil { + unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchHandler") + } + if o.DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutHandler == nil { + unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutHandler") + } + if o.DataDataCocsnInterfacesInterfaceInterfaceNamePatchHandler == nil { + unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNamePatchHandler") + } if o.DataDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetHandler == nil { unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetHandler") } + if o.DataDataCocsnInterfacesInterfaceInterfaceNamePutHandler == nil { + unregistered = append(unregistered, "data.DataCocsnInterfacesInterfaceInterfaceNamePutHandler") + } if o.DataDataCocsnInterfacesPatchHandler == nil { unregistered = append(unregistered, "data.DataCocsnInterfacesPatchHandler") } @@ -469,27 +578,78 @@ func (o *CocsnAPI) Validate() error { if o.DataDataCocsnRoutesPutHandler == nil { unregistered = append(unregistered, "data.DataCocsnRoutesPutHandler") } - if o.DataDataCocsnRoutesRouteGetHandler == nil { - unregistered = append(unregistered, "data.DataCocsnRoutesRouteGetHandler") + if o.DataDataCocsnRoutesRouteRouteDestinationDeleteHandler == nil { + unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationDeleteHandler") + } + if o.DataDataCocsnRoutesRouteRouteDestinationDestinationDeleteHandler == nil { + unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationDestinationDeleteHandler") } if o.DataDataCocsnRoutesRouteRouteDestinationDestinationGetHandler == nil { unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationDestinationGetHandler") } + if o.DataDataCocsnRoutesRouteRouteDestinationDestinationPatchHandler == nil { + unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationDestinationPatchHandler") + } + if o.DataDataCocsnRoutesRouteRouteDestinationDestinationPutHandler == nil { + unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationDestinationPutHandler") + } + if o.DataDataCocsnRoutesRouteRouteDestinationExpireDeleteHandler == nil { + unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationExpireDeleteHandler") + } if o.DataDataCocsnRoutesRouteRouteDestinationExpireGetHandler == nil { unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationExpireGetHandler") } + if o.DataDataCocsnRoutesRouteRouteDestinationExpirePatchHandler == nil { + unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationExpirePatchHandler") + } + if o.DataDataCocsnRoutesRouteRouteDestinationExpirePutHandler == nil { + unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationExpirePutHandler") + } + if o.DataDataCocsnRoutesRouteRouteDestinationFlagsDeleteHandler == nil { + unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationFlagsDeleteHandler") + } if o.DataDataCocsnRoutesRouteRouteDestinationFlagsGetHandler == nil { unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationFlagsGetHandler") } + if o.DataDataCocsnRoutesRouteRouteDestinationFlagsPatchHandler == nil { + unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationFlagsPatchHandler") + } + if o.DataDataCocsnRoutesRouteRouteDestinationFlagsPutHandler == nil { + unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationFlagsPutHandler") + } + if o.DataDataCocsnRoutesRouteRouteDestinationGatewayDeleteHandler == nil { + unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationGatewayDeleteHandler") + } if o.DataDataCocsnRoutesRouteRouteDestinationGatewayGetHandler == nil { unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationGatewayGetHandler") } + if o.DataDataCocsnRoutesRouteRouteDestinationGatewayPatchHandler == nil { + unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationGatewayPatchHandler") + } + if o.DataDataCocsnRoutesRouteRouteDestinationGatewayPutHandler == nil { + unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationGatewayPutHandler") + } if o.DataDataCocsnRoutesRouteRouteDestinationGetHandler == nil { unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationGetHandler") } + if o.DataDataCocsnRoutesRouteRouteDestinationInterfaceDeleteHandler == nil { + unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationInterfaceDeleteHandler") + } if o.DataDataCocsnRoutesRouteRouteDestinationInterfaceGetHandler == nil { unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationInterfaceGetHandler") } + if o.DataDataCocsnRoutesRouteRouteDestinationInterfacePatchHandler == nil { + unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationInterfacePatchHandler") + } + if o.DataDataCocsnRoutesRouteRouteDestinationInterfacePutHandler == nil { + unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationInterfacePutHandler") + } + if o.DataDataCocsnRoutesRouteRouteDestinationPatchHandler == nil { + unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationPatchHandler") + } + if o.DataDataCocsnRoutesRouteRouteDestinationPutHandler == nil { + unregistered = append(unregistered, "data.DataCocsnRoutesRouteRouteDestinationPutHandler") + } if o.DataDataGetHandler == nil { unregistered = append(unregistered, "data.DataGetHandler") } @@ -607,86 +767,98 @@ func (o *CocsnAPI) initHandlerCache() { o.handlers = make(map[string]map[string]http.Handler) } - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data/cocsn:arp-table/arp-entry={arp-entry-address}/address"] = data.NewDataCocsnArpTableArpEntryArpEntryAddressAddressGet(o.context, o.DataDataCocsnArpTableArpEntryArpEntryAddressAddressGetHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data/cocsn:arp-table/arp-entry={arp-entry-address}"] = data.NewDataCocsnArpTableArpEntryArpEntryAddressGet(o.context, o.DataDataCocsnArpTableArpEntryArpEntryAddressGetHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data/cocsn:arp-table/arp-entry={arp-entry-address}/interface"] = data.NewDataCocsnArpTableArpEntryArpEntryAddressInterfaceGet(o.context, o.DataDataCocsnArpTableArpEntryArpEntryAddressInterfaceGetHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) + if o.handlers["DELETE"] == nil { + o.handlers["DELETE"] = make(map[string]http.Handler) } - o.handlers["GET"]["/data/cocsn:arp-table/arp-entry={arp-entry-address}/phs-address"] = data.NewDataCocsnArpTableArpEntryArpEntryAddressPhsAddressGet(o.context, o.DataDataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetHandler) + o.handlers["DELETE"]["/data/cocsn:interfaces"] = data.NewDataCocsnInterfacesDelete(o.context, o.DataDataCocsnInterfacesDeleteHandler) if o.handlers["GET"] == nil { o.handlers["GET"] = make(map[string]http.Handler) } - o.handlers["GET"]["/data/cocsn:arp-table/arp-entry"] = data.NewDataCocsnArpTableArpEntryGet(o.context, o.DataDataCocsnArpTableArpEntryGetHandler) + o.handlers["GET"]["/data/cocsn:interfaces"] = data.NewDataCocsnInterfacesGet(o.context, o.DataDataCocsnInterfacesGetHandler) if o.handlers["DELETE"] == nil { o.handlers["DELETE"] = make(map[string]http.Handler) } - o.handlers["DELETE"]["/data/cocsn:arp-table"] = data.NewDataCocsnArpTableDelete(o.context, o.DataDataCocsnArpTableDeleteHandler) + o.handlers["DELETE"]["/data/cocsn:interfaces/interface={interface-name}/addresses={addresses-id}"] = data.NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDelete(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteHandler) if o.handlers["GET"] == nil { o.handlers["GET"] = make(map[string]http.Handler) } - o.handlers["GET"]["/data/cocsn:arp-table"] = data.NewDataCocsnArpTableGet(o.context, o.DataDataCocsnArpTableGetHandler) + o.handlers["GET"]["/data/cocsn:interfaces/interface={interface-name}/addresses={addresses-id}"] = data.NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGet(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetHandler) if o.handlers["PATCH"] == nil { o.handlers["PATCH"] = make(map[string]http.Handler) } - o.handlers["PATCH"]["/data/cocsn:arp-table"] = data.NewDataCocsnArpTablePatch(o.context, o.DataDataCocsnArpTablePatchHandler) - if o.handlers["POST"] == nil { - o.handlers["POST"] = make(map[string]http.Handler) - } - o.handlers["POST"]["/data/cocsn:arp-table"] = data.NewDataCocsnArpTablePost(o.context, o.DataDataCocsnArpTablePostHandler) + o.handlers["PATCH"]["/data/cocsn:interfaces/interface={interface-name}/addresses={addresses-id}"] = data.NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatch(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchHandler) if o.handlers["PUT"] == nil { o.handlers["PUT"] = make(map[string]http.Handler) } - o.handlers["PUT"]["/data/cocsn:arp-table"] = data.NewDataCocsnArpTablePut(o.context, o.DataDataCocsnArpTablePutHandler) + o.handlers["PUT"]["/data/cocsn:interfaces/interface={interface-name}/addresses={addresses-id}"] = data.NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPut(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutHandler) if o.handlers["DELETE"] == nil { o.handlers["DELETE"] = make(map[string]http.Handler) } - o.handlers["DELETE"]["/data/cocsn:interfaces"] = data.NewDataCocsnInterfacesDelete(o.context, o.DataDataCocsnInterfacesDeleteHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data/cocsn:interfaces"] = data.NewDataCocsnInterfacesGet(o.context, o.DataDataCocsnInterfacesGetHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) + o.handlers["DELETE"]["/data/cocsn:interfaces/interface={interface-name}"] = data.NewDataCocsnInterfacesInterfaceInterfaceNameDelete(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNameDeleteHandler) + if o.handlers["DELETE"] == nil { + o.handlers["DELETE"] = make(map[string]http.Handler) } - o.handlers["GET"]["/data/cocsn:interfaces/interface"] = data.NewDataCocsnInterfacesInterfaceGet(o.context, o.DataDataCocsnInterfacesInterfaceGetHandler) + o.handlers["DELETE"]["/data/cocsn:interfaces/interface={interface-name}/enabled"] = data.NewDataCocsnInterfacesInterfaceInterfaceNameEnabledDelete(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteHandler) if o.handlers["GET"] == nil { o.handlers["GET"] = make(map[string]http.Handler) } - o.handlers["GET"]["/data/cocsn:interfaces/interface={interface-name}/addresses={addresses-id}"] = data.NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGet(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDGetHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) + o.handlers["GET"]["/data/cocsn:interfaces/interface={interface-name}/enabled"] = data.NewDataCocsnInterfacesInterfaceInterfaceNameEnabledGet(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNameEnabledGetHandler) + if o.handlers["PATCH"] == nil { + o.handlers["PATCH"] = make(map[string]http.Handler) } - o.handlers["GET"]["/data/cocsn:interfaces/interface={interface-name}/addresses"] = data.NewDataCocsnInterfacesInterfaceInterfaceNameAddressesGet(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNameAddressesGetHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) + o.handlers["PATCH"]["/data/cocsn:interfaces/interface={interface-name}/enabled"] = data.NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatch(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchHandler) + if o.handlers["PUT"] == nil { + o.handlers["PUT"] = make(map[string]http.Handler) } - o.handlers["GET"]["/data/cocsn:interfaces/interface={interface-name}/enabled"] = data.NewDataCocsnInterfacesInterfaceInterfaceNameEnabledGet(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNameEnabledGetHandler) + o.handlers["PUT"]["/data/cocsn:interfaces/interface={interface-name}/enabled"] = data.NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPut(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNameEnabledPutHandler) if o.handlers["GET"] == nil { o.handlers["GET"] = make(map[string]http.Handler) } o.handlers["GET"]["/data/cocsn:interfaces/interface={interface-name}"] = data.NewDataCocsnInterfacesInterfaceInterfaceNameGet(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNameGetHandler) + if o.handlers["DELETE"] == nil { + o.handlers["DELETE"] = make(map[string]http.Handler) + } + o.handlers["DELETE"]["/data/cocsn:interfaces/interface={interface-name}/name"] = data.NewDataCocsnInterfacesInterfaceInterfaceNameNameDelete(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNameNameDeleteHandler) if o.handlers["GET"] == nil { o.handlers["GET"] = make(map[string]http.Handler) } o.handlers["GET"]["/data/cocsn:interfaces/interface={interface-name}/name"] = data.NewDataCocsnInterfacesInterfaceInterfaceNameNameGet(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNameNameGetHandler) + if o.handlers["PATCH"] == nil { + o.handlers["PATCH"] = make(map[string]http.Handler) + } + o.handlers["PATCH"]["/data/cocsn:interfaces/interface={interface-name}/name"] = data.NewDataCocsnInterfacesInterfaceInterfaceNameNamePatch(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNameNamePatchHandler) + if o.handlers["PUT"] == nil { + o.handlers["PUT"] = make(map[string]http.Handler) + } + o.handlers["PUT"]["/data/cocsn:interfaces/interface={interface-name}/name"] = data.NewDataCocsnInterfacesInterfaceInterfaceNameNamePut(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNameNamePutHandler) + if o.handlers["DELETE"] == nil { + o.handlers["DELETE"] = make(map[string]http.Handler) + } + o.handlers["DELETE"]["/data/cocsn:interfaces/interface={interface-name}/oper-status"] = data.NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusDelete(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteHandler) if o.handlers["GET"] == nil { o.handlers["GET"] = make(map[string]http.Handler) } o.handlers["GET"]["/data/cocsn:interfaces/interface={interface-name}/oper-status"] = data.NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusGet(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusGetHandler) + if o.handlers["PATCH"] == nil { + o.handlers["PATCH"] = make(map[string]http.Handler) + } + o.handlers["PATCH"]["/data/cocsn:interfaces/interface={interface-name}/oper-status"] = data.NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatch(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchHandler) + if o.handlers["PUT"] == nil { + o.handlers["PUT"] = make(map[string]http.Handler) + } + o.handlers["PUT"]["/data/cocsn:interfaces/interface={interface-name}/oper-status"] = data.NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPut(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutHandler) + if o.handlers["PATCH"] == nil { + o.handlers["PATCH"] = make(map[string]http.Handler) + } + o.handlers["PATCH"]["/data/cocsn:interfaces/interface={interface-name}"] = data.NewDataCocsnInterfacesInterfaceInterfaceNamePatch(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNamePatchHandler) if o.handlers["GET"] == nil { o.handlers["GET"] = make(map[string]http.Handler) } o.handlers["GET"]["/data/cocsn:interfaces/interface={interface-name}/phys-address"] = data.NewDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGet(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNamePhysAddressGetHandler) + if o.handlers["PUT"] == nil { + o.handlers["PUT"] = make(map[string]http.Handler) + } + o.handlers["PUT"]["/data/cocsn:interfaces/interface={interface-name}"] = data.NewDataCocsnInterfacesInterfaceInterfaceNamePut(o.context, o.DataDataCocsnInterfacesInterfaceInterfaceNamePutHandler) if o.handlers["PATCH"] == nil { o.handlers["PATCH"] = make(map[string]http.Handler) } @@ -719,34 +891,102 @@ func (o *CocsnAPI) initHandlerCache() { o.handlers["PUT"] = make(map[string]http.Handler) } o.handlers["PUT"]["/data/cocsn:routes"] = data.NewDataCocsnRoutesPut(o.context, o.DataDataCocsnRoutesPutHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) + if o.handlers["DELETE"] == nil { + o.handlers["DELETE"] = make(map[string]http.Handler) } - o.handlers["GET"]["/data/cocsn:routes/route"] = data.NewDataCocsnRoutesRouteGet(o.context, o.DataDataCocsnRoutesRouteGetHandler) + o.handlers["DELETE"]["/data/cocsn:routes/route={route-destination}"] = data.NewDataCocsnRoutesRouteRouteDestinationDelete(o.context, o.DataDataCocsnRoutesRouteRouteDestinationDeleteHandler) + if o.handlers["DELETE"] == nil { + o.handlers["DELETE"] = make(map[string]http.Handler) + } + o.handlers["DELETE"]["/data/cocsn:routes/route={route-destination}/destination"] = data.NewDataCocsnRoutesRouteRouteDestinationDestinationDelete(o.context, o.DataDataCocsnRoutesRouteRouteDestinationDestinationDeleteHandler) if o.handlers["GET"] == nil { o.handlers["GET"] = make(map[string]http.Handler) } o.handlers["GET"]["/data/cocsn:routes/route={route-destination}/destination"] = data.NewDataCocsnRoutesRouteRouteDestinationDestinationGet(o.context, o.DataDataCocsnRoutesRouteRouteDestinationDestinationGetHandler) + if o.handlers["PATCH"] == nil { + o.handlers["PATCH"] = make(map[string]http.Handler) + } + o.handlers["PATCH"]["/data/cocsn:routes/route={route-destination}/destination"] = data.NewDataCocsnRoutesRouteRouteDestinationDestinationPatch(o.context, o.DataDataCocsnRoutesRouteRouteDestinationDestinationPatchHandler) + if o.handlers["PUT"] == nil { + o.handlers["PUT"] = make(map[string]http.Handler) + } + o.handlers["PUT"]["/data/cocsn:routes/route={route-destination}/destination"] = data.NewDataCocsnRoutesRouteRouteDestinationDestinationPut(o.context, o.DataDataCocsnRoutesRouteRouteDestinationDestinationPutHandler) + if o.handlers["DELETE"] == nil { + o.handlers["DELETE"] = make(map[string]http.Handler) + } + o.handlers["DELETE"]["/data/cocsn:routes/route={route-destination}/expire"] = data.NewDataCocsnRoutesRouteRouteDestinationExpireDelete(o.context, o.DataDataCocsnRoutesRouteRouteDestinationExpireDeleteHandler) if o.handlers["GET"] == nil { o.handlers["GET"] = make(map[string]http.Handler) } o.handlers["GET"]["/data/cocsn:routes/route={route-destination}/expire"] = data.NewDataCocsnRoutesRouteRouteDestinationExpireGet(o.context, o.DataDataCocsnRoutesRouteRouteDestinationExpireGetHandler) + if o.handlers["PATCH"] == nil { + o.handlers["PATCH"] = make(map[string]http.Handler) + } + o.handlers["PATCH"]["/data/cocsn:routes/route={route-destination}/expire"] = data.NewDataCocsnRoutesRouteRouteDestinationExpirePatch(o.context, o.DataDataCocsnRoutesRouteRouteDestinationExpirePatchHandler) + if o.handlers["PUT"] == nil { + o.handlers["PUT"] = make(map[string]http.Handler) + } + o.handlers["PUT"]["/data/cocsn:routes/route={route-destination}/expire"] = data.NewDataCocsnRoutesRouteRouteDestinationExpirePut(o.context, o.DataDataCocsnRoutesRouteRouteDestinationExpirePutHandler) + if o.handlers["DELETE"] == nil { + o.handlers["DELETE"] = make(map[string]http.Handler) + } + o.handlers["DELETE"]["/data/cocsn:routes/route={route-destination}/flags"] = data.NewDataCocsnRoutesRouteRouteDestinationFlagsDelete(o.context, o.DataDataCocsnRoutesRouteRouteDestinationFlagsDeleteHandler) if o.handlers["GET"] == nil { o.handlers["GET"] = make(map[string]http.Handler) } o.handlers["GET"]["/data/cocsn:routes/route={route-destination}/flags"] = data.NewDataCocsnRoutesRouteRouteDestinationFlagsGet(o.context, o.DataDataCocsnRoutesRouteRouteDestinationFlagsGetHandler) + if o.handlers["PATCH"] == nil { + o.handlers["PATCH"] = make(map[string]http.Handler) + } + o.handlers["PATCH"]["/data/cocsn:routes/route={route-destination}/flags"] = data.NewDataCocsnRoutesRouteRouteDestinationFlagsPatch(o.context, o.DataDataCocsnRoutesRouteRouteDestinationFlagsPatchHandler) + if o.handlers["PUT"] == nil { + o.handlers["PUT"] = make(map[string]http.Handler) + } + o.handlers["PUT"]["/data/cocsn:routes/route={route-destination}/flags"] = data.NewDataCocsnRoutesRouteRouteDestinationFlagsPut(o.context, o.DataDataCocsnRoutesRouteRouteDestinationFlagsPutHandler) + if o.handlers["DELETE"] == nil { + o.handlers["DELETE"] = make(map[string]http.Handler) + } + o.handlers["DELETE"]["/data/cocsn:routes/route={route-destination}/gateway"] = data.NewDataCocsnRoutesRouteRouteDestinationGatewayDelete(o.context, o.DataDataCocsnRoutesRouteRouteDestinationGatewayDeleteHandler) if o.handlers["GET"] == nil { o.handlers["GET"] = make(map[string]http.Handler) } o.handlers["GET"]["/data/cocsn:routes/route={route-destination}/gateway"] = data.NewDataCocsnRoutesRouteRouteDestinationGatewayGet(o.context, o.DataDataCocsnRoutesRouteRouteDestinationGatewayGetHandler) + if o.handlers["PATCH"] == nil { + o.handlers["PATCH"] = make(map[string]http.Handler) + } + o.handlers["PATCH"]["/data/cocsn:routes/route={route-destination}/gateway"] = data.NewDataCocsnRoutesRouteRouteDestinationGatewayPatch(o.context, o.DataDataCocsnRoutesRouteRouteDestinationGatewayPatchHandler) + if o.handlers["PUT"] == nil { + o.handlers["PUT"] = make(map[string]http.Handler) + } + o.handlers["PUT"]["/data/cocsn:routes/route={route-destination}/gateway"] = data.NewDataCocsnRoutesRouteRouteDestinationGatewayPut(o.context, o.DataDataCocsnRoutesRouteRouteDestinationGatewayPutHandler) if o.handlers["GET"] == nil { o.handlers["GET"] = make(map[string]http.Handler) } o.handlers["GET"]["/data/cocsn:routes/route={route-destination}"] = data.NewDataCocsnRoutesRouteRouteDestinationGet(o.context, o.DataDataCocsnRoutesRouteRouteDestinationGetHandler) + if o.handlers["DELETE"] == nil { + o.handlers["DELETE"] = make(map[string]http.Handler) + } + o.handlers["DELETE"]["/data/cocsn:routes/route={route-destination}/interface"] = data.NewDataCocsnRoutesRouteRouteDestinationInterfaceDelete(o.context, o.DataDataCocsnRoutesRouteRouteDestinationInterfaceDeleteHandler) if o.handlers["GET"] == nil { o.handlers["GET"] = make(map[string]http.Handler) } o.handlers["GET"]["/data/cocsn:routes/route={route-destination}/interface"] = data.NewDataCocsnRoutesRouteRouteDestinationInterfaceGet(o.context, o.DataDataCocsnRoutesRouteRouteDestinationInterfaceGetHandler) + if o.handlers["PATCH"] == nil { + o.handlers["PATCH"] = make(map[string]http.Handler) + } + o.handlers["PATCH"]["/data/cocsn:routes/route={route-destination}/interface"] = data.NewDataCocsnRoutesRouteRouteDestinationInterfacePatch(o.context, o.DataDataCocsnRoutesRouteRouteDestinationInterfacePatchHandler) + if o.handlers["PUT"] == nil { + o.handlers["PUT"] = make(map[string]http.Handler) + } + o.handlers["PUT"]["/data/cocsn:routes/route={route-destination}/interface"] = data.NewDataCocsnRoutesRouteRouteDestinationInterfacePut(o.context, o.DataDataCocsnRoutesRouteRouteDestinationInterfacePutHandler) + if o.handlers["PATCH"] == nil { + o.handlers["PATCH"] = make(map[string]http.Handler) + } + o.handlers["PATCH"]["/data/cocsn:routes/route={route-destination}"] = data.NewDataCocsnRoutesRouteRouteDestinationPatch(o.context, o.DataDataCocsnRoutesRouteRouteDestinationPatchHandler) + if o.handlers["PUT"] == nil { + o.handlers["PUT"] = make(map[string]http.Handler) + } + o.handlers["PUT"]["/data/cocsn:routes/route={route-destination}"] = data.NewDataCocsnRoutesRouteRouteDestinationPut(o.context, o.DataDataCocsnRoutesRouteRouteDestinationPutHandler) if o.handlers["GET"] == nil { o.handlers["GET"] = make(map[string]http.Handler) } diff --git a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_address_get.go b/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_address_get.go deleted file mode 100644 index 3489eddd62bd7653d486f48ee2894f10c33f9648..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_address_get.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnArpTableArpEntryArpEntryAddressAddressGetHandlerFunc turns a function with the right signature into a data cocsn arp table arp entry arp entry address address get handler -type DataCocsnArpTableArpEntryArpEntryAddressAddressGetHandlerFunc func(DataCocsnArpTableArpEntryArpEntryAddressAddressGetParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnArpTableArpEntryArpEntryAddressAddressGetHandlerFunc) Handle(params DataCocsnArpTableArpEntryArpEntryAddressAddressGetParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnArpTableArpEntryArpEntryAddressAddressGetHandler interface for that can handle valid data cocsn arp table arp entry arp entry address address get params -type DataCocsnArpTableArpEntryArpEntryAddressAddressGetHandler interface { - Handle(DataCocsnArpTableArpEntryArpEntryAddressAddressGetParams, interface{}) middleware.Responder -} - -// NewDataCocsnArpTableArpEntryArpEntryAddressAddressGet creates a new http.Handler for the data cocsn arp table arp entry arp entry address address get operation -func NewDataCocsnArpTableArpEntryArpEntryAddressAddressGet(ctx *middleware.Context, handler DataCocsnArpTableArpEntryArpEntryAddressAddressGetHandler) *DataCocsnArpTableArpEntryArpEntryAddressAddressGet { - return &DataCocsnArpTableArpEntryArpEntryAddressAddressGet{Context: ctx, Handler: handler} -} - -/*DataCocsnArpTableArpEntryArpEntryAddressAddressGet swagger:route GET /data/cocsn:arp-table/arp-entry={arp-entry-address}/address data get dataCocsnArpTableArpEntryArpEntryAddressAddressGet - -IP address of the arp entry - -IP address of the arp entry - -*/ -type DataCocsnArpTableArpEntryArpEntryAddressAddressGet struct { - Context *middleware.Context - Handler DataCocsnArpTableArpEntryArpEntryAddressAddressGetHandler -} - -func (o *DataCocsnArpTableArpEntryArpEntryAddressAddressGet) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnArpTableArpEntryArpEntryAddressAddressGetParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_address_get_parameters.go b/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_address_get_parameters.go deleted file mode 100644 index be73ff0c29599271904221decc8b751e3b765595..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_address_get_parameters.go +++ /dev/null @@ -1,260 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NewDataCocsnArpTableArpEntryArpEntryAddressAddressGetParams creates a new DataCocsnArpTableArpEntryArpEntryAddressAddressGetParams object -// with the default values initialized. -func NewDataCocsnArpTableArpEntryArpEntryAddressAddressGetParams() DataCocsnArpTableArpEntryArpEntryAddressAddressGetParams { - - var ( - // initialize parameters with default values - - contentDefault = string("config") - - withDefaultsDefault = string("report-all") - ) - - return DataCocsnArpTableArpEntryArpEntryAddressAddressGetParams{ - Content: &contentDefault, - - WithDefaults: &withDefaultsDefault, - } -} - -// DataCocsnArpTableArpEntryArpEntryAddressAddressGetParams contains all the bound params for the data cocsn arp table arp entry arp entry address address get operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_arp_table_arp_entry_arp_entry_address_address_get -type DataCocsnArpTableArpEntryArpEntryAddressAddressGetParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*IP address of the arp entry - Required: true - In: path - */ - ArpEntryAddress string - /*controlling descendant nodes in response - In: query - Default: "config" - */ - Content *string - /*limit the depth of nodes in response - In: query - */ - Depth *uint16 - /*optionally identify specific data nodes in response - In: query - */ - Fields *string - /*xpath expression to filter data nodes in response - In: query - */ - Filter *string - /*controlling default values in response - In: query - Default: "report-all" - */ - WithDefaults *string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnArpTableArpEntryArpEntryAddressAddressGetParams() beforehand. -func (o *DataCocsnArpTableArpEntryArpEntryAddressAddressGetParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - qs := runtime.Values(r.URL.Query()) - - rArpEntryAddress, rhkArpEntryAddress, _ := route.Params.GetOK("arp-entry-address") - if err := o.bindArpEntryAddress(rArpEntryAddress, rhkArpEntryAddress, route.Formats); err != nil { - res = append(res, err) - } - - qContent, qhkContent, _ := qs.GetOK("content") - if err := o.bindContent(qContent, qhkContent, route.Formats); err != nil { - res = append(res, err) - } - - qDepth, qhkDepth, _ := qs.GetOK("depth") - if err := o.bindDepth(qDepth, qhkDepth, route.Formats); err != nil { - res = append(res, err) - } - - qFields, qhkFields, _ := qs.GetOK("fields") - if err := o.bindFields(qFields, qhkFields, route.Formats); err != nil { - res = append(res, err) - } - - qFilter, qhkFilter, _ := qs.GetOK("filter") - if err := o.bindFilter(qFilter, qhkFilter, route.Formats); err != nil { - res = append(res, err) - } - - qWithDefaults, qhkWithDefaults, _ := qs.GetOK("with-defaults") - if err := o.bindWithDefaults(qWithDefaults, qhkWithDefaults, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindArpEntryAddress binds and validates parameter ArpEntryAddress from path. -func (o *DataCocsnArpTableArpEntryArpEntryAddressAddressGetParams) bindArpEntryAddress(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.ArpEntryAddress = raw - - return nil -} - -// bindContent binds and validates parameter Content from query. -func (o *DataCocsnArpTableArpEntryArpEntryAddressAddressGetParams) bindContent(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnArpTableArpEntryArpEntryAddressAddressGetParams() - return nil - } - - o.Content = &raw - - if err := o.validateContent(formats); err != nil { - return err - } - - return nil -} - -// validateContent carries on validations for parameter Content -func (o *DataCocsnArpTableArpEntryArpEntryAddressAddressGetParams) validateContent(formats strfmt.Registry) error { - - if err := validate.EnumCase("content", "query", *o.Content, []interface{}{"config", "nonconfig", "all"}, true); err != nil { - return err - } - - return nil -} - -// bindDepth binds and validates parameter Depth from query. -func (o *DataCocsnArpTableArpEntryArpEntryAddressAddressGetParams) bindDepth(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - value, err := swag.ConvertUint16(raw) - if err != nil { - return errors.InvalidType("depth", "query", "uint16", raw) - } - o.Depth = &value - - return nil -} - -// bindFields binds and validates parameter Fields from query. -func (o *DataCocsnArpTableArpEntryArpEntryAddressAddressGetParams) bindFields(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Fields = &raw - - return nil -} - -// bindFilter binds and validates parameter Filter from query. -func (o *DataCocsnArpTableArpEntryArpEntryAddressAddressGetParams) bindFilter(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Filter = &raw - - return nil -} - -// bindWithDefaults binds and validates parameter WithDefaults from query. -func (o *DataCocsnArpTableArpEntryArpEntryAddressAddressGetParams) bindWithDefaults(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnArpTableArpEntryArpEntryAddressAddressGetParams() - return nil - } - - o.WithDefaults = &raw - - if err := o.validateWithDefaults(formats); err != nil { - return err - } - - return nil -} - -// validateWithDefaults carries on validations for parameter WithDefaults -func (o *DataCocsnArpTableArpEntryArpEntryAddressAddressGetParams) validateWithDefaults(formats strfmt.Registry) error { - - if err := validate.EnumCase("with-defaults", "query", *o.WithDefaults, []interface{}{"report-all", "trim", "explicit", "report-all-tagged"}, true); err != nil { - return err - } - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_address_get_responses.go b/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_address_get_responses.go deleted file mode 100644 index 79f3fef7edb51f987573b4eb79fd74c119f153b2..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_address_get_responses.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// DataCocsnArpTableArpEntryArpEntryAddressAddressGetOKCode is the HTTP code returned for type DataCocsnArpTableArpEntryArpEntryAddressAddressGetOK -const DataCocsnArpTableArpEntryArpEntryAddressAddressGetOKCode int = 200 - -/*DataCocsnArpTableArpEntryArpEntryAddressAddressGetOK IP address of the arp entry - -swagger:response dataCocsnArpTableArpEntryArpEntryAddressAddressGetOK -*/ -type DataCocsnArpTableArpEntryArpEntryAddressAddressGetOK struct { - - /* - In: Body - */ - Payload *models.DataCocsnArpTableArpEntryArpEntryAddressAddress `json:"body,omitempty"` -} - -// NewDataCocsnArpTableArpEntryArpEntryAddressAddressGetOK creates DataCocsnArpTableArpEntryArpEntryAddressAddressGetOK with default headers values -func NewDataCocsnArpTableArpEntryArpEntryAddressAddressGetOK() *DataCocsnArpTableArpEntryArpEntryAddressAddressGetOK { - - return &DataCocsnArpTableArpEntryArpEntryAddressAddressGetOK{} -} - -// WithPayload adds the payload to the data cocsn arp table arp entry arp entry address address get o k response -func (o *DataCocsnArpTableArpEntryArpEntryAddressAddressGetOK) WithPayload(payload *models.DataCocsnArpTableArpEntryArpEntryAddressAddress) *DataCocsnArpTableArpEntryArpEntryAddressAddressGetOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the data cocsn arp table arp entry arp entry address address get o k response -func (o *DataCocsnArpTableArpEntryArpEntryAddressAddressGetOK) SetPayload(payload *models.DataCocsnArpTableArpEntryArpEntryAddressAddress) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *DataCocsnArpTableArpEntryArpEntryAddressAddressGetOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// DataCocsnArpTableArpEntryArpEntryAddressAddressGetNoContentCode is the HTTP code returned for type DataCocsnArpTableArpEntryArpEntryAddressAddressGetNoContent -const DataCocsnArpTableArpEntryArpEntryAddressAddressGetNoContentCode int = 204 - -/*DataCocsnArpTableArpEntryArpEntryAddressAddressGetNoContent No Content - -swagger:response dataCocsnArpTableArpEntryArpEntryAddressAddressGetNoContent -*/ -type DataCocsnArpTableArpEntryArpEntryAddressAddressGetNoContent struct { -} - -// NewDataCocsnArpTableArpEntryArpEntryAddressAddressGetNoContent creates DataCocsnArpTableArpEntryArpEntryAddressAddressGetNoContent with default headers values -func NewDataCocsnArpTableArpEntryArpEntryAddressAddressGetNoContent() *DataCocsnArpTableArpEntryArpEntryAddressAddressGetNoContent { - - return &DataCocsnArpTableArpEntryArpEntryAddressAddressGetNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableArpEntryArpEntryAddressAddressGetNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnArpTableArpEntryArpEntryAddressAddressGetBadRequestCode is the HTTP code returned for type DataCocsnArpTableArpEntryArpEntryAddressAddressGetBadRequest -const DataCocsnArpTableArpEntryArpEntryAddressAddressGetBadRequestCode int = 400 - -/*DataCocsnArpTableArpEntryArpEntryAddressAddressGetBadRequest Bad Request - -swagger:response dataCocsnArpTableArpEntryArpEntryAddressAddressGetBadRequest -*/ -type DataCocsnArpTableArpEntryArpEntryAddressAddressGetBadRequest struct { -} - -// NewDataCocsnArpTableArpEntryArpEntryAddressAddressGetBadRequest creates DataCocsnArpTableArpEntryArpEntryAddressAddressGetBadRequest with default headers values -func NewDataCocsnArpTableArpEntryArpEntryAddressAddressGetBadRequest() *DataCocsnArpTableArpEntryArpEntryAddressAddressGetBadRequest { - - return &DataCocsnArpTableArpEntryArpEntryAddressAddressGetBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableArpEntryArpEntryAddressAddressGetBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnArpTableArpEntryArpEntryAddressAddressGetUnauthorizedCode is the HTTP code returned for type DataCocsnArpTableArpEntryArpEntryAddressAddressGetUnauthorized -const DataCocsnArpTableArpEntryArpEntryAddressAddressGetUnauthorizedCode int = 401 - -/*DataCocsnArpTableArpEntryArpEntryAddressAddressGetUnauthorized Unauthorized - -swagger:response dataCocsnArpTableArpEntryArpEntryAddressAddressGetUnauthorized -*/ -type DataCocsnArpTableArpEntryArpEntryAddressAddressGetUnauthorized struct { -} - -// NewDataCocsnArpTableArpEntryArpEntryAddressAddressGetUnauthorized creates DataCocsnArpTableArpEntryArpEntryAddressAddressGetUnauthorized with default headers values -func NewDataCocsnArpTableArpEntryArpEntryAddressAddressGetUnauthorized() *DataCocsnArpTableArpEntryArpEntryAddressAddressGetUnauthorized { - - return &DataCocsnArpTableArpEntryArpEntryAddressAddressGetUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableArpEntryArpEntryAddressAddressGetUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnArpTableArpEntryArpEntryAddressAddressGetNotFoundCode is the HTTP code returned for type DataCocsnArpTableArpEntryArpEntryAddressAddressGetNotFound -const DataCocsnArpTableArpEntryArpEntryAddressAddressGetNotFoundCode int = 404 - -/*DataCocsnArpTableArpEntryArpEntryAddressAddressGetNotFound Not Found - -swagger:response dataCocsnArpTableArpEntryArpEntryAddressAddressGetNotFound -*/ -type DataCocsnArpTableArpEntryArpEntryAddressAddressGetNotFound struct { -} - -// NewDataCocsnArpTableArpEntryArpEntryAddressAddressGetNotFound creates DataCocsnArpTableArpEntryArpEntryAddressAddressGetNotFound with default headers values -func NewDataCocsnArpTableArpEntryArpEntryAddressAddressGetNotFound() *DataCocsnArpTableArpEntryArpEntryAddressAddressGetNotFound { - - return &DataCocsnArpTableArpEntryArpEntryAddressAddressGetNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableArpEntryArpEntryAddressAddressGetNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnArpTableArpEntryArpEntryAddressAddressGetMethodNotAllowedCode is the HTTP code returned for type DataCocsnArpTableArpEntryArpEntryAddressAddressGetMethodNotAllowed -const DataCocsnArpTableArpEntryArpEntryAddressAddressGetMethodNotAllowedCode int = 405 - -/*DataCocsnArpTableArpEntryArpEntryAddressAddressGetMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnArpTableArpEntryArpEntryAddressAddressGetMethodNotAllowed -*/ -type DataCocsnArpTableArpEntryArpEntryAddressAddressGetMethodNotAllowed struct { -} - -// NewDataCocsnArpTableArpEntryArpEntryAddressAddressGetMethodNotAllowed creates DataCocsnArpTableArpEntryArpEntryAddressAddressGetMethodNotAllowed with default headers values -func NewDataCocsnArpTableArpEntryArpEntryAddressAddressGetMethodNotAllowed() *DataCocsnArpTableArpEntryArpEntryAddressAddressGetMethodNotAllowed { - - return &DataCocsnArpTableArpEntryArpEntryAddressAddressGetMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableArpEntryArpEntryAddressAddressGetMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnArpTableArpEntryArpEntryAddressAddressGetConflictCode is the HTTP code returned for type DataCocsnArpTableArpEntryArpEntryAddressAddressGetConflict -const DataCocsnArpTableArpEntryArpEntryAddressAddressGetConflictCode int = 409 - -/*DataCocsnArpTableArpEntryArpEntryAddressAddressGetConflict Conflict - -swagger:response dataCocsnArpTableArpEntryArpEntryAddressAddressGetConflict -*/ -type DataCocsnArpTableArpEntryArpEntryAddressAddressGetConflict struct { -} - -// NewDataCocsnArpTableArpEntryArpEntryAddressAddressGetConflict creates DataCocsnArpTableArpEntryArpEntryAddressAddressGetConflict with default headers values -func NewDataCocsnArpTableArpEntryArpEntryAddressAddressGetConflict() *DataCocsnArpTableArpEntryArpEntryAddressAddressGetConflict { - - return &DataCocsnArpTableArpEntryArpEntryAddressAddressGetConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableArpEntryArpEntryAddressAddressGetConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_address_get_urlbuilder.go b/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_address_get_urlbuilder.go deleted file mode 100644 index 3520cbe5450924cab43046050020872dfd0ec865..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_address_get_urlbuilder.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" - - "github.com/go-openapi/swag" -) - -// DataCocsnArpTableArpEntryArpEntryAddressAddressGetURL generates an URL for the data cocsn arp table arp entry arp entry address address get operation -type DataCocsnArpTableArpEntryArpEntryAddressAddressGetURL struct { - ArpEntryAddress string - - Content *string - Depth *uint16 - Fields *string - Filter *string - WithDefaults *string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnArpTableArpEntryArpEntryAddressAddressGetURL) WithBasePath(bp string) *DataCocsnArpTableArpEntryArpEntryAddressAddressGetURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnArpTableArpEntryArpEntryAddressAddressGetURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnArpTableArpEntryArpEntryAddressAddressGetURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:arp-table/arp-entry={arp-entry-address}/address" - - arpEntryAddress := o.ArpEntryAddress - if arpEntryAddress != "" { - _path = strings.Replace(_path, "{arp-entry-address}", arpEntryAddress, -1) - } else { - return nil, errors.New("arpEntryAddress is required on DataCocsnArpTableArpEntryArpEntryAddressAddressGetURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - qs := make(url.Values) - - var contentQ string - if o.Content != nil { - contentQ = *o.Content - } - if contentQ != "" { - qs.Set("content", contentQ) - } - - var depthQ string - if o.Depth != nil { - depthQ = swag.FormatUint16(*o.Depth) - } - if depthQ != "" { - qs.Set("depth", depthQ) - } - - var fieldsQ string - if o.Fields != nil { - fieldsQ = *o.Fields - } - if fieldsQ != "" { - qs.Set("fields", fieldsQ) - } - - var filterQ string - if o.Filter != nil { - filterQ = *o.Filter - } - if filterQ != "" { - qs.Set("filter", filterQ) - } - - var withDefaultsQ string - if o.WithDefaults != nil { - withDefaultsQ = *o.WithDefaults - } - if withDefaultsQ != "" { - qs.Set("with-defaults", withDefaultsQ) - } - - _result.RawQuery = qs.Encode() - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnArpTableArpEntryArpEntryAddressAddressGetURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnArpTableArpEntryArpEntryAddressAddressGetURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnArpTableArpEntryArpEntryAddressAddressGetURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnArpTableArpEntryArpEntryAddressAddressGetURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnArpTableArpEntryArpEntryAddressAddressGetURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnArpTableArpEntryArpEntryAddressAddressGetURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_get.go b/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_get.go deleted file mode 100644 index 5c5355ba68e1c301b286175356160fef629da634..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_get.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnArpTableArpEntryArpEntryAddressGetHandlerFunc turns a function with the right signature into a data cocsn arp table arp entry arp entry address get handler -type DataCocsnArpTableArpEntryArpEntryAddressGetHandlerFunc func(DataCocsnArpTableArpEntryArpEntryAddressGetParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnArpTableArpEntryArpEntryAddressGetHandlerFunc) Handle(params DataCocsnArpTableArpEntryArpEntryAddressGetParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnArpTableArpEntryArpEntryAddressGetHandler interface for that can handle valid data cocsn arp table arp entry arp entry address get params -type DataCocsnArpTableArpEntryArpEntryAddressGetHandler interface { - Handle(DataCocsnArpTableArpEntryArpEntryAddressGetParams, interface{}) middleware.Responder -} - -// NewDataCocsnArpTableArpEntryArpEntryAddressGet creates a new http.Handler for the data cocsn arp table arp entry arp entry address get operation -func NewDataCocsnArpTableArpEntryArpEntryAddressGet(ctx *middleware.Context, handler DataCocsnArpTableArpEntryArpEntryAddressGetHandler) *DataCocsnArpTableArpEntryArpEntryAddressGet { - return &DataCocsnArpTableArpEntryArpEntryAddressGet{Context: ctx, Handler: handler} -} - -/*DataCocsnArpTableArpEntryArpEntryAddressGet swagger:route GET /data/cocsn:arp-table/arp-entry={arp-entry-address} data get dataCocsnArpTableArpEntryArpEntryAddressGet - -DataCocsnArpTableArpEntryArpEntryAddressGet data cocsn arp table arp entry arp entry address get API - -*/ -type DataCocsnArpTableArpEntryArpEntryAddressGet struct { - Context *middleware.Context - Handler DataCocsnArpTableArpEntryArpEntryAddressGetHandler -} - -func (o *DataCocsnArpTableArpEntryArpEntryAddressGet) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnArpTableArpEntryArpEntryAddressGetParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_get_parameters.go b/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_get_parameters.go deleted file mode 100644 index e7337591bade27e5cd1469c93373bdcdbca1e821..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_get_parameters.go +++ /dev/null @@ -1,260 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NewDataCocsnArpTableArpEntryArpEntryAddressGetParams creates a new DataCocsnArpTableArpEntryArpEntryAddressGetParams object -// with the default values initialized. -func NewDataCocsnArpTableArpEntryArpEntryAddressGetParams() DataCocsnArpTableArpEntryArpEntryAddressGetParams { - - var ( - // initialize parameters with default values - - contentDefault = string("config") - - withDefaultsDefault = string("report-all") - ) - - return DataCocsnArpTableArpEntryArpEntryAddressGetParams{ - Content: &contentDefault, - - WithDefaults: &withDefaultsDefault, - } -} - -// DataCocsnArpTableArpEntryArpEntryAddressGetParams contains all the bound params for the data cocsn arp table arp entry arp entry address get operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_arp_table_arp_entry_arp_entry_address_get -type DataCocsnArpTableArpEntryArpEntryAddressGetParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*IP address of the arp entry - Required: true - In: path - */ - ArpEntryAddress string - /*controlling descendant nodes in response - In: query - Default: "config" - */ - Content *string - /*limit the depth of nodes in response - In: query - */ - Depth *uint16 - /*optionally identify specific data nodes in response - In: query - */ - Fields *string - /*xpath expression to filter data nodes in response - In: query - */ - Filter *string - /*controlling default values in response - In: query - Default: "report-all" - */ - WithDefaults *string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnArpTableArpEntryArpEntryAddressGetParams() beforehand. -func (o *DataCocsnArpTableArpEntryArpEntryAddressGetParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - qs := runtime.Values(r.URL.Query()) - - rArpEntryAddress, rhkArpEntryAddress, _ := route.Params.GetOK("arp-entry-address") - if err := o.bindArpEntryAddress(rArpEntryAddress, rhkArpEntryAddress, route.Formats); err != nil { - res = append(res, err) - } - - qContent, qhkContent, _ := qs.GetOK("content") - if err := o.bindContent(qContent, qhkContent, route.Formats); err != nil { - res = append(res, err) - } - - qDepth, qhkDepth, _ := qs.GetOK("depth") - if err := o.bindDepth(qDepth, qhkDepth, route.Formats); err != nil { - res = append(res, err) - } - - qFields, qhkFields, _ := qs.GetOK("fields") - if err := o.bindFields(qFields, qhkFields, route.Formats); err != nil { - res = append(res, err) - } - - qFilter, qhkFilter, _ := qs.GetOK("filter") - if err := o.bindFilter(qFilter, qhkFilter, route.Formats); err != nil { - res = append(res, err) - } - - qWithDefaults, qhkWithDefaults, _ := qs.GetOK("with-defaults") - if err := o.bindWithDefaults(qWithDefaults, qhkWithDefaults, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindArpEntryAddress binds and validates parameter ArpEntryAddress from path. -func (o *DataCocsnArpTableArpEntryArpEntryAddressGetParams) bindArpEntryAddress(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.ArpEntryAddress = raw - - return nil -} - -// bindContent binds and validates parameter Content from query. -func (o *DataCocsnArpTableArpEntryArpEntryAddressGetParams) bindContent(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnArpTableArpEntryArpEntryAddressGetParams() - return nil - } - - o.Content = &raw - - if err := o.validateContent(formats); err != nil { - return err - } - - return nil -} - -// validateContent carries on validations for parameter Content -func (o *DataCocsnArpTableArpEntryArpEntryAddressGetParams) validateContent(formats strfmt.Registry) error { - - if err := validate.EnumCase("content", "query", *o.Content, []interface{}{"config", "nonconfig", "all"}, true); err != nil { - return err - } - - return nil -} - -// bindDepth binds and validates parameter Depth from query. -func (o *DataCocsnArpTableArpEntryArpEntryAddressGetParams) bindDepth(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - value, err := swag.ConvertUint16(raw) - if err != nil { - return errors.InvalidType("depth", "query", "uint16", raw) - } - o.Depth = &value - - return nil -} - -// bindFields binds and validates parameter Fields from query. -func (o *DataCocsnArpTableArpEntryArpEntryAddressGetParams) bindFields(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Fields = &raw - - return nil -} - -// bindFilter binds and validates parameter Filter from query. -func (o *DataCocsnArpTableArpEntryArpEntryAddressGetParams) bindFilter(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Filter = &raw - - return nil -} - -// bindWithDefaults binds and validates parameter WithDefaults from query. -func (o *DataCocsnArpTableArpEntryArpEntryAddressGetParams) bindWithDefaults(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnArpTableArpEntryArpEntryAddressGetParams() - return nil - } - - o.WithDefaults = &raw - - if err := o.validateWithDefaults(formats); err != nil { - return err - } - - return nil -} - -// validateWithDefaults carries on validations for parameter WithDefaults -func (o *DataCocsnArpTableArpEntryArpEntryAddressGetParams) validateWithDefaults(formats strfmt.Registry) error { - - if err := validate.EnumCase("with-defaults", "query", *o.WithDefaults, []interface{}{"report-all", "trim", "explicit", "report-all-tagged"}, true); err != nil { - return err - } - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_get_responses.go b/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_get_responses.go deleted file mode 100644 index fcfa7d140028f3a5f30b8ed0caaf1cd752cad4e3..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_get_responses.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// DataCocsnArpTableArpEntryArpEntryAddressGetOKCode is the HTTP code returned for type DataCocsnArpTableArpEntryArpEntryAddressGetOK -const DataCocsnArpTableArpEntryArpEntryAddressGetOKCode int = 200 - -/*DataCocsnArpTableArpEntryArpEntryAddressGetOK OK - -swagger:response dataCocsnArpTableArpEntryArpEntryAddressGetOK -*/ -type DataCocsnArpTableArpEntryArpEntryAddressGetOK struct { - - /* - In: Body - */ - Payload *models.DataCocsnArpTableArpEntryArpEntryAddress `json:"body,omitempty"` -} - -// NewDataCocsnArpTableArpEntryArpEntryAddressGetOK creates DataCocsnArpTableArpEntryArpEntryAddressGetOK with default headers values -func NewDataCocsnArpTableArpEntryArpEntryAddressGetOK() *DataCocsnArpTableArpEntryArpEntryAddressGetOK { - - return &DataCocsnArpTableArpEntryArpEntryAddressGetOK{} -} - -// WithPayload adds the payload to the data cocsn arp table arp entry arp entry address get o k response -func (o *DataCocsnArpTableArpEntryArpEntryAddressGetOK) WithPayload(payload *models.DataCocsnArpTableArpEntryArpEntryAddress) *DataCocsnArpTableArpEntryArpEntryAddressGetOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the data cocsn arp table arp entry arp entry address get o k response -func (o *DataCocsnArpTableArpEntryArpEntryAddressGetOK) SetPayload(payload *models.DataCocsnArpTableArpEntryArpEntryAddress) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *DataCocsnArpTableArpEntryArpEntryAddressGetOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// DataCocsnArpTableArpEntryArpEntryAddressGetNoContentCode is the HTTP code returned for type DataCocsnArpTableArpEntryArpEntryAddressGetNoContent -const DataCocsnArpTableArpEntryArpEntryAddressGetNoContentCode int = 204 - -/*DataCocsnArpTableArpEntryArpEntryAddressGetNoContent No Content - -swagger:response dataCocsnArpTableArpEntryArpEntryAddressGetNoContent -*/ -type DataCocsnArpTableArpEntryArpEntryAddressGetNoContent struct { -} - -// NewDataCocsnArpTableArpEntryArpEntryAddressGetNoContent creates DataCocsnArpTableArpEntryArpEntryAddressGetNoContent with default headers values -func NewDataCocsnArpTableArpEntryArpEntryAddressGetNoContent() *DataCocsnArpTableArpEntryArpEntryAddressGetNoContent { - - return &DataCocsnArpTableArpEntryArpEntryAddressGetNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableArpEntryArpEntryAddressGetNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnArpTableArpEntryArpEntryAddressGetBadRequestCode is the HTTP code returned for type DataCocsnArpTableArpEntryArpEntryAddressGetBadRequest -const DataCocsnArpTableArpEntryArpEntryAddressGetBadRequestCode int = 400 - -/*DataCocsnArpTableArpEntryArpEntryAddressGetBadRequest Bad Request - -swagger:response dataCocsnArpTableArpEntryArpEntryAddressGetBadRequest -*/ -type DataCocsnArpTableArpEntryArpEntryAddressGetBadRequest struct { -} - -// NewDataCocsnArpTableArpEntryArpEntryAddressGetBadRequest creates DataCocsnArpTableArpEntryArpEntryAddressGetBadRequest with default headers values -func NewDataCocsnArpTableArpEntryArpEntryAddressGetBadRequest() *DataCocsnArpTableArpEntryArpEntryAddressGetBadRequest { - - return &DataCocsnArpTableArpEntryArpEntryAddressGetBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableArpEntryArpEntryAddressGetBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnArpTableArpEntryArpEntryAddressGetUnauthorizedCode is the HTTP code returned for type DataCocsnArpTableArpEntryArpEntryAddressGetUnauthorized -const DataCocsnArpTableArpEntryArpEntryAddressGetUnauthorizedCode int = 401 - -/*DataCocsnArpTableArpEntryArpEntryAddressGetUnauthorized Unauthorized - -swagger:response dataCocsnArpTableArpEntryArpEntryAddressGetUnauthorized -*/ -type DataCocsnArpTableArpEntryArpEntryAddressGetUnauthorized struct { -} - -// NewDataCocsnArpTableArpEntryArpEntryAddressGetUnauthorized creates DataCocsnArpTableArpEntryArpEntryAddressGetUnauthorized with default headers values -func NewDataCocsnArpTableArpEntryArpEntryAddressGetUnauthorized() *DataCocsnArpTableArpEntryArpEntryAddressGetUnauthorized { - - return &DataCocsnArpTableArpEntryArpEntryAddressGetUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableArpEntryArpEntryAddressGetUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnArpTableArpEntryArpEntryAddressGetNotFoundCode is the HTTP code returned for type DataCocsnArpTableArpEntryArpEntryAddressGetNotFound -const DataCocsnArpTableArpEntryArpEntryAddressGetNotFoundCode int = 404 - -/*DataCocsnArpTableArpEntryArpEntryAddressGetNotFound Not Found - -swagger:response dataCocsnArpTableArpEntryArpEntryAddressGetNotFound -*/ -type DataCocsnArpTableArpEntryArpEntryAddressGetNotFound struct { -} - -// NewDataCocsnArpTableArpEntryArpEntryAddressGetNotFound creates DataCocsnArpTableArpEntryArpEntryAddressGetNotFound with default headers values -func NewDataCocsnArpTableArpEntryArpEntryAddressGetNotFound() *DataCocsnArpTableArpEntryArpEntryAddressGetNotFound { - - return &DataCocsnArpTableArpEntryArpEntryAddressGetNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableArpEntryArpEntryAddressGetNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnArpTableArpEntryArpEntryAddressGetMethodNotAllowedCode is the HTTP code returned for type DataCocsnArpTableArpEntryArpEntryAddressGetMethodNotAllowed -const DataCocsnArpTableArpEntryArpEntryAddressGetMethodNotAllowedCode int = 405 - -/*DataCocsnArpTableArpEntryArpEntryAddressGetMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnArpTableArpEntryArpEntryAddressGetMethodNotAllowed -*/ -type DataCocsnArpTableArpEntryArpEntryAddressGetMethodNotAllowed struct { -} - -// NewDataCocsnArpTableArpEntryArpEntryAddressGetMethodNotAllowed creates DataCocsnArpTableArpEntryArpEntryAddressGetMethodNotAllowed with default headers values -func NewDataCocsnArpTableArpEntryArpEntryAddressGetMethodNotAllowed() *DataCocsnArpTableArpEntryArpEntryAddressGetMethodNotAllowed { - - return &DataCocsnArpTableArpEntryArpEntryAddressGetMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableArpEntryArpEntryAddressGetMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnArpTableArpEntryArpEntryAddressGetConflictCode is the HTTP code returned for type DataCocsnArpTableArpEntryArpEntryAddressGetConflict -const DataCocsnArpTableArpEntryArpEntryAddressGetConflictCode int = 409 - -/*DataCocsnArpTableArpEntryArpEntryAddressGetConflict Conflict - -swagger:response dataCocsnArpTableArpEntryArpEntryAddressGetConflict -*/ -type DataCocsnArpTableArpEntryArpEntryAddressGetConflict struct { -} - -// NewDataCocsnArpTableArpEntryArpEntryAddressGetConflict creates DataCocsnArpTableArpEntryArpEntryAddressGetConflict with default headers values -func NewDataCocsnArpTableArpEntryArpEntryAddressGetConflict() *DataCocsnArpTableArpEntryArpEntryAddressGetConflict { - - return &DataCocsnArpTableArpEntryArpEntryAddressGetConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableArpEntryArpEntryAddressGetConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_get_urlbuilder.go b/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_get_urlbuilder.go deleted file mode 100644 index c6259e84833cd20690b40659303cd09cdd9593e7..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_get_urlbuilder.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" - - "github.com/go-openapi/swag" -) - -// DataCocsnArpTableArpEntryArpEntryAddressGetURL generates an URL for the data cocsn arp table arp entry arp entry address get operation -type DataCocsnArpTableArpEntryArpEntryAddressGetURL struct { - ArpEntryAddress string - - Content *string - Depth *uint16 - Fields *string - Filter *string - WithDefaults *string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnArpTableArpEntryArpEntryAddressGetURL) WithBasePath(bp string) *DataCocsnArpTableArpEntryArpEntryAddressGetURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnArpTableArpEntryArpEntryAddressGetURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnArpTableArpEntryArpEntryAddressGetURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:arp-table/arp-entry={arp-entry-address}" - - arpEntryAddress := o.ArpEntryAddress - if arpEntryAddress != "" { - _path = strings.Replace(_path, "{arp-entry-address}", arpEntryAddress, -1) - } else { - return nil, errors.New("arpEntryAddress is required on DataCocsnArpTableArpEntryArpEntryAddressGetURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - qs := make(url.Values) - - var contentQ string - if o.Content != nil { - contentQ = *o.Content - } - if contentQ != "" { - qs.Set("content", contentQ) - } - - var depthQ string - if o.Depth != nil { - depthQ = swag.FormatUint16(*o.Depth) - } - if depthQ != "" { - qs.Set("depth", depthQ) - } - - var fieldsQ string - if o.Fields != nil { - fieldsQ = *o.Fields - } - if fieldsQ != "" { - qs.Set("fields", fieldsQ) - } - - var filterQ string - if o.Filter != nil { - filterQ = *o.Filter - } - if filterQ != "" { - qs.Set("filter", filterQ) - } - - var withDefaultsQ string - if o.WithDefaults != nil { - withDefaultsQ = *o.WithDefaults - } - if withDefaultsQ != "" { - qs.Set("with-defaults", withDefaultsQ) - } - - _result.RawQuery = qs.Encode() - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnArpTableArpEntryArpEntryAddressGetURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnArpTableArpEntryArpEntryAddressGetURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnArpTableArpEntryArpEntryAddressGetURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnArpTableArpEntryArpEntryAddressGetURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnArpTableArpEntryArpEntryAddressGetURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnArpTableArpEntryArpEntryAddressGetURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_interface_get.go b/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_interface_get.go deleted file mode 100644 index 15b4d862f1f819204cd28d66f0bacc94b9305be2..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_interface_get.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetHandlerFunc turns a function with the right signature into a data cocsn arp table arp entry arp entry address interface get handler -type DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetHandlerFunc func(DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetHandlerFunc) Handle(params DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetHandler interface for that can handle valid data cocsn arp table arp entry arp entry address interface get params -type DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetHandler interface { - Handle(DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetParams, interface{}) middleware.Responder -} - -// NewDataCocsnArpTableArpEntryArpEntryAddressInterfaceGet creates a new http.Handler for the data cocsn arp table arp entry arp entry address interface get operation -func NewDataCocsnArpTableArpEntryArpEntryAddressInterfaceGet(ctx *middleware.Context, handler DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetHandler) *DataCocsnArpTableArpEntryArpEntryAddressInterfaceGet { - return &DataCocsnArpTableArpEntryArpEntryAddressInterfaceGet{Context: ctx, Handler: handler} -} - -/*DataCocsnArpTableArpEntryArpEntryAddressInterfaceGet swagger:route GET /data/cocsn:arp-table/arp-entry={arp-entry-address}/interface data get dataCocsnArpTableArpEntryArpEntryAddressInterfaceGet - -Interface of the arp entry - -Interface of the arp entry - -*/ -type DataCocsnArpTableArpEntryArpEntryAddressInterfaceGet struct { - Context *middleware.Context - Handler DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetHandler -} - -func (o *DataCocsnArpTableArpEntryArpEntryAddressInterfaceGet) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnArpTableArpEntryArpEntryAddressInterfaceGetParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_interface_get_parameters.go b/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_interface_get_parameters.go deleted file mode 100644 index 6defe0cee5a9764f8a4eac14c7030fedbe1538a6..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_interface_get_parameters.go +++ /dev/null @@ -1,260 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NewDataCocsnArpTableArpEntryArpEntryAddressInterfaceGetParams creates a new DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetParams object -// with the default values initialized. -func NewDataCocsnArpTableArpEntryArpEntryAddressInterfaceGetParams() DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetParams { - - var ( - // initialize parameters with default values - - contentDefault = string("config") - - withDefaultsDefault = string("report-all") - ) - - return DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetParams{ - Content: &contentDefault, - - WithDefaults: &withDefaultsDefault, - } -} - -// DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetParams contains all the bound params for the data cocsn arp table arp entry arp entry address interface get operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_arp_table_arp_entry_arp_entry_address_interface_get -type DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*IP address of the arp entry - Required: true - In: path - */ - ArpEntryAddress string - /*controlling descendant nodes in response - In: query - Default: "config" - */ - Content *string - /*limit the depth of nodes in response - In: query - */ - Depth *uint16 - /*optionally identify specific data nodes in response - In: query - */ - Fields *string - /*xpath expression to filter data nodes in response - In: query - */ - Filter *string - /*controlling default values in response - In: query - Default: "report-all" - */ - WithDefaults *string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnArpTableArpEntryArpEntryAddressInterfaceGetParams() beforehand. -func (o *DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - qs := runtime.Values(r.URL.Query()) - - rArpEntryAddress, rhkArpEntryAddress, _ := route.Params.GetOK("arp-entry-address") - if err := o.bindArpEntryAddress(rArpEntryAddress, rhkArpEntryAddress, route.Formats); err != nil { - res = append(res, err) - } - - qContent, qhkContent, _ := qs.GetOK("content") - if err := o.bindContent(qContent, qhkContent, route.Formats); err != nil { - res = append(res, err) - } - - qDepth, qhkDepth, _ := qs.GetOK("depth") - if err := o.bindDepth(qDepth, qhkDepth, route.Formats); err != nil { - res = append(res, err) - } - - qFields, qhkFields, _ := qs.GetOK("fields") - if err := o.bindFields(qFields, qhkFields, route.Formats); err != nil { - res = append(res, err) - } - - qFilter, qhkFilter, _ := qs.GetOK("filter") - if err := o.bindFilter(qFilter, qhkFilter, route.Formats); err != nil { - res = append(res, err) - } - - qWithDefaults, qhkWithDefaults, _ := qs.GetOK("with-defaults") - if err := o.bindWithDefaults(qWithDefaults, qhkWithDefaults, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindArpEntryAddress binds and validates parameter ArpEntryAddress from path. -func (o *DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetParams) bindArpEntryAddress(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.ArpEntryAddress = raw - - return nil -} - -// bindContent binds and validates parameter Content from query. -func (o *DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetParams) bindContent(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnArpTableArpEntryArpEntryAddressInterfaceGetParams() - return nil - } - - o.Content = &raw - - if err := o.validateContent(formats); err != nil { - return err - } - - return nil -} - -// validateContent carries on validations for parameter Content -func (o *DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetParams) validateContent(formats strfmt.Registry) error { - - if err := validate.EnumCase("content", "query", *o.Content, []interface{}{"config", "nonconfig", "all"}, true); err != nil { - return err - } - - return nil -} - -// bindDepth binds and validates parameter Depth from query. -func (o *DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetParams) bindDepth(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - value, err := swag.ConvertUint16(raw) - if err != nil { - return errors.InvalidType("depth", "query", "uint16", raw) - } - o.Depth = &value - - return nil -} - -// bindFields binds and validates parameter Fields from query. -func (o *DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetParams) bindFields(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Fields = &raw - - return nil -} - -// bindFilter binds and validates parameter Filter from query. -func (o *DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetParams) bindFilter(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Filter = &raw - - return nil -} - -// bindWithDefaults binds and validates parameter WithDefaults from query. -func (o *DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetParams) bindWithDefaults(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnArpTableArpEntryArpEntryAddressInterfaceGetParams() - return nil - } - - o.WithDefaults = &raw - - if err := o.validateWithDefaults(formats); err != nil { - return err - } - - return nil -} - -// validateWithDefaults carries on validations for parameter WithDefaults -func (o *DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetParams) validateWithDefaults(formats strfmt.Registry) error { - - if err := validate.EnumCase("with-defaults", "query", *o.WithDefaults, []interface{}{"report-all", "trim", "explicit", "report-all-tagged"}, true); err != nil { - return err - } - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_interface_get_responses.go b/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_interface_get_responses.go deleted file mode 100644 index 9b317b5ec19dfb4d90d11183eeadae84167c2ce1..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_interface_get_responses.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetOKCode is the HTTP code returned for type DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetOK -const DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetOKCode int = 200 - -/*DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetOK Interface of the arp entry - -swagger:response dataCocsnArpTableArpEntryArpEntryAddressInterfaceGetOK -*/ -type DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetOK struct { - - /* - In: Body - */ - Payload *models.DataCocsnArpTableArpEntryArpEntryAddressInterface `json:"body,omitempty"` -} - -// NewDataCocsnArpTableArpEntryArpEntryAddressInterfaceGetOK creates DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetOK with default headers values -func NewDataCocsnArpTableArpEntryArpEntryAddressInterfaceGetOK() *DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetOK { - - return &DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetOK{} -} - -// WithPayload adds the payload to the data cocsn arp table arp entry arp entry address interface get o k response -func (o *DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetOK) WithPayload(payload *models.DataCocsnArpTableArpEntryArpEntryAddressInterface) *DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the data cocsn arp table arp entry arp entry address interface get o k response -func (o *DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetOK) SetPayload(payload *models.DataCocsnArpTableArpEntryArpEntryAddressInterface) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetNoContentCode is the HTTP code returned for type DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetNoContent -const DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetNoContentCode int = 204 - -/*DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetNoContent No Content - -swagger:response dataCocsnArpTableArpEntryArpEntryAddressInterfaceGetNoContent -*/ -type DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetNoContent struct { -} - -// NewDataCocsnArpTableArpEntryArpEntryAddressInterfaceGetNoContent creates DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetNoContent with default headers values -func NewDataCocsnArpTableArpEntryArpEntryAddressInterfaceGetNoContent() *DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetNoContent { - - return &DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetBadRequestCode is the HTTP code returned for type DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetBadRequest -const DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetBadRequestCode int = 400 - -/*DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetBadRequest Bad Request - -swagger:response dataCocsnArpTableArpEntryArpEntryAddressInterfaceGetBadRequest -*/ -type DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetBadRequest struct { -} - -// NewDataCocsnArpTableArpEntryArpEntryAddressInterfaceGetBadRequest creates DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetBadRequest with default headers values -func NewDataCocsnArpTableArpEntryArpEntryAddressInterfaceGetBadRequest() *DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetBadRequest { - - return &DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetUnauthorizedCode is the HTTP code returned for type DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetUnauthorized -const DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetUnauthorizedCode int = 401 - -/*DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetUnauthorized Unauthorized - -swagger:response dataCocsnArpTableArpEntryArpEntryAddressInterfaceGetUnauthorized -*/ -type DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetUnauthorized struct { -} - -// NewDataCocsnArpTableArpEntryArpEntryAddressInterfaceGetUnauthorized creates DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetUnauthorized with default headers values -func NewDataCocsnArpTableArpEntryArpEntryAddressInterfaceGetUnauthorized() *DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetUnauthorized { - - return &DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetNotFoundCode is the HTTP code returned for type DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetNotFound -const DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetNotFoundCode int = 404 - -/*DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetNotFound Not Found - -swagger:response dataCocsnArpTableArpEntryArpEntryAddressInterfaceGetNotFound -*/ -type DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetNotFound struct { -} - -// NewDataCocsnArpTableArpEntryArpEntryAddressInterfaceGetNotFound creates DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetNotFound with default headers values -func NewDataCocsnArpTableArpEntryArpEntryAddressInterfaceGetNotFound() *DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetNotFound { - - return &DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetMethodNotAllowedCode is the HTTP code returned for type DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetMethodNotAllowed -const DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetMethodNotAllowedCode int = 405 - -/*DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnArpTableArpEntryArpEntryAddressInterfaceGetMethodNotAllowed -*/ -type DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetMethodNotAllowed struct { -} - -// NewDataCocsnArpTableArpEntryArpEntryAddressInterfaceGetMethodNotAllowed creates DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetMethodNotAllowed with default headers values -func NewDataCocsnArpTableArpEntryArpEntryAddressInterfaceGetMethodNotAllowed() *DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetMethodNotAllowed { - - return &DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetConflictCode is the HTTP code returned for type DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetConflict -const DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetConflictCode int = 409 - -/*DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetConflict Conflict - -swagger:response dataCocsnArpTableArpEntryArpEntryAddressInterfaceGetConflict -*/ -type DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetConflict struct { -} - -// NewDataCocsnArpTableArpEntryArpEntryAddressInterfaceGetConflict creates DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetConflict with default headers values -func NewDataCocsnArpTableArpEntryArpEntryAddressInterfaceGetConflict() *DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetConflict { - - return &DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_interface_get_urlbuilder.go b/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_interface_get_urlbuilder.go deleted file mode 100644 index b4d1ab4ae6ab9b3d66bf398ba706267e156df24e..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_interface_get_urlbuilder.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" - - "github.com/go-openapi/swag" -) - -// DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetURL generates an URL for the data cocsn arp table arp entry arp entry address interface get operation -type DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetURL struct { - ArpEntryAddress string - - Content *string - Depth *uint16 - Fields *string - Filter *string - WithDefaults *string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetURL) WithBasePath(bp string) *DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:arp-table/arp-entry={arp-entry-address}/interface" - - arpEntryAddress := o.ArpEntryAddress - if arpEntryAddress != "" { - _path = strings.Replace(_path, "{arp-entry-address}", arpEntryAddress, -1) - } else { - return nil, errors.New("arpEntryAddress is required on DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - qs := make(url.Values) - - var contentQ string - if o.Content != nil { - contentQ = *o.Content - } - if contentQ != "" { - qs.Set("content", contentQ) - } - - var depthQ string - if o.Depth != nil { - depthQ = swag.FormatUint16(*o.Depth) - } - if depthQ != "" { - qs.Set("depth", depthQ) - } - - var fieldsQ string - if o.Fields != nil { - fieldsQ = *o.Fields - } - if fieldsQ != "" { - qs.Set("fields", fieldsQ) - } - - var filterQ string - if o.Filter != nil { - filterQ = *o.Filter - } - if filterQ != "" { - qs.Set("filter", filterQ) - } - - var withDefaultsQ string - if o.WithDefaults != nil { - withDefaultsQ = *o.WithDefaults - } - if withDefaultsQ != "" { - qs.Set("with-defaults", withDefaultsQ) - } - - _result.RawQuery = qs.Encode() - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnArpTableArpEntryArpEntryAddressInterfaceGetURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_phs_address_get.go b/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_phs_address_get.go deleted file mode 100644 index 8ae7f6e13966e79b82f64b0f13907c589009dbf9..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_phs_address_get.go +++ /dev/null @@ -1,73 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetHandlerFunc turns a function with the right signature into a data cocsn arp table arp entry arp entry address phs address get handler -type DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetHandlerFunc func(DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetHandlerFunc) Handle(params DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetHandler interface for that can handle valid data cocsn arp table arp entry arp entry address phs address get params -type DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetHandler interface { - Handle(DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetParams, interface{}) middleware.Responder -} - -// NewDataCocsnArpTableArpEntryArpEntryAddressPhsAddressGet creates a new http.Handler for the data cocsn arp table arp entry arp entry address phs address get operation -func NewDataCocsnArpTableArpEntryArpEntryAddressPhsAddressGet(ctx *middleware.Context, handler DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetHandler) *DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGet { - return &DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGet{Context: ctx, Handler: handler} -} - -/*DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGet swagger:route GET /data/cocsn:arp-table/arp-entry={arp-entry-address}/phs-address data get dataCocsnArpTableArpEntryArpEntryAddressPhsAddressGet - -MAC address of the arp entry - -MAC address of the arp entry - -*/ -type DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGet struct { - Context *middleware.Context - Handler DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetHandler -} - -func (o *DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGet) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_phs_address_get_parameters.go b/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_phs_address_get_parameters.go deleted file mode 100644 index 62cdcc17bada3909e3d67fb259a54427f761c765..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_phs_address_get_parameters.go +++ /dev/null @@ -1,260 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NewDataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetParams creates a new DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetParams object -// with the default values initialized. -func NewDataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetParams() DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetParams { - - var ( - // initialize parameters with default values - - contentDefault = string("config") - - withDefaultsDefault = string("report-all") - ) - - return DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetParams{ - Content: &contentDefault, - - WithDefaults: &withDefaultsDefault, - } -} - -// DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetParams contains all the bound params for the data cocsn arp table arp entry arp entry address phs address get operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_arp_table_arp_entry_arp_entry_address_phs_address_get -type DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*IP address of the arp entry - Required: true - In: path - */ - ArpEntryAddress string - /*controlling descendant nodes in response - In: query - Default: "config" - */ - Content *string - /*limit the depth of nodes in response - In: query - */ - Depth *uint16 - /*optionally identify specific data nodes in response - In: query - */ - Fields *string - /*xpath expression to filter data nodes in response - In: query - */ - Filter *string - /*controlling default values in response - In: query - Default: "report-all" - */ - WithDefaults *string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetParams() beforehand. -func (o *DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - qs := runtime.Values(r.URL.Query()) - - rArpEntryAddress, rhkArpEntryAddress, _ := route.Params.GetOK("arp-entry-address") - if err := o.bindArpEntryAddress(rArpEntryAddress, rhkArpEntryAddress, route.Formats); err != nil { - res = append(res, err) - } - - qContent, qhkContent, _ := qs.GetOK("content") - if err := o.bindContent(qContent, qhkContent, route.Formats); err != nil { - res = append(res, err) - } - - qDepth, qhkDepth, _ := qs.GetOK("depth") - if err := o.bindDepth(qDepth, qhkDepth, route.Formats); err != nil { - res = append(res, err) - } - - qFields, qhkFields, _ := qs.GetOK("fields") - if err := o.bindFields(qFields, qhkFields, route.Formats); err != nil { - res = append(res, err) - } - - qFilter, qhkFilter, _ := qs.GetOK("filter") - if err := o.bindFilter(qFilter, qhkFilter, route.Formats); err != nil { - res = append(res, err) - } - - qWithDefaults, qhkWithDefaults, _ := qs.GetOK("with-defaults") - if err := o.bindWithDefaults(qWithDefaults, qhkWithDefaults, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindArpEntryAddress binds and validates parameter ArpEntryAddress from path. -func (o *DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetParams) bindArpEntryAddress(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.ArpEntryAddress = raw - - return nil -} - -// bindContent binds and validates parameter Content from query. -func (o *DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetParams) bindContent(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetParams() - return nil - } - - o.Content = &raw - - if err := o.validateContent(formats); err != nil { - return err - } - - return nil -} - -// validateContent carries on validations for parameter Content -func (o *DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetParams) validateContent(formats strfmt.Registry) error { - - if err := validate.EnumCase("content", "query", *o.Content, []interface{}{"config", "nonconfig", "all"}, true); err != nil { - return err - } - - return nil -} - -// bindDepth binds and validates parameter Depth from query. -func (o *DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetParams) bindDepth(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - value, err := swag.ConvertUint16(raw) - if err != nil { - return errors.InvalidType("depth", "query", "uint16", raw) - } - o.Depth = &value - - return nil -} - -// bindFields binds and validates parameter Fields from query. -func (o *DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetParams) bindFields(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Fields = &raw - - return nil -} - -// bindFilter binds and validates parameter Filter from query. -func (o *DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetParams) bindFilter(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Filter = &raw - - return nil -} - -// bindWithDefaults binds and validates parameter WithDefaults from query. -func (o *DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetParams) bindWithDefaults(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetParams() - return nil - } - - o.WithDefaults = &raw - - if err := o.validateWithDefaults(formats); err != nil { - return err - } - - return nil -} - -// validateWithDefaults carries on validations for parameter WithDefaults -func (o *DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetParams) validateWithDefaults(formats strfmt.Registry) error { - - if err := validate.EnumCase("with-defaults", "query", *o.WithDefaults, []interface{}{"report-all", "trim", "explicit", "report-all-tagged"}, true); err != nil { - return err - } - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_phs_address_get_responses.go b/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_phs_address_get_responses.go deleted file mode 100644 index 0413b772745e1af398ba16c0eb9a92fdc4981a6f..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_phs_address_get_responses.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetOKCode is the HTTP code returned for type DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetOK -const DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetOKCode int = 200 - -/*DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetOK MAC address of the arp entry - -swagger:response dataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetOK -*/ -type DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetOK struct { - - /* - In: Body - */ - Payload *models.DataCocsnArpTableArpEntryArpEntryAddressPhsAddress `json:"body,omitempty"` -} - -// NewDataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetOK creates DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetOK with default headers values -func NewDataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetOK() *DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetOK { - - return &DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetOK{} -} - -// WithPayload adds the payload to the data cocsn arp table arp entry arp entry address phs address get o k response -func (o *DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetOK) WithPayload(payload *models.DataCocsnArpTableArpEntryArpEntryAddressPhsAddress) *DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the data cocsn arp table arp entry arp entry address phs address get o k response -func (o *DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetOK) SetPayload(payload *models.DataCocsnArpTableArpEntryArpEntryAddressPhsAddress) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetNoContentCode is the HTTP code returned for type DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetNoContent -const DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetNoContentCode int = 204 - -/*DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetNoContent No Content - -swagger:response dataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetNoContent -*/ -type DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetNoContent struct { -} - -// NewDataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetNoContent creates DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetNoContent with default headers values -func NewDataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetNoContent() *DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetNoContent { - - return &DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetBadRequestCode is the HTTP code returned for type DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetBadRequest -const DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetBadRequestCode int = 400 - -/*DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetBadRequest Bad Request - -swagger:response dataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetBadRequest -*/ -type DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetBadRequest struct { -} - -// NewDataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetBadRequest creates DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetBadRequest with default headers values -func NewDataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetBadRequest() *DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetBadRequest { - - return &DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetUnauthorizedCode is the HTTP code returned for type DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetUnauthorized -const DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetUnauthorizedCode int = 401 - -/*DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetUnauthorized Unauthorized - -swagger:response dataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetUnauthorized -*/ -type DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetUnauthorized struct { -} - -// NewDataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetUnauthorized creates DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetUnauthorized with default headers values -func NewDataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetUnauthorized() *DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetUnauthorized { - - return &DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetNotFoundCode is the HTTP code returned for type DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetNotFound -const DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetNotFoundCode int = 404 - -/*DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetNotFound Not Found - -swagger:response dataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetNotFound -*/ -type DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetNotFound struct { -} - -// NewDataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetNotFound creates DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetNotFound with default headers values -func NewDataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetNotFound() *DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetNotFound { - - return &DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetMethodNotAllowedCode is the HTTP code returned for type DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetMethodNotAllowed -const DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetMethodNotAllowedCode int = 405 - -/*DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetMethodNotAllowed -*/ -type DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetMethodNotAllowed struct { -} - -// NewDataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetMethodNotAllowed creates DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetMethodNotAllowed with default headers values -func NewDataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetMethodNotAllowed() *DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetMethodNotAllowed { - - return &DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetConflictCode is the HTTP code returned for type DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetConflict -const DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetConflictCode int = 409 - -/*DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetConflict Conflict - -swagger:response dataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetConflict -*/ -type DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetConflict struct { -} - -// NewDataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetConflict creates DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetConflict with default headers values -func NewDataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetConflict() *DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetConflict { - - return &DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_phs_address_get_urlbuilder.go b/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_phs_address_get_urlbuilder.go deleted file mode 100644 index bf86a428d0093c91ce3165718fb255d48cf49199..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_arp_entry_address_phs_address_get_urlbuilder.go +++ /dev/null @@ -1,151 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" - - "github.com/go-openapi/swag" -) - -// DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetURL generates an URL for the data cocsn arp table arp entry arp entry address phs address get operation -type DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetURL struct { - ArpEntryAddress string - - Content *string - Depth *uint16 - Fields *string - Filter *string - WithDefaults *string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetURL) WithBasePath(bp string) *DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:arp-table/arp-entry={arp-entry-address}/phs-address" - - arpEntryAddress := o.ArpEntryAddress - if arpEntryAddress != "" { - _path = strings.Replace(_path, "{arp-entry-address}", arpEntryAddress, -1) - } else { - return nil, errors.New("arpEntryAddress is required on DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - qs := make(url.Values) - - var contentQ string - if o.Content != nil { - contentQ = *o.Content - } - if contentQ != "" { - qs.Set("content", contentQ) - } - - var depthQ string - if o.Depth != nil { - depthQ = swag.FormatUint16(*o.Depth) - } - if depthQ != "" { - qs.Set("depth", depthQ) - } - - var fieldsQ string - if o.Fields != nil { - fieldsQ = *o.Fields - } - if fieldsQ != "" { - qs.Set("fields", fieldsQ) - } - - var filterQ string - if o.Filter != nil { - filterQ = *o.Filter - } - if filterQ != "" { - qs.Set("filter", filterQ) - } - - var withDefaultsQ string - if o.WithDefaults != nil { - withDefaultsQ = *o.WithDefaults - } - if withDefaultsQ != "" { - qs.Set("with-defaults", withDefaultsQ) - } - - _result.RawQuery = qs.Encode() - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnArpTableArpEntryArpEntryAddressPhsAddressGetURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_get.go b/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_get.go deleted file mode 100644 index 3ebefbf8207bc993e4e91f9c1be9886a22c22d8c..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_get.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnArpTableArpEntryGetHandlerFunc turns a function with the right signature into a data cocsn arp table arp entry get handler -type DataCocsnArpTableArpEntryGetHandlerFunc func(DataCocsnArpTableArpEntryGetParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnArpTableArpEntryGetHandlerFunc) Handle(params DataCocsnArpTableArpEntryGetParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnArpTableArpEntryGetHandler interface for that can handle valid data cocsn arp table arp entry get params -type DataCocsnArpTableArpEntryGetHandler interface { - Handle(DataCocsnArpTableArpEntryGetParams, interface{}) middleware.Responder -} - -// NewDataCocsnArpTableArpEntryGet creates a new http.Handler for the data cocsn arp table arp entry get operation -func NewDataCocsnArpTableArpEntryGet(ctx *middleware.Context, handler DataCocsnArpTableArpEntryGetHandler) *DataCocsnArpTableArpEntryGet { - return &DataCocsnArpTableArpEntryGet{Context: ctx, Handler: handler} -} - -/*DataCocsnArpTableArpEntryGet swagger:route GET /data/cocsn:arp-table/arp-entry data get dataCocsnArpTableArpEntryGet - -DataCocsnArpTableArpEntryGet data cocsn arp table arp entry get API - -*/ -type DataCocsnArpTableArpEntryGet struct { - Context *middleware.Context - Handler DataCocsnArpTableArpEntryGetHandler -} - -func (o *DataCocsnArpTableArpEntryGet) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnArpTableArpEntryGetParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_get_parameters.go b/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_get_parameters.go deleted file mode 100644 index 3646fcda0085e6a4f507a834b61860580f4ec153..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_get_parameters.go +++ /dev/null @@ -1,235 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NewDataCocsnArpTableArpEntryGetParams creates a new DataCocsnArpTableArpEntryGetParams object -// with the default values initialized. -func NewDataCocsnArpTableArpEntryGetParams() DataCocsnArpTableArpEntryGetParams { - - var ( - // initialize parameters with default values - - contentDefault = string("config") - - withDefaultsDefault = string("report-all") - ) - - return DataCocsnArpTableArpEntryGetParams{ - Content: &contentDefault, - - WithDefaults: &withDefaultsDefault, - } -} - -// DataCocsnArpTableArpEntryGetParams contains all the bound params for the data cocsn arp table arp entry get operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_arp_table_arp_entry_get -type DataCocsnArpTableArpEntryGetParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*controlling descendant nodes in response - In: query - Default: "config" - */ - Content *string - /*limit the depth of nodes in response - In: query - */ - Depth *uint16 - /*optionally identify specific data nodes in response - In: query - */ - Fields *string - /*xpath expression to filter data nodes in response - In: query - */ - Filter *string - /*controlling default values in response - In: query - Default: "report-all" - */ - WithDefaults *string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnArpTableArpEntryGetParams() beforehand. -func (o *DataCocsnArpTableArpEntryGetParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - qs := runtime.Values(r.URL.Query()) - - qContent, qhkContent, _ := qs.GetOK("content") - if err := o.bindContent(qContent, qhkContent, route.Formats); err != nil { - res = append(res, err) - } - - qDepth, qhkDepth, _ := qs.GetOK("depth") - if err := o.bindDepth(qDepth, qhkDepth, route.Formats); err != nil { - res = append(res, err) - } - - qFields, qhkFields, _ := qs.GetOK("fields") - if err := o.bindFields(qFields, qhkFields, route.Formats); err != nil { - res = append(res, err) - } - - qFilter, qhkFilter, _ := qs.GetOK("filter") - if err := o.bindFilter(qFilter, qhkFilter, route.Formats); err != nil { - res = append(res, err) - } - - qWithDefaults, qhkWithDefaults, _ := qs.GetOK("with-defaults") - if err := o.bindWithDefaults(qWithDefaults, qhkWithDefaults, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindContent binds and validates parameter Content from query. -func (o *DataCocsnArpTableArpEntryGetParams) bindContent(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnArpTableArpEntryGetParams() - return nil - } - - o.Content = &raw - - if err := o.validateContent(formats); err != nil { - return err - } - - return nil -} - -// validateContent carries on validations for parameter Content -func (o *DataCocsnArpTableArpEntryGetParams) validateContent(formats strfmt.Registry) error { - - if err := validate.EnumCase("content", "query", *o.Content, []interface{}{"config", "nonconfig", "all"}, true); err != nil { - return err - } - - return nil -} - -// bindDepth binds and validates parameter Depth from query. -func (o *DataCocsnArpTableArpEntryGetParams) bindDepth(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - value, err := swag.ConvertUint16(raw) - if err != nil { - return errors.InvalidType("depth", "query", "uint16", raw) - } - o.Depth = &value - - return nil -} - -// bindFields binds and validates parameter Fields from query. -func (o *DataCocsnArpTableArpEntryGetParams) bindFields(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Fields = &raw - - return nil -} - -// bindFilter binds and validates parameter Filter from query. -func (o *DataCocsnArpTableArpEntryGetParams) bindFilter(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Filter = &raw - - return nil -} - -// bindWithDefaults binds and validates parameter WithDefaults from query. -func (o *DataCocsnArpTableArpEntryGetParams) bindWithDefaults(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnArpTableArpEntryGetParams() - return nil - } - - o.WithDefaults = &raw - - if err := o.validateWithDefaults(formats); err != nil { - return err - } - - return nil -} - -// validateWithDefaults carries on validations for parameter WithDefaults -func (o *DataCocsnArpTableArpEntryGetParams) validateWithDefaults(formats strfmt.Registry) error { - - if err := validate.EnumCase("with-defaults", "query", *o.WithDefaults, []interface{}{"report-all", "trim", "explicit", "report-all-tagged"}, true); err != nil { - return err - } - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_get_responses.go b/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_get_responses.go deleted file mode 100644 index 6629503d79d6f7dde99cdf5c422ed3f9d37b50e3..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_get_responses.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// DataCocsnArpTableArpEntryGetOKCode is the HTTP code returned for type DataCocsnArpTableArpEntryGetOK -const DataCocsnArpTableArpEntryGetOKCode int = 200 - -/*DataCocsnArpTableArpEntryGetOK OK - -swagger:response dataCocsnArpTableArpEntryGetOK -*/ -type DataCocsnArpTableArpEntryGetOK struct { - - /* - In: Body - */ - Payload *models.DataCocsnArpTableArpEntry `json:"body,omitempty"` -} - -// NewDataCocsnArpTableArpEntryGetOK creates DataCocsnArpTableArpEntryGetOK with default headers values -func NewDataCocsnArpTableArpEntryGetOK() *DataCocsnArpTableArpEntryGetOK { - - return &DataCocsnArpTableArpEntryGetOK{} -} - -// WithPayload adds the payload to the data cocsn arp table arp entry get o k response -func (o *DataCocsnArpTableArpEntryGetOK) WithPayload(payload *models.DataCocsnArpTableArpEntry) *DataCocsnArpTableArpEntryGetOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the data cocsn arp table arp entry get o k response -func (o *DataCocsnArpTableArpEntryGetOK) SetPayload(payload *models.DataCocsnArpTableArpEntry) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *DataCocsnArpTableArpEntryGetOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// DataCocsnArpTableArpEntryGetNoContentCode is the HTTP code returned for type DataCocsnArpTableArpEntryGetNoContent -const DataCocsnArpTableArpEntryGetNoContentCode int = 204 - -/*DataCocsnArpTableArpEntryGetNoContent No Content - -swagger:response dataCocsnArpTableArpEntryGetNoContent -*/ -type DataCocsnArpTableArpEntryGetNoContent struct { -} - -// NewDataCocsnArpTableArpEntryGetNoContent creates DataCocsnArpTableArpEntryGetNoContent with default headers values -func NewDataCocsnArpTableArpEntryGetNoContent() *DataCocsnArpTableArpEntryGetNoContent { - - return &DataCocsnArpTableArpEntryGetNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableArpEntryGetNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnArpTableArpEntryGetBadRequestCode is the HTTP code returned for type DataCocsnArpTableArpEntryGetBadRequest -const DataCocsnArpTableArpEntryGetBadRequestCode int = 400 - -/*DataCocsnArpTableArpEntryGetBadRequest Bad Request - -swagger:response dataCocsnArpTableArpEntryGetBadRequest -*/ -type DataCocsnArpTableArpEntryGetBadRequest struct { -} - -// NewDataCocsnArpTableArpEntryGetBadRequest creates DataCocsnArpTableArpEntryGetBadRequest with default headers values -func NewDataCocsnArpTableArpEntryGetBadRequest() *DataCocsnArpTableArpEntryGetBadRequest { - - return &DataCocsnArpTableArpEntryGetBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableArpEntryGetBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnArpTableArpEntryGetUnauthorizedCode is the HTTP code returned for type DataCocsnArpTableArpEntryGetUnauthorized -const DataCocsnArpTableArpEntryGetUnauthorizedCode int = 401 - -/*DataCocsnArpTableArpEntryGetUnauthorized Unauthorized - -swagger:response dataCocsnArpTableArpEntryGetUnauthorized -*/ -type DataCocsnArpTableArpEntryGetUnauthorized struct { -} - -// NewDataCocsnArpTableArpEntryGetUnauthorized creates DataCocsnArpTableArpEntryGetUnauthorized with default headers values -func NewDataCocsnArpTableArpEntryGetUnauthorized() *DataCocsnArpTableArpEntryGetUnauthorized { - - return &DataCocsnArpTableArpEntryGetUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableArpEntryGetUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnArpTableArpEntryGetNotFoundCode is the HTTP code returned for type DataCocsnArpTableArpEntryGetNotFound -const DataCocsnArpTableArpEntryGetNotFoundCode int = 404 - -/*DataCocsnArpTableArpEntryGetNotFound Not Found - -swagger:response dataCocsnArpTableArpEntryGetNotFound -*/ -type DataCocsnArpTableArpEntryGetNotFound struct { -} - -// NewDataCocsnArpTableArpEntryGetNotFound creates DataCocsnArpTableArpEntryGetNotFound with default headers values -func NewDataCocsnArpTableArpEntryGetNotFound() *DataCocsnArpTableArpEntryGetNotFound { - - return &DataCocsnArpTableArpEntryGetNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableArpEntryGetNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnArpTableArpEntryGetMethodNotAllowedCode is the HTTP code returned for type DataCocsnArpTableArpEntryGetMethodNotAllowed -const DataCocsnArpTableArpEntryGetMethodNotAllowedCode int = 405 - -/*DataCocsnArpTableArpEntryGetMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnArpTableArpEntryGetMethodNotAllowed -*/ -type DataCocsnArpTableArpEntryGetMethodNotAllowed struct { -} - -// NewDataCocsnArpTableArpEntryGetMethodNotAllowed creates DataCocsnArpTableArpEntryGetMethodNotAllowed with default headers values -func NewDataCocsnArpTableArpEntryGetMethodNotAllowed() *DataCocsnArpTableArpEntryGetMethodNotAllowed { - - return &DataCocsnArpTableArpEntryGetMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableArpEntryGetMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnArpTableArpEntryGetConflictCode is the HTTP code returned for type DataCocsnArpTableArpEntryGetConflict -const DataCocsnArpTableArpEntryGetConflictCode int = 409 - -/*DataCocsnArpTableArpEntryGetConflict Conflict - -swagger:response dataCocsnArpTableArpEntryGetConflict -*/ -type DataCocsnArpTableArpEntryGetConflict struct { -} - -// NewDataCocsnArpTableArpEntryGetConflict creates DataCocsnArpTableArpEntryGetConflict with default headers values -func NewDataCocsnArpTableArpEntryGetConflict() *DataCocsnArpTableArpEntryGetConflict { - - return &DataCocsnArpTableArpEntryGetConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableArpEntryGetConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_get_urlbuilder.go b/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_get_urlbuilder.go deleted file mode 100644 index c03e5b3826441e963d85fe197956bcb18dcc10b1..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_arp_table_arp_entry_get_urlbuilder.go +++ /dev/null @@ -1,141 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - - "github.com/go-openapi/swag" -) - -// DataCocsnArpTableArpEntryGetURL generates an URL for the data cocsn arp table arp entry get operation -type DataCocsnArpTableArpEntryGetURL struct { - Content *string - Depth *uint16 - Fields *string - Filter *string - WithDefaults *string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnArpTableArpEntryGetURL) WithBasePath(bp string) *DataCocsnArpTableArpEntryGetURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnArpTableArpEntryGetURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnArpTableArpEntryGetURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:arp-table/arp-entry" - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - qs := make(url.Values) - - var contentQ string - if o.Content != nil { - contentQ = *o.Content - } - if contentQ != "" { - qs.Set("content", contentQ) - } - - var depthQ string - if o.Depth != nil { - depthQ = swag.FormatUint16(*o.Depth) - } - if depthQ != "" { - qs.Set("depth", depthQ) - } - - var fieldsQ string - if o.Fields != nil { - fieldsQ = *o.Fields - } - if fieldsQ != "" { - qs.Set("fields", fieldsQ) - } - - var filterQ string - if o.Filter != nil { - filterQ = *o.Filter - } - if filterQ != "" { - qs.Set("filter", filterQ) - } - - var withDefaultsQ string - if o.WithDefaults != nil { - withDefaultsQ = *o.WithDefaults - } - if withDefaultsQ != "" { - qs.Set("with-defaults", withDefaultsQ) - } - - _result.RawQuery = qs.Encode() - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnArpTableArpEntryGetURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnArpTableArpEntryGetURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnArpTableArpEntryGetURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnArpTableArpEntryGetURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnArpTableArpEntryGetURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnArpTableArpEntryGetURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_delete.go b/api/restapi/operations/data/data_cocsn_arp_table_delete.go deleted file mode 100644 index a1f2d1adf0a0a5647a585a1048f2ee3da2022db3..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_arp_table_delete.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnArpTableDeleteHandlerFunc turns a function with the right signature into a data cocsn arp table delete handler -type DataCocsnArpTableDeleteHandlerFunc func(DataCocsnArpTableDeleteParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnArpTableDeleteHandlerFunc) Handle(params DataCocsnArpTableDeleteParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnArpTableDeleteHandler interface for that can handle valid data cocsn arp table delete params -type DataCocsnArpTableDeleteHandler interface { - Handle(DataCocsnArpTableDeleteParams, interface{}) middleware.Responder -} - -// NewDataCocsnArpTableDelete creates a new http.Handler for the data cocsn arp table delete operation -func NewDataCocsnArpTableDelete(ctx *middleware.Context, handler DataCocsnArpTableDeleteHandler) *DataCocsnArpTableDelete { - return &DataCocsnArpTableDelete{Context: ctx, Handler: handler} -} - -/*DataCocsnArpTableDelete swagger:route DELETE /data/cocsn:arp-table data delete dataCocsnArpTableDelete - -DataCocsnArpTableDelete data cocsn arp table delete API - -*/ -type DataCocsnArpTableDelete struct { - Context *middleware.Context - Handler DataCocsnArpTableDeleteHandler -} - -func (o *DataCocsnArpTableDelete) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnArpTableDeleteParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_delete_parameters.go b/api/restapi/operations/data/data_cocsn_arp_table_delete_parameters.go deleted file mode 100644 index 6cc8aef6b0c5b1718498ae0b60664e5401953baf..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_arp_table_delete_parameters.go +++ /dev/null @@ -1,45 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" -) - -// NewDataCocsnArpTableDeleteParams creates a new DataCocsnArpTableDeleteParams object -// no default values defined in spec. -func NewDataCocsnArpTableDeleteParams() DataCocsnArpTableDeleteParams { - - return DataCocsnArpTableDeleteParams{} -} - -// DataCocsnArpTableDeleteParams contains all the bound params for the data cocsn arp table delete operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_arp_table_delete -type DataCocsnArpTableDeleteParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnArpTableDeleteParams() beforehand. -func (o *DataCocsnArpTableDeleteParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_delete_responses.go b/api/restapi/operations/data/data_cocsn_arp_table_delete_responses.go deleted file mode 100644 index eabace5935a525eaa789f1285c7e3e552fe86fd2..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_arp_table_delete_responses.go +++ /dev/null @@ -1,36 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnArpTableDeleteNoContentCode is the HTTP code returned for type DataCocsnArpTableDeleteNoContent -const DataCocsnArpTableDeleteNoContentCode int = 204 - -/*DataCocsnArpTableDeleteNoContent No Content - -swagger:response dataCocsnArpTableDeleteNoContent -*/ -type DataCocsnArpTableDeleteNoContent struct { -} - -// NewDataCocsnArpTableDeleteNoContent creates DataCocsnArpTableDeleteNoContent with default headers values -func NewDataCocsnArpTableDeleteNoContent() *DataCocsnArpTableDeleteNoContent { - - return &DataCocsnArpTableDeleteNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableDeleteNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_get.go b/api/restapi/operations/data/data_cocsn_arp_table_get.go deleted file mode 100644 index dd06581906e78318fa52eedf0fd2302643e3e313..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_arp_table_get.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnArpTableGetHandlerFunc turns a function with the right signature into a data cocsn arp table get handler -type DataCocsnArpTableGetHandlerFunc func(DataCocsnArpTableGetParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnArpTableGetHandlerFunc) Handle(params DataCocsnArpTableGetParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnArpTableGetHandler interface for that can handle valid data cocsn arp table get params -type DataCocsnArpTableGetHandler interface { - Handle(DataCocsnArpTableGetParams, interface{}) middleware.Responder -} - -// NewDataCocsnArpTableGet creates a new http.Handler for the data cocsn arp table get operation -func NewDataCocsnArpTableGet(ctx *middleware.Context, handler DataCocsnArpTableGetHandler) *DataCocsnArpTableGet { - return &DataCocsnArpTableGet{Context: ctx, Handler: handler} -} - -/*DataCocsnArpTableGet swagger:route GET /data/cocsn:arp-table data get dataCocsnArpTableGet - -DataCocsnArpTableGet data cocsn arp table get API - -*/ -type DataCocsnArpTableGet struct { - Context *middleware.Context - Handler DataCocsnArpTableGetHandler -} - -func (o *DataCocsnArpTableGet) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnArpTableGetParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_get_parameters.go b/api/restapi/operations/data/data_cocsn_arp_table_get_parameters.go deleted file mode 100644 index 6ebae175ac67907069b0d3d03a17ef2a2670e055..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_arp_table_get_parameters.go +++ /dev/null @@ -1,235 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NewDataCocsnArpTableGetParams creates a new DataCocsnArpTableGetParams object -// with the default values initialized. -func NewDataCocsnArpTableGetParams() DataCocsnArpTableGetParams { - - var ( - // initialize parameters with default values - - contentDefault = string("config") - - withDefaultsDefault = string("report-all") - ) - - return DataCocsnArpTableGetParams{ - Content: &contentDefault, - - WithDefaults: &withDefaultsDefault, - } -} - -// DataCocsnArpTableGetParams contains all the bound params for the data cocsn arp table get operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_arp_table_get -type DataCocsnArpTableGetParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*controlling descendant nodes in response - In: query - Default: "config" - */ - Content *string - /*limit the depth of nodes in response - In: query - */ - Depth *uint16 - /*optionally identify specific data nodes in response - In: query - */ - Fields *string - /*xpath expression to filter data nodes in response - In: query - */ - Filter *string - /*controlling default values in response - In: query - Default: "report-all" - */ - WithDefaults *string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnArpTableGetParams() beforehand. -func (o *DataCocsnArpTableGetParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - qs := runtime.Values(r.URL.Query()) - - qContent, qhkContent, _ := qs.GetOK("content") - if err := o.bindContent(qContent, qhkContent, route.Formats); err != nil { - res = append(res, err) - } - - qDepth, qhkDepth, _ := qs.GetOK("depth") - if err := o.bindDepth(qDepth, qhkDepth, route.Formats); err != nil { - res = append(res, err) - } - - qFields, qhkFields, _ := qs.GetOK("fields") - if err := o.bindFields(qFields, qhkFields, route.Formats); err != nil { - res = append(res, err) - } - - qFilter, qhkFilter, _ := qs.GetOK("filter") - if err := o.bindFilter(qFilter, qhkFilter, route.Formats); err != nil { - res = append(res, err) - } - - qWithDefaults, qhkWithDefaults, _ := qs.GetOK("with-defaults") - if err := o.bindWithDefaults(qWithDefaults, qhkWithDefaults, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindContent binds and validates parameter Content from query. -func (o *DataCocsnArpTableGetParams) bindContent(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnArpTableGetParams() - return nil - } - - o.Content = &raw - - if err := o.validateContent(formats); err != nil { - return err - } - - return nil -} - -// validateContent carries on validations for parameter Content -func (o *DataCocsnArpTableGetParams) validateContent(formats strfmt.Registry) error { - - if err := validate.EnumCase("content", "query", *o.Content, []interface{}{"config", "nonconfig", "all"}, true); err != nil { - return err - } - - return nil -} - -// bindDepth binds and validates parameter Depth from query. -func (o *DataCocsnArpTableGetParams) bindDepth(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - value, err := swag.ConvertUint16(raw) - if err != nil { - return errors.InvalidType("depth", "query", "uint16", raw) - } - o.Depth = &value - - return nil -} - -// bindFields binds and validates parameter Fields from query. -func (o *DataCocsnArpTableGetParams) bindFields(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Fields = &raw - - return nil -} - -// bindFilter binds and validates parameter Filter from query. -func (o *DataCocsnArpTableGetParams) bindFilter(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Filter = &raw - - return nil -} - -// bindWithDefaults binds and validates parameter WithDefaults from query. -func (o *DataCocsnArpTableGetParams) bindWithDefaults(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnArpTableGetParams() - return nil - } - - o.WithDefaults = &raw - - if err := o.validateWithDefaults(formats); err != nil { - return err - } - - return nil -} - -// validateWithDefaults carries on validations for parameter WithDefaults -func (o *DataCocsnArpTableGetParams) validateWithDefaults(formats strfmt.Registry) error { - - if err := validate.EnumCase("with-defaults", "query", *o.WithDefaults, []interface{}{"report-all", "trim", "explicit", "report-all-tagged"}, true); err != nil { - return err - } - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_get_responses.go b/api/restapi/operations/data/data_cocsn_arp_table_get_responses.go deleted file mode 100644 index 52906005c1a37300d6384ca308a344e642e36297..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_arp_table_get_responses.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// DataCocsnArpTableGetOKCode is the HTTP code returned for type DataCocsnArpTableGetOK -const DataCocsnArpTableGetOKCode int = 200 - -/*DataCocsnArpTableGetOK OK - -swagger:response dataCocsnArpTableGetOK -*/ -type DataCocsnArpTableGetOK struct { - - /* - In: Body - */ - Payload *models.DataCocsnArpTable `json:"body,omitempty"` -} - -// NewDataCocsnArpTableGetOK creates DataCocsnArpTableGetOK with default headers values -func NewDataCocsnArpTableGetOK() *DataCocsnArpTableGetOK { - - return &DataCocsnArpTableGetOK{} -} - -// WithPayload adds the payload to the data cocsn arp table get o k response -func (o *DataCocsnArpTableGetOK) WithPayload(payload *models.DataCocsnArpTable) *DataCocsnArpTableGetOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the data cocsn arp table get o k response -func (o *DataCocsnArpTableGetOK) SetPayload(payload *models.DataCocsnArpTable) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *DataCocsnArpTableGetOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// DataCocsnArpTableGetNoContentCode is the HTTP code returned for type DataCocsnArpTableGetNoContent -const DataCocsnArpTableGetNoContentCode int = 204 - -/*DataCocsnArpTableGetNoContent No Content - -swagger:response dataCocsnArpTableGetNoContent -*/ -type DataCocsnArpTableGetNoContent struct { -} - -// NewDataCocsnArpTableGetNoContent creates DataCocsnArpTableGetNoContent with default headers values -func NewDataCocsnArpTableGetNoContent() *DataCocsnArpTableGetNoContent { - - return &DataCocsnArpTableGetNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableGetNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnArpTableGetBadRequestCode is the HTTP code returned for type DataCocsnArpTableGetBadRequest -const DataCocsnArpTableGetBadRequestCode int = 400 - -/*DataCocsnArpTableGetBadRequest Bad Request - -swagger:response dataCocsnArpTableGetBadRequest -*/ -type DataCocsnArpTableGetBadRequest struct { -} - -// NewDataCocsnArpTableGetBadRequest creates DataCocsnArpTableGetBadRequest with default headers values -func NewDataCocsnArpTableGetBadRequest() *DataCocsnArpTableGetBadRequest { - - return &DataCocsnArpTableGetBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableGetBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnArpTableGetUnauthorizedCode is the HTTP code returned for type DataCocsnArpTableGetUnauthorized -const DataCocsnArpTableGetUnauthorizedCode int = 401 - -/*DataCocsnArpTableGetUnauthorized Unauthorized - -swagger:response dataCocsnArpTableGetUnauthorized -*/ -type DataCocsnArpTableGetUnauthorized struct { -} - -// NewDataCocsnArpTableGetUnauthorized creates DataCocsnArpTableGetUnauthorized with default headers values -func NewDataCocsnArpTableGetUnauthorized() *DataCocsnArpTableGetUnauthorized { - - return &DataCocsnArpTableGetUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableGetUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnArpTableGetNotFoundCode is the HTTP code returned for type DataCocsnArpTableGetNotFound -const DataCocsnArpTableGetNotFoundCode int = 404 - -/*DataCocsnArpTableGetNotFound Not Found - -swagger:response dataCocsnArpTableGetNotFound -*/ -type DataCocsnArpTableGetNotFound struct { -} - -// NewDataCocsnArpTableGetNotFound creates DataCocsnArpTableGetNotFound with default headers values -func NewDataCocsnArpTableGetNotFound() *DataCocsnArpTableGetNotFound { - - return &DataCocsnArpTableGetNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableGetNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnArpTableGetMethodNotAllowedCode is the HTTP code returned for type DataCocsnArpTableGetMethodNotAllowed -const DataCocsnArpTableGetMethodNotAllowedCode int = 405 - -/*DataCocsnArpTableGetMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnArpTableGetMethodNotAllowed -*/ -type DataCocsnArpTableGetMethodNotAllowed struct { -} - -// NewDataCocsnArpTableGetMethodNotAllowed creates DataCocsnArpTableGetMethodNotAllowed with default headers values -func NewDataCocsnArpTableGetMethodNotAllowed() *DataCocsnArpTableGetMethodNotAllowed { - - return &DataCocsnArpTableGetMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableGetMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnArpTableGetConflictCode is the HTTP code returned for type DataCocsnArpTableGetConflict -const DataCocsnArpTableGetConflictCode int = 409 - -/*DataCocsnArpTableGetConflict Conflict - -swagger:response dataCocsnArpTableGetConflict -*/ -type DataCocsnArpTableGetConflict struct { -} - -// NewDataCocsnArpTableGetConflict creates DataCocsnArpTableGetConflict with default headers values -func NewDataCocsnArpTableGetConflict() *DataCocsnArpTableGetConflict { - - return &DataCocsnArpTableGetConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTableGetConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_patch.go b/api/restapi/operations/data/data_cocsn_arp_table_patch.go deleted file mode 100644 index 7dfe4b85068eef5d11852151b15e24c5e20ec9ec..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_arp_table_patch.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnArpTablePatchHandlerFunc turns a function with the right signature into a data cocsn arp table patch handler -type DataCocsnArpTablePatchHandlerFunc func(DataCocsnArpTablePatchParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnArpTablePatchHandlerFunc) Handle(params DataCocsnArpTablePatchParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnArpTablePatchHandler interface for that can handle valid data cocsn arp table patch params -type DataCocsnArpTablePatchHandler interface { - Handle(DataCocsnArpTablePatchParams, interface{}) middleware.Responder -} - -// NewDataCocsnArpTablePatch creates a new http.Handler for the data cocsn arp table patch operation -func NewDataCocsnArpTablePatch(ctx *middleware.Context, handler DataCocsnArpTablePatchHandler) *DataCocsnArpTablePatch { - return &DataCocsnArpTablePatch{Context: ctx, Handler: handler} -} - -/*DataCocsnArpTablePatch swagger:route PATCH /data/cocsn:arp-table data patch dataCocsnArpTablePatch - -DataCocsnArpTablePatch data cocsn arp table patch API - -*/ -type DataCocsnArpTablePatch struct { - Context *middleware.Context - Handler DataCocsnArpTablePatchHandler -} - -func (o *DataCocsnArpTablePatch) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnArpTablePatchParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_patch_parameters.go b/api/restapi/operations/data/data_cocsn_arp_table_patch_parameters.go deleted file mode 100644 index af2fe00335110ec571beafa0f8116fd2f8a8c5ca..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_arp_table_patch_parameters.go +++ /dev/null @@ -1,77 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// NewDataCocsnArpTablePatchParams creates a new DataCocsnArpTablePatchParams object -// no default values defined in spec. -func NewDataCocsnArpTablePatchParams() DataCocsnArpTablePatchParams { - - return DataCocsnArpTablePatchParams{} -} - -// DataCocsnArpTablePatchParams contains all the bound params for the data cocsn arp table patch operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_arp_table_patch -type DataCocsnArpTablePatchParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /* - Required: true - In: body - */ - ArpTable *models.DataCocsnArpTable -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnArpTablePatchParams() beforehand. -func (o *DataCocsnArpTablePatchParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.DataCocsnArpTable - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { - res = append(res, errors.Required("arpTable", "body", "")) - } else { - res = append(res, errors.NewParseError("arpTable", "body", "", err)) - } - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.ArpTable = &body - } - } - } else { - res = append(res, errors.Required("arpTable", "body", "")) - } - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_patch_responses.go b/api/restapi/operations/data/data_cocsn_arp_table_patch_responses.go deleted file mode 100644 index 85851de26d037ff44147cebed1ba8dc7d09b04d1..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_arp_table_patch_responses.go +++ /dev/null @@ -1,156 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnArpTablePatchNoContentCode is the HTTP code returned for type DataCocsnArpTablePatchNoContent -const DataCocsnArpTablePatchNoContentCode int = 204 - -/*DataCocsnArpTablePatchNoContent container arp-table updated - -swagger:response dataCocsnArpTablePatchNoContent -*/ -type DataCocsnArpTablePatchNoContent struct { -} - -// NewDataCocsnArpTablePatchNoContent creates DataCocsnArpTablePatchNoContent with default headers values -func NewDataCocsnArpTablePatchNoContent() *DataCocsnArpTablePatchNoContent { - - return &DataCocsnArpTablePatchNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTablePatchNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnArpTablePatchBadRequestCode is the HTTP code returned for type DataCocsnArpTablePatchBadRequest -const DataCocsnArpTablePatchBadRequestCode int = 400 - -/*DataCocsnArpTablePatchBadRequest Bad Request - -swagger:response dataCocsnArpTablePatchBadRequest -*/ -type DataCocsnArpTablePatchBadRequest struct { -} - -// NewDataCocsnArpTablePatchBadRequest creates DataCocsnArpTablePatchBadRequest with default headers values -func NewDataCocsnArpTablePatchBadRequest() *DataCocsnArpTablePatchBadRequest { - - return &DataCocsnArpTablePatchBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTablePatchBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnArpTablePatchUnauthorizedCode is the HTTP code returned for type DataCocsnArpTablePatchUnauthorized -const DataCocsnArpTablePatchUnauthorizedCode int = 401 - -/*DataCocsnArpTablePatchUnauthorized Unauthorized - -swagger:response dataCocsnArpTablePatchUnauthorized -*/ -type DataCocsnArpTablePatchUnauthorized struct { -} - -// NewDataCocsnArpTablePatchUnauthorized creates DataCocsnArpTablePatchUnauthorized with default headers values -func NewDataCocsnArpTablePatchUnauthorized() *DataCocsnArpTablePatchUnauthorized { - - return &DataCocsnArpTablePatchUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTablePatchUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnArpTablePatchNotFoundCode is the HTTP code returned for type DataCocsnArpTablePatchNotFound -const DataCocsnArpTablePatchNotFoundCode int = 404 - -/*DataCocsnArpTablePatchNotFound Not Found - -swagger:response dataCocsnArpTablePatchNotFound -*/ -type DataCocsnArpTablePatchNotFound struct { -} - -// NewDataCocsnArpTablePatchNotFound creates DataCocsnArpTablePatchNotFound with default headers values -func NewDataCocsnArpTablePatchNotFound() *DataCocsnArpTablePatchNotFound { - - return &DataCocsnArpTablePatchNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTablePatchNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnArpTablePatchMethodNotAllowedCode is the HTTP code returned for type DataCocsnArpTablePatchMethodNotAllowed -const DataCocsnArpTablePatchMethodNotAllowedCode int = 405 - -/*DataCocsnArpTablePatchMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnArpTablePatchMethodNotAllowed -*/ -type DataCocsnArpTablePatchMethodNotAllowed struct { -} - -// NewDataCocsnArpTablePatchMethodNotAllowed creates DataCocsnArpTablePatchMethodNotAllowed with default headers values -func NewDataCocsnArpTablePatchMethodNotAllowed() *DataCocsnArpTablePatchMethodNotAllowed { - - return &DataCocsnArpTablePatchMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTablePatchMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnArpTablePatchConflictCode is the HTTP code returned for type DataCocsnArpTablePatchConflict -const DataCocsnArpTablePatchConflictCode int = 409 - -/*DataCocsnArpTablePatchConflict Conflict - -swagger:response dataCocsnArpTablePatchConflict -*/ -type DataCocsnArpTablePatchConflict struct { -} - -// NewDataCocsnArpTablePatchConflict creates DataCocsnArpTablePatchConflict with default headers values -func NewDataCocsnArpTablePatchConflict() *DataCocsnArpTablePatchConflict { - - return &DataCocsnArpTablePatchConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTablePatchConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_post.go b/api/restapi/operations/data/data_cocsn_arp_table_post.go deleted file mode 100644 index f6420cc14267f733c21f514fba5ff315b0afe646..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_arp_table_post.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnArpTablePostHandlerFunc turns a function with the right signature into a data cocsn arp table post handler -type DataCocsnArpTablePostHandlerFunc func(DataCocsnArpTablePostParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnArpTablePostHandlerFunc) Handle(params DataCocsnArpTablePostParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnArpTablePostHandler interface for that can handle valid data cocsn arp table post params -type DataCocsnArpTablePostHandler interface { - Handle(DataCocsnArpTablePostParams, interface{}) middleware.Responder -} - -// NewDataCocsnArpTablePost creates a new http.Handler for the data cocsn arp table post operation -func NewDataCocsnArpTablePost(ctx *middleware.Context, handler DataCocsnArpTablePostHandler) *DataCocsnArpTablePost { - return &DataCocsnArpTablePost{Context: ctx, Handler: handler} -} - -/*DataCocsnArpTablePost swagger:route POST /data/cocsn:arp-table data post dataCocsnArpTablePost - -DataCocsnArpTablePost data cocsn arp table post API - -*/ -type DataCocsnArpTablePost struct { - Context *middleware.Context - Handler DataCocsnArpTablePostHandler -} - -func (o *DataCocsnArpTablePost) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnArpTablePostParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_post_parameters.go b/api/restapi/operations/data/data_cocsn_arp_table_post_parameters.go deleted file mode 100644 index 42ff3fb3af85a46dff66614072348aae339cc63e..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_arp_table_post_parameters.go +++ /dev/null @@ -1,77 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// NewDataCocsnArpTablePostParams creates a new DataCocsnArpTablePostParams object -// no default values defined in spec. -func NewDataCocsnArpTablePostParams() DataCocsnArpTablePostParams { - - return DataCocsnArpTablePostParams{} -} - -// DataCocsnArpTablePostParams contains all the bound params for the data cocsn arp table post operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_arp_table_post -type DataCocsnArpTablePostParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /* - Required: true - In: body - */ - ArpTable *models.DataCocsnArpTablePost -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnArpTablePostParams() beforehand. -func (o *DataCocsnArpTablePostParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.DataCocsnArpTablePost - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { - res = append(res, errors.Required("arpTable", "body", "")) - } else { - res = append(res, errors.NewParseError("arpTable", "body", "", err)) - } - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.ArpTable = &body - } - } - } else { - res = append(res, errors.Required("arpTable", "body", "")) - } - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_post_responses.go b/api/restapi/operations/data/data_cocsn_arp_table_post_responses.go deleted file mode 100644 index e1a5b6269e99810dd9fbc80076c4a3ad39661d2e..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_arp_table_post_responses.go +++ /dev/null @@ -1,180 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnArpTablePostCreatedCode is the HTTP code returned for type DataCocsnArpTablePostCreated -const DataCocsnArpTablePostCreatedCode int = 201 - -/*DataCocsnArpTablePostCreated container arp-table created - -swagger:response dataCocsnArpTablePostCreated -*/ -type DataCocsnArpTablePostCreated struct { -} - -// NewDataCocsnArpTablePostCreated creates DataCocsnArpTablePostCreated with default headers values -func NewDataCocsnArpTablePostCreated() *DataCocsnArpTablePostCreated { - - return &DataCocsnArpTablePostCreated{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTablePostCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// DataCocsnArpTablePostNoContentCode is the HTTP code returned for type DataCocsnArpTablePostNoContent -const DataCocsnArpTablePostNoContentCode int = 204 - -/*DataCocsnArpTablePostNoContent No Content - -swagger:response dataCocsnArpTablePostNoContent -*/ -type DataCocsnArpTablePostNoContent struct { -} - -// NewDataCocsnArpTablePostNoContent creates DataCocsnArpTablePostNoContent with default headers values -func NewDataCocsnArpTablePostNoContent() *DataCocsnArpTablePostNoContent { - - return &DataCocsnArpTablePostNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTablePostNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnArpTablePostBadRequestCode is the HTTP code returned for type DataCocsnArpTablePostBadRequest -const DataCocsnArpTablePostBadRequestCode int = 400 - -/*DataCocsnArpTablePostBadRequest Bad Request - -swagger:response dataCocsnArpTablePostBadRequest -*/ -type DataCocsnArpTablePostBadRequest struct { -} - -// NewDataCocsnArpTablePostBadRequest creates DataCocsnArpTablePostBadRequest with default headers values -func NewDataCocsnArpTablePostBadRequest() *DataCocsnArpTablePostBadRequest { - - return &DataCocsnArpTablePostBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTablePostBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnArpTablePostUnauthorizedCode is the HTTP code returned for type DataCocsnArpTablePostUnauthorized -const DataCocsnArpTablePostUnauthorizedCode int = 401 - -/*DataCocsnArpTablePostUnauthorized Unauthorized - -swagger:response dataCocsnArpTablePostUnauthorized -*/ -type DataCocsnArpTablePostUnauthorized struct { -} - -// NewDataCocsnArpTablePostUnauthorized creates DataCocsnArpTablePostUnauthorized with default headers values -func NewDataCocsnArpTablePostUnauthorized() *DataCocsnArpTablePostUnauthorized { - - return &DataCocsnArpTablePostUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTablePostUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnArpTablePostNotFoundCode is the HTTP code returned for type DataCocsnArpTablePostNotFound -const DataCocsnArpTablePostNotFoundCode int = 404 - -/*DataCocsnArpTablePostNotFound Not Found - -swagger:response dataCocsnArpTablePostNotFound -*/ -type DataCocsnArpTablePostNotFound struct { -} - -// NewDataCocsnArpTablePostNotFound creates DataCocsnArpTablePostNotFound with default headers values -func NewDataCocsnArpTablePostNotFound() *DataCocsnArpTablePostNotFound { - - return &DataCocsnArpTablePostNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTablePostNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnArpTablePostMethodNotAllowedCode is the HTTP code returned for type DataCocsnArpTablePostMethodNotAllowed -const DataCocsnArpTablePostMethodNotAllowedCode int = 405 - -/*DataCocsnArpTablePostMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnArpTablePostMethodNotAllowed -*/ -type DataCocsnArpTablePostMethodNotAllowed struct { -} - -// NewDataCocsnArpTablePostMethodNotAllowed creates DataCocsnArpTablePostMethodNotAllowed with default headers values -func NewDataCocsnArpTablePostMethodNotAllowed() *DataCocsnArpTablePostMethodNotAllowed { - - return &DataCocsnArpTablePostMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTablePostMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnArpTablePostConflictCode is the HTTP code returned for type DataCocsnArpTablePostConflict -const DataCocsnArpTablePostConflictCode int = 409 - -/*DataCocsnArpTablePostConflict Conflict - -swagger:response dataCocsnArpTablePostConflict -*/ -type DataCocsnArpTablePostConflict struct { -} - -// NewDataCocsnArpTablePostConflict creates DataCocsnArpTablePostConflict with default headers values -func NewDataCocsnArpTablePostConflict() *DataCocsnArpTablePostConflict { - - return &DataCocsnArpTablePostConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTablePostConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_put.go b/api/restapi/operations/data/data_cocsn_arp_table_put.go deleted file mode 100644 index 7fe090d1c6c3529539366d3087fee8260bcb07a1..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_arp_table_put.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnArpTablePutHandlerFunc turns a function with the right signature into a data cocsn arp table put handler -type DataCocsnArpTablePutHandlerFunc func(DataCocsnArpTablePutParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnArpTablePutHandlerFunc) Handle(params DataCocsnArpTablePutParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnArpTablePutHandler interface for that can handle valid data cocsn arp table put params -type DataCocsnArpTablePutHandler interface { - Handle(DataCocsnArpTablePutParams, interface{}) middleware.Responder -} - -// NewDataCocsnArpTablePut creates a new http.Handler for the data cocsn arp table put operation -func NewDataCocsnArpTablePut(ctx *middleware.Context, handler DataCocsnArpTablePutHandler) *DataCocsnArpTablePut { - return &DataCocsnArpTablePut{Context: ctx, Handler: handler} -} - -/*DataCocsnArpTablePut swagger:route PUT /data/cocsn:arp-table data put dataCocsnArpTablePut - -DataCocsnArpTablePut data cocsn arp table put API - -*/ -type DataCocsnArpTablePut struct { - Context *middleware.Context - Handler DataCocsnArpTablePutHandler -} - -func (o *DataCocsnArpTablePut) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnArpTablePutParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_put_parameters.go b/api/restapi/operations/data/data_cocsn_arp_table_put_parameters.go deleted file mode 100644 index 1078c37aa1805e57bd1bf265afe1d4e6c9c868b0..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_arp_table_put_parameters.go +++ /dev/null @@ -1,77 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "io" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// NewDataCocsnArpTablePutParams creates a new DataCocsnArpTablePutParams object -// no default values defined in spec. -func NewDataCocsnArpTablePutParams() DataCocsnArpTablePutParams { - - return DataCocsnArpTablePutParams{} -} - -// DataCocsnArpTablePutParams contains all the bound params for the data cocsn arp table put operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_arp_table_put -type DataCocsnArpTablePutParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /* - Required: true - In: body - */ - ArpTable *models.DataCocsnArpTable -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnArpTablePutParams() beforehand. -func (o *DataCocsnArpTablePutParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.DataCocsnArpTable - if err := route.Consumer.Consume(r.Body, &body); err != nil { - if err == io.EOF { - res = append(res, errors.Required("arpTable", "body", "")) - } else { - res = append(res, errors.NewParseError("arpTable", "body", "", err)) - } - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.ArpTable = &body - } - } - } else { - res = append(res, errors.Required("arpTable", "body", "")) - } - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_put_responses.go b/api/restapi/operations/data/data_cocsn_arp_table_put_responses.go deleted file mode 100644 index c5478e9eb3ed1bcc97e04740db0d31464a962491..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_arp_table_put_responses.go +++ /dev/null @@ -1,180 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DataCocsnArpTablePutCreatedCode is the HTTP code returned for type DataCocsnArpTablePutCreated -const DataCocsnArpTablePutCreatedCode int = 201 - -/*DataCocsnArpTablePutCreated container arp-table created or replaced - -swagger:response dataCocsnArpTablePutCreated -*/ -type DataCocsnArpTablePutCreated struct { -} - -// NewDataCocsnArpTablePutCreated creates DataCocsnArpTablePutCreated with default headers values -func NewDataCocsnArpTablePutCreated() *DataCocsnArpTablePutCreated { - - return &DataCocsnArpTablePutCreated{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTablePutCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// DataCocsnArpTablePutNoContentCode is the HTTP code returned for type DataCocsnArpTablePutNoContent -const DataCocsnArpTablePutNoContentCode int = 204 - -/*DataCocsnArpTablePutNoContent No Content - -swagger:response dataCocsnArpTablePutNoContent -*/ -type DataCocsnArpTablePutNoContent struct { -} - -// NewDataCocsnArpTablePutNoContent creates DataCocsnArpTablePutNoContent with default headers values -func NewDataCocsnArpTablePutNoContent() *DataCocsnArpTablePutNoContent { - - return &DataCocsnArpTablePutNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTablePutNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnArpTablePutBadRequestCode is the HTTP code returned for type DataCocsnArpTablePutBadRequest -const DataCocsnArpTablePutBadRequestCode int = 400 - -/*DataCocsnArpTablePutBadRequest Bad Request - -swagger:response dataCocsnArpTablePutBadRequest -*/ -type DataCocsnArpTablePutBadRequest struct { -} - -// NewDataCocsnArpTablePutBadRequest creates DataCocsnArpTablePutBadRequest with default headers values -func NewDataCocsnArpTablePutBadRequest() *DataCocsnArpTablePutBadRequest { - - return &DataCocsnArpTablePutBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTablePutBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnArpTablePutUnauthorizedCode is the HTTP code returned for type DataCocsnArpTablePutUnauthorized -const DataCocsnArpTablePutUnauthorizedCode int = 401 - -/*DataCocsnArpTablePutUnauthorized Unauthorized - -swagger:response dataCocsnArpTablePutUnauthorized -*/ -type DataCocsnArpTablePutUnauthorized struct { -} - -// NewDataCocsnArpTablePutUnauthorized creates DataCocsnArpTablePutUnauthorized with default headers values -func NewDataCocsnArpTablePutUnauthorized() *DataCocsnArpTablePutUnauthorized { - - return &DataCocsnArpTablePutUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTablePutUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnArpTablePutNotFoundCode is the HTTP code returned for type DataCocsnArpTablePutNotFound -const DataCocsnArpTablePutNotFoundCode int = 404 - -/*DataCocsnArpTablePutNotFound Not Found - -swagger:response dataCocsnArpTablePutNotFound -*/ -type DataCocsnArpTablePutNotFound struct { -} - -// NewDataCocsnArpTablePutNotFound creates DataCocsnArpTablePutNotFound with default headers values -func NewDataCocsnArpTablePutNotFound() *DataCocsnArpTablePutNotFound { - - return &DataCocsnArpTablePutNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTablePutNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnArpTablePutMethodNotAllowedCode is the HTTP code returned for type DataCocsnArpTablePutMethodNotAllowed -const DataCocsnArpTablePutMethodNotAllowedCode int = 405 - -/*DataCocsnArpTablePutMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnArpTablePutMethodNotAllowed -*/ -type DataCocsnArpTablePutMethodNotAllowed struct { -} - -// NewDataCocsnArpTablePutMethodNotAllowed creates DataCocsnArpTablePutMethodNotAllowed with default headers values -func NewDataCocsnArpTablePutMethodNotAllowed() *DataCocsnArpTablePutMethodNotAllowed { - - return &DataCocsnArpTablePutMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTablePutMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnArpTablePutConflictCode is the HTTP code returned for type DataCocsnArpTablePutConflict -const DataCocsnArpTablePutConflictCode int = 409 - -/*DataCocsnArpTablePutConflict Conflict - -swagger:response dataCocsnArpTablePutConflict -*/ -type DataCocsnArpTablePutConflict struct { -} - -// NewDataCocsnArpTablePutConflict creates DataCocsnArpTablePutConflict with default headers values -func NewDataCocsnArpTablePutConflict() *DataCocsnArpTablePutConflict { - - return &DataCocsnArpTablePutConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnArpTablePutConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_get.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_get.go deleted file mode 100644 index 3e2049440558efd565aaa334f698c13d820c25c3..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_get.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnInterfacesInterfaceGetHandlerFunc turns a function with the right signature into a data cocsn interfaces interface get handler -type DataCocsnInterfacesInterfaceGetHandlerFunc func(DataCocsnInterfacesInterfaceGetParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnInterfacesInterfaceGetHandlerFunc) Handle(params DataCocsnInterfacesInterfaceGetParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnInterfacesInterfaceGetHandler interface for that can handle valid data cocsn interfaces interface get params -type DataCocsnInterfacesInterfaceGetHandler interface { - Handle(DataCocsnInterfacesInterfaceGetParams, interface{}) middleware.Responder -} - -// NewDataCocsnInterfacesInterfaceGet creates a new http.Handler for the data cocsn interfaces interface get operation -func NewDataCocsnInterfacesInterfaceGet(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceGetHandler) *DataCocsnInterfacesInterfaceGet { - return &DataCocsnInterfacesInterfaceGet{Context: ctx, Handler: handler} -} - -/*DataCocsnInterfacesInterfaceGet swagger:route GET /data/cocsn:interfaces/interface data get dataCocsnInterfacesInterfaceGet - -DataCocsnInterfacesInterfaceGet data cocsn interfaces interface get API - -*/ -type DataCocsnInterfacesInterfaceGet struct { - Context *middleware.Context - Handler DataCocsnInterfacesInterfaceGetHandler -} - -func (o *DataCocsnInterfacesInterfaceGet) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnInterfacesInterfaceGetParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_get_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_get_parameters.go deleted file mode 100644 index 67822b2a9ff0b9395523f4ab4dfb840ac937c156..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_get_parameters.go +++ /dev/null @@ -1,235 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NewDataCocsnInterfacesInterfaceGetParams creates a new DataCocsnInterfacesInterfaceGetParams object -// with the default values initialized. -func NewDataCocsnInterfacesInterfaceGetParams() DataCocsnInterfacesInterfaceGetParams { - - var ( - // initialize parameters with default values - - contentDefault = string("config") - - withDefaultsDefault = string("report-all") - ) - - return DataCocsnInterfacesInterfaceGetParams{ - Content: &contentDefault, - - WithDefaults: &withDefaultsDefault, - } -} - -// DataCocsnInterfacesInterfaceGetParams contains all the bound params for the data cocsn interfaces interface get operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_interfaces_interface_get -type DataCocsnInterfacesInterfaceGetParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*controlling descendant nodes in response - In: query - Default: "config" - */ - Content *string - /*limit the depth of nodes in response - In: query - */ - Depth *uint16 - /*optionally identify specific data nodes in response - In: query - */ - Fields *string - /*xpath expression to filter data nodes in response - In: query - */ - Filter *string - /*controlling default values in response - In: query - Default: "report-all" - */ - WithDefaults *string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceGetParams() beforehand. -func (o *DataCocsnInterfacesInterfaceGetParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - qs := runtime.Values(r.URL.Query()) - - qContent, qhkContent, _ := qs.GetOK("content") - if err := o.bindContent(qContent, qhkContent, route.Formats); err != nil { - res = append(res, err) - } - - qDepth, qhkDepth, _ := qs.GetOK("depth") - if err := o.bindDepth(qDepth, qhkDepth, route.Formats); err != nil { - res = append(res, err) - } - - qFields, qhkFields, _ := qs.GetOK("fields") - if err := o.bindFields(qFields, qhkFields, route.Formats); err != nil { - res = append(res, err) - } - - qFilter, qhkFilter, _ := qs.GetOK("filter") - if err := o.bindFilter(qFilter, qhkFilter, route.Formats); err != nil { - res = append(res, err) - } - - qWithDefaults, qhkWithDefaults, _ := qs.GetOK("with-defaults") - if err := o.bindWithDefaults(qWithDefaults, qhkWithDefaults, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindContent binds and validates parameter Content from query. -func (o *DataCocsnInterfacesInterfaceGetParams) bindContent(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnInterfacesInterfaceGetParams() - return nil - } - - o.Content = &raw - - if err := o.validateContent(formats); err != nil { - return err - } - - return nil -} - -// validateContent carries on validations for parameter Content -func (o *DataCocsnInterfacesInterfaceGetParams) validateContent(formats strfmt.Registry) error { - - if err := validate.EnumCase("content", "query", *o.Content, []interface{}{"config", "nonconfig", "all"}, true); err != nil { - return err - } - - return nil -} - -// bindDepth binds and validates parameter Depth from query. -func (o *DataCocsnInterfacesInterfaceGetParams) bindDepth(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - value, err := swag.ConvertUint16(raw) - if err != nil { - return errors.InvalidType("depth", "query", "uint16", raw) - } - o.Depth = &value - - return nil -} - -// bindFields binds and validates parameter Fields from query. -func (o *DataCocsnInterfacesInterfaceGetParams) bindFields(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Fields = &raw - - return nil -} - -// bindFilter binds and validates parameter Filter from query. -func (o *DataCocsnInterfacesInterfaceGetParams) bindFilter(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Filter = &raw - - return nil -} - -// bindWithDefaults binds and validates parameter WithDefaults from query. -func (o *DataCocsnInterfacesInterfaceGetParams) bindWithDefaults(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnInterfacesInterfaceGetParams() - return nil - } - - o.WithDefaults = &raw - - if err := o.validateWithDefaults(formats); err != nil { - return err - } - - return nil -} - -// validateWithDefaults carries on validations for parameter WithDefaults -func (o *DataCocsnInterfacesInterfaceGetParams) validateWithDefaults(formats strfmt.Registry) error { - - if err := validate.EnumCase("with-defaults", "query", *o.WithDefaults, []interface{}{"report-all", "trim", "explicit", "report-all-tagged"}, true); err != nil { - return err - } - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_get_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_get_responses.go deleted file mode 100644 index 01fa94483334ceb549d9e3ad0ef5700cda59e04b..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_get_responses.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// DataCocsnInterfacesInterfaceGetOKCode is the HTTP code returned for type DataCocsnInterfacesInterfaceGetOK -const DataCocsnInterfacesInterfaceGetOKCode int = 200 - -/*DataCocsnInterfacesInterfaceGetOK OK - -swagger:response dataCocsnInterfacesInterfaceGetOK -*/ -type DataCocsnInterfacesInterfaceGetOK struct { - - /* - In: Body - */ - Payload *models.DataCocsnInterfacesInterface `json:"body,omitempty"` -} - -// NewDataCocsnInterfacesInterfaceGetOK creates DataCocsnInterfacesInterfaceGetOK with default headers values -func NewDataCocsnInterfacesInterfaceGetOK() *DataCocsnInterfacesInterfaceGetOK { - - return &DataCocsnInterfacesInterfaceGetOK{} -} - -// WithPayload adds the payload to the data cocsn interfaces interface get o k response -func (o *DataCocsnInterfacesInterfaceGetOK) WithPayload(payload *models.DataCocsnInterfacesInterface) *DataCocsnInterfacesInterfaceGetOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the data cocsn interfaces interface get o k response -func (o *DataCocsnInterfacesInterfaceGetOK) SetPayload(payload *models.DataCocsnInterfacesInterface) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceGetOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// DataCocsnInterfacesInterfaceGetNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceGetNoContent -const DataCocsnInterfacesInterfaceGetNoContentCode int = 204 - -/*DataCocsnInterfacesInterfaceGetNoContent No Content - -swagger:response dataCocsnInterfacesInterfaceGetNoContent -*/ -type DataCocsnInterfacesInterfaceGetNoContent struct { -} - -// NewDataCocsnInterfacesInterfaceGetNoContent creates DataCocsnInterfacesInterfaceGetNoContent with default headers values -func NewDataCocsnInterfacesInterfaceGetNoContent() *DataCocsnInterfacesInterfaceGetNoContent { - - return &DataCocsnInterfacesInterfaceGetNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceGetNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnInterfacesInterfaceGetBadRequestCode is the HTTP code returned for type DataCocsnInterfacesInterfaceGetBadRequest -const DataCocsnInterfacesInterfaceGetBadRequestCode int = 400 - -/*DataCocsnInterfacesInterfaceGetBadRequest Bad Request - -swagger:response dataCocsnInterfacesInterfaceGetBadRequest -*/ -type DataCocsnInterfacesInterfaceGetBadRequest struct { -} - -// NewDataCocsnInterfacesInterfaceGetBadRequest creates DataCocsnInterfacesInterfaceGetBadRequest with default headers values -func NewDataCocsnInterfacesInterfaceGetBadRequest() *DataCocsnInterfacesInterfaceGetBadRequest { - - return &DataCocsnInterfacesInterfaceGetBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceGetBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnInterfacesInterfaceGetUnauthorizedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceGetUnauthorized -const DataCocsnInterfacesInterfaceGetUnauthorizedCode int = 401 - -/*DataCocsnInterfacesInterfaceGetUnauthorized Unauthorized - -swagger:response dataCocsnInterfacesInterfaceGetUnauthorized -*/ -type DataCocsnInterfacesInterfaceGetUnauthorized struct { -} - -// NewDataCocsnInterfacesInterfaceGetUnauthorized creates DataCocsnInterfacesInterfaceGetUnauthorized with default headers values -func NewDataCocsnInterfacesInterfaceGetUnauthorized() *DataCocsnInterfacesInterfaceGetUnauthorized { - - return &DataCocsnInterfacesInterfaceGetUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceGetUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnInterfacesInterfaceGetNotFoundCode is the HTTP code returned for type DataCocsnInterfacesInterfaceGetNotFound -const DataCocsnInterfacesInterfaceGetNotFoundCode int = 404 - -/*DataCocsnInterfacesInterfaceGetNotFound Not Found - -swagger:response dataCocsnInterfacesInterfaceGetNotFound -*/ -type DataCocsnInterfacesInterfaceGetNotFound struct { -} - -// NewDataCocsnInterfacesInterfaceGetNotFound creates DataCocsnInterfacesInterfaceGetNotFound with default headers values -func NewDataCocsnInterfacesInterfaceGetNotFound() *DataCocsnInterfacesInterfaceGetNotFound { - - return &DataCocsnInterfacesInterfaceGetNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceGetNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnInterfacesInterfaceGetMethodNotAllowedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceGetMethodNotAllowed -const DataCocsnInterfacesInterfaceGetMethodNotAllowedCode int = 405 - -/*DataCocsnInterfacesInterfaceGetMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnInterfacesInterfaceGetMethodNotAllowed -*/ -type DataCocsnInterfacesInterfaceGetMethodNotAllowed struct { -} - -// NewDataCocsnInterfacesInterfaceGetMethodNotAllowed creates DataCocsnInterfacesInterfaceGetMethodNotAllowed with default headers values -func NewDataCocsnInterfacesInterfaceGetMethodNotAllowed() *DataCocsnInterfacesInterfaceGetMethodNotAllowed { - - return &DataCocsnInterfacesInterfaceGetMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceGetMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnInterfacesInterfaceGetConflictCode is the HTTP code returned for type DataCocsnInterfacesInterfaceGetConflict -const DataCocsnInterfacesInterfaceGetConflictCode int = 409 - -/*DataCocsnInterfacesInterfaceGetConflict Conflict - -swagger:response dataCocsnInterfacesInterfaceGetConflict -*/ -type DataCocsnInterfacesInterfaceGetConflict struct { -} - -// NewDataCocsnInterfacesInterfaceGetConflict creates DataCocsnInterfacesInterfaceGetConflict with default headers values -func NewDataCocsnInterfacesInterfaceGetConflict() *DataCocsnInterfacesInterfaceGetConflict { - - return &DataCocsnInterfacesInterfaceGetConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceGetConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_get_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_get_urlbuilder.go deleted file mode 100644 index 846f2838ea2819fee7adc35639f452d9e9f0ef7b..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_get_urlbuilder.go +++ /dev/null @@ -1,141 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - - "github.com/go-openapi/swag" -) - -// DataCocsnInterfacesInterfaceGetURL generates an URL for the data cocsn interfaces interface get operation -type DataCocsnInterfacesInterfaceGetURL struct { - Content *string - Depth *uint16 - Fields *string - Filter *string - WithDefaults *string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceGetURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceGetURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceGetURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DataCocsnInterfacesInterfaceGetURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn:interfaces/interface" - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - qs := make(url.Values) - - var contentQ string - if o.Content != nil { - contentQ = *o.Content - } - if contentQ != "" { - qs.Set("content", contentQ) - } - - var depthQ string - if o.Depth != nil { - depthQ = swag.FormatUint16(*o.Depth) - } - if depthQ != "" { - qs.Set("depth", depthQ) - } - - var fieldsQ string - if o.Fields != nil { - fieldsQ = *o.Fields - } - if fieldsQ != "" { - qs.Set("fields", fieldsQ) - } - - var filterQ string - if o.Filter != nil { - filterQ = *o.Filter - } - if filterQ != "" { - qs.Set("filter", filterQ) - } - - var withDefaultsQ string - if o.WithDefaults != nil { - withDefaultsQ = *o.WithDefaults - } - if withDefaultsQ != "" { - qs.Set("with-defaults", withDefaultsQ) - } - - _result.RawQuery = qs.Encode() - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnInterfacesInterfaceGetURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DataCocsnInterfacesInterfaceGetURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnInterfacesInterfaceGetURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceGetURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceGetURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DataCocsnInterfacesInterfaceGetURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_delete.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_delete.go new file mode 100644 index 0000000000000000000000000000000000000000..476e90b04d8c6b7ff3ec79bcb89b0fee6c26e094 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_delete.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime/middleware" +) + +// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name addresses addresses id delete handler +type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteParams, interface{}) middleware.Responder + +// Handle executing the request and returning a response +func (fn DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteParams, principal interface{}) middleware.Responder { + return fn(params, principal) +} + +// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteHandler interface for that can handle valid data cocsn interfaces interface interface name addresses addresses id delete params +type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteHandler interface { + Handle(DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteParams, interface{}) middleware.Responder +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDelete creates a new http.Handler for the data cocsn interfaces interface interface name addresses addresses id delete operation +func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDelete(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteHandler) *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDelete { + return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDelete{Context: ctx, Handler: handler} +} + +/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDelete swagger:route DELETE /data/cocsn:interfaces/interface={interface-name}/addresses={addresses-id} data delete dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdDelete + +Interface IP address. Example value: 10.10.10.1 + +Interface IP address. Example value: 10.10.10.1 + +*/ +type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDelete struct { + Context *middleware.Context + Handler DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteHandler +} + +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDelete) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + route, rCtx, _ := o.Context.RouteInfo(r) + if rCtx != nil { + r = rCtx + } + var Params = NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteParams() + + uprinc, aCtx, err := o.Context.Authorize(r, route) + if err != nil { + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + if aCtx != nil { + r = aCtx + } + var principal interface{} + if uprinc != nil { + principal = uprinc + } + + if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + + res := o.Handler.Handle(Params, principal) // actually handle the request + + o.Context.Respond(rw, r, route.Produces, route, res) + +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_delete_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_delete_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..cf4be8a25964736444bc9959d8b487b1b734d738 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_delete_parameters.go @@ -0,0 +1,97 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime/middleware" + "github.com/go-openapi/strfmt" +) + +// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteParams creates a new DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteParams object +// no default values defined in spec. +func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteParams() DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteParams { + + return DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteParams{} +} + +// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteParams contains all the bound params for the data cocsn interfaces interface interface name addresses addresses id delete operation +// typically these are obtained from a http.Request +// +// swagger:parameters data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_delete +type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteParams struct { + + // HTTP Request Object + HTTPRequest *http.Request `json:"-"` + + /*Interface IP address. Example value: 10.10.10.1 + Required: true + In: path + */ + AddressesID string + /*Interface name. Example value: en0 + Required: true + In: path + */ + InterfaceName string +} + +// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface +// for simple values it will use straight method calls. +// +// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteParams() beforehand. +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { + var res []error + + o.HTTPRequest = r + + rAddressesID, rhkAddressesID, _ := route.Params.GetOK("addresses-id") + if err := o.bindAddressesID(rAddressesID, rhkAddressesID, route.Formats); err != nil { + res = append(res, err) + } + + rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") + if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindAddressesID binds and validates parameter AddressesID from path. +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteParams) bindAddressesID(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + + o.AddressesID = raw + + return nil +} + +// bindInterfaceName binds and validates parameter InterfaceName from path. +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + + o.InterfaceName = raw + + return nil +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_delete_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_delete_responses.go new file mode 100644 index 0000000000000000000000000000000000000000..dcf7cdcd700a0048eeb776dffcca64d6e1d1f045 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_delete_responses.go @@ -0,0 +1,36 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime" +) + +// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteNoContent +const DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteNoContentCode int = 204 + +/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteNoContent No Content + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdDeleteNoContent +*/ +type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteNoContent struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteNoContent creates DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteNoContent with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteNoContent() *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteNoContent { + + return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteNoContent{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(204) +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_delete_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_delete_urlbuilder.go new file mode 100644 index 0000000000000000000000000000000000000000..cb06f64b90c5626c305e95a84feee97bf05c5aa4 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_delete_urlbuilder.go @@ -0,0 +1,107 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "errors" + "net/url" + golangswaggerpaths "path" + "strings" +) + +// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteURL generates an URL for the data cocsn interfaces interface interface name addresses addresses id delete operation +type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteURL struct { + AddressesID string + InterfaceName string + + _basePath string + // avoid unkeyed usage + _ struct{} +} + +// WithBasePath sets the base path for this url builder, only required when it's different from the +// base path specified in the swagger spec. +// When the value of the base path is an empty string +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteURL { + o.SetBasePath(bp) + return o +} + +// SetBasePath sets the base path for this url builder, only required when it's different from the +// base path specified in the swagger spec. +// When the value of the base path is an empty string +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteURL) SetBasePath(bp string) { + o._basePath = bp +} + +// Build a url path and query string +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteURL) Build() (*url.URL, error) { + var _result url.URL + + var _path = "/data/cocsn:interfaces/interface={interface-name}/addresses={addresses-id}" + + addressesID := o.AddressesID + if addressesID != "" { + _path = strings.Replace(_path, "{addresses-id}", addressesID, -1) + } else { + return nil, errors.New("addressesId is required on DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteURL") + } + + interfaceName := o.InterfaceName + if interfaceName != "" { + _path = strings.Replace(_path, "{interface-name}", interfaceName, -1) + } else { + return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteURL") + } + + _basePath := o._basePath + if _basePath == "" { + _basePath = "/restconf" + } + _result.Path = golangswaggerpaths.Join(_basePath, _path) + + return &_result, nil +} + +// Must is a helper function to panic when the url builder returns an error +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteURL) Must(u *url.URL, err error) *url.URL { + if err != nil { + panic(err) + } + if u == nil { + panic("url can't be nil") + } + return u +} + +// String returns the string representation of the path with query string +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteURL) String() string { + return o.Must(o.Build()).String() +} + +// BuildFull builds a full url with scheme, host, path and query string +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteURL) BuildFull(scheme, host string) (*url.URL, error) { + if scheme == "" { + return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteURL") + } + if host == "" { + return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteURL") + } + + base, err := o.Build() + if err != nil { + return nil, err + } + + base.Scheme = scheme + base.Host = host + return base, nil +} + +// StringFull returns the string representation of a complete url +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDDeleteURL) StringFull(scheme, host string) string { + return o.Must(o.BuildFull(scheme, host)).String() +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_patch.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_patch.go new file mode 100644 index 0000000000000000000000000000000000000000..fd339dd9ca1b6e3376616d1e2dd5ebe266cd7396 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_patch.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime/middleware" +) + +// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name addresses addresses id patch handler +type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchParams, interface{}) middleware.Responder + +// Handle executing the request and returning a response +func (fn DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchParams, principal interface{}) middleware.Responder { + return fn(params, principal) +} + +// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchHandler interface for that can handle valid data cocsn interfaces interface interface name addresses addresses id patch params +type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchHandler interface { + Handle(DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchParams, interface{}) middleware.Responder +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatch creates a new http.Handler for the data cocsn interfaces interface interface name addresses addresses id patch operation +func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatch(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchHandler) *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatch { + return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatch{Context: ctx, Handler: handler} +} + +/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatch swagger:route PATCH /data/cocsn:interfaces/interface={interface-name}/addresses={addresses-id} data patch dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdPatch + +Interface IP address. Example value: 10.10.10.1 + +Interface IP address. Example value: 10.10.10.1 + +*/ +type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatch struct { + Context *middleware.Context + Handler DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchHandler +} + +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatch) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + route, rCtx, _ := o.Context.RouteInfo(r) + if rCtx != nil { + r = rCtx + } + var Params = NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchParams() + + uprinc, aCtx, err := o.Context.Authorize(r, route) + if err != nil { + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + if aCtx != nil { + r = aCtx + } + var principal interface{} + if uprinc != nil { + principal = uprinc + } + + if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + + res := o.Handler.Handle(Params, principal) // actually handle the request + + o.Context.Respond(rw, r, route.Produces, route, res) + +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_patch_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_patch_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..de80c98fd29374e4c44f904fc2de006d28914def --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_patch_parameters.go @@ -0,0 +1,128 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "io" + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/runtime/middleware" + "github.com/go-openapi/strfmt" + + "code.fbi.h-da.de/cocsn/cocsn-api/api/models" +) + +// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchParams creates a new DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchParams object +// no default values defined in spec. +func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchParams() DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchParams { + + return DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchParams{} +} + +// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchParams contains all the bound params for the data cocsn interfaces interface interface name addresses addresses id patch operation +// typically these are obtained from a http.Request +// +// swagger:parameters data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_patch +type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchParams struct { + + // HTTP Request Object + HTTPRequest *http.Request `json:"-"` + + /*Interface IP address. Example value: 10.10.10.1 + Required: true + In: body + */ + Addresses *models.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesID + /*Interface IP address. Example value: 10.10.10.1 + Required: true + In: path + */ + AddressesID string + /*Interface name. Example value: en0 + Required: true + In: path + */ + InterfaceName string +} + +// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface +// for simple values it will use straight method calls. +// +// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchParams() beforehand. +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { + var res []error + + o.HTTPRequest = r + + if runtime.HasBody(r) { + defer r.Body.Close() + var body models.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesID + if err := route.Consumer.Consume(r.Body, &body); err != nil { + if err == io.EOF { + res = append(res, errors.Required("addresses", "body", "")) + } else { + res = append(res, errors.NewParseError("addresses", "body", "", err)) + } + } else { + // validate body object + if err := body.Validate(route.Formats); err != nil { + res = append(res, err) + } + + if len(res) == 0 { + o.Addresses = &body + } + } + } else { + res = append(res, errors.Required("addresses", "body", "")) + } + rAddressesID, rhkAddressesID, _ := route.Params.GetOK("addresses-id") + if err := o.bindAddressesID(rAddressesID, rhkAddressesID, route.Formats); err != nil { + res = append(res, err) + } + + rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") + if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindAddressesID binds and validates parameter AddressesID from path. +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchParams) bindAddressesID(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + + o.AddressesID = raw + + return nil +} + +// bindInterfaceName binds and validates parameter InterfaceName from path. +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + + o.InterfaceName = raw + + return nil +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_patch_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_patch_responses.go new file mode 100644 index 0000000000000000000000000000000000000000..5c0914ea81005605eff67fcc20e04703c638ba53 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_patch_responses.go @@ -0,0 +1,156 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime" +) + +// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNoContent +const DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNoContentCode int = 204 + +/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNoContent leaf-list addresses updated + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdPatchNoContent +*/ +type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNoContent struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNoContent creates DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNoContent with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNoContent() *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNoContent { + + return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNoContent{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(204) +} + +// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchBadRequestCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchBadRequest +const DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchBadRequestCode int = 400 + +/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchBadRequest Bad Request + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdPatchBadRequest +*/ +type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchBadRequest struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchBadRequest creates DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchBadRequest with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchBadRequest() *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchBadRequest { + + return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchBadRequest{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(400) +} + +// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchUnauthorizedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchUnauthorized +const DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchUnauthorizedCode int = 401 + +/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchUnauthorized Unauthorized + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdPatchUnauthorized +*/ +type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchUnauthorized struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchUnauthorized creates DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchUnauthorized with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchUnauthorized() *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchUnauthorized { + + return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchUnauthorized{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(401) +} + +// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNotFoundCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNotFound +const DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNotFoundCode int = 404 + +/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNotFound Not Found + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdPatchNotFound +*/ +type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNotFound struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNotFound creates DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNotFound with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNotFound() *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNotFound { + + return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNotFound{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(404) +} + +// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchMethodNotAllowedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchMethodNotAllowed +const DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchMethodNotAllowedCode int = 405 + +/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchMethodNotAllowed Method Not Allowed + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdPatchMethodNotAllowed +*/ +type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchMethodNotAllowed struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchMethodNotAllowed creates DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchMethodNotAllowed with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchMethodNotAllowed() *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchMethodNotAllowed { + + return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchMethodNotAllowed{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(405) +} + +// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchConflictCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchConflict +const DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchConflictCode int = 409 + +/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchConflict Conflict + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdPatchConflict +*/ +type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchConflict struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchConflict creates DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchConflict with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchConflict() *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchConflict { + + return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchConflict{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(409) +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_patch_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_patch_urlbuilder.go new file mode 100644 index 0000000000000000000000000000000000000000..2c713bf92a0e69d9ae7f0971598e3478e4123ed8 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_patch_urlbuilder.go @@ -0,0 +1,107 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "errors" + "net/url" + golangswaggerpaths "path" + "strings" +) + +// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchURL generates an URL for the data cocsn interfaces interface interface name addresses addresses id patch operation +type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchURL struct { + AddressesID string + InterfaceName string + + _basePath string + // avoid unkeyed usage + _ struct{} +} + +// WithBasePath sets the base path for this url builder, only required when it's different from the +// base path specified in the swagger spec. +// When the value of the base path is an empty string +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchURL { + o.SetBasePath(bp) + return o +} + +// SetBasePath sets the base path for this url builder, only required when it's different from the +// base path specified in the swagger spec. +// When the value of the base path is an empty string +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchURL) SetBasePath(bp string) { + o._basePath = bp +} + +// Build a url path and query string +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchURL) Build() (*url.URL, error) { + var _result url.URL + + var _path = "/data/cocsn:interfaces/interface={interface-name}/addresses={addresses-id}" + + addressesID := o.AddressesID + if addressesID != "" { + _path = strings.Replace(_path, "{addresses-id}", addressesID, -1) + } else { + return nil, errors.New("addressesId is required on DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchURL") + } + + interfaceName := o.InterfaceName + if interfaceName != "" { + _path = strings.Replace(_path, "{interface-name}", interfaceName, -1) + } else { + return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchURL") + } + + _basePath := o._basePath + if _basePath == "" { + _basePath = "/restconf" + } + _result.Path = golangswaggerpaths.Join(_basePath, _path) + + return &_result, nil +} + +// Must is a helper function to panic when the url builder returns an error +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchURL) Must(u *url.URL, err error) *url.URL { + if err != nil { + panic(err) + } + if u == nil { + panic("url can't be nil") + } + return u +} + +// String returns the string representation of the path with query string +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchURL) String() string { + return o.Must(o.Build()).String() +} + +// BuildFull builds a full url with scheme, host, path and query string +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchURL) BuildFull(scheme, host string) (*url.URL, error) { + if scheme == "" { + return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchURL") + } + if host == "" { + return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchURL") + } + + base, err := o.Build() + if err != nil { + return nil, err + } + + base.Scheme = scheme + base.Host = host + return base, nil +} + +// StringFull returns the string representation of a complete url +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPatchURL) StringFull(scheme, host string) string { + return o.Must(o.BuildFull(scheme, host)).String() +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_put.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_put.go new file mode 100644 index 0000000000000000000000000000000000000000..cb7c4c3709928752ff21a682ff0643e291b99d91 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_put.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime/middleware" +) + +// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name addresses addresses id put handler +type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams, interface{}) middleware.Responder + +// Handle executing the request and returning a response +func (fn DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams, principal interface{}) middleware.Responder { + return fn(params, principal) +} + +// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutHandler interface for that can handle valid data cocsn interfaces interface interface name addresses addresses id put params +type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutHandler interface { + Handle(DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams, interface{}) middleware.Responder +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPut creates a new http.Handler for the data cocsn interfaces interface interface name addresses addresses id put operation +func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPut(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutHandler) *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPut { + return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPut{Context: ctx, Handler: handler} +} + +/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPut swagger:route PUT /data/cocsn:interfaces/interface={interface-name}/addresses={addresses-id} data put dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdPut + +Interface IP address. Example value: 10.10.10.1 + +Interface IP address. Example value: 10.10.10.1 + +*/ +type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPut struct { + Context *middleware.Context + Handler DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutHandler +} + +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPut) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + route, rCtx, _ := o.Context.RouteInfo(r) + if rCtx != nil { + r = rCtx + } + var Params = NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams() + + uprinc, aCtx, err := o.Context.Authorize(r, route) + if err != nil { + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + if aCtx != nil { + r = aCtx + } + var principal interface{} + if uprinc != nil { + principal = uprinc + } + + if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + + res := o.Handler.Handle(Params, principal) // actually handle the request + + o.Context.Respond(rw, r, route.Produces, route, res) + +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_put_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_put_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..b0bc9615eb16ad00fef2eb15464bd32931224397 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_put_parameters.go @@ -0,0 +1,209 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "io" + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/runtime/middleware" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" + + "code.fbi.h-da.de/cocsn/cocsn-api/api/models" +) + +// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams creates a new DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams object +// with the default values initialized. +func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams() DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams { + + var ( + // initialize parameters with default values + + insertDefault = string("first") + ) + + return DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams{ + Insert: &insertDefault, + } +} + +// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams contains all the bound params for the data cocsn interfaces interface interface name addresses addresses id put operation +// typically these are obtained from a http.Request +// +// swagger:parameters data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_put +type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams struct { + + // HTTP Request Object + HTTPRequest *http.Request `json:"-"` + + /*Interface IP address. Example value: 10.10.10.1 + Required: true + In: body + */ + Addresses *models.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesID + /*Interface IP address. Example value: 10.10.10.1 + Required: true + In: path + */ + AddressesID string + /*controlling the order when adding new list elements + In: query + Default: "first" + */ + Insert *string + /*Interface name. Example value: en0 + Required: true + In: path + */ + InterfaceName string + /*used to specify the insertion point + In: query + */ + Point *string +} + +// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface +// for simple values it will use straight method calls. +// +// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams() beforehand. +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { + var res []error + + o.HTTPRequest = r + + qs := runtime.Values(r.URL.Query()) + + if runtime.HasBody(r) { + defer r.Body.Close() + var body models.DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesID + if err := route.Consumer.Consume(r.Body, &body); err != nil { + if err == io.EOF { + res = append(res, errors.Required("addresses", "body", "")) + } else { + res = append(res, errors.NewParseError("addresses", "body", "", err)) + } + } else { + // validate body object + if err := body.Validate(route.Formats); err != nil { + res = append(res, err) + } + + if len(res) == 0 { + o.Addresses = &body + } + } + } else { + res = append(res, errors.Required("addresses", "body", "")) + } + rAddressesID, rhkAddressesID, _ := route.Params.GetOK("addresses-id") + if err := o.bindAddressesID(rAddressesID, rhkAddressesID, route.Formats); err != nil { + res = append(res, err) + } + + qInsert, qhkInsert, _ := qs.GetOK("insert") + if err := o.bindInsert(qInsert, qhkInsert, route.Formats); err != nil { + res = append(res, err) + } + + rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") + if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { + res = append(res, err) + } + + qPoint, qhkPoint, _ := qs.GetOK("point") + if err := o.bindPoint(qPoint, qhkPoint, route.Formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindAddressesID binds and validates parameter AddressesID from path. +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams) bindAddressesID(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + + o.AddressesID = raw + + return nil +} + +// bindInsert binds and validates parameter Insert from query. +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams) bindInsert(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: false + // AllowEmptyValue: false + if raw == "" { // empty values pass all other validations + // Default values have been previously initialized by NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams() + return nil + } + + o.Insert = &raw + + if err := o.validateInsert(formats); err != nil { + return err + } + + return nil +} + +// validateInsert carries on validations for parameter Insert +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams) validateInsert(formats strfmt.Registry) error { + + if err := validate.EnumCase("insert", "query", *o.Insert, []interface{}{"first", "last", "before", "after"}, true); err != nil { + return err + } + + return nil +} + +// bindInterfaceName binds and validates parameter InterfaceName from path. +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + + o.InterfaceName = raw + + return nil +} + +// bindPoint binds and validates parameter Point from query. +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutParams) bindPoint(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: false + // AllowEmptyValue: false + if raw == "" { // empty values pass all other validations + return nil + } + + o.Point = &raw + + return nil +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_put_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_put_responses.go new file mode 100644 index 0000000000000000000000000000000000000000..39285a5e9350af347f235904daa76b15da3a778e --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_put_responses.go @@ -0,0 +1,180 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime" +) + +// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutCreatedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutCreated +const DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutCreatedCode int = 201 + +/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutCreated leaf-list addresses created or replaced + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdPutCreated +*/ +type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutCreated struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutCreated creates DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutCreated with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutCreated() *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutCreated { + + return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutCreated{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(201) +} + +// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNoContent +const DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNoContentCode int = 204 + +/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNoContent No Content + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdPutNoContent +*/ +type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNoContent struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNoContent creates DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNoContent with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNoContent() *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNoContent { + + return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNoContent{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(204) +} + +// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutBadRequestCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutBadRequest +const DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutBadRequestCode int = 400 + +/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutBadRequest Bad Request + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdPutBadRequest +*/ +type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutBadRequest struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutBadRequest creates DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutBadRequest with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutBadRequest() *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutBadRequest { + + return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutBadRequest{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(400) +} + +// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutUnauthorizedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutUnauthorized +const DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutUnauthorizedCode int = 401 + +/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutUnauthorized Unauthorized + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdPutUnauthorized +*/ +type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutUnauthorized struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutUnauthorized creates DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutUnauthorized with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutUnauthorized() *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutUnauthorized { + + return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutUnauthorized{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(401) +} + +// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNotFoundCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNotFound +const DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNotFoundCode int = 404 + +/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNotFound Not Found + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdPutNotFound +*/ +type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNotFound struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNotFound creates DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNotFound with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNotFound() *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNotFound { + + return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNotFound{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(404) +} + +// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutMethodNotAllowedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutMethodNotAllowed +const DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutMethodNotAllowedCode int = 405 + +/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutMethodNotAllowed Method Not Allowed + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdPutMethodNotAllowed +*/ +type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutMethodNotAllowed struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutMethodNotAllowed creates DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutMethodNotAllowed with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutMethodNotAllowed() *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutMethodNotAllowed { + + return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutMethodNotAllowed{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(405) +} + +// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutConflictCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutConflict +const DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutConflictCode int = 409 + +/*DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutConflict Conflict + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIdPutConflict +*/ +type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutConflict struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutConflict creates DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutConflict with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutConflict() *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutConflict { + + return &DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutConflict{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(409) +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_put_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_put_urlbuilder.go new file mode 100644 index 0000000000000000000000000000000000000000..7dcc0809d217cfd113a3a4f6cb6130dd9e738357 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_put_urlbuilder.go @@ -0,0 +1,130 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "errors" + "net/url" + golangswaggerpaths "path" + "strings" +) + +// DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutURL generates an URL for the data cocsn interfaces interface interface name addresses addresses id put operation +type DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutURL struct { + AddressesID string + InterfaceName string + + Insert *string + Point *string + + _basePath string + // avoid unkeyed usage + _ struct{} +} + +// WithBasePath sets the base path for this url builder, only required when it's different from the +// base path specified in the swagger spec. +// When the value of the base path is an empty string +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutURL { + o.SetBasePath(bp) + return o +} + +// SetBasePath sets the base path for this url builder, only required when it's different from the +// base path specified in the swagger spec. +// When the value of the base path is an empty string +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutURL) SetBasePath(bp string) { + o._basePath = bp +} + +// Build a url path and query string +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutURL) Build() (*url.URL, error) { + var _result url.URL + + var _path = "/data/cocsn:interfaces/interface={interface-name}/addresses={addresses-id}" + + addressesID := o.AddressesID + if addressesID != "" { + _path = strings.Replace(_path, "{addresses-id}", addressesID, -1) + } else { + return nil, errors.New("addressesId is required on DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutURL") + } + + interfaceName := o.InterfaceName + if interfaceName != "" { + _path = strings.Replace(_path, "{interface-name}", interfaceName, -1) + } else { + return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutURL") + } + + _basePath := o._basePath + if _basePath == "" { + _basePath = "/restconf" + } + _result.Path = golangswaggerpaths.Join(_basePath, _path) + + qs := make(url.Values) + + var insertQ string + if o.Insert != nil { + insertQ = *o.Insert + } + if insertQ != "" { + qs.Set("insert", insertQ) + } + + var pointQ string + if o.Point != nil { + pointQ = *o.Point + } + if pointQ != "" { + qs.Set("point", pointQ) + } + + _result.RawQuery = qs.Encode() + + return &_result, nil +} + +// Must is a helper function to panic when the url builder returns an error +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutURL) Must(u *url.URL, err error) *url.URL { + if err != nil { + panic(err) + } + if u == nil { + panic("url can't be nil") + } + return u +} + +// String returns the string representation of the path with query string +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutURL) String() string { + return o.Must(o.Build()).String() +} + +// BuildFull builds a full url with scheme, host, path and query string +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutURL) BuildFull(scheme, host string) (*url.URL, error) { + if scheme == "" { + return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutURL") + } + if host == "" { + return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutURL") + } + + base, err := o.Build() + if err != nil { + return nil, err + } + + base.Scheme = scheme + base.Host = host + return base, nil +} + +// StringFull returns the string representation of a complete url +func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesAddressesIDPutURL) StringFull(scheme, host string) string { + return o.Must(o.BuildFull(scheme, host)).String() +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_get_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_get_parameters.go deleted file mode 100644 index 91297cec2eb542ea417509a1e3b1f1155d33cdd4..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_get_parameters.go +++ /dev/null @@ -1,260 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesGetParams creates a new DataCocsnInterfacesInterfaceInterfaceNameAddressesGetParams object -// with the default values initialized. -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesGetParams() DataCocsnInterfacesInterfaceInterfaceNameAddressesGetParams { - - var ( - // initialize parameters with default values - - contentDefault = string("config") - - withDefaultsDefault = string("report-all") - ) - - return DataCocsnInterfacesInterfaceInterfaceNameAddressesGetParams{ - Content: &contentDefault, - - WithDefaults: &withDefaultsDefault, - } -} - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesGetParams contains all the bound params for the data cocsn interfaces interface interface name addresses get operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_interfaces_interface_interface_name_addresses_get -type DataCocsnInterfacesInterfaceInterfaceNameAddressesGetParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*controlling descendant nodes in response - In: query - Default: "config" - */ - Content *string - /*limit the depth of nodes in response - In: query - */ - Depth *uint16 - /*optionally identify specific data nodes in response - In: query - */ - Fields *string - /*xpath expression to filter data nodes in response - In: query - */ - Filter *string - /*Interface name. Example value: en0 - Required: true - In: path - */ - InterfaceName string - /*controlling default values in response - In: query - Default: "report-all" - */ - WithDefaults *string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNameAddressesGetParams() beforehand. -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - qs := runtime.Values(r.URL.Query()) - - qContent, qhkContent, _ := qs.GetOK("content") - if err := o.bindContent(qContent, qhkContent, route.Formats); err != nil { - res = append(res, err) - } - - qDepth, qhkDepth, _ := qs.GetOK("depth") - if err := o.bindDepth(qDepth, qhkDepth, route.Formats); err != nil { - res = append(res, err) - } - - qFields, qhkFields, _ := qs.GetOK("fields") - if err := o.bindFields(qFields, qhkFields, route.Formats); err != nil { - res = append(res, err) - } - - qFilter, qhkFilter, _ := qs.GetOK("filter") - if err := o.bindFilter(qFilter, qhkFilter, route.Formats); err != nil { - res = append(res, err) - } - - rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") - if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { - res = append(res, err) - } - - qWithDefaults, qhkWithDefaults, _ := qs.GetOK("with-defaults") - if err := o.bindWithDefaults(qWithDefaults, qhkWithDefaults, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindContent binds and validates parameter Content from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetParams) bindContent(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnInterfacesInterfaceInterfaceNameAddressesGetParams() - return nil - } - - o.Content = &raw - - if err := o.validateContent(formats); err != nil { - return err - } - - return nil -} - -// validateContent carries on validations for parameter Content -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetParams) validateContent(formats strfmt.Registry) error { - - if err := validate.EnumCase("content", "query", *o.Content, []interface{}{"config", "nonconfig", "all"}, true); err != nil { - return err - } - - return nil -} - -// bindDepth binds and validates parameter Depth from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetParams) bindDepth(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - value, err := swag.ConvertUint16(raw) - if err != nil { - return errors.InvalidType("depth", "query", "uint16", raw) - } - o.Depth = &value - - return nil -} - -// bindFields binds and validates parameter Fields from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetParams) bindFields(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Fields = &raw - - return nil -} - -// bindFilter binds and validates parameter Filter from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetParams) bindFilter(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Filter = &raw - - return nil -} - -// bindInterfaceName binds and validates parameter InterfaceName from path. -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.InterfaceName = raw - - return nil -} - -// bindWithDefaults binds and validates parameter WithDefaults from query. -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetParams) bindWithDefaults(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnInterfacesInterfaceInterfaceNameAddressesGetParams() - return nil - } - - o.WithDefaults = &raw - - if err := o.validateWithDefaults(formats); err != nil { - return err - } - - return nil -} - -// validateWithDefaults carries on validations for parameter WithDefaults -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetParams) validateWithDefaults(formats strfmt.Registry) error { - - if err := validate.EnumCase("with-defaults", "query", *o.WithDefaults, []interface{}{"report-all", "trim", "explicit", "report-all-tagged"}, true); err != nil { - return err - } - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_get_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_get_responses.go deleted file mode 100644 index c804563e662abb1bc4ec59eb881b8e841f0e29c9..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_get_responses.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesGetOKCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesGetOK -const DataCocsnInterfacesInterfaceInterfaceNameAddressesGetOKCode int = 200 - -/*DataCocsnInterfacesInterfaceInterfaceNameAddressesGetOK Interface IP address. Example value: 10.10.10.1 - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesGetOK -*/ -type DataCocsnInterfacesInterfaceInterfaceNameAddressesGetOK struct { - - /* - In: Body - */ - Payload *models.DataCocsnInterfacesInterfaceInterfaceNameAddresses `json:"body,omitempty"` -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesGetOK creates DataCocsnInterfacesInterfaceInterfaceNameAddressesGetOK with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesGetOK() *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetOK { - - return &DataCocsnInterfacesInterfaceInterfaceNameAddressesGetOK{} -} - -// WithPayload adds the payload to the data cocsn interfaces interface interface name addresses get o k response -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetOK) WithPayload(payload *models.DataCocsnInterfacesInterfaceInterfaceNameAddresses) *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the data cocsn interfaces interface interface name addresses get o k response -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetOK) SetPayload(payload *models.DataCocsnInterfacesInterfaceInterfaceNameAddresses) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesGetNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesGetNoContent -const DataCocsnInterfacesInterfaceInterfaceNameAddressesGetNoContentCode int = 204 - -/*DataCocsnInterfacesInterfaceInterfaceNameAddressesGetNoContent No Content - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesGetNoContent -*/ -type DataCocsnInterfacesInterfaceInterfaceNameAddressesGetNoContent struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesGetNoContent creates DataCocsnInterfacesInterfaceInterfaceNameAddressesGetNoContent with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesGetNoContent() *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetNoContent { - - return &DataCocsnInterfacesInterfaceInterfaceNameAddressesGetNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesGetBadRequestCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesGetBadRequest -const DataCocsnInterfacesInterfaceInterfaceNameAddressesGetBadRequestCode int = 400 - -/*DataCocsnInterfacesInterfaceInterfaceNameAddressesGetBadRequest Bad Request - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesGetBadRequest -*/ -type DataCocsnInterfacesInterfaceInterfaceNameAddressesGetBadRequest struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesGetBadRequest creates DataCocsnInterfacesInterfaceInterfaceNameAddressesGetBadRequest with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesGetBadRequest() *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetBadRequest { - - return &DataCocsnInterfacesInterfaceInterfaceNameAddressesGetBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesGetUnauthorizedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesGetUnauthorized -const DataCocsnInterfacesInterfaceInterfaceNameAddressesGetUnauthorizedCode int = 401 - -/*DataCocsnInterfacesInterfaceInterfaceNameAddressesGetUnauthorized Unauthorized - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesGetUnauthorized -*/ -type DataCocsnInterfacesInterfaceInterfaceNameAddressesGetUnauthorized struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesGetUnauthorized creates DataCocsnInterfacesInterfaceInterfaceNameAddressesGetUnauthorized with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesGetUnauthorized() *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetUnauthorized { - - return &DataCocsnInterfacesInterfaceInterfaceNameAddressesGetUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesGetNotFoundCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesGetNotFound -const DataCocsnInterfacesInterfaceInterfaceNameAddressesGetNotFoundCode int = 404 - -/*DataCocsnInterfacesInterfaceInterfaceNameAddressesGetNotFound Not Found - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesGetNotFound -*/ -type DataCocsnInterfacesInterfaceInterfaceNameAddressesGetNotFound struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesGetNotFound creates DataCocsnInterfacesInterfaceInterfaceNameAddressesGetNotFound with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesGetNotFound() *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetNotFound { - - return &DataCocsnInterfacesInterfaceInterfaceNameAddressesGetNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesGetMethodNotAllowedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesGetMethodNotAllowed -const DataCocsnInterfacesInterfaceInterfaceNameAddressesGetMethodNotAllowedCode int = 405 - -/*DataCocsnInterfacesInterfaceInterfaceNameAddressesGetMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesGetMethodNotAllowed -*/ -type DataCocsnInterfacesInterfaceInterfaceNameAddressesGetMethodNotAllowed struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesGetMethodNotAllowed creates DataCocsnInterfacesInterfaceInterfaceNameAddressesGetMethodNotAllowed with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesGetMethodNotAllowed() *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetMethodNotAllowed { - - return &DataCocsnInterfacesInterfaceInterfaceNameAddressesGetMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnInterfacesInterfaceInterfaceNameAddressesGetConflictCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameAddressesGetConflict -const DataCocsnInterfacesInterfaceInterfaceNameAddressesGetConflictCode int = 409 - -/*DataCocsnInterfacesInterfaceInterfaceNameAddressesGetConflict Conflict - -swagger:response dataCocsnInterfacesInterfaceInterfaceNameAddressesGetConflict -*/ -type DataCocsnInterfacesInterfaceInterfaceNameAddressesGetConflict struct { -} - -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesGetConflict creates DataCocsnInterfacesInterfaceInterfaceNameAddressesGetConflict with default headers values -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesGetConflict() *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetConflict { - - return &DataCocsnInterfacesInterfaceInterfaceNameAddressesGetConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_delete.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_delete.go new file mode 100644 index 0000000000000000000000000000000000000000..3dbcc05d768ad3733f7d1d4ba1791e813de01e9b --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_delete.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime/middleware" +) + +// DataCocsnInterfacesInterfaceInterfaceNameDeleteHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name delete handler +type DataCocsnInterfacesInterfaceInterfaceNameDeleteHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNameDeleteParams, interface{}) middleware.Responder + +// Handle executing the request and returning a response +func (fn DataCocsnInterfacesInterfaceInterfaceNameDeleteHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNameDeleteParams, principal interface{}) middleware.Responder { + return fn(params, principal) +} + +// DataCocsnInterfacesInterfaceInterfaceNameDeleteHandler interface for that can handle valid data cocsn interfaces interface interface name delete params +type DataCocsnInterfacesInterfaceInterfaceNameDeleteHandler interface { + Handle(DataCocsnInterfacesInterfaceInterfaceNameDeleteParams, interface{}) middleware.Responder +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameDelete creates a new http.Handler for the data cocsn interfaces interface interface name delete operation +func NewDataCocsnInterfacesInterfaceInterfaceNameDelete(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNameDeleteHandler) *DataCocsnInterfacesInterfaceInterfaceNameDelete { + return &DataCocsnInterfacesInterfaceInterfaceNameDelete{Context: ctx, Handler: handler} +} + +/*DataCocsnInterfacesInterfaceInterfaceNameDelete swagger:route DELETE /data/cocsn:interfaces/interface={interface-name} data delete dataCocsnInterfacesInterfaceInterfaceNameDelete + +DataCocsnInterfacesInterfaceInterfaceNameDelete data cocsn interfaces interface interface name delete API + +*/ +type DataCocsnInterfacesInterfaceInterfaceNameDelete struct { + Context *middleware.Context + Handler DataCocsnInterfacesInterfaceInterfaceNameDeleteHandler +} + +func (o *DataCocsnInterfacesInterfaceInterfaceNameDelete) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + route, rCtx, _ := o.Context.RouteInfo(r) + if rCtx != nil { + r = rCtx + } + var Params = NewDataCocsnInterfacesInterfaceInterfaceNameDeleteParams() + + uprinc, aCtx, err := o.Context.Authorize(r, route) + if err != nil { + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + if aCtx != nil { + r = aCtx + } + var principal interface{} + if uprinc != nil { + principal = uprinc + } + + if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + + res := o.Handler.Handle(Params, principal) // actually handle the request + + o.Context.Respond(rw, r, route.Produces, route, res) + +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_delete_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_delete_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..579b814414bc3b2f7814b67586039951444a9b46 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_delete_parameters.go @@ -0,0 +1,72 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime/middleware" + "github.com/go-openapi/strfmt" +) + +// NewDataCocsnInterfacesInterfaceInterfaceNameDeleteParams creates a new DataCocsnInterfacesInterfaceInterfaceNameDeleteParams object +// no default values defined in spec. +func NewDataCocsnInterfacesInterfaceInterfaceNameDeleteParams() DataCocsnInterfacesInterfaceInterfaceNameDeleteParams { + + return DataCocsnInterfacesInterfaceInterfaceNameDeleteParams{} +} + +// DataCocsnInterfacesInterfaceInterfaceNameDeleteParams contains all the bound params for the data cocsn interfaces interface interface name delete operation +// typically these are obtained from a http.Request +// +// swagger:parameters data_cocsn_interfaces_interface_interface_name_delete +type DataCocsnInterfacesInterfaceInterfaceNameDeleteParams struct { + + // HTTP Request Object + HTTPRequest *http.Request `json:"-"` + + /*Interface name. Example value: en0 + Required: true + In: path + */ + InterfaceName string +} + +// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface +// for simple values it will use straight method calls. +// +// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNameDeleteParams() beforehand. +func (o *DataCocsnInterfacesInterfaceInterfaceNameDeleteParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { + var res []error + + o.HTTPRequest = r + + rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") + if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindInterfaceName binds and validates parameter InterfaceName from path. +func (o *DataCocsnInterfacesInterfaceInterfaceNameDeleteParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + + o.InterfaceName = raw + + return nil +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_delete_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_delete_responses.go new file mode 100644 index 0000000000000000000000000000000000000000..932e48cc4b30a10a18c0002d4aa05c604a2dce8d --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_delete_responses.go @@ -0,0 +1,36 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime" +) + +// DataCocsnInterfacesInterfaceInterfaceNameDeleteNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameDeleteNoContent +const DataCocsnInterfacesInterfaceInterfaceNameDeleteNoContentCode int = 204 + +/*DataCocsnInterfacesInterfaceInterfaceNameDeleteNoContent No Content + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameDeleteNoContent +*/ +type DataCocsnInterfacesInterfaceInterfaceNameDeleteNoContent struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameDeleteNoContent creates DataCocsnInterfacesInterfaceInterfaceNameDeleteNoContent with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameDeleteNoContent() *DataCocsnInterfacesInterfaceInterfaceNameDeleteNoContent { + + return &DataCocsnInterfacesInterfaceInterfaceNameDeleteNoContent{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameDeleteNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(204) +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_delete_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_delete_urlbuilder.go new file mode 100644 index 0000000000000000000000000000000000000000..7d8870b7ee5eb9c1ab81d8a2c90b4e5857f4bd0d --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_delete_urlbuilder.go @@ -0,0 +1,99 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "errors" + "net/url" + golangswaggerpaths "path" + "strings" +) + +// DataCocsnInterfacesInterfaceInterfaceNameDeleteURL generates an URL for the data cocsn interfaces interface interface name delete operation +type DataCocsnInterfacesInterfaceInterfaceNameDeleteURL struct { + InterfaceName string + + _basePath string + // avoid unkeyed usage + _ struct{} +} + +// WithBasePath sets the base path for this url builder, only required when it's different from the +// base path specified in the swagger spec. +// When the value of the base path is an empty string +func (o *DataCocsnInterfacesInterfaceInterfaceNameDeleteURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNameDeleteURL { + o.SetBasePath(bp) + return o +} + +// SetBasePath sets the base path for this url builder, only required when it's different from the +// base path specified in the swagger spec. +// When the value of the base path is an empty string +func (o *DataCocsnInterfacesInterfaceInterfaceNameDeleteURL) SetBasePath(bp string) { + o._basePath = bp +} + +// Build a url path and query string +func (o *DataCocsnInterfacesInterfaceInterfaceNameDeleteURL) Build() (*url.URL, error) { + var _result url.URL + + var _path = "/data/cocsn:interfaces/interface={interface-name}" + + interfaceName := o.InterfaceName + if interfaceName != "" { + _path = strings.Replace(_path, "{interface-name}", interfaceName, -1) + } else { + return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNameDeleteURL") + } + + _basePath := o._basePath + if _basePath == "" { + _basePath = "/restconf" + } + _result.Path = golangswaggerpaths.Join(_basePath, _path) + + return &_result, nil +} + +// Must is a helper function to panic when the url builder returns an error +func (o *DataCocsnInterfacesInterfaceInterfaceNameDeleteURL) Must(u *url.URL, err error) *url.URL { + if err != nil { + panic(err) + } + if u == nil { + panic("url can't be nil") + } + return u +} + +// String returns the string representation of the path with query string +func (o *DataCocsnInterfacesInterfaceInterfaceNameDeleteURL) String() string { + return o.Must(o.Build()).String() +} + +// BuildFull builds a full url with scheme, host, path and query string +func (o *DataCocsnInterfacesInterfaceInterfaceNameDeleteURL) BuildFull(scheme, host string) (*url.URL, error) { + if scheme == "" { + return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameDeleteURL") + } + if host == "" { + return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameDeleteURL") + } + + base, err := o.Build() + if err != nil { + return nil, err + } + + base.Scheme = scheme + base.Host = host + return base, nil +} + +// StringFull returns the string representation of a complete url +func (o *DataCocsnInterfacesInterfaceInterfaceNameDeleteURL) StringFull(scheme, host string) string { + return o.Must(o.BuildFull(scheme, host)).String() +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_delete.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_delete.go new file mode 100644 index 0000000000000000000000000000000000000000..b8f989b9c3abfe6ada1461bfa744e3c94c565f03 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_delete.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime/middleware" +) + +// DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name enabled delete handler +type DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteParams, interface{}) middleware.Responder + +// Handle executing the request and returning a response +func (fn DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteParams, principal interface{}) middleware.Responder { + return fn(params, principal) +} + +// DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteHandler interface for that can handle valid data cocsn interfaces interface interface name enabled delete params +type DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteHandler interface { + Handle(DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteParams, interface{}) middleware.Responder +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledDelete creates a new http.Handler for the data cocsn interfaces interface interface name enabled delete operation +func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledDelete(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteHandler) *DataCocsnInterfacesInterfaceInterfaceNameEnabledDelete { + return &DataCocsnInterfacesInterfaceInterfaceNameEnabledDelete{Context: ctx, Handler: handler} +} + +/*DataCocsnInterfacesInterfaceInterfaceNameEnabledDelete swagger:route DELETE /data/cocsn:interfaces/interface={interface-name}/enabled data delete dataCocsnInterfacesInterfaceInterfaceNameEnabledDelete + +Enable or disable the interface. Example value: true + +Enable or disable the interface. Example value: true + +*/ +type DataCocsnInterfacesInterfaceInterfaceNameEnabledDelete struct { + Context *middleware.Context + Handler DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteHandler +} + +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledDelete) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + route, rCtx, _ := o.Context.RouteInfo(r) + if rCtx != nil { + r = rCtx + } + var Params = NewDataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteParams() + + uprinc, aCtx, err := o.Context.Authorize(r, route) + if err != nil { + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + if aCtx != nil { + r = aCtx + } + var principal interface{} + if uprinc != nil { + principal = uprinc + } + + if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + + res := o.Handler.Handle(Params, principal) // actually handle the request + + o.Context.Respond(rw, r, route.Produces, route, res) + +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_delete_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_delete_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..f1a5b20a53010131038f8908daaccba08b915b3f --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_delete_parameters.go @@ -0,0 +1,72 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime/middleware" + "github.com/go-openapi/strfmt" +) + +// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteParams creates a new DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteParams object +// no default values defined in spec. +func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteParams() DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteParams { + + return DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteParams{} +} + +// DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteParams contains all the bound params for the data cocsn interfaces interface interface name enabled delete operation +// typically these are obtained from a http.Request +// +// swagger:parameters data_cocsn_interfaces_interface_interface_name_enabled_delete +type DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteParams struct { + + // HTTP Request Object + HTTPRequest *http.Request `json:"-"` + + /*Interface name. Example value: en0 + Required: true + In: path + */ + InterfaceName string +} + +// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface +// for simple values it will use straight method calls. +// +// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteParams() beforehand. +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { + var res []error + + o.HTTPRequest = r + + rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") + if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindInterfaceName binds and validates parameter InterfaceName from path. +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + + o.InterfaceName = raw + + return nil +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_delete_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_delete_responses.go new file mode 100644 index 0000000000000000000000000000000000000000..4f2ff330eaa87a44086d17d1dc387442ef3a83ae --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_delete_responses.go @@ -0,0 +1,36 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime" +) + +// DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteNoContent +const DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteNoContentCode int = 204 + +/*DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteNoContent No Content + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteNoContent +*/ +type DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteNoContent struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteNoContent creates DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteNoContent with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteNoContent() *DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteNoContent { + + return &DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteNoContent{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(204) +} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_state_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_delete_urlbuilder.go similarity index 56% rename from waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_state_urlbuilder.go rename to api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_delete_urlbuilder.go index 60c971af5f408b5995eda556a205af3882c6b94c..165e52413570f53ceca1202ae023fb474cdb5560 100644 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_state_urlbuilder.go +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_delete_urlbuilder.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package ciena_waveserver_interfaces +package data // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the generate command @@ -10,13 +10,11 @@ import ( "net/url" golangswaggerpaths "path" "strings" - - "github.com/go-openapi/swag" ) -// PostDataWaveserverInterfacesLogicalInterfaceIndexStateURL generates an URL for the post data waveserver interfaces logical interface index state operation -type PostDataWaveserverInterfacesLogicalInterfaceIndexStateURL struct { - Index int64 +// DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteURL generates an URL for the data cocsn interfaces interface interface name enabled delete operation +type DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteURL struct { + InterfaceName string _basePath string // avoid unkeyed usage @@ -26,7 +24,7 @@ type PostDataWaveserverInterfacesLogicalInterfaceIndexStateURL struct { // WithBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexStateURL) WithBasePath(bp string) *PostDataWaveserverInterfacesLogicalInterfaceIndexStateURL { +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteURL { o.SetBasePath(bp) return o } @@ -34,31 +32,34 @@ func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexStateURL) WithBasePath // SetBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexStateURL) SetBasePath(bp string) { +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteURL) SetBasePath(bp string) { o._basePath = bp } // Build a url path and query string -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexStateURL) Build() (*url.URL, error) { +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/data/waveserver-interfaces/logical-interface={index}/state/" + var _path = "/data/cocsn:interfaces/interface={interface-name}/enabled" - index := swag.FormatInt64(o.Index) - if index != "" { - _path = strings.Replace(_path, "{index}", index, -1) + interfaceName := o.InterfaceName + if interfaceName != "" { + _path = strings.Replace(_path, "{interface-name}", interfaceName, -1) } else { - return nil, errors.New("index is required on PostDataWaveserverInterfacesLogicalInterfaceIndexStateURL") + return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteURL") } _basePath := o._basePath + if _basePath == "" { + _basePath = "/restconf" + } _result.Path = golangswaggerpaths.Join(_basePath, _path) return &_result, nil } // Must is a helper function to panic when the url builder returns an error -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexStateURL) Must(u *url.URL, err error) *url.URL { +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteURL) Must(u *url.URL, err error) *url.URL { if err != nil { panic(err) } @@ -69,17 +70,17 @@ func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexStateURL) Must(u *url. } // String returns the string representation of the path with query string -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexStateURL) String() string { +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteURL) String() string { return o.Must(o.Build()).String() } // BuildFull builds a full url with scheme, host, path and query string -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexStateURL) BuildFull(scheme, host string) (*url.URL, error) { +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteURL) BuildFull(scheme, host string) (*url.URL, error) { if scheme == "" { - return nil, errors.New("scheme is required for a full url on PostDataWaveserverInterfacesLogicalInterfaceIndexStateURL") + return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteURL") } if host == "" { - return nil, errors.New("host is required for a full url on PostDataWaveserverInterfacesLogicalInterfaceIndexStateURL") + return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteURL") } base, err := o.Build() @@ -93,6 +94,6 @@ func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexStateURL) BuildFull(sc } // StringFull returns the string representation of a complete url -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexStateURL) StringFull(scheme, host string) string { +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledDeleteURL) StringFull(scheme, host string) string { return o.Must(o.BuildFull(scheme, host)).String() } diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_get.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_patch.go similarity index 50% rename from api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_get.go rename to api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_patch.go index bfdeacbb3e49d7c86a69c3fc5f09ff299b27c59d..74fdbde86d583aa1f29648d9e387bfaef7d7ff2d 100644 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_get.go +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_patch.go @@ -11,42 +11,42 @@ import ( "github.com/go-openapi/runtime/middleware" ) -// DataCocsnInterfacesInterfaceInterfaceNameAddressesGetHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name addresses get handler -type DataCocsnInterfacesInterfaceInterfaceNameAddressesGetHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNameAddressesGetParams, interface{}) middleware.Responder +// DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name enabled patch handler +type DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchParams, interface{}) middleware.Responder // Handle executing the request and returning a response -func (fn DataCocsnInterfacesInterfaceInterfaceNameAddressesGetHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNameAddressesGetParams, principal interface{}) middleware.Responder { +func (fn DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchParams, principal interface{}) middleware.Responder { return fn(params, principal) } -// DataCocsnInterfacesInterfaceInterfaceNameAddressesGetHandler interface for that can handle valid data cocsn interfaces interface interface name addresses get params -type DataCocsnInterfacesInterfaceInterfaceNameAddressesGetHandler interface { - Handle(DataCocsnInterfacesInterfaceInterfaceNameAddressesGetParams, interface{}) middleware.Responder +// DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchHandler interface for that can handle valid data cocsn interfaces interface interface name enabled patch params +type DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchHandler interface { + Handle(DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchParams, interface{}) middleware.Responder } -// NewDataCocsnInterfacesInterfaceInterfaceNameAddressesGet creates a new http.Handler for the data cocsn interfaces interface interface name addresses get operation -func NewDataCocsnInterfacesInterfaceInterfaceNameAddressesGet(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNameAddressesGetHandler) *DataCocsnInterfacesInterfaceInterfaceNameAddressesGet { - return &DataCocsnInterfacesInterfaceInterfaceNameAddressesGet{Context: ctx, Handler: handler} +// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatch creates a new http.Handler for the data cocsn interfaces interface interface name enabled patch operation +func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatch(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchHandler) *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatch { + return &DataCocsnInterfacesInterfaceInterfaceNameEnabledPatch{Context: ctx, Handler: handler} } -/*DataCocsnInterfacesInterfaceInterfaceNameAddressesGet swagger:route GET /data/cocsn:interfaces/interface={interface-name}/addresses data get dataCocsnInterfacesInterfaceInterfaceNameAddressesGet +/*DataCocsnInterfacesInterfaceInterfaceNameEnabledPatch swagger:route PATCH /data/cocsn:interfaces/interface={interface-name}/enabled data patch dataCocsnInterfacesInterfaceInterfaceNameEnabledPatch -Interface IP address. Example value: 10.10.10.1 +Enable or disable the interface. Example value: true -Interface IP address. Example value: 10.10.10.1 +Enable or disable the interface. Example value: true */ -type DataCocsnInterfacesInterfaceInterfaceNameAddressesGet struct { +type DataCocsnInterfacesInterfaceInterfaceNameEnabledPatch struct { Context *middleware.Context - Handler DataCocsnInterfacesInterfaceInterfaceNameAddressesGetHandler + Handler DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchHandler } -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesGet) ServeHTTP(rw http.ResponseWriter, r *http.Request) { +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatch) ServeHTTP(rw http.ResponseWriter, r *http.Request) { route, rCtx, _ := o.Context.RouteInfo(r) if rCtx != nil { r = rCtx } - var Params = NewDataCocsnInterfacesInterfaceInterfaceNameAddressesGetParams() + var Params = NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchParams() uprinc, aCtx, err := o.Context.Authorize(r, route) if err != nil { diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_patch_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_patch_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..32e328518ed6137f7ec343172b09453ff186e5e6 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_patch_parameters.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "io" + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/runtime/middleware" + "github.com/go-openapi/strfmt" + + "code.fbi.h-da.de/cocsn/cocsn-api/api/models" +) + +// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchParams creates a new DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchParams object +// no default values defined in spec. +func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchParams() DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchParams { + + return DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchParams{} +} + +// DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchParams contains all the bound params for the data cocsn interfaces interface interface name enabled patch operation +// typically these are obtained from a http.Request +// +// swagger:parameters data_cocsn_interfaces_interface_interface_name_enabled_patch +type DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchParams struct { + + // HTTP Request Object + HTTPRequest *http.Request `json:"-"` + + /*Enable or disable the interface. Example value: true + Required: true + In: body + */ + Enabled *models.DataCocsnInterfacesInterfaceInterfaceNameEnabled + /*Interface name. Example value: en0 + Required: true + In: path + */ + InterfaceName string +} + +// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface +// for simple values it will use straight method calls. +// +// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchParams() beforehand. +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { + var res []error + + o.HTTPRequest = r + + if runtime.HasBody(r) { + defer r.Body.Close() + var body models.DataCocsnInterfacesInterfaceInterfaceNameEnabled + if err := route.Consumer.Consume(r.Body, &body); err != nil { + if err == io.EOF { + res = append(res, errors.Required("enabled", "body", "")) + } else { + res = append(res, errors.NewParseError("enabled", "body", "", err)) + } + } else { + // validate body object + if err := body.Validate(route.Formats); err != nil { + res = append(res, err) + } + + if len(res) == 0 { + o.Enabled = &body + } + } + } else { + res = append(res, errors.Required("enabled", "body", "")) + } + rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") + if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindInterfaceName binds and validates parameter InterfaceName from path. +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + + o.InterfaceName = raw + + return nil +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_patch_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_patch_responses.go new file mode 100644 index 0000000000000000000000000000000000000000..acdd4267b10c41697c9b8bd1487854f20d00d763 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_patch_responses.go @@ -0,0 +1,156 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime" +) + +// DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNoContent +const DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNoContentCode int = 204 + +/*DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNoContent leaf enabled updated + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNoContent +*/ +type DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNoContent struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNoContent creates DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNoContent with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNoContent() *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNoContent { + + return &DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNoContent{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(204) +} + +// DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchBadRequestCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchBadRequest +const DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchBadRequestCode int = 400 + +/*DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchBadRequest Bad Request + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameEnabledPatchBadRequest +*/ +type DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchBadRequest struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchBadRequest creates DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchBadRequest with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchBadRequest() *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchBadRequest { + + return &DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchBadRequest{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(400) +} + +// DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchUnauthorizedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchUnauthorized +const DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchUnauthorizedCode int = 401 + +/*DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchUnauthorized Unauthorized + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameEnabledPatchUnauthorized +*/ +type DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchUnauthorized struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchUnauthorized creates DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchUnauthorized with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchUnauthorized() *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchUnauthorized { + + return &DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchUnauthorized{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(401) +} + +// DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNotFoundCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNotFound +const DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNotFoundCode int = 404 + +/*DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNotFound Not Found + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNotFound +*/ +type DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNotFound struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNotFound creates DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNotFound with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNotFound() *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNotFound { + + return &DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNotFound{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(404) +} + +// DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchMethodNotAllowedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchMethodNotAllowed +const DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchMethodNotAllowedCode int = 405 + +/*DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchMethodNotAllowed Method Not Allowed + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameEnabledPatchMethodNotAllowed +*/ +type DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchMethodNotAllowed struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchMethodNotAllowed creates DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchMethodNotAllowed with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchMethodNotAllowed() *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchMethodNotAllowed { + + return &DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchMethodNotAllowed{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(405) +} + +// DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchConflictCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchConflict +const DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchConflictCode int = 409 + +/*DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchConflict Conflict + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameEnabledPatchConflict +*/ +type DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchConflict struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchConflict creates DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchConflict with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPatchConflict() *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchConflict { + + return &DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchConflict{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(409) +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_get_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_patch_urlbuilder.go similarity index 59% rename from api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_get_urlbuilder.go rename to api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_patch_urlbuilder.go index a817691c6c572f21f33c64f60b67856590187b1b..4e726c73f735f90dd8937a25cb494a7253570035 100644 --- a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_addresses_get_urlbuilder.go +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_patch_urlbuilder.go @@ -10,20 +10,12 @@ import ( "net/url" golangswaggerpaths "path" "strings" - - "github.com/go-openapi/swag" ) -// DataCocsnInterfacesInterfaceInterfaceNameAddressesGetURL generates an URL for the data cocsn interfaces interface interface name addresses get operation -type DataCocsnInterfacesInterfaceInterfaceNameAddressesGetURL struct { +// DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchURL generates an URL for the data cocsn interfaces interface interface name enabled patch operation +type DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchURL struct { InterfaceName string - Content *string - Depth *uint16 - Fields *string - Filter *string - WithDefaults *string - _basePath string // avoid unkeyed usage _ struct{} @@ -32,7 +24,7 @@ type DataCocsnInterfacesInterfaceInterfaceNameAddressesGetURL struct { // WithBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetURL { +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchURL { o.SetBasePath(bp) return o } @@ -40,21 +32,21 @@ func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetURL) WithBasePath( // SetBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetURL) SetBasePath(bp string) { +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchURL) SetBasePath(bp string) { o._basePath = bp } // Build a url path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetURL) Build() (*url.URL, error) { +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/data/cocsn:interfaces/interface={interface-name}/addresses" + var _path = "/data/cocsn:interfaces/interface={interface-name}/enabled" interfaceName := o.InterfaceName if interfaceName != "" { _path = strings.Replace(_path, "{interface-name}", interfaceName, -1) } else { - return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNameAddressesGetURL") + return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchURL") } _basePath := o._basePath @@ -63,55 +55,11 @@ func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetURL) Build() (*url } _result.Path = golangswaggerpaths.Join(_basePath, _path) - qs := make(url.Values) - - var contentQ string - if o.Content != nil { - contentQ = *o.Content - } - if contentQ != "" { - qs.Set("content", contentQ) - } - - var depthQ string - if o.Depth != nil { - depthQ = swag.FormatUint16(*o.Depth) - } - if depthQ != "" { - qs.Set("depth", depthQ) - } - - var fieldsQ string - if o.Fields != nil { - fieldsQ = *o.Fields - } - if fieldsQ != "" { - qs.Set("fields", fieldsQ) - } - - var filterQ string - if o.Filter != nil { - filterQ = *o.Filter - } - if filterQ != "" { - qs.Set("filter", filterQ) - } - - var withDefaultsQ string - if o.WithDefaults != nil { - withDefaultsQ = *o.WithDefaults - } - if withDefaultsQ != "" { - qs.Set("with-defaults", withDefaultsQ) - } - - _result.RawQuery = qs.Encode() - return &_result, nil } // Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetURL) Must(u *url.URL, err error) *url.URL { +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchURL) Must(u *url.URL, err error) *url.URL { if err != nil { panic(err) } @@ -122,17 +70,17 @@ func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetURL) Must(u *url.U } // String returns the string representation of the path with query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetURL) String() string { +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchURL) String() string { return o.Must(o.Build()).String() } // BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetURL) BuildFull(scheme, host string) (*url.URL, error) { +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchURL) BuildFull(scheme, host string) (*url.URL, error) { if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameAddressesGetURL") + return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchURL") } if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameAddressesGetURL") + return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchURL") } base, err := o.Build() @@ -146,6 +94,6 @@ func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetURL) BuildFull(sch } // StringFull returns the string representation of a complete url -func (o *DataCocsnInterfacesInterfaceInterfaceNameAddressesGetURL) StringFull(scheme, host string) string { +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPatchURL) StringFull(scheme, host string) string { return o.Must(o.BuildFull(scheme, host)).String() } diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_put.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_put.go new file mode 100644 index 0000000000000000000000000000000000000000..99cb5ec40cb9d9fb9cfb77fe82e0edc102445965 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_put.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime/middleware" +) + +// DataCocsnInterfacesInterfaceInterfaceNameEnabledPutHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name enabled put handler +type DataCocsnInterfacesInterfaceInterfaceNameEnabledPutHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNameEnabledPutParams, interface{}) middleware.Responder + +// Handle executing the request and returning a response +func (fn DataCocsnInterfacesInterfaceInterfaceNameEnabledPutHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNameEnabledPutParams, principal interface{}) middleware.Responder { + return fn(params, principal) +} + +// DataCocsnInterfacesInterfaceInterfaceNameEnabledPutHandler interface for that can handle valid data cocsn interfaces interface interface name enabled put params +type DataCocsnInterfacesInterfaceInterfaceNameEnabledPutHandler interface { + Handle(DataCocsnInterfacesInterfaceInterfaceNameEnabledPutParams, interface{}) middleware.Responder +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPut creates a new http.Handler for the data cocsn interfaces interface interface name enabled put operation +func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPut(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNameEnabledPutHandler) *DataCocsnInterfacesInterfaceInterfaceNameEnabledPut { + return &DataCocsnInterfacesInterfaceInterfaceNameEnabledPut{Context: ctx, Handler: handler} +} + +/*DataCocsnInterfacesInterfaceInterfaceNameEnabledPut swagger:route PUT /data/cocsn:interfaces/interface={interface-name}/enabled data put dataCocsnInterfacesInterfaceInterfaceNameEnabledPut + +Enable or disable the interface. Example value: true + +Enable or disable the interface. Example value: true + +*/ +type DataCocsnInterfacesInterfaceInterfaceNameEnabledPut struct { + Context *middleware.Context + Handler DataCocsnInterfacesInterfaceInterfaceNameEnabledPutHandler +} + +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPut) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + route, rCtx, _ := o.Context.RouteInfo(r) + if rCtx != nil { + r = rCtx + } + var Params = NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPutParams() + + uprinc, aCtx, err := o.Context.Authorize(r, route) + if err != nil { + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + if aCtx != nil { + r = aCtx + } + var principal interface{} + if uprinc != nil { + principal = uprinc + } + + if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + + res := o.Handler.Handle(Params, principal) // actually handle the request + + o.Context.Respond(rw, r, route.Produces, route, res) + +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_put_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_put_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..c7200669842cc3036346a41bd8d5c41307b9e416 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_put_parameters.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "io" + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/runtime/middleware" + "github.com/go-openapi/strfmt" + + "code.fbi.h-da.de/cocsn/cocsn-api/api/models" +) + +// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPutParams creates a new DataCocsnInterfacesInterfaceInterfaceNameEnabledPutParams object +// no default values defined in spec. +func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPutParams() DataCocsnInterfacesInterfaceInterfaceNameEnabledPutParams { + + return DataCocsnInterfacesInterfaceInterfaceNameEnabledPutParams{} +} + +// DataCocsnInterfacesInterfaceInterfaceNameEnabledPutParams contains all the bound params for the data cocsn interfaces interface interface name enabled put operation +// typically these are obtained from a http.Request +// +// swagger:parameters data_cocsn_interfaces_interface_interface_name_enabled_put +type DataCocsnInterfacesInterfaceInterfaceNameEnabledPutParams struct { + + // HTTP Request Object + HTTPRequest *http.Request `json:"-"` + + /*Enable or disable the interface. Example value: true + Required: true + In: body + */ + Enabled *models.DataCocsnInterfacesInterfaceInterfaceNameEnabled + /*Interface name. Example value: en0 + Required: true + In: path + */ + InterfaceName string +} + +// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface +// for simple values it will use straight method calls. +// +// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPutParams() beforehand. +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { + var res []error + + o.HTTPRequest = r + + if runtime.HasBody(r) { + defer r.Body.Close() + var body models.DataCocsnInterfacesInterfaceInterfaceNameEnabled + if err := route.Consumer.Consume(r.Body, &body); err != nil { + if err == io.EOF { + res = append(res, errors.Required("enabled", "body", "")) + } else { + res = append(res, errors.NewParseError("enabled", "body", "", err)) + } + } else { + // validate body object + if err := body.Validate(route.Formats); err != nil { + res = append(res, err) + } + + if len(res) == 0 { + o.Enabled = &body + } + } + } else { + res = append(res, errors.Required("enabled", "body", "")) + } + rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") + if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindInterfaceName binds and validates parameter InterfaceName from path. +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + + o.InterfaceName = raw + + return nil +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_put_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_put_responses.go new file mode 100644 index 0000000000000000000000000000000000000000..8a2c2fcdd34461ce510041d3a95771448f427895 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_put_responses.go @@ -0,0 +1,180 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime" +) + +// DataCocsnInterfacesInterfaceInterfaceNameEnabledPutCreatedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameEnabledPutCreated +const DataCocsnInterfacesInterfaceInterfaceNameEnabledPutCreatedCode int = 201 + +/*DataCocsnInterfacesInterfaceInterfaceNameEnabledPutCreated leaf enabled created or replaced + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameEnabledPutCreated +*/ +type DataCocsnInterfacesInterfaceInterfaceNameEnabledPutCreated struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPutCreated creates DataCocsnInterfacesInterfaceInterfaceNameEnabledPutCreated with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPutCreated() *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutCreated { + + return &DataCocsnInterfacesInterfaceInterfaceNameEnabledPutCreated{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(201) +} + +// DataCocsnInterfacesInterfaceInterfaceNameEnabledPutNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameEnabledPutNoContent +const DataCocsnInterfacesInterfaceInterfaceNameEnabledPutNoContentCode int = 204 + +/*DataCocsnInterfacesInterfaceInterfaceNameEnabledPutNoContent No Content + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameEnabledPutNoContent +*/ +type DataCocsnInterfacesInterfaceInterfaceNameEnabledPutNoContent struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPutNoContent creates DataCocsnInterfacesInterfaceInterfaceNameEnabledPutNoContent with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPutNoContent() *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutNoContent { + + return &DataCocsnInterfacesInterfaceInterfaceNameEnabledPutNoContent{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(204) +} + +// DataCocsnInterfacesInterfaceInterfaceNameEnabledPutBadRequestCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameEnabledPutBadRequest +const DataCocsnInterfacesInterfaceInterfaceNameEnabledPutBadRequestCode int = 400 + +/*DataCocsnInterfacesInterfaceInterfaceNameEnabledPutBadRequest Bad Request + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameEnabledPutBadRequest +*/ +type DataCocsnInterfacesInterfaceInterfaceNameEnabledPutBadRequest struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPutBadRequest creates DataCocsnInterfacesInterfaceInterfaceNameEnabledPutBadRequest with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPutBadRequest() *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutBadRequest { + + return &DataCocsnInterfacesInterfaceInterfaceNameEnabledPutBadRequest{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(400) +} + +// DataCocsnInterfacesInterfaceInterfaceNameEnabledPutUnauthorizedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameEnabledPutUnauthorized +const DataCocsnInterfacesInterfaceInterfaceNameEnabledPutUnauthorizedCode int = 401 + +/*DataCocsnInterfacesInterfaceInterfaceNameEnabledPutUnauthorized Unauthorized + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameEnabledPutUnauthorized +*/ +type DataCocsnInterfacesInterfaceInterfaceNameEnabledPutUnauthorized struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPutUnauthorized creates DataCocsnInterfacesInterfaceInterfaceNameEnabledPutUnauthorized with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPutUnauthorized() *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutUnauthorized { + + return &DataCocsnInterfacesInterfaceInterfaceNameEnabledPutUnauthorized{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(401) +} + +// DataCocsnInterfacesInterfaceInterfaceNameEnabledPutNotFoundCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameEnabledPutNotFound +const DataCocsnInterfacesInterfaceInterfaceNameEnabledPutNotFoundCode int = 404 + +/*DataCocsnInterfacesInterfaceInterfaceNameEnabledPutNotFound Not Found + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameEnabledPutNotFound +*/ +type DataCocsnInterfacesInterfaceInterfaceNameEnabledPutNotFound struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPutNotFound creates DataCocsnInterfacesInterfaceInterfaceNameEnabledPutNotFound with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPutNotFound() *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutNotFound { + + return &DataCocsnInterfacesInterfaceInterfaceNameEnabledPutNotFound{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(404) +} + +// DataCocsnInterfacesInterfaceInterfaceNameEnabledPutMethodNotAllowedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameEnabledPutMethodNotAllowed +const DataCocsnInterfacesInterfaceInterfaceNameEnabledPutMethodNotAllowedCode int = 405 + +/*DataCocsnInterfacesInterfaceInterfaceNameEnabledPutMethodNotAllowed Method Not Allowed + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameEnabledPutMethodNotAllowed +*/ +type DataCocsnInterfacesInterfaceInterfaceNameEnabledPutMethodNotAllowed struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPutMethodNotAllowed creates DataCocsnInterfacesInterfaceInterfaceNameEnabledPutMethodNotAllowed with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPutMethodNotAllowed() *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutMethodNotAllowed { + + return &DataCocsnInterfacesInterfaceInterfaceNameEnabledPutMethodNotAllowed{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(405) +} + +// DataCocsnInterfacesInterfaceInterfaceNameEnabledPutConflictCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameEnabledPutConflict +const DataCocsnInterfacesInterfaceInterfaceNameEnabledPutConflictCode int = 409 + +/*DataCocsnInterfacesInterfaceInterfaceNameEnabledPutConflict Conflict + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameEnabledPutConflict +*/ +type DataCocsnInterfacesInterfaceInterfaceNameEnabledPutConflict struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPutConflict creates DataCocsnInterfacesInterfaceInterfaceNameEnabledPutConflict with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameEnabledPutConflict() *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutConflict { + + return &DataCocsnInterfacesInterfaceInterfaceNameEnabledPutConflict{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(409) +} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_put_urlbuilder.go similarity index 58% rename from waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_urlbuilder.go rename to api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_put_urlbuilder.go index 1d1031527724b21531c4365c6a555b1ebf6c3883..2f88fe691cf0edd9696363c7442242d1f1929c22 100644 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_urlbuilder.go +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_enabled_put_urlbuilder.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package ciena_waveserver_interfaces +package data // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the generate command @@ -12,9 +12,9 @@ import ( "strings" ) -// DeleteDataWaveserverInterfacesPhysicalInterfaceNameURL generates an URL for the delete data waveserver interfaces physical interface name operation -type DeleteDataWaveserverInterfacesPhysicalInterfaceNameURL struct { - Name string +// DataCocsnInterfacesInterfaceInterfaceNameEnabledPutURL generates an URL for the data cocsn interfaces interface interface name enabled put operation +type DataCocsnInterfacesInterfaceInterfaceNameEnabledPutURL struct { + InterfaceName string _basePath string // avoid unkeyed usage @@ -24,7 +24,7 @@ type DeleteDataWaveserverInterfacesPhysicalInterfaceNameURL struct { // WithBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameURL) WithBasePath(bp string) *DeleteDataWaveserverInterfacesPhysicalInterfaceNameURL { +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutURL { o.SetBasePath(bp) return o } @@ -32,31 +32,34 @@ func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameURL) WithBasePath(bp // SetBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameURL) SetBasePath(bp string) { +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutURL) SetBasePath(bp string) { o._basePath = bp } // Build a url path and query string -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameURL) Build() (*url.URL, error) { +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/data/waveserver-interfaces/physical-interface={name}/" + var _path = "/data/cocsn:interfaces/interface={interface-name}/enabled" - name := o.Name - if name != "" { - _path = strings.Replace(_path, "{name}", name, -1) + interfaceName := o.InterfaceName + if interfaceName != "" { + _path = strings.Replace(_path, "{interface-name}", interfaceName, -1) } else { - return nil, errors.New("name is required on DeleteDataWaveserverInterfacesPhysicalInterfaceNameURL") + return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNameEnabledPutURL") } _basePath := o._basePath + if _basePath == "" { + _basePath = "/restconf" + } _result.Path = golangswaggerpaths.Join(_basePath, _path) return &_result, nil } // Must is a helper function to panic when the url builder returns an error -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameURL) Must(u *url.URL, err error) *url.URL { +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutURL) Must(u *url.URL, err error) *url.URL { if err != nil { panic(err) } @@ -67,17 +70,17 @@ func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameURL) Must(u *url.URL } // String returns the string representation of the path with query string -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameURL) String() string { +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutURL) String() string { return o.Must(o.Build()).String() } // BuildFull builds a full url with scheme, host, path and query string -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameURL) BuildFull(scheme, host string) (*url.URL, error) { +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutURL) BuildFull(scheme, host string) (*url.URL, error) { if scheme == "" { - return nil, errors.New("scheme is required for a full url on DeleteDataWaveserverInterfacesPhysicalInterfaceNameURL") + return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameEnabledPutURL") } if host == "" { - return nil, errors.New("host is required for a full url on DeleteDataWaveserverInterfacesPhysicalInterfaceNameURL") + return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameEnabledPutURL") } base, err := o.Build() @@ -91,6 +94,6 @@ func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameURL) BuildFull(schem } // StringFull returns the string representation of a complete url -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameURL) StringFull(scheme, host string) string { +func (o *DataCocsnInterfacesInterfaceInterfaceNameEnabledPutURL) StringFull(scheme, host string) string { return o.Must(o.BuildFull(scheme, host)).String() } diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_delete.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_delete.go new file mode 100644 index 0000000000000000000000000000000000000000..6cd56c14d9b77fb359f39232c49d41018d454da8 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_delete.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime/middleware" +) + +// DataCocsnInterfacesInterfaceInterfaceNameNameDeleteHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name name delete handler +type DataCocsnInterfacesInterfaceInterfaceNameNameDeleteHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNameNameDeleteParams, interface{}) middleware.Responder + +// Handle executing the request and returning a response +func (fn DataCocsnInterfacesInterfaceInterfaceNameNameDeleteHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNameNameDeleteParams, principal interface{}) middleware.Responder { + return fn(params, principal) +} + +// DataCocsnInterfacesInterfaceInterfaceNameNameDeleteHandler interface for that can handle valid data cocsn interfaces interface interface name name delete params +type DataCocsnInterfacesInterfaceInterfaceNameNameDeleteHandler interface { + Handle(DataCocsnInterfacesInterfaceInterfaceNameNameDeleteParams, interface{}) middleware.Responder +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameNameDelete creates a new http.Handler for the data cocsn interfaces interface interface name name delete operation +func NewDataCocsnInterfacesInterfaceInterfaceNameNameDelete(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNameNameDeleteHandler) *DataCocsnInterfacesInterfaceInterfaceNameNameDelete { + return &DataCocsnInterfacesInterfaceInterfaceNameNameDelete{Context: ctx, Handler: handler} +} + +/*DataCocsnInterfacesInterfaceInterfaceNameNameDelete swagger:route DELETE /data/cocsn:interfaces/interface={interface-name}/name data delete dataCocsnInterfacesInterfaceInterfaceNameNameDelete + +Interface name. Example value: en0 + +Interface name. Example value: en0 + +*/ +type DataCocsnInterfacesInterfaceInterfaceNameNameDelete struct { + Context *middleware.Context + Handler DataCocsnInterfacesInterfaceInterfaceNameNameDeleteHandler +} + +func (o *DataCocsnInterfacesInterfaceInterfaceNameNameDelete) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + route, rCtx, _ := o.Context.RouteInfo(r) + if rCtx != nil { + r = rCtx + } + var Params = NewDataCocsnInterfacesInterfaceInterfaceNameNameDeleteParams() + + uprinc, aCtx, err := o.Context.Authorize(r, route) + if err != nil { + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + if aCtx != nil { + r = aCtx + } + var principal interface{} + if uprinc != nil { + principal = uprinc + } + + if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + + res := o.Handler.Handle(Params, principal) // actually handle the request + + o.Context.Respond(rw, r, route.Produces, route, res) + +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_delete_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_delete_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..d00389d30334e038c5768b04656a653396c2cc62 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_delete_parameters.go @@ -0,0 +1,72 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime/middleware" + "github.com/go-openapi/strfmt" +) + +// NewDataCocsnInterfacesInterfaceInterfaceNameNameDeleteParams creates a new DataCocsnInterfacesInterfaceInterfaceNameNameDeleteParams object +// no default values defined in spec. +func NewDataCocsnInterfacesInterfaceInterfaceNameNameDeleteParams() DataCocsnInterfacesInterfaceInterfaceNameNameDeleteParams { + + return DataCocsnInterfacesInterfaceInterfaceNameNameDeleteParams{} +} + +// DataCocsnInterfacesInterfaceInterfaceNameNameDeleteParams contains all the bound params for the data cocsn interfaces interface interface name name delete operation +// typically these are obtained from a http.Request +// +// swagger:parameters data_cocsn_interfaces_interface_interface_name_name_delete +type DataCocsnInterfacesInterfaceInterfaceNameNameDeleteParams struct { + + // HTTP Request Object + HTTPRequest *http.Request `json:"-"` + + /*Interface name. Example value: en0 + Required: true + In: path + */ + InterfaceName string +} + +// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface +// for simple values it will use straight method calls. +// +// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNameNameDeleteParams() beforehand. +func (o *DataCocsnInterfacesInterfaceInterfaceNameNameDeleteParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { + var res []error + + o.HTTPRequest = r + + rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") + if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindInterfaceName binds and validates parameter InterfaceName from path. +func (o *DataCocsnInterfacesInterfaceInterfaceNameNameDeleteParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + + o.InterfaceName = raw + + return nil +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_delete_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_delete_responses.go new file mode 100644 index 0000000000000000000000000000000000000000..7439a7eb66735b671c43e1aa6797178af4a15d2c --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_delete_responses.go @@ -0,0 +1,36 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime" +) + +// DataCocsnInterfacesInterfaceInterfaceNameNameDeleteNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameNameDeleteNoContent +const DataCocsnInterfacesInterfaceInterfaceNameNameDeleteNoContentCode int = 204 + +/*DataCocsnInterfacesInterfaceInterfaceNameNameDeleteNoContent No Content + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameNameDeleteNoContent +*/ +type DataCocsnInterfacesInterfaceInterfaceNameNameDeleteNoContent struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameNameDeleteNoContent creates DataCocsnInterfacesInterfaceInterfaceNameNameDeleteNoContent with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameNameDeleteNoContent() *DataCocsnInterfacesInterfaceInterfaceNameNameDeleteNoContent { + + return &DataCocsnInterfacesInterfaceInterfaceNameNameDeleteNoContent{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameNameDeleteNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(204) +} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_delete_urlbuilder.go similarity index 58% rename from waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_urlbuilder.go rename to api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_delete_urlbuilder.go index c603bcd8f516d0c6de92efbef60f1f4dcc3792d0..fecc4547c6a55f0ade557ffd2196ac111616b48d 100644 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_urlbuilder.go +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_delete_urlbuilder.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package ciena_waveserver_interfaces +package data // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the generate command @@ -10,13 +10,11 @@ import ( "net/url" golangswaggerpaths "path" "strings" - - "github.com/go-openapi/swag" ) -// DeleteDataWaveserverInterfacesLogicalInterfaceIndexURL generates an URL for the delete data waveserver interfaces logical interface index operation -type DeleteDataWaveserverInterfacesLogicalInterfaceIndexURL struct { - Index int64 +// DataCocsnInterfacesInterfaceInterfaceNameNameDeleteURL generates an URL for the data cocsn interfaces interface interface name name delete operation +type DataCocsnInterfacesInterfaceInterfaceNameNameDeleteURL struct { + InterfaceName string _basePath string // avoid unkeyed usage @@ -26,7 +24,7 @@ type DeleteDataWaveserverInterfacesLogicalInterfaceIndexURL struct { // WithBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexURL) WithBasePath(bp string) *DeleteDataWaveserverInterfacesLogicalInterfaceIndexURL { +func (o *DataCocsnInterfacesInterfaceInterfaceNameNameDeleteURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNameNameDeleteURL { o.SetBasePath(bp) return o } @@ -34,31 +32,34 @@ func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexURL) WithBasePath(bp // SetBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexURL) SetBasePath(bp string) { +func (o *DataCocsnInterfacesInterfaceInterfaceNameNameDeleteURL) SetBasePath(bp string) { o._basePath = bp } // Build a url path and query string -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexURL) Build() (*url.URL, error) { +func (o *DataCocsnInterfacesInterfaceInterfaceNameNameDeleteURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/data/waveserver-interfaces/logical-interface={index}/" + var _path = "/data/cocsn:interfaces/interface={interface-name}/name" - index := swag.FormatInt64(o.Index) - if index != "" { - _path = strings.Replace(_path, "{index}", index, -1) + interfaceName := o.InterfaceName + if interfaceName != "" { + _path = strings.Replace(_path, "{interface-name}", interfaceName, -1) } else { - return nil, errors.New("index is required on DeleteDataWaveserverInterfacesLogicalInterfaceIndexURL") + return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNameNameDeleteURL") } _basePath := o._basePath + if _basePath == "" { + _basePath = "/restconf" + } _result.Path = golangswaggerpaths.Join(_basePath, _path) return &_result, nil } // Must is a helper function to panic when the url builder returns an error -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexURL) Must(u *url.URL, err error) *url.URL { +func (o *DataCocsnInterfacesInterfaceInterfaceNameNameDeleteURL) Must(u *url.URL, err error) *url.URL { if err != nil { panic(err) } @@ -69,17 +70,17 @@ func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexURL) Must(u *url.URL } // String returns the string representation of the path with query string -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexURL) String() string { +func (o *DataCocsnInterfacesInterfaceInterfaceNameNameDeleteURL) String() string { return o.Must(o.Build()).String() } // BuildFull builds a full url with scheme, host, path and query string -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexURL) BuildFull(scheme, host string) (*url.URL, error) { +func (o *DataCocsnInterfacesInterfaceInterfaceNameNameDeleteURL) BuildFull(scheme, host string) (*url.URL, error) { if scheme == "" { - return nil, errors.New("scheme is required for a full url on DeleteDataWaveserverInterfacesLogicalInterfaceIndexURL") + return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameNameDeleteURL") } if host == "" { - return nil, errors.New("host is required for a full url on DeleteDataWaveserverInterfacesLogicalInterfaceIndexURL") + return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameNameDeleteURL") } base, err := o.Build() @@ -93,6 +94,6 @@ func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexURL) BuildFull(schem } // StringFull returns the string representation of a complete url -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexURL) StringFull(scheme, host string) string { +func (o *DataCocsnInterfacesInterfaceInterfaceNameNameDeleteURL) StringFull(scheme, host string) string { return o.Must(o.BuildFull(scheme, host)).String() } diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_patch.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_patch.go new file mode 100644 index 0000000000000000000000000000000000000000..0fa74eb639d1fbac3fdd4bad2009091ecc0431f5 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_patch.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime/middleware" +) + +// DataCocsnInterfacesInterfaceInterfaceNameNamePatchHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name name patch handler +type DataCocsnInterfacesInterfaceInterfaceNameNamePatchHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNameNamePatchParams, interface{}) middleware.Responder + +// Handle executing the request and returning a response +func (fn DataCocsnInterfacesInterfaceInterfaceNameNamePatchHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNameNamePatchParams, principal interface{}) middleware.Responder { + return fn(params, principal) +} + +// DataCocsnInterfacesInterfaceInterfaceNameNamePatchHandler interface for that can handle valid data cocsn interfaces interface interface name name patch params +type DataCocsnInterfacesInterfaceInterfaceNameNamePatchHandler interface { + Handle(DataCocsnInterfacesInterfaceInterfaceNameNamePatchParams, interface{}) middleware.Responder +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameNamePatch creates a new http.Handler for the data cocsn interfaces interface interface name name patch operation +func NewDataCocsnInterfacesInterfaceInterfaceNameNamePatch(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNameNamePatchHandler) *DataCocsnInterfacesInterfaceInterfaceNameNamePatch { + return &DataCocsnInterfacesInterfaceInterfaceNameNamePatch{Context: ctx, Handler: handler} +} + +/*DataCocsnInterfacesInterfaceInterfaceNameNamePatch swagger:route PATCH /data/cocsn:interfaces/interface={interface-name}/name data patch dataCocsnInterfacesInterfaceInterfaceNameNamePatch + +Interface name. Example value: en0 + +Interface name. Example value: en0 + +*/ +type DataCocsnInterfacesInterfaceInterfaceNameNamePatch struct { + Context *middleware.Context + Handler DataCocsnInterfacesInterfaceInterfaceNameNamePatchHandler +} + +func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePatch) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + route, rCtx, _ := o.Context.RouteInfo(r) + if rCtx != nil { + r = rCtx + } + var Params = NewDataCocsnInterfacesInterfaceInterfaceNameNamePatchParams() + + uprinc, aCtx, err := o.Context.Authorize(r, route) + if err != nil { + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + if aCtx != nil { + r = aCtx + } + var principal interface{} + if uprinc != nil { + principal = uprinc + } + + if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + + res := o.Handler.Handle(Params, principal) // actually handle the request + + o.Context.Respond(rw, r, route.Produces, route, res) + +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_patch_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_patch_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..3c48ab4ca2b0150b6cadeb7e1782ee283ef33a9a --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_patch_parameters.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "io" + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/runtime/middleware" + "github.com/go-openapi/strfmt" + + "code.fbi.h-da.de/cocsn/cocsn-api/api/models" +) + +// NewDataCocsnInterfacesInterfaceInterfaceNameNamePatchParams creates a new DataCocsnInterfacesInterfaceInterfaceNameNamePatchParams object +// no default values defined in spec. +func NewDataCocsnInterfacesInterfaceInterfaceNameNamePatchParams() DataCocsnInterfacesInterfaceInterfaceNameNamePatchParams { + + return DataCocsnInterfacesInterfaceInterfaceNameNamePatchParams{} +} + +// DataCocsnInterfacesInterfaceInterfaceNameNamePatchParams contains all the bound params for the data cocsn interfaces interface interface name name patch operation +// typically these are obtained from a http.Request +// +// swagger:parameters data_cocsn_interfaces_interface_interface_name_name_patch +type DataCocsnInterfacesInterfaceInterfaceNameNamePatchParams struct { + + // HTTP Request Object + HTTPRequest *http.Request `json:"-"` + + /*Interface name. Example value: en0 + Required: true + In: path + */ + InterfaceName string + /*Interface name. Example value: en0 + Required: true + In: body + */ + Name *models.DataCocsnInterfacesInterfaceInterfaceNameName +} + +// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface +// for simple values it will use straight method calls. +// +// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNameNamePatchParams() beforehand. +func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePatchParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { + var res []error + + o.HTTPRequest = r + + rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") + if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { + res = append(res, err) + } + + if runtime.HasBody(r) { + defer r.Body.Close() + var body models.DataCocsnInterfacesInterfaceInterfaceNameName + if err := route.Consumer.Consume(r.Body, &body); err != nil { + if err == io.EOF { + res = append(res, errors.Required("name", "body", "")) + } else { + res = append(res, errors.NewParseError("name", "body", "", err)) + } + } else { + // validate body object + if err := body.Validate(route.Formats); err != nil { + res = append(res, err) + } + + if len(res) == 0 { + o.Name = &body + } + } + } else { + res = append(res, errors.Required("name", "body", "")) + } + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindInterfaceName binds and validates parameter InterfaceName from path. +func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePatchParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + + o.InterfaceName = raw + + return nil +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_patch_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_patch_responses.go new file mode 100644 index 0000000000000000000000000000000000000000..184e6835744a37a453d32115ba7c0c259a4734d0 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_patch_responses.go @@ -0,0 +1,156 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime" +) + +// DataCocsnInterfacesInterfaceInterfaceNameNamePatchNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameNamePatchNoContent +const DataCocsnInterfacesInterfaceInterfaceNameNamePatchNoContentCode int = 204 + +/*DataCocsnInterfacesInterfaceInterfaceNameNamePatchNoContent leaf name updated + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameNamePatchNoContent +*/ +type DataCocsnInterfacesInterfaceInterfaceNameNamePatchNoContent struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameNamePatchNoContent creates DataCocsnInterfacesInterfaceInterfaceNameNamePatchNoContent with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameNamePatchNoContent() *DataCocsnInterfacesInterfaceInterfaceNameNamePatchNoContent { + + return &DataCocsnInterfacesInterfaceInterfaceNameNamePatchNoContent{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePatchNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(204) +} + +// DataCocsnInterfacesInterfaceInterfaceNameNamePatchBadRequestCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameNamePatchBadRequest +const DataCocsnInterfacesInterfaceInterfaceNameNamePatchBadRequestCode int = 400 + +/*DataCocsnInterfacesInterfaceInterfaceNameNamePatchBadRequest Bad Request + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameNamePatchBadRequest +*/ +type DataCocsnInterfacesInterfaceInterfaceNameNamePatchBadRequest struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameNamePatchBadRequest creates DataCocsnInterfacesInterfaceInterfaceNameNamePatchBadRequest with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameNamePatchBadRequest() *DataCocsnInterfacesInterfaceInterfaceNameNamePatchBadRequest { + + return &DataCocsnInterfacesInterfaceInterfaceNameNamePatchBadRequest{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePatchBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(400) +} + +// DataCocsnInterfacesInterfaceInterfaceNameNamePatchUnauthorizedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameNamePatchUnauthorized +const DataCocsnInterfacesInterfaceInterfaceNameNamePatchUnauthorizedCode int = 401 + +/*DataCocsnInterfacesInterfaceInterfaceNameNamePatchUnauthorized Unauthorized + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameNamePatchUnauthorized +*/ +type DataCocsnInterfacesInterfaceInterfaceNameNamePatchUnauthorized struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameNamePatchUnauthorized creates DataCocsnInterfacesInterfaceInterfaceNameNamePatchUnauthorized with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameNamePatchUnauthorized() *DataCocsnInterfacesInterfaceInterfaceNameNamePatchUnauthorized { + + return &DataCocsnInterfacesInterfaceInterfaceNameNamePatchUnauthorized{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePatchUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(401) +} + +// DataCocsnInterfacesInterfaceInterfaceNameNamePatchNotFoundCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameNamePatchNotFound +const DataCocsnInterfacesInterfaceInterfaceNameNamePatchNotFoundCode int = 404 + +/*DataCocsnInterfacesInterfaceInterfaceNameNamePatchNotFound Not Found + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameNamePatchNotFound +*/ +type DataCocsnInterfacesInterfaceInterfaceNameNamePatchNotFound struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameNamePatchNotFound creates DataCocsnInterfacesInterfaceInterfaceNameNamePatchNotFound with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameNamePatchNotFound() *DataCocsnInterfacesInterfaceInterfaceNameNamePatchNotFound { + + return &DataCocsnInterfacesInterfaceInterfaceNameNamePatchNotFound{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePatchNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(404) +} + +// DataCocsnInterfacesInterfaceInterfaceNameNamePatchMethodNotAllowedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameNamePatchMethodNotAllowed +const DataCocsnInterfacesInterfaceInterfaceNameNamePatchMethodNotAllowedCode int = 405 + +/*DataCocsnInterfacesInterfaceInterfaceNameNamePatchMethodNotAllowed Method Not Allowed + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameNamePatchMethodNotAllowed +*/ +type DataCocsnInterfacesInterfaceInterfaceNameNamePatchMethodNotAllowed struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameNamePatchMethodNotAllowed creates DataCocsnInterfacesInterfaceInterfaceNameNamePatchMethodNotAllowed with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameNamePatchMethodNotAllowed() *DataCocsnInterfacesInterfaceInterfaceNameNamePatchMethodNotAllowed { + + return &DataCocsnInterfacesInterfaceInterfaceNameNamePatchMethodNotAllowed{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePatchMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(405) +} + +// DataCocsnInterfacesInterfaceInterfaceNameNamePatchConflictCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameNamePatchConflict +const DataCocsnInterfacesInterfaceInterfaceNameNamePatchConflictCode int = 409 + +/*DataCocsnInterfacesInterfaceInterfaceNameNamePatchConflict Conflict + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameNamePatchConflict +*/ +type DataCocsnInterfacesInterfaceInterfaceNameNamePatchConflict struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameNamePatchConflict creates DataCocsnInterfacesInterfaceInterfaceNameNamePatchConflict with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameNamePatchConflict() *DataCocsnInterfacesInterfaceInterfaceNameNamePatchConflict { + + return &DataCocsnInterfacesInterfaceInterfaceNameNamePatchConflict{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePatchConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(409) +} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_id_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_patch_urlbuilder.go similarity index 56% rename from waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_id_urlbuilder.go rename to api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_patch_urlbuilder.go index 629ecd853e8f74cffb2b2b7ad175b50b64e86e35..de999056820d6408c785383b58670a0a0b4f480f 100644 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_id_urlbuilder.go +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_patch_urlbuilder.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package ciena_waveserver_interfaces +package data // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the generate command @@ -10,13 +10,11 @@ import ( "net/url" golangswaggerpaths "path" "strings" - - "github.com/go-openapi/swag" ) -// GetDataWaveserverInterfacesLogicalInterfaceIndexIDURL generates an URL for the get data waveserver interfaces logical interface index ID operation -type GetDataWaveserverInterfacesLogicalInterfaceIndexIDURL struct { - Index int64 +// DataCocsnInterfacesInterfaceInterfaceNameNamePatchURL generates an URL for the data cocsn interfaces interface interface name name patch operation +type DataCocsnInterfacesInterfaceInterfaceNameNamePatchURL struct { + InterfaceName string _basePath string // avoid unkeyed usage @@ -26,7 +24,7 @@ type GetDataWaveserverInterfacesLogicalInterfaceIndexIDURL struct { // WithBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexIDURL) WithBasePath(bp string) *GetDataWaveserverInterfacesLogicalInterfaceIndexIDURL { +func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePatchURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNameNamePatchURL { o.SetBasePath(bp) return o } @@ -34,31 +32,34 @@ func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexIDURL) WithBasePath(bp // SetBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexIDURL) SetBasePath(bp string) { +func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePatchURL) SetBasePath(bp string) { o._basePath = bp } // Build a url path and query string -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexIDURL) Build() (*url.URL, error) { +func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePatchURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/data/waveserver-interfaces/logical-interface={index}/id/" + var _path = "/data/cocsn:interfaces/interface={interface-name}/name" - index := swag.FormatInt64(o.Index) - if index != "" { - _path = strings.Replace(_path, "{index}", index, -1) + interfaceName := o.InterfaceName + if interfaceName != "" { + _path = strings.Replace(_path, "{interface-name}", interfaceName, -1) } else { - return nil, errors.New("index is required on GetDataWaveserverInterfacesLogicalInterfaceIndexIDURL") + return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNameNamePatchURL") } _basePath := o._basePath + if _basePath == "" { + _basePath = "/restconf" + } _result.Path = golangswaggerpaths.Join(_basePath, _path) return &_result, nil } // Must is a helper function to panic when the url builder returns an error -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexIDURL) Must(u *url.URL, err error) *url.URL { +func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePatchURL) Must(u *url.URL, err error) *url.URL { if err != nil { panic(err) } @@ -69,17 +70,17 @@ func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexIDURL) Must(u *url.URL, } // String returns the string representation of the path with query string -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexIDURL) String() string { +func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePatchURL) String() string { return o.Must(o.Build()).String() } // BuildFull builds a full url with scheme, host, path and query string -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexIDURL) BuildFull(scheme, host string) (*url.URL, error) { +func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePatchURL) BuildFull(scheme, host string) (*url.URL, error) { if scheme == "" { - return nil, errors.New("scheme is required for a full url on GetDataWaveserverInterfacesLogicalInterfaceIndexIDURL") + return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameNamePatchURL") } if host == "" { - return nil, errors.New("host is required for a full url on GetDataWaveserverInterfacesLogicalInterfaceIndexIDURL") + return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameNamePatchURL") } base, err := o.Build() @@ -93,6 +94,6 @@ func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexIDURL) BuildFull(scheme } // StringFull returns the string representation of a complete url -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexIDURL) StringFull(scheme, host string) string { +func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePatchURL) StringFull(scheme, host string) string { return o.Must(o.BuildFull(scheme, host)).String() } diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_put.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_put.go new file mode 100644 index 0000000000000000000000000000000000000000..d423b6c9dda85929bdb29150d2f23bdf91354960 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_put.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime/middleware" +) + +// DataCocsnInterfacesInterfaceInterfaceNameNamePutHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name name put handler +type DataCocsnInterfacesInterfaceInterfaceNameNamePutHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNameNamePutParams, interface{}) middleware.Responder + +// Handle executing the request and returning a response +func (fn DataCocsnInterfacesInterfaceInterfaceNameNamePutHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNameNamePutParams, principal interface{}) middleware.Responder { + return fn(params, principal) +} + +// DataCocsnInterfacesInterfaceInterfaceNameNamePutHandler interface for that can handle valid data cocsn interfaces interface interface name name put params +type DataCocsnInterfacesInterfaceInterfaceNameNamePutHandler interface { + Handle(DataCocsnInterfacesInterfaceInterfaceNameNamePutParams, interface{}) middleware.Responder +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameNamePut creates a new http.Handler for the data cocsn interfaces interface interface name name put operation +func NewDataCocsnInterfacesInterfaceInterfaceNameNamePut(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNameNamePutHandler) *DataCocsnInterfacesInterfaceInterfaceNameNamePut { + return &DataCocsnInterfacesInterfaceInterfaceNameNamePut{Context: ctx, Handler: handler} +} + +/*DataCocsnInterfacesInterfaceInterfaceNameNamePut swagger:route PUT /data/cocsn:interfaces/interface={interface-name}/name data put dataCocsnInterfacesInterfaceInterfaceNameNamePut + +Interface name. Example value: en0 + +Interface name. Example value: en0 + +*/ +type DataCocsnInterfacesInterfaceInterfaceNameNamePut struct { + Context *middleware.Context + Handler DataCocsnInterfacesInterfaceInterfaceNameNamePutHandler +} + +func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePut) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + route, rCtx, _ := o.Context.RouteInfo(r) + if rCtx != nil { + r = rCtx + } + var Params = NewDataCocsnInterfacesInterfaceInterfaceNameNamePutParams() + + uprinc, aCtx, err := o.Context.Authorize(r, route) + if err != nil { + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + if aCtx != nil { + r = aCtx + } + var principal interface{} + if uprinc != nil { + principal = uprinc + } + + if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + + res := o.Handler.Handle(Params, principal) // actually handle the request + + o.Context.Respond(rw, r, route.Produces, route, res) + +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_put_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_put_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..f9df3b7ba9c050d900d2adac727ca53775b2a179 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_put_parameters.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "io" + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/runtime/middleware" + "github.com/go-openapi/strfmt" + + "code.fbi.h-da.de/cocsn/cocsn-api/api/models" +) + +// NewDataCocsnInterfacesInterfaceInterfaceNameNamePutParams creates a new DataCocsnInterfacesInterfaceInterfaceNameNamePutParams object +// no default values defined in spec. +func NewDataCocsnInterfacesInterfaceInterfaceNameNamePutParams() DataCocsnInterfacesInterfaceInterfaceNameNamePutParams { + + return DataCocsnInterfacesInterfaceInterfaceNameNamePutParams{} +} + +// DataCocsnInterfacesInterfaceInterfaceNameNamePutParams contains all the bound params for the data cocsn interfaces interface interface name name put operation +// typically these are obtained from a http.Request +// +// swagger:parameters data_cocsn_interfaces_interface_interface_name_name_put +type DataCocsnInterfacesInterfaceInterfaceNameNamePutParams struct { + + // HTTP Request Object + HTTPRequest *http.Request `json:"-"` + + /*Interface name. Example value: en0 + Required: true + In: path + */ + InterfaceName string + /*Interface name. Example value: en0 + Required: true + In: body + */ + Name *models.DataCocsnInterfacesInterfaceInterfaceNameName +} + +// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface +// for simple values it will use straight method calls. +// +// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNameNamePutParams() beforehand. +func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePutParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { + var res []error + + o.HTTPRequest = r + + rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") + if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { + res = append(res, err) + } + + if runtime.HasBody(r) { + defer r.Body.Close() + var body models.DataCocsnInterfacesInterfaceInterfaceNameName + if err := route.Consumer.Consume(r.Body, &body); err != nil { + if err == io.EOF { + res = append(res, errors.Required("name", "body", "")) + } else { + res = append(res, errors.NewParseError("name", "body", "", err)) + } + } else { + // validate body object + if err := body.Validate(route.Formats); err != nil { + res = append(res, err) + } + + if len(res) == 0 { + o.Name = &body + } + } + } else { + res = append(res, errors.Required("name", "body", "")) + } + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindInterfaceName binds and validates parameter InterfaceName from path. +func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePutParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + + o.InterfaceName = raw + + return nil +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_put_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_put_responses.go new file mode 100644 index 0000000000000000000000000000000000000000..0c901a690bae2c7f2b61fc4bb2b49aca345d3710 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_put_responses.go @@ -0,0 +1,180 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime" +) + +// DataCocsnInterfacesInterfaceInterfaceNameNamePutCreatedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameNamePutCreated +const DataCocsnInterfacesInterfaceInterfaceNameNamePutCreatedCode int = 201 + +/*DataCocsnInterfacesInterfaceInterfaceNameNamePutCreated leaf name created or replaced + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameNamePutCreated +*/ +type DataCocsnInterfacesInterfaceInterfaceNameNamePutCreated struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameNamePutCreated creates DataCocsnInterfacesInterfaceInterfaceNameNamePutCreated with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameNamePutCreated() *DataCocsnInterfacesInterfaceInterfaceNameNamePutCreated { + + return &DataCocsnInterfacesInterfaceInterfaceNameNamePutCreated{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePutCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(201) +} + +// DataCocsnInterfacesInterfaceInterfaceNameNamePutNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameNamePutNoContent +const DataCocsnInterfacesInterfaceInterfaceNameNamePutNoContentCode int = 204 + +/*DataCocsnInterfacesInterfaceInterfaceNameNamePutNoContent No Content + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameNamePutNoContent +*/ +type DataCocsnInterfacesInterfaceInterfaceNameNamePutNoContent struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameNamePutNoContent creates DataCocsnInterfacesInterfaceInterfaceNameNamePutNoContent with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameNamePutNoContent() *DataCocsnInterfacesInterfaceInterfaceNameNamePutNoContent { + + return &DataCocsnInterfacesInterfaceInterfaceNameNamePutNoContent{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePutNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(204) +} + +// DataCocsnInterfacesInterfaceInterfaceNameNamePutBadRequestCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameNamePutBadRequest +const DataCocsnInterfacesInterfaceInterfaceNameNamePutBadRequestCode int = 400 + +/*DataCocsnInterfacesInterfaceInterfaceNameNamePutBadRequest Bad Request + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameNamePutBadRequest +*/ +type DataCocsnInterfacesInterfaceInterfaceNameNamePutBadRequest struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameNamePutBadRequest creates DataCocsnInterfacesInterfaceInterfaceNameNamePutBadRequest with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameNamePutBadRequest() *DataCocsnInterfacesInterfaceInterfaceNameNamePutBadRequest { + + return &DataCocsnInterfacesInterfaceInterfaceNameNamePutBadRequest{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePutBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(400) +} + +// DataCocsnInterfacesInterfaceInterfaceNameNamePutUnauthorizedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameNamePutUnauthorized +const DataCocsnInterfacesInterfaceInterfaceNameNamePutUnauthorizedCode int = 401 + +/*DataCocsnInterfacesInterfaceInterfaceNameNamePutUnauthorized Unauthorized + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameNamePutUnauthorized +*/ +type DataCocsnInterfacesInterfaceInterfaceNameNamePutUnauthorized struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameNamePutUnauthorized creates DataCocsnInterfacesInterfaceInterfaceNameNamePutUnauthorized with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameNamePutUnauthorized() *DataCocsnInterfacesInterfaceInterfaceNameNamePutUnauthorized { + + return &DataCocsnInterfacesInterfaceInterfaceNameNamePutUnauthorized{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePutUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(401) +} + +// DataCocsnInterfacesInterfaceInterfaceNameNamePutNotFoundCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameNamePutNotFound +const DataCocsnInterfacesInterfaceInterfaceNameNamePutNotFoundCode int = 404 + +/*DataCocsnInterfacesInterfaceInterfaceNameNamePutNotFound Not Found + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameNamePutNotFound +*/ +type DataCocsnInterfacesInterfaceInterfaceNameNamePutNotFound struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameNamePutNotFound creates DataCocsnInterfacesInterfaceInterfaceNameNamePutNotFound with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameNamePutNotFound() *DataCocsnInterfacesInterfaceInterfaceNameNamePutNotFound { + + return &DataCocsnInterfacesInterfaceInterfaceNameNamePutNotFound{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePutNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(404) +} + +// DataCocsnInterfacesInterfaceInterfaceNameNamePutMethodNotAllowedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameNamePutMethodNotAllowed +const DataCocsnInterfacesInterfaceInterfaceNameNamePutMethodNotAllowedCode int = 405 + +/*DataCocsnInterfacesInterfaceInterfaceNameNamePutMethodNotAllowed Method Not Allowed + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameNamePutMethodNotAllowed +*/ +type DataCocsnInterfacesInterfaceInterfaceNameNamePutMethodNotAllowed struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameNamePutMethodNotAllowed creates DataCocsnInterfacesInterfaceInterfaceNameNamePutMethodNotAllowed with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameNamePutMethodNotAllowed() *DataCocsnInterfacesInterfaceInterfaceNameNamePutMethodNotAllowed { + + return &DataCocsnInterfacesInterfaceInterfaceNameNamePutMethodNotAllowed{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePutMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(405) +} + +// DataCocsnInterfacesInterfaceInterfaceNameNamePutConflictCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameNamePutConflict +const DataCocsnInterfacesInterfaceInterfaceNameNamePutConflictCode int = 409 + +/*DataCocsnInterfacesInterfaceInterfaceNameNamePutConflict Conflict + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameNamePutConflict +*/ +type DataCocsnInterfacesInterfaceInterfaceNameNamePutConflict struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameNamePutConflict creates DataCocsnInterfacesInterfaceInterfaceNameNamePutConflict with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameNamePutConflict() *DataCocsnInterfacesInterfaceInterfaceNameNamePutConflict { + + return &DataCocsnInterfacesInterfaceInterfaceNameNamePutConflict{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePutConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(409) +} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_put_urlbuilder.go similarity index 56% rename from waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_urlbuilder.go rename to api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_put_urlbuilder.go index f1b9c16690c39ee80420f03fc148ea40ea26cfc7..b9285a9650bfb23102fdd3b1026a0a0e463ef0e3 100644 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_urlbuilder.go +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_name_put_urlbuilder.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package ciena_waveserver_interfaces +package data // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the generate command @@ -10,13 +10,11 @@ import ( "net/url" golangswaggerpaths "path" "strings" - - "github.com/go-openapi/swag" ) -// GetDataWaveserverInterfacesLogicalInterfaceIndexURL generates an URL for the get data waveserver interfaces logical interface index operation -type GetDataWaveserverInterfacesLogicalInterfaceIndexURL struct { - Index int64 +// DataCocsnInterfacesInterfaceInterfaceNameNamePutURL generates an URL for the data cocsn interfaces interface interface name name put operation +type DataCocsnInterfacesInterfaceInterfaceNameNamePutURL struct { + InterfaceName string _basePath string // avoid unkeyed usage @@ -26,7 +24,7 @@ type GetDataWaveserverInterfacesLogicalInterfaceIndexURL struct { // WithBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexURL) WithBasePath(bp string) *GetDataWaveserverInterfacesLogicalInterfaceIndexURL { +func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePutURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNameNamePutURL { o.SetBasePath(bp) return o } @@ -34,31 +32,34 @@ func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexURL) WithBasePath(bp st // SetBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexURL) SetBasePath(bp string) { +func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePutURL) SetBasePath(bp string) { o._basePath = bp } // Build a url path and query string -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexURL) Build() (*url.URL, error) { +func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePutURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/data/waveserver-interfaces/logical-interface={index}/" + var _path = "/data/cocsn:interfaces/interface={interface-name}/name" - index := swag.FormatInt64(o.Index) - if index != "" { - _path = strings.Replace(_path, "{index}", index, -1) + interfaceName := o.InterfaceName + if interfaceName != "" { + _path = strings.Replace(_path, "{interface-name}", interfaceName, -1) } else { - return nil, errors.New("index is required on GetDataWaveserverInterfacesLogicalInterfaceIndexURL") + return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNameNamePutURL") } _basePath := o._basePath + if _basePath == "" { + _basePath = "/restconf" + } _result.Path = golangswaggerpaths.Join(_basePath, _path) return &_result, nil } // Must is a helper function to panic when the url builder returns an error -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexURL) Must(u *url.URL, err error) *url.URL { +func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePutURL) Must(u *url.URL, err error) *url.URL { if err != nil { panic(err) } @@ -69,17 +70,17 @@ func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexURL) Must(u *url.URL, e } // String returns the string representation of the path with query string -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexURL) String() string { +func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePutURL) String() string { return o.Must(o.Build()).String() } // BuildFull builds a full url with scheme, host, path and query string -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexURL) BuildFull(scheme, host string) (*url.URL, error) { +func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePutURL) BuildFull(scheme, host string) (*url.URL, error) { if scheme == "" { - return nil, errors.New("scheme is required for a full url on GetDataWaveserverInterfacesLogicalInterfaceIndexURL") + return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameNamePutURL") } if host == "" { - return nil, errors.New("host is required for a full url on GetDataWaveserverInterfacesLogicalInterfaceIndexURL") + return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameNamePutURL") } base, err := o.Build() @@ -93,6 +94,6 @@ func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexURL) BuildFull(scheme, } // StringFull returns the string representation of a complete url -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexURL) StringFull(scheme, host string) string { +func (o *DataCocsnInterfacesInterfaceInterfaceNameNamePutURL) StringFull(scheme, host string) string { return o.Must(o.BuildFull(scheme, host)).String() } diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_delete.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_delete.go new file mode 100644 index 0000000000000000000000000000000000000000..7ceba593c786060199ceebac2183bba5aab5179b --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_delete.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime/middleware" +) + +// DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name oper status delete handler +type DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteParams, interface{}) middleware.Responder + +// Handle executing the request and returning a response +func (fn DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteParams, principal interface{}) middleware.Responder { + return fn(params, principal) +} + +// DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteHandler interface for that can handle valid data cocsn interfaces interface interface name oper status delete params +type DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteHandler interface { + Handle(DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteParams, interface{}) middleware.Responder +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusDelete creates a new http.Handler for the data cocsn interfaces interface interface name oper status delete operation +func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusDelete(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteHandler) *DataCocsnInterfacesInterfaceInterfaceNameOperStatusDelete { + return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusDelete{Context: ctx, Handler: handler} +} + +/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusDelete swagger:route DELETE /data/cocsn:interfaces/interface={interface-name}/oper-status data delete dataCocsnInterfacesInterfaceInterfaceNameOperStatusDelete + +Describes whether the interface is physically up or down + +Describes whether the interface is physically up or down + +*/ +type DataCocsnInterfacesInterfaceInterfaceNameOperStatusDelete struct { + Context *middleware.Context + Handler DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteHandler +} + +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusDelete) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + route, rCtx, _ := o.Context.RouteInfo(r) + if rCtx != nil { + r = rCtx + } + var Params = NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteParams() + + uprinc, aCtx, err := o.Context.Authorize(r, route) + if err != nil { + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + if aCtx != nil { + r = aCtx + } + var principal interface{} + if uprinc != nil { + principal = uprinc + } + + if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + + res := o.Handler.Handle(Params, principal) // actually handle the request + + o.Context.Respond(rw, r, route.Produces, route, res) + +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_delete_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_delete_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..2b1d849056982e28351515b26a968e24e056a6b0 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_delete_parameters.go @@ -0,0 +1,72 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime/middleware" + "github.com/go-openapi/strfmt" +) + +// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteParams creates a new DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteParams object +// no default values defined in spec. +func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteParams() DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteParams { + + return DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteParams{} +} + +// DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteParams contains all the bound params for the data cocsn interfaces interface interface name oper status delete operation +// typically these are obtained from a http.Request +// +// swagger:parameters data_cocsn_interfaces_interface_interface_name_oper_status_delete +type DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteParams struct { + + // HTTP Request Object + HTTPRequest *http.Request `json:"-"` + + /*Interface name. Example value: en0 + Required: true + In: path + */ + InterfaceName string +} + +// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface +// for simple values it will use straight method calls. +// +// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteParams() beforehand. +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { + var res []error + + o.HTTPRequest = r + + rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") + if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindInterfaceName binds and validates parameter InterfaceName from path. +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + + o.InterfaceName = raw + + return nil +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_delete_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_delete_responses.go new file mode 100644 index 0000000000000000000000000000000000000000..510f508023ed1cbdd268c0f87b13bc481f198851 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_delete_responses.go @@ -0,0 +1,36 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime" +) + +// DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteNoContent +const DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteNoContentCode int = 204 + +/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteNoContent No Content + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteNoContent +*/ +type DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteNoContent struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteNoContent creates DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteNoContent with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteNoContent() *DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteNoContent { + + return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteNoContent{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(204) +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_delete_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_delete_urlbuilder.go new file mode 100644 index 0000000000000000000000000000000000000000..5890ad7aa6ee1e5930643ddb2f3631f8b4b6d4dd --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_delete_urlbuilder.go @@ -0,0 +1,99 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "errors" + "net/url" + golangswaggerpaths "path" + "strings" +) + +// DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteURL generates an URL for the data cocsn interfaces interface interface name oper status delete operation +type DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteURL struct { + InterfaceName string + + _basePath string + // avoid unkeyed usage + _ struct{} +} + +// WithBasePath sets the base path for this url builder, only required when it's different from the +// base path specified in the swagger spec. +// When the value of the base path is an empty string +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteURL { + o.SetBasePath(bp) + return o +} + +// SetBasePath sets the base path for this url builder, only required when it's different from the +// base path specified in the swagger spec. +// When the value of the base path is an empty string +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteURL) SetBasePath(bp string) { + o._basePath = bp +} + +// Build a url path and query string +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteURL) Build() (*url.URL, error) { + var _result url.URL + + var _path = "/data/cocsn:interfaces/interface={interface-name}/oper-status" + + interfaceName := o.InterfaceName + if interfaceName != "" { + _path = strings.Replace(_path, "{interface-name}", interfaceName, -1) + } else { + return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteURL") + } + + _basePath := o._basePath + if _basePath == "" { + _basePath = "/restconf" + } + _result.Path = golangswaggerpaths.Join(_basePath, _path) + + return &_result, nil +} + +// Must is a helper function to panic when the url builder returns an error +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteURL) Must(u *url.URL, err error) *url.URL { + if err != nil { + panic(err) + } + if u == nil { + panic("url can't be nil") + } + return u +} + +// String returns the string representation of the path with query string +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteURL) String() string { + return o.Must(o.Build()).String() +} + +// BuildFull builds a full url with scheme, host, path and query string +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteURL) BuildFull(scheme, host string) (*url.URL, error) { + if scheme == "" { + return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteURL") + } + if host == "" { + return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteURL") + } + + base, err := o.Build() + if err != nil { + return nil, err + } + + base.Scheme = scheme + base.Host = host + return base, nil +} + +// StringFull returns the string representation of a complete url +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusDeleteURL) StringFull(scheme, host string) string { + return o.Must(o.BuildFull(scheme, host)).String() +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_patch.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_patch.go new file mode 100644 index 0000000000000000000000000000000000000000..fdcda7d395d1287d112a83c60aec568acc2814ac --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_patch.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime/middleware" +) + +// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name oper status patch handler +type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchParams, interface{}) middleware.Responder + +// Handle executing the request and returning a response +func (fn DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchParams, principal interface{}) middleware.Responder { + return fn(params, principal) +} + +// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchHandler interface for that can handle valid data cocsn interfaces interface interface name oper status patch params +type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchHandler interface { + Handle(DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchParams, interface{}) middleware.Responder +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatch creates a new http.Handler for the data cocsn interfaces interface interface name oper status patch operation +func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatch(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchHandler) *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatch { + return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatch{Context: ctx, Handler: handler} +} + +/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatch swagger:route PATCH /data/cocsn:interfaces/interface={interface-name}/oper-status data patch dataCocsnInterfacesInterfaceInterfaceNameOperStatusPatch + +Describes whether the interface is physically up or down + +Describes whether the interface is physically up or down + +*/ +type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatch struct { + Context *middleware.Context + Handler DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchHandler +} + +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatch) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + route, rCtx, _ := o.Context.RouteInfo(r) + if rCtx != nil { + r = rCtx + } + var Params = NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchParams() + + uprinc, aCtx, err := o.Context.Authorize(r, route) + if err != nil { + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + if aCtx != nil { + r = aCtx + } + var principal interface{} + if uprinc != nil { + principal = uprinc + } + + if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + + res := o.Handler.Handle(Params, principal) // actually handle the request + + o.Context.Respond(rw, r, route.Produces, route, res) + +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_patch_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_patch_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..8d9436f65dec835c32a6ef1cd70b67ba67106b31 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_patch_parameters.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "io" + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/runtime/middleware" + "github.com/go-openapi/strfmt" + + "code.fbi.h-da.de/cocsn/cocsn-api/api/models" +) + +// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchParams creates a new DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchParams object +// no default values defined in spec. +func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchParams() DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchParams { + + return DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchParams{} +} + +// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchParams contains all the bound params for the data cocsn interfaces interface interface name oper status patch operation +// typically these are obtained from a http.Request +// +// swagger:parameters data_cocsn_interfaces_interface_interface_name_oper_status_patch +type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchParams struct { + + // HTTP Request Object + HTTPRequest *http.Request `json:"-"` + + /*Interface name. Example value: en0 + Required: true + In: path + */ + InterfaceName string + /*Describes whether the interface is physically up or down + Required: true + In: body + */ + OperStatus *models.DataCocsnInterfacesInterfaceInterfaceNameOperStatus +} + +// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface +// for simple values it will use straight method calls. +// +// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchParams() beforehand. +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { + var res []error + + o.HTTPRequest = r + + rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") + if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { + res = append(res, err) + } + + if runtime.HasBody(r) { + defer r.Body.Close() + var body models.DataCocsnInterfacesInterfaceInterfaceNameOperStatus + if err := route.Consumer.Consume(r.Body, &body); err != nil { + if err == io.EOF { + res = append(res, errors.Required("operStatus", "body", "")) + } else { + res = append(res, errors.NewParseError("operStatus", "body", "", err)) + } + } else { + // validate body object + if err := body.Validate(route.Formats); err != nil { + res = append(res, err) + } + + if len(res) == 0 { + o.OperStatus = &body + } + } + } else { + res = append(res, errors.Required("operStatus", "body", "")) + } + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindInterfaceName binds and validates parameter InterfaceName from path. +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + + o.InterfaceName = raw + + return nil +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_patch_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_patch_responses.go new file mode 100644 index 0000000000000000000000000000000000000000..7983ed7975b5732bbb5b08cf5148950c1b58bfa6 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_patch_responses.go @@ -0,0 +1,156 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime" +) + +// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNoContent +const DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNoContentCode int = 204 + +/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNoContent leaf oper-status updated + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNoContent +*/ +type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNoContent struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNoContent creates DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNoContent with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNoContent() *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNoContent { + + return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNoContent{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(204) +} + +// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchBadRequestCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchBadRequest +const DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchBadRequestCode int = 400 + +/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchBadRequest Bad Request + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchBadRequest +*/ +type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchBadRequest struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchBadRequest creates DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchBadRequest with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchBadRequest() *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchBadRequest { + + return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchBadRequest{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(400) +} + +// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchUnauthorizedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchUnauthorized +const DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchUnauthorizedCode int = 401 + +/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchUnauthorized Unauthorized + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchUnauthorized +*/ +type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchUnauthorized struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchUnauthorized creates DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchUnauthorized with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchUnauthorized() *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchUnauthorized { + + return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchUnauthorized{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(401) +} + +// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNotFoundCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNotFound +const DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNotFoundCode int = 404 + +/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNotFound Not Found + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNotFound +*/ +type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNotFound struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNotFound creates DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNotFound with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNotFound() *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNotFound { + + return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNotFound{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(404) +} + +// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchMethodNotAllowedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchMethodNotAllowed +const DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchMethodNotAllowedCode int = 405 + +/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchMethodNotAllowed Method Not Allowed + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchMethodNotAllowed +*/ +type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchMethodNotAllowed struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchMethodNotAllowed creates DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchMethodNotAllowed with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchMethodNotAllowed() *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchMethodNotAllowed { + + return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchMethodNotAllowed{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(405) +} + +// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchConflictCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchConflict +const DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchConflictCode int = 409 + +/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchConflict Conflict + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchConflict +*/ +type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchConflict struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchConflict creates DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchConflict with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchConflict() *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchConflict { + + return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchConflict{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(409) +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_patch_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_patch_urlbuilder.go new file mode 100644 index 0000000000000000000000000000000000000000..ae6270b416ad3f941a8f724b4e673092479bce71 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_patch_urlbuilder.go @@ -0,0 +1,99 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "errors" + "net/url" + golangswaggerpaths "path" + "strings" +) + +// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchURL generates an URL for the data cocsn interfaces interface interface name oper status patch operation +type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchURL struct { + InterfaceName string + + _basePath string + // avoid unkeyed usage + _ struct{} +} + +// WithBasePath sets the base path for this url builder, only required when it's different from the +// base path specified in the swagger spec. +// When the value of the base path is an empty string +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchURL { + o.SetBasePath(bp) + return o +} + +// SetBasePath sets the base path for this url builder, only required when it's different from the +// base path specified in the swagger spec. +// When the value of the base path is an empty string +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchURL) SetBasePath(bp string) { + o._basePath = bp +} + +// Build a url path and query string +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchURL) Build() (*url.URL, error) { + var _result url.URL + + var _path = "/data/cocsn:interfaces/interface={interface-name}/oper-status" + + interfaceName := o.InterfaceName + if interfaceName != "" { + _path = strings.Replace(_path, "{interface-name}", interfaceName, -1) + } else { + return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchURL") + } + + _basePath := o._basePath + if _basePath == "" { + _basePath = "/restconf" + } + _result.Path = golangswaggerpaths.Join(_basePath, _path) + + return &_result, nil +} + +// Must is a helper function to panic when the url builder returns an error +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchURL) Must(u *url.URL, err error) *url.URL { + if err != nil { + panic(err) + } + if u == nil { + panic("url can't be nil") + } + return u +} + +// String returns the string representation of the path with query string +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchURL) String() string { + return o.Must(o.Build()).String() +} + +// BuildFull builds a full url with scheme, host, path and query string +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchURL) BuildFull(scheme, host string) (*url.URL, error) { + if scheme == "" { + return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchURL") + } + if host == "" { + return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchURL") + } + + base, err := o.Build() + if err != nil { + return nil, err + } + + base.Scheme = scheme + base.Host = host + return base, nil +} + +// StringFull returns the string representation of a complete url +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPatchURL) StringFull(scheme, host string) string { + return o.Must(o.BuildFull(scheme, host)).String() +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_put.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_put.go new file mode 100644 index 0000000000000000000000000000000000000000..256397260e9a1a0bfdb3ef218c220f336e634944 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_put.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime/middleware" +) + +// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name oper status put handler +type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutParams, interface{}) middleware.Responder + +// Handle executing the request and returning a response +func (fn DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutParams, principal interface{}) middleware.Responder { + return fn(params, principal) +} + +// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutHandler interface for that can handle valid data cocsn interfaces interface interface name oper status put params +type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutHandler interface { + Handle(DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutParams, interface{}) middleware.Responder +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPut creates a new http.Handler for the data cocsn interfaces interface interface name oper status put operation +func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPut(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutHandler) *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPut { + return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusPut{Context: ctx, Handler: handler} +} + +/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusPut swagger:route PUT /data/cocsn:interfaces/interface={interface-name}/oper-status data put dataCocsnInterfacesInterfaceInterfaceNameOperStatusPut + +Describes whether the interface is physically up or down + +Describes whether the interface is physically up or down + +*/ +type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPut struct { + Context *middleware.Context + Handler DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutHandler +} + +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPut) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + route, rCtx, _ := o.Context.RouteInfo(r) + if rCtx != nil { + r = rCtx + } + var Params = NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutParams() + + uprinc, aCtx, err := o.Context.Authorize(r, route) + if err != nil { + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + if aCtx != nil { + r = aCtx + } + var principal interface{} + if uprinc != nil { + principal = uprinc + } + + if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + + res := o.Handler.Handle(Params, principal) // actually handle the request + + o.Context.Respond(rw, r, route.Produces, route, res) + +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_put_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_put_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..d1dbf6dc505be1caf76440a1b033e68b89bbc6b5 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_put_parameters.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "io" + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/runtime/middleware" + "github.com/go-openapi/strfmt" + + "code.fbi.h-da.de/cocsn/cocsn-api/api/models" +) + +// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutParams creates a new DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutParams object +// no default values defined in spec. +func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutParams() DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutParams { + + return DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutParams{} +} + +// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutParams contains all the bound params for the data cocsn interfaces interface interface name oper status put operation +// typically these are obtained from a http.Request +// +// swagger:parameters data_cocsn_interfaces_interface_interface_name_oper_status_put +type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutParams struct { + + // HTTP Request Object + HTTPRequest *http.Request `json:"-"` + + /*Interface name. Example value: en0 + Required: true + In: path + */ + InterfaceName string + /*Describes whether the interface is physically up or down + Required: true + In: body + */ + OperStatus *models.DataCocsnInterfacesInterfaceInterfaceNameOperStatus +} + +// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface +// for simple values it will use straight method calls. +// +// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutParams() beforehand. +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { + var res []error + + o.HTTPRequest = r + + rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") + if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { + res = append(res, err) + } + + if runtime.HasBody(r) { + defer r.Body.Close() + var body models.DataCocsnInterfacesInterfaceInterfaceNameOperStatus + if err := route.Consumer.Consume(r.Body, &body); err != nil { + if err == io.EOF { + res = append(res, errors.Required("operStatus", "body", "")) + } else { + res = append(res, errors.NewParseError("operStatus", "body", "", err)) + } + } else { + // validate body object + if err := body.Validate(route.Formats); err != nil { + res = append(res, err) + } + + if len(res) == 0 { + o.OperStatus = &body + } + } + } else { + res = append(res, errors.Required("operStatus", "body", "")) + } + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindInterfaceName binds and validates parameter InterfaceName from path. +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + + o.InterfaceName = raw + + return nil +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_put_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_put_responses.go new file mode 100644 index 0000000000000000000000000000000000000000..54c5ec7d4f0e01190dd12b3b226f61d0975f13f7 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_put_responses.go @@ -0,0 +1,180 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime" +) + +// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutCreatedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutCreated +const DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutCreatedCode int = 201 + +/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutCreated leaf oper-status created or replaced + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameOperStatusPutCreated +*/ +type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutCreated struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutCreated creates DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutCreated with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutCreated() *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutCreated { + + return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutCreated{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(201) +} + +// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNoContent +const DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNoContentCode int = 204 + +/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNoContent No Content + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNoContent +*/ +type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNoContent struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNoContent creates DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNoContent with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNoContent() *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNoContent { + + return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNoContent{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(204) +} + +// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutBadRequestCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutBadRequest +const DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutBadRequestCode int = 400 + +/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutBadRequest Bad Request + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameOperStatusPutBadRequest +*/ +type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutBadRequest struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutBadRequest creates DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutBadRequest with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutBadRequest() *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutBadRequest { + + return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutBadRequest{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(400) +} + +// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutUnauthorizedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutUnauthorized +const DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutUnauthorizedCode int = 401 + +/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutUnauthorized Unauthorized + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameOperStatusPutUnauthorized +*/ +type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutUnauthorized struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutUnauthorized creates DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutUnauthorized with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutUnauthorized() *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutUnauthorized { + + return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutUnauthorized{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(401) +} + +// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNotFoundCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNotFound +const DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNotFoundCode int = 404 + +/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNotFound Not Found + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNotFound +*/ +type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNotFound struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNotFound creates DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNotFound with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNotFound() *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNotFound { + + return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNotFound{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(404) +} + +// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutMethodNotAllowedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutMethodNotAllowed +const DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutMethodNotAllowedCode int = 405 + +/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutMethodNotAllowed Method Not Allowed + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameOperStatusPutMethodNotAllowed +*/ +type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutMethodNotAllowed struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutMethodNotAllowed creates DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutMethodNotAllowed with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutMethodNotAllowed() *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutMethodNotAllowed { + + return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutMethodNotAllowed{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(405) +} + +// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutConflictCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutConflict +const DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutConflictCode int = 409 + +/*DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutConflict Conflict + +swagger:response dataCocsnInterfacesInterfaceInterfaceNameOperStatusPutConflict +*/ +type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutConflict struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutConflict creates DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutConflict with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNameOperStatusPutConflict() *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutConflict { + + return &DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutConflict{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(409) +} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_state_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_put_urlbuilder.go similarity index 56% rename from waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_state_urlbuilder.go rename to api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_put_urlbuilder.go index f6fddc2e9b41ae90f4c850caae6c0133455ffaaa..cf05cd068844458a4de36da314f4e21013ee4332 100644 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_state_urlbuilder.go +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_oper_status_put_urlbuilder.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package ciena_waveserver_interfaces +package data // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the generate command @@ -12,9 +12,9 @@ import ( "strings" ) -// PostDataWaveserverInterfacesPhysicalInterfaceNameStateURL generates an URL for the post data waveserver interfaces physical interface name state operation -type PostDataWaveserverInterfacesPhysicalInterfaceNameStateURL struct { - Name string +// DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutURL generates an URL for the data cocsn interfaces interface interface name oper status put operation +type DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutURL struct { + InterfaceName string _basePath string // avoid unkeyed usage @@ -24,7 +24,7 @@ type PostDataWaveserverInterfacesPhysicalInterfaceNameStateURL struct { // WithBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNameStateURL) WithBasePath(bp string) *PostDataWaveserverInterfacesPhysicalInterfaceNameStateURL { +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutURL { o.SetBasePath(bp) return o } @@ -32,31 +32,34 @@ func (o *PostDataWaveserverInterfacesPhysicalInterfaceNameStateURL) WithBasePath // SetBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNameStateURL) SetBasePath(bp string) { +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutURL) SetBasePath(bp string) { o._basePath = bp } // Build a url path and query string -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNameStateURL) Build() (*url.URL, error) { +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/data/waveserver-interfaces/physical-interface={name}/state/" + var _path = "/data/cocsn:interfaces/interface={interface-name}/oper-status" - name := o.Name - if name != "" { - _path = strings.Replace(_path, "{name}", name, -1) + interfaceName := o.InterfaceName + if interfaceName != "" { + _path = strings.Replace(_path, "{interface-name}", interfaceName, -1) } else { - return nil, errors.New("name is required on PostDataWaveserverInterfacesPhysicalInterfaceNameStateURL") + return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutURL") } _basePath := o._basePath + if _basePath == "" { + _basePath = "/restconf" + } _result.Path = golangswaggerpaths.Join(_basePath, _path) return &_result, nil } // Must is a helper function to panic when the url builder returns an error -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNameStateURL) Must(u *url.URL, err error) *url.URL { +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutURL) Must(u *url.URL, err error) *url.URL { if err != nil { panic(err) } @@ -67,17 +70,17 @@ func (o *PostDataWaveserverInterfacesPhysicalInterfaceNameStateURL) Must(u *url. } // String returns the string representation of the path with query string -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNameStateURL) String() string { +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutURL) String() string { return o.Must(o.Build()).String() } // BuildFull builds a full url with scheme, host, path and query string -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNameStateURL) BuildFull(scheme, host string) (*url.URL, error) { +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutURL) BuildFull(scheme, host string) (*url.URL, error) { if scheme == "" { - return nil, errors.New("scheme is required for a full url on PostDataWaveserverInterfacesPhysicalInterfaceNameStateURL") + return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutURL") } if host == "" { - return nil, errors.New("host is required for a full url on PostDataWaveserverInterfacesPhysicalInterfaceNameStateURL") + return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutURL") } base, err := o.Build() @@ -91,6 +94,6 @@ func (o *PostDataWaveserverInterfacesPhysicalInterfaceNameStateURL) BuildFull(sc } // StringFull returns the string representation of a complete url -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNameStateURL) StringFull(scheme, host string) string { +func (o *DataCocsnInterfacesInterfaceInterfaceNameOperStatusPutURL) StringFull(scheme, host string) string { return o.Must(o.BuildFull(scheme, host)).String() } diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_patch.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_patch.go new file mode 100644 index 0000000000000000000000000000000000000000..d94e49e42cf151d1804f49bcc5d845e500b50172 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_patch.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime/middleware" +) + +// DataCocsnInterfacesInterfaceInterfaceNamePatchHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name patch handler +type DataCocsnInterfacesInterfaceInterfaceNamePatchHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNamePatchParams, interface{}) middleware.Responder + +// Handle executing the request and returning a response +func (fn DataCocsnInterfacesInterfaceInterfaceNamePatchHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNamePatchParams, principal interface{}) middleware.Responder { + return fn(params, principal) +} + +// DataCocsnInterfacesInterfaceInterfaceNamePatchHandler interface for that can handle valid data cocsn interfaces interface interface name patch params +type DataCocsnInterfacesInterfaceInterfaceNamePatchHandler interface { + Handle(DataCocsnInterfacesInterfaceInterfaceNamePatchParams, interface{}) middleware.Responder +} + +// NewDataCocsnInterfacesInterfaceInterfaceNamePatch creates a new http.Handler for the data cocsn interfaces interface interface name patch operation +func NewDataCocsnInterfacesInterfaceInterfaceNamePatch(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNamePatchHandler) *DataCocsnInterfacesInterfaceInterfaceNamePatch { + return &DataCocsnInterfacesInterfaceInterfaceNamePatch{Context: ctx, Handler: handler} +} + +/*DataCocsnInterfacesInterfaceInterfaceNamePatch swagger:route PATCH /data/cocsn:interfaces/interface={interface-name} data patch dataCocsnInterfacesInterfaceInterfaceNamePatch + +DataCocsnInterfacesInterfaceInterfaceNamePatch data cocsn interfaces interface interface name patch API + +*/ +type DataCocsnInterfacesInterfaceInterfaceNamePatch struct { + Context *middleware.Context + Handler DataCocsnInterfacesInterfaceInterfaceNamePatchHandler +} + +func (o *DataCocsnInterfacesInterfaceInterfaceNamePatch) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + route, rCtx, _ := o.Context.RouteInfo(r) + if rCtx != nil { + r = rCtx + } + var Params = NewDataCocsnInterfacesInterfaceInterfaceNamePatchParams() + + uprinc, aCtx, err := o.Context.Authorize(r, route) + if err != nil { + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + if aCtx != nil { + r = aCtx + } + var principal interface{} + if uprinc != nil { + principal = uprinc + } + + if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + + res := o.Handler.Handle(Params, principal) // actually handle the request + + o.Context.Respond(rw, r, route.Produces, route, res) + +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_patch_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_patch_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..f2846ba9af059aec553fd68a298773471e25c4ad --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_patch_parameters.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "io" + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/runtime/middleware" + "github.com/go-openapi/strfmt" + + "code.fbi.h-da.de/cocsn/cocsn-api/api/models" +) + +// NewDataCocsnInterfacesInterfaceInterfaceNamePatchParams creates a new DataCocsnInterfacesInterfaceInterfaceNamePatchParams object +// no default values defined in spec. +func NewDataCocsnInterfacesInterfaceInterfaceNamePatchParams() DataCocsnInterfacesInterfaceInterfaceNamePatchParams { + + return DataCocsnInterfacesInterfaceInterfaceNamePatchParams{} +} + +// DataCocsnInterfacesInterfaceInterfaceNamePatchParams contains all the bound params for the data cocsn interfaces interface interface name patch operation +// typically these are obtained from a http.Request +// +// swagger:parameters data_cocsn_interfaces_interface_interface_name_patch +type DataCocsnInterfacesInterfaceInterfaceNamePatchParams struct { + + // HTTP Request Object + HTTPRequest *http.Request `json:"-"` + + /* + Required: true + In: body + */ + Interface *models.DataCocsnInterfacesInterfaceInterfaceName + /*Interface name. Example value: en0 + Required: true + In: path + */ + InterfaceName string +} + +// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface +// for simple values it will use straight method calls. +// +// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNamePatchParams() beforehand. +func (o *DataCocsnInterfacesInterfaceInterfaceNamePatchParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { + var res []error + + o.HTTPRequest = r + + if runtime.HasBody(r) { + defer r.Body.Close() + var body models.DataCocsnInterfacesInterfaceInterfaceName + if err := route.Consumer.Consume(r.Body, &body); err != nil { + if err == io.EOF { + res = append(res, errors.Required("interface", "body", "")) + } else { + res = append(res, errors.NewParseError("interface", "body", "", err)) + } + } else { + // validate body object + if err := body.Validate(route.Formats); err != nil { + res = append(res, err) + } + + if len(res) == 0 { + o.Interface = &body + } + } + } else { + res = append(res, errors.Required("interface", "body", "")) + } + rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") + if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindInterfaceName binds and validates parameter InterfaceName from path. +func (o *DataCocsnInterfacesInterfaceInterfaceNamePatchParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + + o.InterfaceName = raw + + return nil +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_patch_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_patch_responses.go new file mode 100644 index 0000000000000000000000000000000000000000..cb7eb1c052262072f5d6189d450ea96aecd3a521 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_patch_responses.go @@ -0,0 +1,156 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime" +) + +// DataCocsnInterfacesInterfaceInterfaceNamePatchNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNamePatchNoContent +const DataCocsnInterfacesInterfaceInterfaceNamePatchNoContentCode int = 204 + +/*DataCocsnInterfacesInterfaceInterfaceNamePatchNoContent list interface updated + +swagger:response dataCocsnInterfacesInterfaceInterfaceNamePatchNoContent +*/ +type DataCocsnInterfacesInterfaceInterfaceNamePatchNoContent struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNamePatchNoContent creates DataCocsnInterfacesInterfaceInterfaceNamePatchNoContent with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNamePatchNoContent() *DataCocsnInterfacesInterfaceInterfaceNamePatchNoContent { + + return &DataCocsnInterfacesInterfaceInterfaceNamePatchNoContent{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNamePatchNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(204) +} + +// DataCocsnInterfacesInterfaceInterfaceNamePatchBadRequestCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNamePatchBadRequest +const DataCocsnInterfacesInterfaceInterfaceNamePatchBadRequestCode int = 400 + +/*DataCocsnInterfacesInterfaceInterfaceNamePatchBadRequest Bad Request + +swagger:response dataCocsnInterfacesInterfaceInterfaceNamePatchBadRequest +*/ +type DataCocsnInterfacesInterfaceInterfaceNamePatchBadRequest struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNamePatchBadRequest creates DataCocsnInterfacesInterfaceInterfaceNamePatchBadRequest with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNamePatchBadRequest() *DataCocsnInterfacesInterfaceInterfaceNamePatchBadRequest { + + return &DataCocsnInterfacesInterfaceInterfaceNamePatchBadRequest{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNamePatchBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(400) +} + +// DataCocsnInterfacesInterfaceInterfaceNamePatchUnauthorizedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNamePatchUnauthorized +const DataCocsnInterfacesInterfaceInterfaceNamePatchUnauthorizedCode int = 401 + +/*DataCocsnInterfacesInterfaceInterfaceNamePatchUnauthorized Unauthorized + +swagger:response dataCocsnInterfacesInterfaceInterfaceNamePatchUnauthorized +*/ +type DataCocsnInterfacesInterfaceInterfaceNamePatchUnauthorized struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNamePatchUnauthorized creates DataCocsnInterfacesInterfaceInterfaceNamePatchUnauthorized with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNamePatchUnauthorized() *DataCocsnInterfacesInterfaceInterfaceNamePatchUnauthorized { + + return &DataCocsnInterfacesInterfaceInterfaceNamePatchUnauthorized{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNamePatchUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(401) +} + +// DataCocsnInterfacesInterfaceInterfaceNamePatchNotFoundCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNamePatchNotFound +const DataCocsnInterfacesInterfaceInterfaceNamePatchNotFoundCode int = 404 + +/*DataCocsnInterfacesInterfaceInterfaceNamePatchNotFound Not Found + +swagger:response dataCocsnInterfacesInterfaceInterfaceNamePatchNotFound +*/ +type DataCocsnInterfacesInterfaceInterfaceNamePatchNotFound struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNamePatchNotFound creates DataCocsnInterfacesInterfaceInterfaceNamePatchNotFound with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNamePatchNotFound() *DataCocsnInterfacesInterfaceInterfaceNamePatchNotFound { + + return &DataCocsnInterfacesInterfaceInterfaceNamePatchNotFound{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNamePatchNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(404) +} + +// DataCocsnInterfacesInterfaceInterfaceNamePatchMethodNotAllowedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNamePatchMethodNotAllowed +const DataCocsnInterfacesInterfaceInterfaceNamePatchMethodNotAllowedCode int = 405 + +/*DataCocsnInterfacesInterfaceInterfaceNamePatchMethodNotAllowed Method Not Allowed + +swagger:response dataCocsnInterfacesInterfaceInterfaceNamePatchMethodNotAllowed +*/ +type DataCocsnInterfacesInterfaceInterfaceNamePatchMethodNotAllowed struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNamePatchMethodNotAllowed creates DataCocsnInterfacesInterfaceInterfaceNamePatchMethodNotAllowed with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNamePatchMethodNotAllowed() *DataCocsnInterfacesInterfaceInterfaceNamePatchMethodNotAllowed { + + return &DataCocsnInterfacesInterfaceInterfaceNamePatchMethodNotAllowed{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNamePatchMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(405) +} + +// DataCocsnInterfacesInterfaceInterfaceNamePatchConflictCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNamePatchConflict +const DataCocsnInterfacesInterfaceInterfaceNamePatchConflictCode int = 409 + +/*DataCocsnInterfacesInterfaceInterfaceNamePatchConflict Conflict + +swagger:response dataCocsnInterfacesInterfaceInterfaceNamePatchConflict +*/ +type DataCocsnInterfacesInterfaceInterfaceNamePatchConflict struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNamePatchConflict creates DataCocsnInterfacesInterfaceInterfaceNamePatchConflict with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNamePatchConflict() *DataCocsnInterfacesInterfaceInterfaceNamePatchConflict { + + return &DataCocsnInterfacesInterfaceInterfaceNamePatchConflict{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNamePatchConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(409) +} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_patch_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_patch_urlbuilder.go similarity index 55% rename from api/restapi/operations/data/data_cocsn_arp_table_patch_urlbuilder.go rename to api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_patch_urlbuilder.go index ba660c95549b6acccac9dfc6c4db96908edb9cca..ac5fbfd912679ea4b9842b6781280fd814fe8820 100644 --- a/api/restapi/operations/data/data_cocsn_arp_table_patch_urlbuilder.go +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_patch_urlbuilder.go @@ -9,17 +9,22 @@ import ( "errors" "net/url" golangswaggerpaths "path" + "strings" ) -// DataCocsnArpTablePatchURL generates an URL for the data cocsn arp table patch operation -type DataCocsnArpTablePatchURL struct { +// DataCocsnInterfacesInterfaceInterfaceNamePatchURL generates an URL for the data cocsn interfaces interface interface name patch operation +type DataCocsnInterfacesInterfaceInterfaceNamePatchURL struct { + InterfaceName string + _basePath string + // avoid unkeyed usage + _ struct{} } // WithBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *DataCocsnArpTablePatchURL) WithBasePath(bp string) *DataCocsnArpTablePatchURL { +func (o *DataCocsnInterfacesInterfaceInterfaceNamePatchURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNamePatchURL { o.SetBasePath(bp) return o } @@ -27,15 +32,22 @@ func (o *DataCocsnArpTablePatchURL) WithBasePath(bp string) *DataCocsnArpTablePa // SetBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *DataCocsnArpTablePatchURL) SetBasePath(bp string) { +func (o *DataCocsnInterfacesInterfaceInterfaceNamePatchURL) SetBasePath(bp string) { o._basePath = bp } // Build a url path and query string -func (o *DataCocsnArpTablePatchURL) Build() (*url.URL, error) { +func (o *DataCocsnInterfacesInterfaceInterfaceNamePatchURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/data/cocsn:arp-table" + var _path = "/data/cocsn:interfaces/interface={interface-name}" + + interfaceName := o.InterfaceName + if interfaceName != "" { + _path = strings.Replace(_path, "{interface-name}", interfaceName, -1) + } else { + return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNamePatchURL") + } _basePath := o._basePath if _basePath == "" { @@ -47,7 +59,7 @@ func (o *DataCocsnArpTablePatchURL) Build() (*url.URL, error) { } // Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnArpTablePatchURL) Must(u *url.URL, err error) *url.URL { +func (o *DataCocsnInterfacesInterfaceInterfaceNamePatchURL) Must(u *url.URL, err error) *url.URL { if err != nil { panic(err) } @@ -58,17 +70,17 @@ func (o *DataCocsnArpTablePatchURL) Must(u *url.URL, err error) *url.URL { } // String returns the string representation of the path with query string -func (o *DataCocsnArpTablePatchURL) String() string { +func (o *DataCocsnInterfacesInterfaceInterfaceNamePatchURL) String() string { return o.Must(o.Build()).String() } // BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnArpTablePatchURL) BuildFull(scheme, host string) (*url.URL, error) { +func (o *DataCocsnInterfacesInterfaceInterfaceNamePatchURL) BuildFull(scheme, host string) (*url.URL, error) { if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnArpTablePatchURL") + return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNamePatchURL") } if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnArpTablePatchURL") + return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNamePatchURL") } base, err := o.Build() @@ -82,6 +94,6 @@ func (o *DataCocsnArpTablePatchURL) BuildFull(scheme, host string) (*url.URL, er } // StringFull returns the string representation of a complete url -func (o *DataCocsnArpTablePatchURL) StringFull(scheme, host string) string { +func (o *DataCocsnInterfacesInterfaceInterfaceNamePatchURL) StringFull(scheme, host string) string { return o.Must(o.BuildFull(scheme, host)).String() } diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_put.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_put.go new file mode 100644 index 0000000000000000000000000000000000000000..5480f5deb9a3ecaf84bd5713b3cd8296dd5b1e6e --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_put.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime/middleware" +) + +// DataCocsnInterfacesInterfaceInterfaceNamePutHandlerFunc turns a function with the right signature into a data cocsn interfaces interface interface name put handler +type DataCocsnInterfacesInterfaceInterfaceNamePutHandlerFunc func(DataCocsnInterfacesInterfaceInterfaceNamePutParams, interface{}) middleware.Responder + +// Handle executing the request and returning a response +func (fn DataCocsnInterfacesInterfaceInterfaceNamePutHandlerFunc) Handle(params DataCocsnInterfacesInterfaceInterfaceNamePutParams, principal interface{}) middleware.Responder { + return fn(params, principal) +} + +// DataCocsnInterfacesInterfaceInterfaceNamePutHandler interface for that can handle valid data cocsn interfaces interface interface name put params +type DataCocsnInterfacesInterfaceInterfaceNamePutHandler interface { + Handle(DataCocsnInterfacesInterfaceInterfaceNamePutParams, interface{}) middleware.Responder +} + +// NewDataCocsnInterfacesInterfaceInterfaceNamePut creates a new http.Handler for the data cocsn interfaces interface interface name put operation +func NewDataCocsnInterfacesInterfaceInterfaceNamePut(ctx *middleware.Context, handler DataCocsnInterfacesInterfaceInterfaceNamePutHandler) *DataCocsnInterfacesInterfaceInterfaceNamePut { + return &DataCocsnInterfacesInterfaceInterfaceNamePut{Context: ctx, Handler: handler} +} + +/*DataCocsnInterfacesInterfaceInterfaceNamePut swagger:route PUT /data/cocsn:interfaces/interface={interface-name} data put dataCocsnInterfacesInterfaceInterfaceNamePut + +DataCocsnInterfacesInterfaceInterfaceNamePut data cocsn interfaces interface interface name put API + +*/ +type DataCocsnInterfacesInterfaceInterfaceNamePut struct { + Context *middleware.Context + Handler DataCocsnInterfacesInterfaceInterfaceNamePutHandler +} + +func (o *DataCocsnInterfacesInterfaceInterfaceNamePut) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + route, rCtx, _ := o.Context.RouteInfo(r) + if rCtx != nil { + r = rCtx + } + var Params = NewDataCocsnInterfacesInterfaceInterfaceNamePutParams() + + uprinc, aCtx, err := o.Context.Authorize(r, route) + if err != nil { + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + if aCtx != nil { + r = aCtx + } + var principal interface{} + if uprinc != nil { + principal = uprinc + } + + if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + + res := o.Handler.Handle(Params, principal) // actually handle the request + + o.Context.Respond(rw, r, route.Produces, route, res) + +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_put_parameters.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_put_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..4475559bf2578c2604025adbff7b7e8a52a2da0f --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_put_parameters.go @@ -0,0 +1,184 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "io" + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/runtime/middleware" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" + + "code.fbi.h-da.de/cocsn/cocsn-api/api/models" +) + +// NewDataCocsnInterfacesInterfaceInterfaceNamePutParams creates a new DataCocsnInterfacesInterfaceInterfaceNamePutParams object +// with the default values initialized. +func NewDataCocsnInterfacesInterfaceInterfaceNamePutParams() DataCocsnInterfacesInterfaceInterfaceNamePutParams { + + var ( + // initialize parameters with default values + + insertDefault = string("first") + ) + + return DataCocsnInterfacesInterfaceInterfaceNamePutParams{ + Insert: &insertDefault, + } +} + +// DataCocsnInterfacesInterfaceInterfaceNamePutParams contains all the bound params for the data cocsn interfaces interface interface name put operation +// typically these are obtained from a http.Request +// +// swagger:parameters data_cocsn_interfaces_interface_interface_name_put +type DataCocsnInterfacesInterfaceInterfaceNamePutParams struct { + + // HTTP Request Object + HTTPRequest *http.Request `json:"-"` + + /*controlling the order when adding new list elements + In: query + Default: "first" + */ + Insert *string + /* + Required: true + In: body + */ + Interface *models.DataCocsnInterfacesInterfaceInterfaceName + /*Interface name. Example value: en0 + Required: true + In: path + */ + InterfaceName string + /*used to specify the insertion point + In: query + */ + Point *string +} + +// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface +// for simple values it will use straight method calls. +// +// To ensure default values, the struct must have been initialized with NewDataCocsnInterfacesInterfaceInterfaceNamePutParams() beforehand. +func (o *DataCocsnInterfacesInterfaceInterfaceNamePutParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { + var res []error + + o.HTTPRequest = r + + qs := runtime.Values(r.URL.Query()) + + qInsert, qhkInsert, _ := qs.GetOK("insert") + if err := o.bindInsert(qInsert, qhkInsert, route.Formats); err != nil { + res = append(res, err) + } + + if runtime.HasBody(r) { + defer r.Body.Close() + var body models.DataCocsnInterfacesInterfaceInterfaceName + if err := route.Consumer.Consume(r.Body, &body); err != nil { + if err == io.EOF { + res = append(res, errors.Required("interface", "body", "")) + } else { + res = append(res, errors.NewParseError("interface", "body", "", err)) + } + } else { + // validate body object + if err := body.Validate(route.Formats); err != nil { + res = append(res, err) + } + + if len(res) == 0 { + o.Interface = &body + } + } + } else { + res = append(res, errors.Required("interface", "body", "")) + } + rInterfaceName, rhkInterfaceName, _ := route.Params.GetOK("interface-name") + if err := o.bindInterfaceName(rInterfaceName, rhkInterfaceName, route.Formats); err != nil { + res = append(res, err) + } + + qPoint, qhkPoint, _ := qs.GetOK("point") + if err := o.bindPoint(qPoint, qhkPoint, route.Formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindInsert binds and validates parameter Insert from query. +func (o *DataCocsnInterfacesInterfaceInterfaceNamePutParams) bindInsert(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: false + // AllowEmptyValue: false + if raw == "" { // empty values pass all other validations + // Default values have been previously initialized by NewDataCocsnInterfacesInterfaceInterfaceNamePutParams() + return nil + } + + o.Insert = &raw + + if err := o.validateInsert(formats); err != nil { + return err + } + + return nil +} + +// validateInsert carries on validations for parameter Insert +func (o *DataCocsnInterfacesInterfaceInterfaceNamePutParams) validateInsert(formats strfmt.Registry) error { + + if err := validate.EnumCase("insert", "query", *o.Insert, []interface{}{"first", "last", "before", "after"}, true); err != nil { + return err + } + + return nil +} + +// bindInterfaceName binds and validates parameter InterfaceName from path. +func (o *DataCocsnInterfacesInterfaceInterfaceNamePutParams) bindInterfaceName(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + + o.InterfaceName = raw + + return nil +} + +// bindPoint binds and validates parameter Point from query. +func (o *DataCocsnInterfacesInterfaceInterfaceNamePutParams) bindPoint(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: false + // AllowEmptyValue: false + if raw == "" { // empty values pass all other validations + return nil + } + + o.Point = &raw + + return nil +} diff --git a/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_put_responses.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_put_responses.go new file mode 100644 index 0000000000000000000000000000000000000000..1971fc75525d554d9067737f92e3d37a7508b826 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_put_responses.go @@ -0,0 +1,180 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime" +) + +// DataCocsnInterfacesInterfaceInterfaceNamePutCreatedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNamePutCreated +const DataCocsnInterfacesInterfaceInterfaceNamePutCreatedCode int = 201 + +/*DataCocsnInterfacesInterfaceInterfaceNamePutCreated list interface created or replaced + +swagger:response dataCocsnInterfacesInterfaceInterfaceNamePutCreated +*/ +type DataCocsnInterfacesInterfaceInterfaceNamePutCreated struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNamePutCreated creates DataCocsnInterfacesInterfaceInterfaceNamePutCreated with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNamePutCreated() *DataCocsnInterfacesInterfaceInterfaceNamePutCreated { + + return &DataCocsnInterfacesInterfaceInterfaceNamePutCreated{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNamePutCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(201) +} + +// DataCocsnInterfacesInterfaceInterfaceNamePutNoContentCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNamePutNoContent +const DataCocsnInterfacesInterfaceInterfaceNamePutNoContentCode int = 204 + +/*DataCocsnInterfacesInterfaceInterfaceNamePutNoContent No Content + +swagger:response dataCocsnInterfacesInterfaceInterfaceNamePutNoContent +*/ +type DataCocsnInterfacesInterfaceInterfaceNamePutNoContent struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNamePutNoContent creates DataCocsnInterfacesInterfaceInterfaceNamePutNoContent with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNamePutNoContent() *DataCocsnInterfacesInterfaceInterfaceNamePutNoContent { + + return &DataCocsnInterfacesInterfaceInterfaceNamePutNoContent{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNamePutNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(204) +} + +// DataCocsnInterfacesInterfaceInterfaceNamePutBadRequestCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNamePutBadRequest +const DataCocsnInterfacesInterfaceInterfaceNamePutBadRequestCode int = 400 + +/*DataCocsnInterfacesInterfaceInterfaceNamePutBadRequest Bad Request + +swagger:response dataCocsnInterfacesInterfaceInterfaceNamePutBadRequest +*/ +type DataCocsnInterfacesInterfaceInterfaceNamePutBadRequest struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNamePutBadRequest creates DataCocsnInterfacesInterfaceInterfaceNamePutBadRequest with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNamePutBadRequest() *DataCocsnInterfacesInterfaceInterfaceNamePutBadRequest { + + return &DataCocsnInterfacesInterfaceInterfaceNamePutBadRequest{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNamePutBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(400) +} + +// DataCocsnInterfacesInterfaceInterfaceNamePutUnauthorizedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNamePutUnauthorized +const DataCocsnInterfacesInterfaceInterfaceNamePutUnauthorizedCode int = 401 + +/*DataCocsnInterfacesInterfaceInterfaceNamePutUnauthorized Unauthorized + +swagger:response dataCocsnInterfacesInterfaceInterfaceNamePutUnauthorized +*/ +type DataCocsnInterfacesInterfaceInterfaceNamePutUnauthorized struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNamePutUnauthorized creates DataCocsnInterfacesInterfaceInterfaceNamePutUnauthorized with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNamePutUnauthorized() *DataCocsnInterfacesInterfaceInterfaceNamePutUnauthorized { + + return &DataCocsnInterfacesInterfaceInterfaceNamePutUnauthorized{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNamePutUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(401) +} + +// DataCocsnInterfacesInterfaceInterfaceNamePutNotFoundCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNamePutNotFound +const DataCocsnInterfacesInterfaceInterfaceNamePutNotFoundCode int = 404 + +/*DataCocsnInterfacesInterfaceInterfaceNamePutNotFound Not Found + +swagger:response dataCocsnInterfacesInterfaceInterfaceNamePutNotFound +*/ +type DataCocsnInterfacesInterfaceInterfaceNamePutNotFound struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNamePutNotFound creates DataCocsnInterfacesInterfaceInterfaceNamePutNotFound with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNamePutNotFound() *DataCocsnInterfacesInterfaceInterfaceNamePutNotFound { + + return &DataCocsnInterfacesInterfaceInterfaceNamePutNotFound{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNamePutNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(404) +} + +// DataCocsnInterfacesInterfaceInterfaceNamePutMethodNotAllowedCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNamePutMethodNotAllowed +const DataCocsnInterfacesInterfaceInterfaceNamePutMethodNotAllowedCode int = 405 + +/*DataCocsnInterfacesInterfaceInterfaceNamePutMethodNotAllowed Method Not Allowed + +swagger:response dataCocsnInterfacesInterfaceInterfaceNamePutMethodNotAllowed +*/ +type DataCocsnInterfacesInterfaceInterfaceNamePutMethodNotAllowed struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNamePutMethodNotAllowed creates DataCocsnInterfacesInterfaceInterfaceNamePutMethodNotAllowed with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNamePutMethodNotAllowed() *DataCocsnInterfacesInterfaceInterfaceNamePutMethodNotAllowed { + + return &DataCocsnInterfacesInterfaceInterfaceNamePutMethodNotAllowed{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNamePutMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(405) +} + +// DataCocsnInterfacesInterfaceInterfaceNamePutConflictCode is the HTTP code returned for type DataCocsnInterfacesInterfaceInterfaceNamePutConflict +const DataCocsnInterfacesInterfaceInterfaceNamePutConflictCode int = 409 + +/*DataCocsnInterfacesInterfaceInterfaceNamePutConflict Conflict + +swagger:response dataCocsnInterfacesInterfaceInterfaceNamePutConflict +*/ +type DataCocsnInterfacesInterfaceInterfaceNamePutConflict struct { +} + +// NewDataCocsnInterfacesInterfaceInterfaceNamePutConflict creates DataCocsnInterfacesInterfaceInterfaceNamePutConflict with default headers values +func NewDataCocsnInterfacesInterfaceInterfaceNamePutConflict() *DataCocsnInterfacesInterfaceInterfaceNamePutConflict { + + return &DataCocsnInterfacesInterfaceInterfaceNamePutConflict{} +} + +// WriteResponse to the client +func (o *DataCocsnInterfacesInterfaceInterfaceNamePutConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(409) +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_get_urlbuilder.go b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_put_urlbuilder.go similarity index 53% rename from api/restapi/operations/data/data_cocsn_routes_route_get_urlbuilder.go rename to api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_put_urlbuilder.go index 38242697b250d4d5e28ab794130b72cd47044ee7..5615184f033c5d21716d581f69712da0f3662f96 100644 --- a/api/restapi/operations/data/data_cocsn_routes_route_get_urlbuilder.go +++ b/api/restapi/operations/data/data_cocsn_interfaces_interface_interface_name_put_urlbuilder.go @@ -9,17 +9,15 @@ import ( "errors" "net/url" golangswaggerpaths "path" - - "github.com/go-openapi/swag" + "strings" ) -// DataCocsnRoutesRouteGetURL generates an URL for the data cocsn routes route get operation -type DataCocsnRoutesRouteGetURL struct { - Content *string - Depth *uint16 - Fields *string - Filter *string - WithDefaults *string +// DataCocsnInterfacesInterfaceInterfaceNamePutURL generates an URL for the data cocsn interfaces interface interface name put operation +type DataCocsnInterfacesInterfaceInterfaceNamePutURL struct { + InterfaceName string + + Insert *string + Point *string _basePath string // avoid unkeyed usage @@ -29,7 +27,7 @@ type DataCocsnRoutesRouteGetURL struct { // WithBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteGetURL) WithBasePath(bp string) *DataCocsnRoutesRouteGetURL { +func (o *DataCocsnInterfacesInterfaceInterfaceNamePutURL) WithBasePath(bp string) *DataCocsnInterfacesInterfaceInterfaceNamePutURL { o.SetBasePath(bp) return o } @@ -37,15 +35,22 @@ func (o *DataCocsnRoutesRouteGetURL) WithBasePath(bp string) *DataCocsnRoutesRou // SetBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *DataCocsnRoutesRouteGetURL) SetBasePath(bp string) { +func (o *DataCocsnInterfacesInterfaceInterfaceNamePutURL) SetBasePath(bp string) { o._basePath = bp } // Build a url path and query string -func (o *DataCocsnRoutesRouteGetURL) Build() (*url.URL, error) { +func (o *DataCocsnInterfacesInterfaceInterfaceNamePutURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/data/cocsn:routes/route" + var _path = "/data/cocsn:interfaces/interface={interface-name}" + + interfaceName := o.InterfaceName + if interfaceName != "" { + _path = strings.Replace(_path, "{interface-name}", interfaceName, -1) + } else { + return nil, errors.New("interfaceName is required on DataCocsnInterfacesInterfaceInterfaceNamePutURL") + } _basePath := o._basePath if _basePath == "" { @@ -55,44 +60,20 @@ func (o *DataCocsnRoutesRouteGetURL) Build() (*url.URL, error) { qs := make(url.Values) - var contentQ string - if o.Content != nil { - contentQ = *o.Content - } - if contentQ != "" { - qs.Set("content", contentQ) - } - - var depthQ string - if o.Depth != nil { - depthQ = swag.FormatUint16(*o.Depth) - } - if depthQ != "" { - qs.Set("depth", depthQ) - } - - var fieldsQ string - if o.Fields != nil { - fieldsQ = *o.Fields - } - if fieldsQ != "" { - qs.Set("fields", fieldsQ) - } - - var filterQ string - if o.Filter != nil { - filterQ = *o.Filter + var insertQ string + if o.Insert != nil { + insertQ = *o.Insert } - if filterQ != "" { - qs.Set("filter", filterQ) + if insertQ != "" { + qs.Set("insert", insertQ) } - var withDefaultsQ string - if o.WithDefaults != nil { - withDefaultsQ = *o.WithDefaults + var pointQ string + if o.Point != nil { + pointQ = *o.Point } - if withDefaultsQ != "" { - qs.Set("with-defaults", withDefaultsQ) + if pointQ != "" { + qs.Set("point", pointQ) } _result.RawQuery = qs.Encode() @@ -101,7 +82,7 @@ func (o *DataCocsnRoutesRouteGetURL) Build() (*url.URL, error) { } // Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnRoutesRouteGetURL) Must(u *url.URL, err error) *url.URL { +func (o *DataCocsnInterfacesInterfaceInterfaceNamePutURL) Must(u *url.URL, err error) *url.URL { if err != nil { panic(err) } @@ -112,17 +93,17 @@ func (o *DataCocsnRoutesRouteGetURL) Must(u *url.URL, err error) *url.URL { } // String returns the string representation of the path with query string -func (o *DataCocsnRoutesRouteGetURL) String() string { +func (o *DataCocsnInterfacesInterfaceInterfaceNamePutURL) String() string { return o.Must(o.Build()).String() } // BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnRoutesRouteGetURL) BuildFull(scheme, host string) (*url.URL, error) { +func (o *DataCocsnInterfacesInterfaceInterfaceNamePutURL) BuildFull(scheme, host string) (*url.URL, error) { if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteGetURL") + return nil, errors.New("scheme is required for a full url on DataCocsnInterfacesInterfaceInterfaceNamePutURL") } if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteGetURL") + return nil, errors.New("host is required for a full url on DataCocsnInterfacesInterfaceInterfaceNamePutURL") } base, err := o.Build() @@ -136,6 +117,6 @@ func (o *DataCocsnRoutesRouteGetURL) BuildFull(scheme, host string) (*url.URL, e } // StringFull returns the string representation of a complete url -func (o *DataCocsnRoutesRouteGetURL) StringFull(scheme, host string) string { +func (o *DataCocsnInterfacesInterfaceInterfaceNamePutURL) StringFull(scheme, host string) string { return o.Must(o.BuildFull(scheme, host)).String() } diff --git a/api/restapi/operations/data/data_cocsn_routes_route_get.go b/api/restapi/operations/data/data_cocsn_routes_route_get.go deleted file mode 100644 index 90d2438f97dbda8014b7e174dccceccc015cf5ed..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_get.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DataCocsnRoutesRouteGetHandlerFunc turns a function with the right signature into a data cocsn routes route get handler -type DataCocsnRoutesRouteGetHandlerFunc func(DataCocsnRoutesRouteGetParams, interface{}) middleware.Responder - -// Handle executing the request and returning a response -func (fn DataCocsnRoutesRouteGetHandlerFunc) Handle(params DataCocsnRoutesRouteGetParams, principal interface{}) middleware.Responder { - return fn(params, principal) -} - -// DataCocsnRoutesRouteGetHandler interface for that can handle valid data cocsn routes route get params -type DataCocsnRoutesRouteGetHandler interface { - Handle(DataCocsnRoutesRouteGetParams, interface{}) middleware.Responder -} - -// NewDataCocsnRoutesRouteGet creates a new http.Handler for the data cocsn routes route get operation -func NewDataCocsnRoutesRouteGet(ctx *middleware.Context, handler DataCocsnRoutesRouteGetHandler) *DataCocsnRoutesRouteGet { - return &DataCocsnRoutesRouteGet{Context: ctx, Handler: handler} -} - -/*DataCocsnRoutesRouteGet swagger:route GET /data/cocsn:routes/route data get dataCocsnRoutesRouteGet - -DataCocsnRoutesRouteGet data cocsn routes route get API - -*/ -type DataCocsnRoutesRouteGet struct { - Context *middleware.Context - Handler DataCocsnRoutesRouteGetHandler -} - -func (o *DataCocsnRoutesRouteGet) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDataCocsnRoutesRouteGetParams() - - uprinc, aCtx, err := o.Context.Authorize(r, route) - if err != nil { - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - if aCtx != nil { - r = aCtx - } - var principal interface{} - if uprinc != nil { - principal = uprinc - } - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params, principal) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_get_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_get_parameters.go deleted file mode 100644 index 7e2981d4a9fd5637c79693a75f6853884a23f1fe..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_get_parameters.go +++ /dev/null @@ -1,235 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - "github.com/go-openapi/validate" -) - -// NewDataCocsnRoutesRouteGetParams creates a new DataCocsnRoutesRouteGetParams object -// with the default values initialized. -func NewDataCocsnRoutesRouteGetParams() DataCocsnRoutesRouteGetParams { - - var ( - // initialize parameters with default values - - contentDefault = string("config") - - withDefaultsDefault = string("report-all") - ) - - return DataCocsnRoutesRouteGetParams{ - Content: &contentDefault, - - WithDefaults: &withDefaultsDefault, - } -} - -// DataCocsnRoutesRouteGetParams contains all the bound params for the data cocsn routes route get operation -// typically these are obtained from a http.Request -// -// swagger:parameters data_cocsn_routes_route_get -type DataCocsnRoutesRouteGetParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*controlling descendant nodes in response - In: query - Default: "config" - */ - Content *string - /*limit the depth of nodes in response - In: query - */ - Depth *uint16 - /*optionally identify specific data nodes in response - In: query - */ - Fields *string - /*xpath expression to filter data nodes in response - In: query - */ - Filter *string - /*controlling default values in response - In: query - Default: "report-all" - */ - WithDefaults *string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteGetParams() beforehand. -func (o *DataCocsnRoutesRouteGetParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - qs := runtime.Values(r.URL.Query()) - - qContent, qhkContent, _ := qs.GetOK("content") - if err := o.bindContent(qContent, qhkContent, route.Formats); err != nil { - res = append(res, err) - } - - qDepth, qhkDepth, _ := qs.GetOK("depth") - if err := o.bindDepth(qDepth, qhkDepth, route.Formats); err != nil { - res = append(res, err) - } - - qFields, qhkFields, _ := qs.GetOK("fields") - if err := o.bindFields(qFields, qhkFields, route.Formats); err != nil { - res = append(res, err) - } - - qFilter, qhkFilter, _ := qs.GetOK("filter") - if err := o.bindFilter(qFilter, qhkFilter, route.Formats); err != nil { - res = append(res, err) - } - - qWithDefaults, qhkWithDefaults, _ := qs.GetOK("with-defaults") - if err := o.bindWithDefaults(qWithDefaults, qhkWithDefaults, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindContent binds and validates parameter Content from query. -func (o *DataCocsnRoutesRouteGetParams) bindContent(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnRoutesRouteGetParams() - return nil - } - - o.Content = &raw - - if err := o.validateContent(formats); err != nil { - return err - } - - return nil -} - -// validateContent carries on validations for parameter Content -func (o *DataCocsnRoutesRouteGetParams) validateContent(formats strfmt.Registry) error { - - if err := validate.EnumCase("content", "query", *o.Content, []interface{}{"config", "nonconfig", "all"}, true); err != nil { - return err - } - - return nil -} - -// bindDepth binds and validates parameter Depth from query. -func (o *DataCocsnRoutesRouteGetParams) bindDepth(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - value, err := swag.ConvertUint16(raw) - if err != nil { - return errors.InvalidType("depth", "query", "uint16", raw) - } - o.Depth = &value - - return nil -} - -// bindFields binds and validates parameter Fields from query. -func (o *DataCocsnRoutesRouteGetParams) bindFields(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Fields = &raw - - return nil -} - -// bindFilter binds and validates parameter Filter from query. -func (o *DataCocsnRoutesRouteGetParams) bindFilter(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - return nil - } - - o.Filter = &raw - - return nil -} - -// bindWithDefaults binds and validates parameter WithDefaults from query. -func (o *DataCocsnRoutesRouteGetParams) bindWithDefaults(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: false - // AllowEmptyValue: false - if raw == "" { // empty values pass all other validations - // Default values have been previously initialized by NewDataCocsnRoutesRouteGetParams() - return nil - } - - o.WithDefaults = &raw - - if err := o.validateWithDefaults(formats); err != nil { - return err - } - - return nil -} - -// validateWithDefaults carries on validations for parameter WithDefaults -func (o *DataCocsnRoutesRouteGetParams) validateWithDefaults(formats strfmt.Registry) error { - - if err := validate.EnumCase("with-defaults", "query", *o.WithDefaults, []interface{}{"report-all", "trim", "explicit", "report-all-tagged"}, true); err != nil { - return err - } - - return nil -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_get_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_get_responses.go deleted file mode 100644 index 5659d3c90d91cfed3a8798d02bdf01b03283a5e2..0000000000000000000000000000000000000000 --- a/api/restapi/operations/data/data_cocsn_routes_route_get_responses.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package data - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/api/models" -) - -// DataCocsnRoutesRouteGetOKCode is the HTTP code returned for type DataCocsnRoutesRouteGetOK -const DataCocsnRoutesRouteGetOKCode int = 200 - -/*DataCocsnRoutesRouteGetOK OK - -swagger:response dataCocsnRoutesRouteGetOK -*/ -type DataCocsnRoutesRouteGetOK struct { - - /* - In: Body - */ - Payload *models.DataCocsnRoutesRoute `json:"body,omitempty"` -} - -// NewDataCocsnRoutesRouteGetOK creates DataCocsnRoutesRouteGetOK with default headers values -func NewDataCocsnRoutesRouteGetOK() *DataCocsnRoutesRouteGetOK { - - return &DataCocsnRoutesRouteGetOK{} -} - -// WithPayload adds the payload to the data cocsn routes route get o k response -func (o *DataCocsnRoutesRouteGetOK) WithPayload(payload *models.DataCocsnRoutesRoute) *DataCocsnRoutesRouteGetOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the data cocsn routes route get o k response -func (o *DataCocsnRoutesRouteGetOK) SetPayload(payload *models.DataCocsnRoutesRoute) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteGetOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// DataCocsnRoutesRouteGetNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteGetNoContent -const DataCocsnRoutesRouteGetNoContentCode int = 204 - -/*DataCocsnRoutesRouteGetNoContent No Content - -swagger:response dataCocsnRoutesRouteGetNoContent -*/ -type DataCocsnRoutesRouteGetNoContent struct { -} - -// NewDataCocsnRoutesRouteGetNoContent creates DataCocsnRoutesRouteGetNoContent with default headers values -func NewDataCocsnRoutesRouteGetNoContent() *DataCocsnRoutesRouteGetNoContent { - - return &DataCocsnRoutesRouteGetNoContent{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteGetNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DataCocsnRoutesRouteGetBadRequestCode is the HTTP code returned for type DataCocsnRoutesRouteGetBadRequest -const DataCocsnRoutesRouteGetBadRequestCode int = 400 - -/*DataCocsnRoutesRouteGetBadRequest Bad Request - -swagger:response dataCocsnRoutesRouteGetBadRequest -*/ -type DataCocsnRoutesRouteGetBadRequest struct { -} - -// NewDataCocsnRoutesRouteGetBadRequest creates DataCocsnRoutesRouteGetBadRequest with default headers values -func NewDataCocsnRoutesRouteGetBadRequest() *DataCocsnRoutesRouteGetBadRequest { - - return &DataCocsnRoutesRouteGetBadRequest{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteGetBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// DataCocsnRoutesRouteGetUnauthorizedCode is the HTTP code returned for type DataCocsnRoutesRouteGetUnauthorized -const DataCocsnRoutesRouteGetUnauthorizedCode int = 401 - -/*DataCocsnRoutesRouteGetUnauthorized Unauthorized - -swagger:response dataCocsnRoutesRouteGetUnauthorized -*/ -type DataCocsnRoutesRouteGetUnauthorized struct { -} - -// NewDataCocsnRoutesRouteGetUnauthorized creates DataCocsnRoutesRouteGetUnauthorized with default headers values -func NewDataCocsnRoutesRouteGetUnauthorized() *DataCocsnRoutesRouteGetUnauthorized { - - return &DataCocsnRoutesRouteGetUnauthorized{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteGetUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(401) -} - -// DataCocsnRoutesRouteGetNotFoundCode is the HTTP code returned for type DataCocsnRoutesRouteGetNotFound -const DataCocsnRoutesRouteGetNotFoundCode int = 404 - -/*DataCocsnRoutesRouteGetNotFound Not Found - -swagger:response dataCocsnRoutesRouteGetNotFound -*/ -type DataCocsnRoutesRouteGetNotFound struct { -} - -// NewDataCocsnRoutesRouteGetNotFound creates DataCocsnRoutesRouteGetNotFound with default headers values -func NewDataCocsnRoutesRouteGetNotFound() *DataCocsnRoutesRouteGetNotFound { - - return &DataCocsnRoutesRouteGetNotFound{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteGetNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -// DataCocsnRoutesRouteGetMethodNotAllowedCode is the HTTP code returned for type DataCocsnRoutesRouteGetMethodNotAllowed -const DataCocsnRoutesRouteGetMethodNotAllowedCode int = 405 - -/*DataCocsnRoutesRouteGetMethodNotAllowed Method Not Allowed - -swagger:response dataCocsnRoutesRouteGetMethodNotAllowed -*/ -type DataCocsnRoutesRouteGetMethodNotAllowed struct { -} - -// NewDataCocsnRoutesRouteGetMethodNotAllowed creates DataCocsnRoutesRouteGetMethodNotAllowed with default headers values -func NewDataCocsnRoutesRouteGetMethodNotAllowed() *DataCocsnRoutesRouteGetMethodNotAllowed { - - return &DataCocsnRoutesRouteGetMethodNotAllowed{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteGetMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(405) -} - -// DataCocsnRoutesRouteGetConflictCode is the HTTP code returned for type DataCocsnRoutesRouteGetConflict -const DataCocsnRoutesRouteGetConflictCode int = 409 - -/*DataCocsnRoutesRouteGetConflict Conflict - -swagger:response dataCocsnRoutesRouteGetConflict -*/ -type DataCocsnRoutesRouteGetConflict struct { -} - -// NewDataCocsnRoutesRouteGetConflict creates DataCocsnRoutesRouteGetConflict with default headers values -func NewDataCocsnRoutesRouteGetConflict() *DataCocsnRoutesRouteGetConflict { - - return &DataCocsnRoutesRouteGetConflict{} -} - -// WriteResponse to the client -func (o *DataCocsnRoutesRouteGetConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_delete.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_delete.go new file mode 100644 index 0000000000000000000000000000000000000000..2cfc3f88142a64b17eab6592d4f35f16de586758 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_delete.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime/middleware" +) + +// DataCocsnRoutesRouteRouteDestinationDeleteHandlerFunc turns a function with the right signature into a data cocsn routes route route destination delete handler +type DataCocsnRoutesRouteRouteDestinationDeleteHandlerFunc func(DataCocsnRoutesRouteRouteDestinationDeleteParams, interface{}) middleware.Responder + +// Handle executing the request and returning a response +func (fn DataCocsnRoutesRouteRouteDestinationDeleteHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationDeleteParams, principal interface{}) middleware.Responder { + return fn(params, principal) +} + +// DataCocsnRoutesRouteRouteDestinationDeleteHandler interface for that can handle valid data cocsn routes route route destination delete params +type DataCocsnRoutesRouteRouteDestinationDeleteHandler interface { + Handle(DataCocsnRoutesRouteRouteDestinationDeleteParams, interface{}) middleware.Responder +} + +// NewDataCocsnRoutesRouteRouteDestinationDelete creates a new http.Handler for the data cocsn routes route route destination delete operation +func NewDataCocsnRoutesRouteRouteDestinationDelete(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationDeleteHandler) *DataCocsnRoutesRouteRouteDestinationDelete { + return &DataCocsnRoutesRouteRouteDestinationDelete{Context: ctx, Handler: handler} +} + +/*DataCocsnRoutesRouteRouteDestinationDelete swagger:route DELETE /data/cocsn:routes/route={route-destination} data delete dataCocsnRoutesRouteRouteDestinationDelete + +DataCocsnRoutesRouteRouteDestinationDelete data cocsn routes route route destination delete API + +*/ +type DataCocsnRoutesRouteRouteDestinationDelete struct { + Context *middleware.Context + Handler DataCocsnRoutesRouteRouteDestinationDeleteHandler +} + +func (o *DataCocsnRoutesRouteRouteDestinationDelete) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + route, rCtx, _ := o.Context.RouteInfo(r) + if rCtx != nil { + r = rCtx + } + var Params = NewDataCocsnRoutesRouteRouteDestinationDeleteParams() + + uprinc, aCtx, err := o.Context.Authorize(r, route) + if err != nil { + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + if aCtx != nil { + r = aCtx + } + var principal interface{} + if uprinc != nil { + principal = uprinc + } + + if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + + res := o.Handler.Handle(Params, principal) // actually handle the request + + o.Context.Respond(rw, r, route.Produces, route, res) + +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_delete_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_delete_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..5a0f4d3f5a46aa13f2b9f4b5941e815bf3ff01b4 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_delete_parameters.go @@ -0,0 +1,72 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime/middleware" + "github.com/go-openapi/strfmt" +) + +// NewDataCocsnRoutesRouteRouteDestinationDeleteParams creates a new DataCocsnRoutesRouteRouteDestinationDeleteParams object +// no default values defined in spec. +func NewDataCocsnRoutesRouteRouteDestinationDeleteParams() DataCocsnRoutesRouteRouteDestinationDeleteParams { + + return DataCocsnRoutesRouteRouteDestinationDeleteParams{} +} + +// DataCocsnRoutesRouteRouteDestinationDeleteParams contains all the bound params for the data cocsn routes route route destination delete operation +// typically these are obtained from a http.Request +// +// swagger:parameters data_cocsn_routes_route_route_destination_delete +type DataCocsnRoutesRouteRouteDestinationDeleteParams struct { + + // HTTP Request Object + HTTPRequest *http.Request `json:"-"` + + /*Route destination. IP network + Required: true + In: path + */ + RouteDestination string +} + +// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface +// for simple values it will use straight method calls. +// +// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationDeleteParams() beforehand. +func (o *DataCocsnRoutesRouteRouteDestinationDeleteParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { + var res []error + + o.HTTPRequest = r + + rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") + if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindRouteDestination binds and validates parameter RouteDestination from path. +func (o *DataCocsnRoutesRouteRouteDestinationDeleteParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + + o.RouteDestination = raw + + return nil +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_delete_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_delete_responses.go new file mode 100644 index 0000000000000000000000000000000000000000..3236962b5d4c978d77bb4130df33231c967dffd4 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_delete_responses.go @@ -0,0 +1,36 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime" +) + +// DataCocsnRoutesRouteRouteDestinationDeleteNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDeleteNoContent +const DataCocsnRoutesRouteRouteDestinationDeleteNoContentCode int = 204 + +/*DataCocsnRoutesRouteRouteDestinationDeleteNoContent No Content + +swagger:response dataCocsnRoutesRouteRouteDestinationDeleteNoContent +*/ +type DataCocsnRoutesRouteRouteDestinationDeleteNoContent struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationDeleteNoContent creates DataCocsnRoutesRouteRouteDestinationDeleteNoContent with default headers values +func NewDataCocsnRoutesRouteRouteDestinationDeleteNoContent() *DataCocsnRoutesRouteRouteDestinationDeleteNoContent { + + return &DataCocsnRoutesRouteRouteDestinationDeleteNoContent{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationDeleteNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(204) +} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_put_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_delete_urlbuilder.go similarity index 55% rename from api/restapi/operations/data/data_cocsn_arp_table_put_urlbuilder.go rename to api/restapi/operations/data/data_cocsn_routes_route_route_destination_delete_urlbuilder.go index 335d0ea316b9c16a87905b6fd507c7be13af2953..ff67f3106bb74de0d11ead438f36eb74f05f96c6 100644 --- a/api/restapi/operations/data/data_cocsn_arp_table_put_urlbuilder.go +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_delete_urlbuilder.go @@ -9,17 +9,22 @@ import ( "errors" "net/url" golangswaggerpaths "path" + "strings" ) -// DataCocsnArpTablePutURL generates an URL for the data cocsn arp table put operation -type DataCocsnArpTablePutURL struct { +// DataCocsnRoutesRouteRouteDestinationDeleteURL generates an URL for the data cocsn routes route route destination delete operation +type DataCocsnRoutesRouteRouteDestinationDeleteURL struct { + RouteDestination string + _basePath string + // avoid unkeyed usage + _ struct{} } // WithBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *DataCocsnArpTablePutURL) WithBasePath(bp string) *DataCocsnArpTablePutURL { +func (o *DataCocsnRoutesRouteRouteDestinationDeleteURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationDeleteURL { o.SetBasePath(bp) return o } @@ -27,15 +32,22 @@ func (o *DataCocsnArpTablePutURL) WithBasePath(bp string) *DataCocsnArpTablePutU // SetBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *DataCocsnArpTablePutURL) SetBasePath(bp string) { +func (o *DataCocsnRoutesRouteRouteDestinationDeleteURL) SetBasePath(bp string) { o._basePath = bp } // Build a url path and query string -func (o *DataCocsnArpTablePutURL) Build() (*url.URL, error) { +func (o *DataCocsnRoutesRouteRouteDestinationDeleteURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/data/cocsn:arp-table" + var _path = "/data/cocsn:routes/route={route-destination}" + + routeDestination := o.RouteDestination + if routeDestination != "" { + _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) + } else { + return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationDeleteURL") + } _basePath := o._basePath if _basePath == "" { @@ -47,7 +59,7 @@ func (o *DataCocsnArpTablePutURL) Build() (*url.URL, error) { } // Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnArpTablePutURL) Must(u *url.URL, err error) *url.URL { +func (o *DataCocsnRoutesRouteRouteDestinationDeleteURL) Must(u *url.URL, err error) *url.URL { if err != nil { panic(err) } @@ -58,17 +70,17 @@ func (o *DataCocsnArpTablePutURL) Must(u *url.URL, err error) *url.URL { } // String returns the string representation of the path with query string -func (o *DataCocsnArpTablePutURL) String() string { +func (o *DataCocsnRoutesRouteRouteDestinationDeleteURL) String() string { return o.Must(o.Build()).String() } // BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnArpTablePutURL) BuildFull(scheme, host string) (*url.URL, error) { +func (o *DataCocsnRoutesRouteRouteDestinationDeleteURL) BuildFull(scheme, host string) (*url.URL, error) { if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnArpTablePutURL") + return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationDeleteURL") } if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnArpTablePutURL") + return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationDeleteURL") } base, err := o.Build() @@ -82,6 +94,6 @@ func (o *DataCocsnArpTablePutURL) BuildFull(scheme, host string) (*url.URL, erro } // StringFull returns the string representation of a complete url -func (o *DataCocsnArpTablePutURL) StringFull(scheme, host string) string { +func (o *DataCocsnRoutesRouteRouteDestinationDeleteURL) StringFull(scheme, host string) string { return o.Must(o.BuildFull(scheme, host)).String() } diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_delete.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_delete.go new file mode 100644 index 0000000000000000000000000000000000000000..cc462301ab02da142ca75aff272a32df21a7109d --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_delete.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime/middleware" +) + +// DataCocsnRoutesRouteRouteDestinationDestinationDeleteHandlerFunc turns a function with the right signature into a data cocsn routes route route destination destination delete handler +type DataCocsnRoutesRouteRouteDestinationDestinationDeleteHandlerFunc func(DataCocsnRoutesRouteRouteDestinationDestinationDeleteParams, interface{}) middleware.Responder + +// Handle executing the request and returning a response +func (fn DataCocsnRoutesRouteRouteDestinationDestinationDeleteHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationDestinationDeleteParams, principal interface{}) middleware.Responder { + return fn(params, principal) +} + +// DataCocsnRoutesRouteRouteDestinationDestinationDeleteHandler interface for that can handle valid data cocsn routes route route destination destination delete params +type DataCocsnRoutesRouteRouteDestinationDestinationDeleteHandler interface { + Handle(DataCocsnRoutesRouteRouteDestinationDestinationDeleteParams, interface{}) middleware.Responder +} + +// NewDataCocsnRoutesRouteRouteDestinationDestinationDelete creates a new http.Handler for the data cocsn routes route route destination destination delete operation +func NewDataCocsnRoutesRouteRouteDestinationDestinationDelete(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationDestinationDeleteHandler) *DataCocsnRoutesRouteRouteDestinationDestinationDelete { + return &DataCocsnRoutesRouteRouteDestinationDestinationDelete{Context: ctx, Handler: handler} +} + +/*DataCocsnRoutesRouteRouteDestinationDestinationDelete swagger:route DELETE /data/cocsn:routes/route={route-destination}/destination data delete dataCocsnRoutesRouteRouteDestinationDestinationDelete + +Route destination. IP network + +Route destination. IP network + +*/ +type DataCocsnRoutesRouteRouteDestinationDestinationDelete struct { + Context *middleware.Context + Handler DataCocsnRoutesRouteRouteDestinationDestinationDeleteHandler +} + +func (o *DataCocsnRoutesRouteRouteDestinationDestinationDelete) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + route, rCtx, _ := o.Context.RouteInfo(r) + if rCtx != nil { + r = rCtx + } + var Params = NewDataCocsnRoutesRouteRouteDestinationDestinationDeleteParams() + + uprinc, aCtx, err := o.Context.Authorize(r, route) + if err != nil { + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + if aCtx != nil { + r = aCtx + } + var principal interface{} + if uprinc != nil { + principal = uprinc + } + + if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + + res := o.Handler.Handle(Params, principal) // actually handle the request + + o.Context.Respond(rw, r, route.Produces, route, res) + +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_delete_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_delete_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..679e25746c0110d19e2994ecf40d91ff3f99e42a --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_delete_parameters.go @@ -0,0 +1,72 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime/middleware" + "github.com/go-openapi/strfmt" +) + +// NewDataCocsnRoutesRouteRouteDestinationDestinationDeleteParams creates a new DataCocsnRoutesRouteRouteDestinationDestinationDeleteParams object +// no default values defined in spec. +func NewDataCocsnRoutesRouteRouteDestinationDestinationDeleteParams() DataCocsnRoutesRouteRouteDestinationDestinationDeleteParams { + + return DataCocsnRoutesRouteRouteDestinationDestinationDeleteParams{} +} + +// DataCocsnRoutesRouteRouteDestinationDestinationDeleteParams contains all the bound params for the data cocsn routes route route destination destination delete operation +// typically these are obtained from a http.Request +// +// swagger:parameters data_cocsn_routes_route_route_destination_destination_delete +type DataCocsnRoutesRouteRouteDestinationDestinationDeleteParams struct { + + // HTTP Request Object + HTTPRequest *http.Request `json:"-"` + + /*Route destination. IP network + Required: true + In: path + */ + RouteDestination string +} + +// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface +// for simple values it will use straight method calls. +// +// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationDestinationDeleteParams() beforehand. +func (o *DataCocsnRoutesRouteRouteDestinationDestinationDeleteParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { + var res []error + + o.HTTPRequest = r + + rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") + if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindRouteDestination binds and validates parameter RouteDestination from path. +func (o *DataCocsnRoutesRouteRouteDestinationDestinationDeleteParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + + o.RouteDestination = raw + + return nil +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_delete_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_delete_responses.go new file mode 100644 index 0000000000000000000000000000000000000000..167d2c0637d545e1797df21f96685880152cd4e8 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_delete_responses.go @@ -0,0 +1,36 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime" +) + +// DataCocsnRoutesRouteRouteDestinationDestinationDeleteNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDestinationDeleteNoContent +const DataCocsnRoutesRouteRouteDestinationDestinationDeleteNoContentCode int = 204 + +/*DataCocsnRoutesRouteRouteDestinationDestinationDeleteNoContent No Content + +swagger:response dataCocsnRoutesRouteRouteDestinationDestinationDeleteNoContent +*/ +type DataCocsnRoutesRouteRouteDestinationDestinationDeleteNoContent struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationDestinationDeleteNoContent creates DataCocsnRoutesRouteRouteDestinationDestinationDeleteNoContent with default headers values +func NewDataCocsnRoutesRouteRouteDestinationDestinationDeleteNoContent() *DataCocsnRoutesRouteRouteDestinationDestinationDeleteNoContent { + + return &DataCocsnRoutesRouteRouteDestinationDestinationDeleteNoContent{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationDestinationDeleteNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(204) +} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_id_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_delete_urlbuilder.go similarity index 57% rename from waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_id_urlbuilder.go rename to api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_delete_urlbuilder.go index 215f268045ab352287fb852f0732726338f1de40..88534e27375629fe388e1087903b62c91d1b4550 100644 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_id_urlbuilder.go +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_delete_urlbuilder.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package ciena_waveserver_interfaces +package data // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the generate command @@ -12,9 +12,9 @@ import ( "strings" ) -// DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDURL generates an URL for the delete data waveserver interfaces physical interface name ID operation -type DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDURL struct { - Name string +// DataCocsnRoutesRouteRouteDestinationDestinationDeleteURL generates an URL for the data cocsn routes route route destination destination delete operation +type DataCocsnRoutesRouteRouteDestinationDestinationDeleteURL struct { + RouteDestination string _basePath string // avoid unkeyed usage @@ -24,7 +24,7 @@ type DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDURL struct { // WithBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDURL) WithBasePath(bp string) *DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDURL { +func (o *DataCocsnRoutesRouteRouteDestinationDestinationDeleteURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationDestinationDeleteURL { o.SetBasePath(bp) return o } @@ -32,31 +32,34 @@ func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDURL) WithBasePath( // SetBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDURL) SetBasePath(bp string) { +func (o *DataCocsnRoutesRouteRouteDestinationDestinationDeleteURL) SetBasePath(bp string) { o._basePath = bp } // Build a url path and query string -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDURL) Build() (*url.URL, error) { +func (o *DataCocsnRoutesRouteRouteDestinationDestinationDeleteURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/data/waveserver-interfaces/physical-interface={name}/id/" + var _path = "/data/cocsn:routes/route={route-destination}/destination" - name := o.Name - if name != "" { - _path = strings.Replace(_path, "{name}", name, -1) + routeDestination := o.RouteDestination + if routeDestination != "" { + _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) } else { - return nil, errors.New("name is required on DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDURL") + return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationDestinationDeleteURL") } _basePath := o._basePath + if _basePath == "" { + _basePath = "/restconf" + } _result.Path = golangswaggerpaths.Join(_basePath, _path) return &_result, nil } // Must is a helper function to panic when the url builder returns an error -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDURL) Must(u *url.URL, err error) *url.URL { +func (o *DataCocsnRoutesRouteRouteDestinationDestinationDeleteURL) Must(u *url.URL, err error) *url.URL { if err != nil { panic(err) } @@ -67,17 +70,17 @@ func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDURL) Must(u *url.U } // String returns the string representation of the path with query string -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDURL) String() string { +func (o *DataCocsnRoutesRouteRouteDestinationDestinationDeleteURL) String() string { return o.Must(o.Build()).String() } // BuildFull builds a full url with scheme, host, path and query string -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDURL) BuildFull(scheme, host string) (*url.URL, error) { +func (o *DataCocsnRoutesRouteRouteDestinationDestinationDeleteURL) BuildFull(scheme, host string) (*url.URL, error) { if scheme == "" { - return nil, errors.New("scheme is required for a full url on DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDURL") + return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationDestinationDeleteURL") } if host == "" { - return nil, errors.New("host is required for a full url on DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDURL") + return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationDestinationDeleteURL") } base, err := o.Build() @@ -91,6 +94,6 @@ func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDURL) BuildFull(sch } // StringFull returns the string representation of a complete url -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDURL) StringFull(scheme, host string) string { +func (o *DataCocsnRoutesRouteRouteDestinationDestinationDeleteURL) StringFull(scheme, host string) string { return o.Must(o.BuildFull(scheme, host)).String() } diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_patch.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_patch.go new file mode 100644 index 0000000000000000000000000000000000000000..5789ae9ea7d16cd9e28996a5506d94e21cc319ad --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_patch.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime/middleware" +) + +// DataCocsnRoutesRouteRouteDestinationDestinationPatchHandlerFunc turns a function with the right signature into a data cocsn routes route route destination destination patch handler +type DataCocsnRoutesRouteRouteDestinationDestinationPatchHandlerFunc func(DataCocsnRoutesRouteRouteDestinationDestinationPatchParams, interface{}) middleware.Responder + +// Handle executing the request and returning a response +func (fn DataCocsnRoutesRouteRouteDestinationDestinationPatchHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationDestinationPatchParams, principal interface{}) middleware.Responder { + return fn(params, principal) +} + +// DataCocsnRoutesRouteRouteDestinationDestinationPatchHandler interface for that can handle valid data cocsn routes route route destination destination patch params +type DataCocsnRoutesRouteRouteDestinationDestinationPatchHandler interface { + Handle(DataCocsnRoutesRouteRouteDestinationDestinationPatchParams, interface{}) middleware.Responder +} + +// NewDataCocsnRoutesRouteRouteDestinationDestinationPatch creates a new http.Handler for the data cocsn routes route route destination destination patch operation +func NewDataCocsnRoutesRouteRouteDestinationDestinationPatch(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationDestinationPatchHandler) *DataCocsnRoutesRouteRouteDestinationDestinationPatch { + return &DataCocsnRoutesRouteRouteDestinationDestinationPatch{Context: ctx, Handler: handler} +} + +/*DataCocsnRoutesRouteRouteDestinationDestinationPatch swagger:route PATCH /data/cocsn:routes/route={route-destination}/destination data patch dataCocsnRoutesRouteRouteDestinationDestinationPatch + +Route destination. IP network + +Route destination. IP network + +*/ +type DataCocsnRoutesRouteRouteDestinationDestinationPatch struct { + Context *middleware.Context + Handler DataCocsnRoutesRouteRouteDestinationDestinationPatchHandler +} + +func (o *DataCocsnRoutesRouteRouteDestinationDestinationPatch) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + route, rCtx, _ := o.Context.RouteInfo(r) + if rCtx != nil { + r = rCtx + } + var Params = NewDataCocsnRoutesRouteRouteDestinationDestinationPatchParams() + + uprinc, aCtx, err := o.Context.Authorize(r, route) + if err != nil { + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + if aCtx != nil { + r = aCtx + } + var principal interface{} + if uprinc != nil { + principal = uprinc + } + + if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + + res := o.Handler.Handle(Params, principal) // actually handle the request + + o.Context.Respond(rw, r, route.Produces, route, res) + +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_patch_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_patch_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..9953707e08576d7cd5b0a6431c3fc04167af544a --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_patch_parameters.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "io" + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/runtime/middleware" + "github.com/go-openapi/strfmt" + + "code.fbi.h-da.de/cocsn/cocsn-api/api/models" +) + +// NewDataCocsnRoutesRouteRouteDestinationDestinationPatchParams creates a new DataCocsnRoutesRouteRouteDestinationDestinationPatchParams object +// no default values defined in spec. +func NewDataCocsnRoutesRouteRouteDestinationDestinationPatchParams() DataCocsnRoutesRouteRouteDestinationDestinationPatchParams { + + return DataCocsnRoutesRouteRouteDestinationDestinationPatchParams{} +} + +// DataCocsnRoutesRouteRouteDestinationDestinationPatchParams contains all the bound params for the data cocsn routes route route destination destination patch operation +// typically these are obtained from a http.Request +// +// swagger:parameters data_cocsn_routes_route_route_destination_destination_patch +type DataCocsnRoutesRouteRouteDestinationDestinationPatchParams struct { + + // HTTP Request Object + HTTPRequest *http.Request `json:"-"` + + /*Route destination. IP network + Required: true + In: body + */ + Destination *models.DataCocsnRoutesRouteRouteDestinationDestination + /*Route destination. IP network + Required: true + In: path + */ + RouteDestination string +} + +// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface +// for simple values it will use straight method calls. +// +// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationDestinationPatchParams() beforehand. +func (o *DataCocsnRoutesRouteRouteDestinationDestinationPatchParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { + var res []error + + o.HTTPRequest = r + + if runtime.HasBody(r) { + defer r.Body.Close() + var body models.DataCocsnRoutesRouteRouteDestinationDestination + if err := route.Consumer.Consume(r.Body, &body); err != nil { + if err == io.EOF { + res = append(res, errors.Required("destination", "body", "")) + } else { + res = append(res, errors.NewParseError("destination", "body", "", err)) + } + } else { + // validate body object + if err := body.Validate(route.Formats); err != nil { + res = append(res, err) + } + + if len(res) == 0 { + o.Destination = &body + } + } + } else { + res = append(res, errors.Required("destination", "body", "")) + } + rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") + if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindRouteDestination binds and validates parameter RouteDestination from path. +func (o *DataCocsnRoutesRouteRouteDestinationDestinationPatchParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + + o.RouteDestination = raw + + return nil +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_patch_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_patch_responses.go new file mode 100644 index 0000000000000000000000000000000000000000..b923bb953803068f55ff0a6ed614b003bf8d1460 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_patch_responses.go @@ -0,0 +1,156 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime" +) + +// DataCocsnRoutesRouteRouteDestinationDestinationPatchNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDestinationPatchNoContent +const DataCocsnRoutesRouteRouteDestinationDestinationPatchNoContentCode int = 204 + +/*DataCocsnRoutesRouteRouteDestinationDestinationPatchNoContent leaf destination updated + +swagger:response dataCocsnRoutesRouteRouteDestinationDestinationPatchNoContent +*/ +type DataCocsnRoutesRouteRouteDestinationDestinationPatchNoContent struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationDestinationPatchNoContent creates DataCocsnRoutesRouteRouteDestinationDestinationPatchNoContent with default headers values +func NewDataCocsnRoutesRouteRouteDestinationDestinationPatchNoContent() *DataCocsnRoutesRouteRouteDestinationDestinationPatchNoContent { + + return &DataCocsnRoutesRouteRouteDestinationDestinationPatchNoContent{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationDestinationPatchNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(204) +} + +// DataCocsnRoutesRouteRouteDestinationDestinationPatchBadRequestCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDestinationPatchBadRequest +const DataCocsnRoutesRouteRouteDestinationDestinationPatchBadRequestCode int = 400 + +/*DataCocsnRoutesRouteRouteDestinationDestinationPatchBadRequest Bad Request + +swagger:response dataCocsnRoutesRouteRouteDestinationDestinationPatchBadRequest +*/ +type DataCocsnRoutesRouteRouteDestinationDestinationPatchBadRequest struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationDestinationPatchBadRequest creates DataCocsnRoutesRouteRouteDestinationDestinationPatchBadRequest with default headers values +func NewDataCocsnRoutesRouteRouteDestinationDestinationPatchBadRequest() *DataCocsnRoutesRouteRouteDestinationDestinationPatchBadRequest { + + return &DataCocsnRoutesRouteRouteDestinationDestinationPatchBadRequest{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationDestinationPatchBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(400) +} + +// DataCocsnRoutesRouteRouteDestinationDestinationPatchUnauthorizedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDestinationPatchUnauthorized +const DataCocsnRoutesRouteRouteDestinationDestinationPatchUnauthorizedCode int = 401 + +/*DataCocsnRoutesRouteRouteDestinationDestinationPatchUnauthorized Unauthorized + +swagger:response dataCocsnRoutesRouteRouteDestinationDestinationPatchUnauthorized +*/ +type DataCocsnRoutesRouteRouteDestinationDestinationPatchUnauthorized struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationDestinationPatchUnauthorized creates DataCocsnRoutesRouteRouteDestinationDestinationPatchUnauthorized with default headers values +func NewDataCocsnRoutesRouteRouteDestinationDestinationPatchUnauthorized() *DataCocsnRoutesRouteRouteDestinationDestinationPatchUnauthorized { + + return &DataCocsnRoutesRouteRouteDestinationDestinationPatchUnauthorized{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationDestinationPatchUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(401) +} + +// DataCocsnRoutesRouteRouteDestinationDestinationPatchNotFoundCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDestinationPatchNotFound +const DataCocsnRoutesRouteRouteDestinationDestinationPatchNotFoundCode int = 404 + +/*DataCocsnRoutesRouteRouteDestinationDestinationPatchNotFound Not Found + +swagger:response dataCocsnRoutesRouteRouteDestinationDestinationPatchNotFound +*/ +type DataCocsnRoutesRouteRouteDestinationDestinationPatchNotFound struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationDestinationPatchNotFound creates DataCocsnRoutesRouteRouteDestinationDestinationPatchNotFound with default headers values +func NewDataCocsnRoutesRouteRouteDestinationDestinationPatchNotFound() *DataCocsnRoutesRouteRouteDestinationDestinationPatchNotFound { + + return &DataCocsnRoutesRouteRouteDestinationDestinationPatchNotFound{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationDestinationPatchNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(404) +} + +// DataCocsnRoutesRouteRouteDestinationDestinationPatchMethodNotAllowedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDestinationPatchMethodNotAllowed +const DataCocsnRoutesRouteRouteDestinationDestinationPatchMethodNotAllowedCode int = 405 + +/*DataCocsnRoutesRouteRouteDestinationDestinationPatchMethodNotAllowed Method Not Allowed + +swagger:response dataCocsnRoutesRouteRouteDestinationDestinationPatchMethodNotAllowed +*/ +type DataCocsnRoutesRouteRouteDestinationDestinationPatchMethodNotAllowed struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationDestinationPatchMethodNotAllowed creates DataCocsnRoutesRouteRouteDestinationDestinationPatchMethodNotAllowed with default headers values +func NewDataCocsnRoutesRouteRouteDestinationDestinationPatchMethodNotAllowed() *DataCocsnRoutesRouteRouteDestinationDestinationPatchMethodNotAllowed { + + return &DataCocsnRoutesRouteRouteDestinationDestinationPatchMethodNotAllowed{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationDestinationPatchMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(405) +} + +// DataCocsnRoutesRouteRouteDestinationDestinationPatchConflictCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDestinationPatchConflict +const DataCocsnRoutesRouteRouteDestinationDestinationPatchConflictCode int = 409 + +/*DataCocsnRoutesRouteRouteDestinationDestinationPatchConflict Conflict + +swagger:response dataCocsnRoutesRouteRouteDestinationDestinationPatchConflict +*/ +type DataCocsnRoutesRouteRouteDestinationDestinationPatchConflict struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationDestinationPatchConflict creates DataCocsnRoutesRouteRouteDestinationDestinationPatchConflict with default headers values +func NewDataCocsnRoutesRouteRouteDestinationDestinationPatchConflict() *DataCocsnRoutesRouteRouteDestinationDestinationPatchConflict { + + return &DataCocsnRoutesRouteRouteDestinationDestinationPatchConflict{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationDestinationPatchConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(409) +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_patch_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_patch_urlbuilder.go new file mode 100644 index 0000000000000000000000000000000000000000..0a348f2ad9e344883fdfb0de19992ee95f234dbb --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_patch_urlbuilder.go @@ -0,0 +1,99 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "errors" + "net/url" + golangswaggerpaths "path" + "strings" +) + +// DataCocsnRoutesRouteRouteDestinationDestinationPatchURL generates an URL for the data cocsn routes route route destination destination patch operation +type DataCocsnRoutesRouteRouteDestinationDestinationPatchURL struct { + RouteDestination string + + _basePath string + // avoid unkeyed usage + _ struct{} +} + +// WithBasePath sets the base path for this url builder, only required when it's different from the +// base path specified in the swagger spec. +// When the value of the base path is an empty string +func (o *DataCocsnRoutesRouteRouteDestinationDestinationPatchURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationDestinationPatchURL { + o.SetBasePath(bp) + return o +} + +// SetBasePath sets the base path for this url builder, only required when it's different from the +// base path specified in the swagger spec. +// When the value of the base path is an empty string +func (o *DataCocsnRoutesRouteRouteDestinationDestinationPatchURL) SetBasePath(bp string) { + o._basePath = bp +} + +// Build a url path and query string +func (o *DataCocsnRoutesRouteRouteDestinationDestinationPatchURL) Build() (*url.URL, error) { + var _result url.URL + + var _path = "/data/cocsn:routes/route={route-destination}/destination" + + routeDestination := o.RouteDestination + if routeDestination != "" { + _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) + } else { + return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationDestinationPatchURL") + } + + _basePath := o._basePath + if _basePath == "" { + _basePath = "/restconf" + } + _result.Path = golangswaggerpaths.Join(_basePath, _path) + + return &_result, nil +} + +// Must is a helper function to panic when the url builder returns an error +func (o *DataCocsnRoutesRouteRouteDestinationDestinationPatchURL) Must(u *url.URL, err error) *url.URL { + if err != nil { + panic(err) + } + if u == nil { + panic("url can't be nil") + } + return u +} + +// String returns the string representation of the path with query string +func (o *DataCocsnRoutesRouteRouteDestinationDestinationPatchURL) String() string { + return o.Must(o.Build()).String() +} + +// BuildFull builds a full url with scheme, host, path and query string +func (o *DataCocsnRoutesRouteRouteDestinationDestinationPatchURL) BuildFull(scheme, host string) (*url.URL, error) { + if scheme == "" { + return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationDestinationPatchURL") + } + if host == "" { + return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationDestinationPatchURL") + } + + base, err := o.Build() + if err != nil { + return nil, err + } + + base.Scheme = scheme + base.Host = host + return base, nil +} + +// StringFull returns the string representation of a complete url +func (o *DataCocsnRoutesRouteRouteDestinationDestinationPatchURL) StringFull(scheme, host string) string { + return o.Must(o.BuildFull(scheme, host)).String() +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_put.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_put.go new file mode 100644 index 0000000000000000000000000000000000000000..3adb78688a0e241e7591c3f2f5590c27c5f375bf --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_put.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime/middleware" +) + +// DataCocsnRoutesRouteRouteDestinationDestinationPutHandlerFunc turns a function with the right signature into a data cocsn routes route route destination destination put handler +type DataCocsnRoutesRouteRouteDestinationDestinationPutHandlerFunc func(DataCocsnRoutesRouteRouteDestinationDestinationPutParams, interface{}) middleware.Responder + +// Handle executing the request and returning a response +func (fn DataCocsnRoutesRouteRouteDestinationDestinationPutHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationDestinationPutParams, principal interface{}) middleware.Responder { + return fn(params, principal) +} + +// DataCocsnRoutesRouteRouteDestinationDestinationPutHandler interface for that can handle valid data cocsn routes route route destination destination put params +type DataCocsnRoutesRouteRouteDestinationDestinationPutHandler interface { + Handle(DataCocsnRoutesRouteRouteDestinationDestinationPutParams, interface{}) middleware.Responder +} + +// NewDataCocsnRoutesRouteRouteDestinationDestinationPut creates a new http.Handler for the data cocsn routes route route destination destination put operation +func NewDataCocsnRoutesRouteRouteDestinationDestinationPut(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationDestinationPutHandler) *DataCocsnRoutesRouteRouteDestinationDestinationPut { + return &DataCocsnRoutesRouteRouteDestinationDestinationPut{Context: ctx, Handler: handler} +} + +/*DataCocsnRoutesRouteRouteDestinationDestinationPut swagger:route PUT /data/cocsn:routes/route={route-destination}/destination data put dataCocsnRoutesRouteRouteDestinationDestinationPut + +Route destination. IP network + +Route destination. IP network + +*/ +type DataCocsnRoutesRouteRouteDestinationDestinationPut struct { + Context *middleware.Context + Handler DataCocsnRoutesRouteRouteDestinationDestinationPutHandler +} + +func (o *DataCocsnRoutesRouteRouteDestinationDestinationPut) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + route, rCtx, _ := o.Context.RouteInfo(r) + if rCtx != nil { + r = rCtx + } + var Params = NewDataCocsnRoutesRouteRouteDestinationDestinationPutParams() + + uprinc, aCtx, err := o.Context.Authorize(r, route) + if err != nil { + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + if aCtx != nil { + r = aCtx + } + var principal interface{} + if uprinc != nil { + principal = uprinc + } + + if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + + res := o.Handler.Handle(Params, principal) // actually handle the request + + o.Context.Respond(rw, r, route.Produces, route, res) + +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_put_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_put_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..67abe9068a2a51ec7e3dfa2b6476d9a6bbe90fd8 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_put_parameters.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "io" + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/runtime/middleware" + "github.com/go-openapi/strfmt" + + "code.fbi.h-da.de/cocsn/cocsn-api/api/models" +) + +// NewDataCocsnRoutesRouteRouteDestinationDestinationPutParams creates a new DataCocsnRoutesRouteRouteDestinationDestinationPutParams object +// no default values defined in spec. +func NewDataCocsnRoutesRouteRouteDestinationDestinationPutParams() DataCocsnRoutesRouteRouteDestinationDestinationPutParams { + + return DataCocsnRoutesRouteRouteDestinationDestinationPutParams{} +} + +// DataCocsnRoutesRouteRouteDestinationDestinationPutParams contains all the bound params for the data cocsn routes route route destination destination put operation +// typically these are obtained from a http.Request +// +// swagger:parameters data_cocsn_routes_route_route_destination_destination_put +type DataCocsnRoutesRouteRouteDestinationDestinationPutParams struct { + + // HTTP Request Object + HTTPRequest *http.Request `json:"-"` + + /*Route destination. IP network + Required: true + In: body + */ + Destination *models.DataCocsnRoutesRouteRouteDestinationDestination + /*Route destination. IP network + Required: true + In: path + */ + RouteDestination string +} + +// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface +// for simple values it will use straight method calls. +// +// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationDestinationPutParams() beforehand. +func (o *DataCocsnRoutesRouteRouteDestinationDestinationPutParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { + var res []error + + o.HTTPRequest = r + + if runtime.HasBody(r) { + defer r.Body.Close() + var body models.DataCocsnRoutesRouteRouteDestinationDestination + if err := route.Consumer.Consume(r.Body, &body); err != nil { + if err == io.EOF { + res = append(res, errors.Required("destination", "body", "")) + } else { + res = append(res, errors.NewParseError("destination", "body", "", err)) + } + } else { + // validate body object + if err := body.Validate(route.Formats); err != nil { + res = append(res, err) + } + + if len(res) == 0 { + o.Destination = &body + } + } + } else { + res = append(res, errors.Required("destination", "body", "")) + } + rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") + if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindRouteDestination binds and validates parameter RouteDestination from path. +func (o *DataCocsnRoutesRouteRouteDestinationDestinationPutParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + + o.RouteDestination = raw + + return nil +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_put_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_put_responses.go new file mode 100644 index 0000000000000000000000000000000000000000..bfe9de053765d2db83a46e5b4c79af275952641f --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_put_responses.go @@ -0,0 +1,180 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime" +) + +// DataCocsnRoutesRouteRouteDestinationDestinationPutCreatedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDestinationPutCreated +const DataCocsnRoutesRouteRouteDestinationDestinationPutCreatedCode int = 201 + +/*DataCocsnRoutesRouteRouteDestinationDestinationPutCreated leaf destination created or replaced + +swagger:response dataCocsnRoutesRouteRouteDestinationDestinationPutCreated +*/ +type DataCocsnRoutesRouteRouteDestinationDestinationPutCreated struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationDestinationPutCreated creates DataCocsnRoutesRouteRouteDestinationDestinationPutCreated with default headers values +func NewDataCocsnRoutesRouteRouteDestinationDestinationPutCreated() *DataCocsnRoutesRouteRouteDestinationDestinationPutCreated { + + return &DataCocsnRoutesRouteRouteDestinationDestinationPutCreated{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationDestinationPutCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(201) +} + +// DataCocsnRoutesRouteRouteDestinationDestinationPutNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDestinationPutNoContent +const DataCocsnRoutesRouteRouteDestinationDestinationPutNoContentCode int = 204 + +/*DataCocsnRoutesRouteRouteDestinationDestinationPutNoContent No Content + +swagger:response dataCocsnRoutesRouteRouteDestinationDestinationPutNoContent +*/ +type DataCocsnRoutesRouteRouteDestinationDestinationPutNoContent struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationDestinationPutNoContent creates DataCocsnRoutesRouteRouteDestinationDestinationPutNoContent with default headers values +func NewDataCocsnRoutesRouteRouteDestinationDestinationPutNoContent() *DataCocsnRoutesRouteRouteDestinationDestinationPutNoContent { + + return &DataCocsnRoutesRouteRouteDestinationDestinationPutNoContent{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationDestinationPutNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(204) +} + +// DataCocsnRoutesRouteRouteDestinationDestinationPutBadRequestCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDestinationPutBadRequest +const DataCocsnRoutesRouteRouteDestinationDestinationPutBadRequestCode int = 400 + +/*DataCocsnRoutesRouteRouteDestinationDestinationPutBadRequest Bad Request + +swagger:response dataCocsnRoutesRouteRouteDestinationDestinationPutBadRequest +*/ +type DataCocsnRoutesRouteRouteDestinationDestinationPutBadRequest struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationDestinationPutBadRequest creates DataCocsnRoutesRouteRouteDestinationDestinationPutBadRequest with default headers values +func NewDataCocsnRoutesRouteRouteDestinationDestinationPutBadRequest() *DataCocsnRoutesRouteRouteDestinationDestinationPutBadRequest { + + return &DataCocsnRoutesRouteRouteDestinationDestinationPutBadRequest{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationDestinationPutBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(400) +} + +// DataCocsnRoutesRouteRouteDestinationDestinationPutUnauthorizedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDestinationPutUnauthorized +const DataCocsnRoutesRouteRouteDestinationDestinationPutUnauthorizedCode int = 401 + +/*DataCocsnRoutesRouteRouteDestinationDestinationPutUnauthorized Unauthorized + +swagger:response dataCocsnRoutesRouteRouteDestinationDestinationPutUnauthorized +*/ +type DataCocsnRoutesRouteRouteDestinationDestinationPutUnauthorized struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationDestinationPutUnauthorized creates DataCocsnRoutesRouteRouteDestinationDestinationPutUnauthorized with default headers values +func NewDataCocsnRoutesRouteRouteDestinationDestinationPutUnauthorized() *DataCocsnRoutesRouteRouteDestinationDestinationPutUnauthorized { + + return &DataCocsnRoutesRouteRouteDestinationDestinationPutUnauthorized{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationDestinationPutUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(401) +} + +// DataCocsnRoutesRouteRouteDestinationDestinationPutNotFoundCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDestinationPutNotFound +const DataCocsnRoutesRouteRouteDestinationDestinationPutNotFoundCode int = 404 + +/*DataCocsnRoutesRouteRouteDestinationDestinationPutNotFound Not Found + +swagger:response dataCocsnRoutesRouteRouteDestinationDestinationPutNotFound +*/ +type DataCocsnRoutesRouteRouteDestinationDestinationPutNotFound struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationDestinationPutNotFound creates DataCocsnRoutesRouteRouteDestinationDestinationPutNotFound with default headers values +func NewDataCocsnRoutesRouteRouteDestinationDestinationPutNotFound() *DataCocsnRoutesRouteRouteDestinationDestinationPutNotFound { + + return &DataCocsnRoutesRouteRouteDestinationDestinationPutNotFound{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationDestinationPutNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(404) +} + +// DataCocsnRoutesRouteRouteDestinationDestinationPutMethodNotAllowedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDestinationPutMethodNotAllowed +const DataCocsnRoutesRouteRouteDestinationDestinationPutMethodNotAllowedCode int = 405 + +/*DataCocsnRoutesRouteRouteDestinationDestinationPutMethodNotAllowed Method Not Allowed + +swagger:response dataCocsnRoutesRouteRouteDestinationDestinationPutMethodNotAllowed +*/ +type DataCocsnRoutesRouteRouteDestinationDestinationPutMethodNotAllowed struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationDestinationPutMethodNotAllowed creates DataCocsnRoutesRouteRouteDestinationDestinationPutMethodNotAllowed with default headers values +func NewDataCocsnRoutesRouteRouteDestinationDestinationPutMethodNotAllowed() *DataCocsnRoutesRouteRouteDestinationDestinationPutMethodNotAllowed { + + return &DataCocsnRoutesRouteRouteDestinationDestinationPutMethodNotAllowed{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationDestinationPutMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(405) +} + +// DataCocsnRoutesRouteRouteDestinationDestinationPutConflictCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationDestinationPutConflict +const DataCocsnRoutesRouteRouteDestinationDestinationPutConflictCode int = 409 + +/*DataCocsnRoutesRouteRouteDestinationDestinationPutConflict Conflict + +swagger:response dataCocsnRoutesRouteRouteDestinationDestinationPutConflict +*/ +type DataCocsnRoutesRouteRouteDestinationDestinationPutConflict struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationDestinationPutConflict creates DataCocsnRoutesRouteRouteDestinationDestinationPutConflict with default headers values +func NewDataCocsnRoutesRouteRouteDestinationDestinationPutConflict() *DataCocsnRoutesRouteRouteDestinationDestinationPutConflict { + + return &DataCocsnRoutesRouteRouteDestinationDestinationPutConflict{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationDestinationPutConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(409) +} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_id_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_put_urlbuilder.go similarity index 55% rename from waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_id_urlbuilder.go rename to api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_put_urlbuilder.go index 71e6c552a22d6b7ee9326e4ba04fe1a531a799f7..3d4adf9d3c926b579b66761bedd6266145b52b8c 100644 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_id_urlbuilder.go +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_destination_put_urlbuilder.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package ciena_waveserver_interfaces +package data // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the generate command @@ -12,9 +12,9 @@ import ( "strings" ) -// PutDataWaveserverInterfacesPhysicalInterfaceNameIDURL generates an URL for the put data waveserver interfaces physical interface name ID operation -type PutDataWaveserverInterfacesPhysicalInterfaceNameIDURL struct { - Name string +// DataCocsnRoutesRouteRouteDestinationDestinationPutURL generates an URL for the data cocsn routes route route destination destination put operation +type DataCocsnRoutesRouteRouteDestinationDestinationPutURL struct { + RouteDestination string _basePath string // avoid unkeyed usage @@ -24,7 +24,7 @@ type PutDataWaveserverInterfacesPhysicalInterfaceNameIDURL struct { // WithBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameIDURL) WithBasePath(bp string) *PutDataWaveserverInterfacesPhysicalInterfaceNameIDURL { +func (o *DataCocsnRoutesRouteRouteDestinationDestinationPutURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationDestinationPutURL { o.SetBasePath(bp) return o } @@ -32,31 +32,34 @@ func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameIDURL) WithBasePath(bp // SetBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameIDURL) SetBasePath(bp string) { +func (o *DataCocsnRoutesRouteRouteDestinationDestinationPutURL) SetBasePath(bp string) { o._basePath = bp } // Build a url path and query string -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameIDURL) Build() (*url.URL, error) { +func (o *DataCocsnRoutesRouteRouteDestinationDestinationPutURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/data/waveserver-interfaces/physical-interface={name}/id/" + var _path = "/data/cocsn:routes/route={route-destination}/destination" - name := o.Name - if name != "" { - _path = strings.Replace(_path, "{name}", name, -1) + routeDestination := o.RouteDestination + if routeDestination != "" { + _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) } else { - return nil, errors.New("name is required on PutDataWaveserverInterfacesPhysicalInterfaceNameIDURL") + return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationDestinationPutURL") } _basePath := o._basePath + if _basePath == "" { + _basePath = "/restconf" + } _result.Path = golangswaggerpaths.Join(_basePath, _path) return &_result, nil } // Must is a helper function to panic when the url builder returns an error -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameIDURL) Must(u *url.URL, err error) *url.URL { +func (o *DataCocsnRoutesRouteRouteDestinationDestinationPutURL) Must(u *url.URL, err error) *url.URL { if err != nil { panic(err) } @@ -67,17 +70,17 @@ func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameIDURL) Must(u *url.URL, } // String returns the string representation of the path with query string -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameIDURL) String() string { +func (o *DataCocsnRoutesRouteRouteDestinationDestinationPutURL) String() string { return o.Must(o.Build()).String() } // BuildFull builds a full url with scheme, host, path and query string -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameIDURL) BuildFull(scheme, host string) (*url.URL, error) { +func (o *DataCocsnRoutesRouteRouteDestinationDestinationPutURL) BuildFull(scheme, host string) (*url.URL, error) { if scheme == "" { - return nil, errors.New("scheme is required for a full url on PutDataWaveserverInterfacesPhysicalInterfaceNameIDURL") + return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationDestinationPutURL") } if host == "" { - return nil, errors.New("host is required for a full url on PutDataWaveserverInterfacesPhysicalInterfaceNameIDURL") + return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationDestinationPutURL") } base, err := o.Build() @@ -91,6 +94,6 @@ func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameIDURL) BuildFull(scheme } // StringFull returns the string representation of a complete url -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameIDURL) StringFull(scheme, host string) string { +func (o *DataCocsnRoutesRouteRouteDestinationDestinationPutURL) StringFull(scheme, host string) string { return o.Must(o.BuildFull(scheme, host)).String() } diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_delete.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_delete.go new file mode 100644 index 0000000000000000000000000000000000000000..c7631df3eff57cbcdfc4f5cf549a7612efa56bbd --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_delete.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime/middleware" +) + +// DataCocsnRoutesRouteRouteDestinationExpireDeleteHandlerFunc turns a function with the right signature into a data cocsn routes route route destination expire delete handler +type DataCocsnRoutesRouteRouteDestinationExpireDeleteHandlerFunc func(DataCocsnRoutesRouteRouteDestinationExpireDeleteParams, interface{}) middleware.Responder + +// Handle executing the request and returning a response +func (fn DataCocsnRoutesRouteRouteDestinationExpireDeleteHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationExpireDeleteParams, principal interface{}) middleware.Responder { + return fn(params, principal) +} + +// DataCocsnRoutesRouteRouteDestinationExpireDeleteHandler interface for that can handle valid data cocsn routes route route destination expire delete params +type DataCocsnRoutesRouteRouteDestinationExpireDeleteHandler interface { + Handle(DataCocsnRoutesRouteRouteDestinationExpireDeleteParams, interface{}) middleware.Responder +} + +// NewDataCocsnRoutesRouteRouteDestinationExpireDelete creates a new http.Handler for the data cocsn routes route route destination expire delete operation +func NewDataCocsnRoutesRouteRouteDestinationExpireDelete(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationExpireDeleteHandler) *DataCocsnRoutesRouteRouteDestinationExpireDelete { + return &DataCocsnRoutesRouteRouteDestinationExpireDelete{Context: ctx, Handler: handler} +} + +/*DataCocsnRoutesRouteRouteDestinationExpireDelete swagger:route DELETE /data/cocsn:routes/route={route-destination}/expire data delete dataCocsnRoutesRouteRouteDestinationExpireDelete + +Expiration timer of the route + +Expiration timer of the route + +*/ +type DataCocsnRoutesRouteRouteDestinationExpireDelete struct { + Context *middleware.Context + Handler DataCocsnRoutesRouteRouteDestinationExpireDeleteHandler +} + +func (o *DataCocsnRoutesRouteRouteDestinationExpireDelete) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + route, rCtx, _ := o.Context.RouteInfo(r) + if rCtx != nil { + r = rCtx + } + var Params = NewDataCocsnRoutesRouteRouteDestinationExpireDeleteParams() + + uprinc, aCtx, err := o.Context.Authorize(r, route) + if err != nil { + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + if aCtx != nil { + r = aCtx + } + var principal interface{} + if uprinc != nil { + principal = uprinc + } + + if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + + res := o.Handler.Handle(Params, principal) // actually handle the request + + o.Context.Respond(rw, r, route.Produces, route, res) + +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_delete_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_delete_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..0ec95071a7c8093f2e802147b22c3733d5d309b4 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_delete_parameters.go @@ -0,0 +1,72 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime/middleware" + "github.com/go-openapi/strfmt" +) + +// NewDataCocsnRoutesRouteRouteDestinationExpireDeleteParams creates a new DataCocsnRoutesRouteRouteDestinationExpireDeleteParams object +// no default values defined in spec. +func NewDataCocsnRoutesRouteRouteDestinationExpireDeleteParams() DataCocsnRoutesRouteRouteDestinationExpireDeleteParams { + + return DataCocsnRoutesRouteRouteDestinationExpireDeleteParams{} +} + +// DataCocsnRoutesRouteRouteDestinationExpireDeleteParams contains all the bound params for the data cocsn routes route route destination expire delete operation +// typically these are obtained from a http.Request +// +// swagger:parameters data_cocsn_routes_route_route_destination_expire_delete +type DataCocsnRoutesRouteRouteDestinationExpireDeleteParams struct { + + // HTTP Request Object + HTTPRequest *http.Request `json:"-"` + + /*Route destination. IP network + Required: true + In: path + */ + RouteDestination string +} + +// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface +// for simple values it will use straight method calls. +// +// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationExpireDeleteParams() beforehand. +func (o *DataCocsnRoutesRouteRouteDestinationExpireDeleteParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { + var res []error + + o.HTTPRequest = r + + rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") + if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindRouteDestination binds and validates parameter RouteDestination from path. +func (o *DataCocsnRoutesRouteRouteDestinationExpireDeleteParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + + o.RouteDestination = raw + + return nil +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_delete_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_delete_responses.go new file mode 100644 index 0000000000000000000000000000000000000000..17c46fe740ade6f13bbaa8c190c16d268fa7a440 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_delete_responses.go @@ -0,0 +1,36 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime" +) + +// DataCocsnRoutesRouteRouteDestinationExpireDeleteNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationExpireDeleteNoContent +const DataCocsnRoutesRouteRouteDestinationExpireDeleteNoContentCode int = 204 + +/*DataCocsnRoutesRouteRouteDestinationExpireDeleteNoContent No Content + +swagger:response dataCocsnRoutesRouteRouteDestinationExpireDeleteNoContent +*/ +type DataCocsnRoutesRouteRouteDestinationExpireDeleteNoContent struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationExpireDeleteNoContent creates DataCocsnRoutesRouteRouteDestinationExpireDeleteNoContent with default headers values +func NewDataCocsnRoutesRouteRouteDestinationExpireDeleteNoContent() *DataCocsnRoutesRouteRouteDestinationExpireDeleteNoContent { + + return &DataCocsnRoutesRouteRouteDestinationExpireDeleteNoContent{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationExpireDeleteNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(204) +} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_delete_urlbuilder.go similarity index 56% rename from waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_urlbuilder.go rename to api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_delete_urlbuilder.go index 119b7267bd828dc11c24840e4c030703e58f0f34..92aaca1bc8a9fad9f0405a29a8abc103cfac62c0 100644 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_urlbuilder.go +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_delete_urlbuilder.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package ciena_waveserver_interfaces +package data // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the generate command @@ -12,9 +12,9 @@ import ( "strings" ) -// GetDataWaveserverInterfacesPhysicalInterfaceNameURL generates an URL for the get data waveserver interfaces physical interface name operation -type GetDataWaveserverInterfacesPhysicalInterfaceNameURL struct { - Name string +// DataCocsnRoutesRouteRouteDestinationExpireDeleteURL generates an URL for the data cocsn routes route route destination expire delete operation +type DataCocsnRoutesRouteRouteDestinationExpireDeleteURL struct { + RouteDestination string _basePath string // avoid unkeyed usage @@ -24,7 +24,7 @@ type GetDataWaveserverInterfacesPhysicalInterfaceNameURL struct { // WithBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameURL) WithBasePath(bp string) *GetDataWaveserverInterfacesPhysicalInterfaceNameURL { +func (o *DataCocsnRoutesRouteRouteDestinationExpireDeleteURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationExpireDeleteURL { o.SetBasePath(bp) return o } @@ -32,31 +32,34 @@ func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameURL) WithBasePath(bp st // SetBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameURL) SetBasePath(bp string) { +func (o *DataCocsnRoutesRouteRouteDestinationExpireDeleteURL) SetBasePath(bp string) { o._basePath = bp } // Build a url path and query string -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameURL) Build() (*url.URL, error) { +func (o *DataCocsnRoutesRouteRouteDestinationExpireDeleteURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/data/waveserver-interfaces/physical-interface={name}/" + var _path = "/data/cocsn:routes/route={route-destination}/expire" - name := o.Name - if name != "" { - _path = strings.Replace(_path, "{name}", name, -1) + routeDestination := o.RouteDestination + if routeDestination != "" { + _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) } else { - return nil, errors.New("name is required on GetDataWaveserverInterfacesPhysicalInterfaceNameURL") + return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationExpireDeleteURL") } _basePath := o._basePath + if _basePath == "" { + _basePath = "/restconf" + } _result.Path = golangswaggerpaths.Join(_basePath, _path) return &_result, nil } // Must is a helper function to panic when the url builder returns an error -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameURL) Must(u *url.URL, err error) *url.URL { +func (o *DataCocsnRoutesRouteRouteDestinationExpireDeleteURL) Must(u *url.URL, err error) *url.URL { if err != nil { panic(err) } @@ -67,17 +70,17 @@ func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameURL) Must(u *url.URL, e } // String returns the string representation of the path with query string -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameURL) String() string { +func (o *DataCocsnRoutesRouteRouteDestinationExpireDeleteURL) String() string { return o.Must(o.Build()).String() } // BuildFull builds a full url with scheme, host, path and query string -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameURL) BuildFull(scheme, host string) (*url.URL, error) { +func (o *DataCocsnRoutesRouteRouteDestinationExpireDeleteURL) BuildFull(scheme, host string) (*url.URL, error) { if scheme == "" { - return nil, errors.New("scheme is required for a full url on GetDataWaveserverInterfacesPhysicalInterfaceNameURL") + return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationExpireDeleteURL") } if host == "" { - return nil, errors.New("host is required for a full url on GetDataWaveserverInterfacesPhysicalInterfaceNameURL") + return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationExpireDeleteURL") } base, err := o.Build() @@ -91,6 +94,6 @@ func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameURL) BuildFull(scheme, } // StringFull returns the string representation of a complete url -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameURL) StringFull(scheme, host string) string { +func (o *DataCocsnRoutesRouteRouteDestinationExpireDeleteURL) StringFull(scheme, host string) string { return o.Must(o.BuildFull(scheme, host)).String() } diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_patch.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_patch.go new file mode 100644 index 0000000000000000000000000000000000000000..0dffb69f478e04662d005365128d03aaf536735b --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_patch.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime/middleware" +) + +// DataCocsnRoutesRouteRouteDestinationExpirePatchHandlerFunc turns a function with the right signature into a data cocsn routes route route destination expire patch handler +type DataCocsnRoutesRouteRouteDestinationExpirePatchHandlerFunc func(DataCocsnRoutesRouteRouteDestinationExpirePatchParams, interface{}) middleware.Responder + +// Handle executing the request and returning a response +func (fn DataCocsnRoutesRouteRouteDestinationExpirePatchHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationExpirePatchParams, principal interface{}) middleware.Responder { + return fn(params, principal) +} + +// DataCocsnRoutesRouteRouteDestinationExpirePatchHandler interface for that can handle valid data cocsn routes route route destination expire patch params +type DataCocsnRoutesRouteRouteDestinationExpirePatchHandler interface { + Handle(DataCocsnRoutesRouteRouteDestinationExpirePatchParams, interface{}) middleware.Responder +} + +// NewDataCocsnRoutesRouteRouteDestinationExpirePatch creates a new http.Handler for the data cocsn routes route route destination expire patch operation +func NewDataCocsnRoutesRouteRouteDestinationExpirePatch(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationExpirePatchHandler) *DataCocsnRoutesRouteRouteDestinationExpirePatch { + return &DataCocsnRoutesRouteRouteDestinationExpirePatch{Context: ctx, Handler: handler} +} + +/*DataCocsnRoutesRouteRouteDestinationExpirePatch swagger:route PATCH /data/cocsn:routes/route={route-destination}/expire data patch dataCocsnRoutesRouteRouteDestinationExpirePatch + +Expiration timer of the route + +Expiration timer of the route + +*/ +type DataCocsnRoutesRouteRouteDestinationExpirePatch struct { + Context *middleware.Context + Handler DataCocsnRoutesRouteRouteDestinationExpirePatchHandler +} + +func (o *DataCocsnRoutesRouteRouteDestinationExpirePatch) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + route, rCtx, _ := o.Context.RouteInfo(r) + if rCtx != nil { + r = rCtx + } + var Params = NewDataCocsnRoutesRouteRouteDestinationExpirePatchParams() + + uprinc, aCtx, err := o.Context.Authorize(r, route) + if err != nil { + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + if aCtx != nil { + r = aCtx + } + var principal interface{} + if uprinc != nil { + principal = uprinc + } + + if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + + res := o.Handler.Handle(Params, principal) // actually handle the request + + o.Context.Respond(rw, r, route.Produces, route, res) + +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_patch_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_patch_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..bf1c07f865d3e18ec67f9019644447c96cf3c1f9 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_patch_parameters.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "io" + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/runtime/middleware" + "github.com/go-openapi/strfmt" + + "code.fbi.h-da.de/cocsn/cocsn-api/api/models" +) + +// NewDataCocsnRoutesRouteRouteDestinationExpirePatchParams creates a new DataCocsnRoutesRouteRouteDestinationExpirePatchParams object +// no default values defined in spec. +func NewDataCocsnRoutesRouteRouteDestinationExpirePatchParams() DataCocsnRoutesRouteRouteDestinationExpirePatchParams { + + return DataCocsnRoutesRouteRouteDestinationExpirePatchParams{} +} + +// DataCocsnRoutesRouteRouteDestinationExpirePatchParams contains all the bound params for the data cocsn routes route route destination expire patch operation +// typically these are obtained from a http.Request +// +// swagger:parameters data_cocsn_routes_route_route_destination_expire_patch +type DataCocsnRoutesRouteRouteDestinationExpirePatchParams struct { + + // HTTP Request Object + HTTPRequest *http.Request `json:"-"` + + /*Expiration timer of the route + Required: true + In: body + */ + Expire *models.DataCocsnRoutesRouteRouteDestinationExpire + /*Route destination. IP network + Required: true + In: path + */ + RouteDestination string +} + +// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface +// for simple values it will use straight method calls. +// +// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationExpirePatchParams() beforehand. +func (o *DataCocsnRoutesRouteRouteDestinationExpirePatchParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { + var res []error + + o.HTTPRequest = r + + if runtime.HasBody(r) { + defer r.Body.Close() + var body models.DataCocsnRoutesRouteRouteDestinationExpire + if err := route.Consumer.Consume(r.Body, &body); err != nil { + if err == io.EOF { + res = append(res, errors.Required("expire", "body", "")) + } else { + res = append(res, errors.NewParseError("expire", "body", "", err)) + } + } else { + // validate body object + if err := body.Validate(route.Formats); err != nil { + res = append(res, err) + } + + if len(res) == 0 { + o.Expire = &body + } + } + } else { + res = append(res, errors.Required("expire", "body", "")) + } + rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") + if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindRouteDestination binds and validates parameter RouteDestination from path. +func (o *DataCocsnRoutesRouteRouteDestinationExpirePatchParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + + o.RouteDestination = raw + + return nil +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_patch_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_patch_responses.go new file mode 100644 index 0000000000000000000000000000000000000000..8ee95f6c1afbd92d7bbfebf2ff7abd157e0ff282 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_patch_responses.go @@ -0,0 +1,156 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime" +) + +// DataCocsnRoutesRouteRouteDestinationExpirePatchNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationExpirePatchNoContent +const DataCocsnRoutesRouteRouteDestinationExpirePatchNoContentCode int = 204 + +/*DataCocsnRoutesRouteRouteDestinationExpirePatchNoContent leaf expire updated + +swagger:response dataCocsnRoutesRouteRouteDestinationExpirePatchNoContent +*/ +type DataCocsnRoutesRouteRouteDestinationExpirePatchNoContent struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationExpirePatchNoContent creates DataCocsnRoutesRouteRouteDestinationExpirePatchNoContent with default headers values +func NewDataCocsnRoutesRouteRouteDestinationExpirePatchNoContent() *DataCocsnRoutesRouteRouteDestinationExpirePatchNoContent { + + return &DataCocsnRoutesRouteRouteDestinationExpirePatchNoContent{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationExpirePatchNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(204) +} + +// DataCocsnRoutesRouteRouteDestinationExpirePatchBadRequestCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationExpirePatchBadRequest +const DataCocsnRoutesRouteRouteDestinationExpirePatchBadRequestCode int = 400 + +/*DataCocsnRoutesRouteRouteDestinationExpirePatchBadRequest Bad Request + +swagger:response dataCocsnRoutesRouteRouteDestinationExpirePatchBadRequest +*/ +type DataCocsnRoutesRouteRouteDestinationExpirePatchBadRequest struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationExpirePatchBadRequest creates DataCocsnRoutesRouteRouteDestinationExpirePatchBadRequest with default headers values +func NewDataCocsnRoutesRouteRouteDestinationExpirePatchBadRequest() *DataCocsnRoutesRouteRouteDestinationExpirePatchBadRequest { + + return &DataCocsnRoutesRouteRouteDestinationExpirePatchBadRequest{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationExpirePatchBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(400) +} + +// DataCocsnRoutesRouteRouteDestinationExpirePatchUnauthorizedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationExpirePatchUnauthorized +const DataCocsnRoutesRouteRouteDestinationExpirePatchUnauthorizedCode int = 401 + +/*DataCocsnRoutesRouteRouteDestinationExpirePatchUnauthorized Unauthorized + +swagger:response dataCocsnRoutesRouteRouteDestinationExpirePatchUnauthorized +*/ +type DataCocsnRoutesRouteRouteDestinationExpirePatchUnauthorized struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationExpirePatchUnauthorized creates DataCocsnRoutesRouteRouteDestinationExpirePatchUnauthorized with default headers values +func NewDataCocsnRoutesRouteRouteDestinationExpirePatchUnauthorized() *DataCocsnRoutesRouteRouteDestinationExpirePatchUnauthorized { + + return &DataCocsnRoutesRouteRouteDestinationExpirePatchUnauthorized{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationExpirePatchUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(401) +} + +// DataCocsnRoutesRouteRouteDestinationExpirePatchNotFoundCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationExpirePatchNotFound +const DataCocsnRoutesRouteRouteDestinationExpirePatchNotFoundCode int = 404 + +/*DataCocsnRoutesRouteRouteDestinationExpirePatchNotFound Not Found + +swagger:response dataCocsnRoutesRouteRouteDestinationExpirePatchNotFound +*/ +type DataCocsnRoutesRouteRouteDestinationExpirePatchNotFound struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationExpirePatchNotFound creates DataCocsnRoutesRouteRouteDestinationExpirePatchNotFound with default headers values +func NewDataCocsnRoutesRouteRouteDestinationExpirePatchNotFound() *DataCocsnRoutesRouteRouteDestinationExpirePatchNotFound { + + return &DataCocsnRoutesRouteRouteDestinationExpirePatchNotFound{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationExpirePatchNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(404) +} + +// DataCocsnRoutesRouteRouteDestinationExpirePatchMethodNotAllowedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationExpirePatchMethodNotAllowed +const DataCocsnRoutesRouteRouteDestinationExpirePatchMethodNotAllowedCode int = 405 + +/*DataCocsnRoutesRouteRouteDestinationExpirePatchMethodNotAllowed Method Not Allowed + +swagger:response dataCocsnRoutesRouteRouteDestinationExpirePatchMethodNotAllowed +*/ +type DataCocsnRoutesRouteRouteDestinationExpirePatchMethodNotAllowed struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationExpirePatchMethodNotAllowed creates DataCocsnRoutesRouteRouteDestinationExpirePatchMethodNotAllowed with default headers values +func NewDataCocsnRoutesRouteRouteDestinationExpirePatchMethodNotAllowed() *DataCocsnRoutesRouteRouteDestinationExpirePatchMethodNotAllowed { + + return &DataCocsnRoutesRouteRouteDestinationExpirePatchMethodNotAllowed{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationExpirePatchMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(405) +} + +// DataCocsnRoutesRouteRouteDestinationExpirePatchConflictCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationExpirePatchConflict +const DataCocsnRoutesRouteRouteDestinationExpirePatchConflictCode int = 409 + +/*DataCocsnRoutesRouteRouteDestinationExpirePatchConflict Conflict + +swagger:response dataCocsnRoutesRouteRouteDestinationExpirePatchConflict +*/ +type DataCocsnRoutesRouteRouteDestinationExpirePatchConflict struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationExpirePatchConflict creates DataCocsnRoutesRouteRouteDestinationExpirePatchConflict with default headers values +func NewDataCocsnRoutesRouteRouteDestinationExpirePatchConflict() *DataCocsnRoutesRouteRouteDestinationExpirePatchConflict { + + return &DataCocsnRoutesRouteRouteDestinationExpirePatchConflict{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationExpirePatchConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(409) +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_patch_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_patch_urlbuilder.go new file mode 100644 index 0000000000000000000000000000000000000000..d6e08bc7e49f41bb3b37a9d2e3b48939c1905832 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_patch_urlbuilder.go @@ -0,0 +1,99 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "errors" + "net/url" + golangswaggerpaths "path" + "strings" +) + +// DataCocsnRoutesRouteRouteDestinationExpirePatchURL generates an URL for the data cocsn routes route route destination expire patch operation +type DataCocsnRoutesRouteRouteDestinationExpirePatchURL struct { + RouteDestination string + + _basePath string + // avoid unkeyed usage + _ struct{} +} + +// WithBasePath sets the base path for this url builder, only required when it's different from the +// base path specified in the swagger spec. +// When the value of the base path is an empty string +func (o *DataCocsnRoutesRouteRouteDestinationExpirePatchURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationExpirePatchURL { + o.SetBasePath(bp) + return o +} + +// SetBasePath sets the base path for this url builder, only required when it's different from the +// base path specified in the swagger spec. +// When the value of the base path is an empty string +func (o *DataCocsnRoutesRouteRouteDestinationExpirePatchURL) SetBasePath(bp string) { + o._basePath = bp +} + +// Build a url path and query string +func (o *DataCocsnRoutesRouteRouteDestinationExpirePatchURL) Build() (*url.URL, error) { + var _result url.URL + + var _path = "/data/cocsn:routes/route={route-destination}/expire" + + routeDestination := o.RouteDestination + if routeDestination != "" { + _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) + } else { + return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationExpirePatchURL") + } + + _basePath := o._basePath + if _basePath == "" { + _basePath = "/restconf" + } + _result.Path = golangswaggerpaths.Join(_basePath, _path) + + return &_result, nil +} + +// Must is a helper function to panic when the url builder returns an error +func (o *DataCocsnRoutesRouteRouteDestinationExpirePatchURL) Must(u *url.URL, err error) *url.URL { + if err != nil { + panic(err) + } + if u == nil { + panic("url can't be nil") + } + return u +} + +// String returns the string representation of the path with query string +func (o *DataCocsnRoutesRouteRouteDestinationExpirePatchURL) String() string { + return o.Must(o.Build()).String() +} + +// BuildFull builds a full url with scheme, host, path and query string +func (o *DataCocsnRoutesRouteRouteDestinationExpirePatchURL) BuildFull(scheme, host string) (*url.URL, error) { + if scheme == "" { + return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationExpirePatchURL") + } + if host == "" { + return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationExpirePatchURL") + } + + base, err := o.Build() + if err != nil { + return nil, err + } + + base.Scheme = scheme + base.Host = host + return base, nil +} + +// StringFull returns the string representation of a complete url +func (o *DataCocsnRoutesRouteRouteDestinationExpirePatchURL) StringFull(scheme, host string) string { + return o.Must(o.BuildFull(scheme, host)).String() +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_put.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_put.go new file mode 100644 index 0000000000000000000000000000000000000000..6cd3db0a73b721aa36124194b7916f70871178f7 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_put.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime/middleware" +) + +// DataCocsnRoutesRouteRouteDestinationExpirePutHandlerFunc turns a function with the right signature into a data cocsn routes route route destination expire put handler +type DataCocsnRoutesRouteRouteDestinationExpirePutHandlerFunc func(DataCocsnRoutesRouteRouteDestinationExpirePutParams, interface{}) middleware.Responder + +// Handle executing the request and returning a response +func (fn DataCocsnRoutesRouteRouteDestinationExpirePutHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationExpirePutParams, principal interface{}) middleware.Responder { + return fn(params, principal) +} + +// DataCocsnRoutesRouteRouteDestinationExpirePutHandler interface for that can handle valid data cocsn routes route route destination expire put params +type DataCocsnRoutesRouteRouteDestinationExpirePutHandler interface { + Handle(DataCocsnRoutesRouteRouteDestinationExpirePutParams, interface{}) middleware.Responder +} + +// NewDataCocsnRoutesRouteRouteDestinationExpirePut creates a new http.Handler for the data cocsn routes route route destination expire put operation +func NewDataCocsnRoutesRouteRouteDestinationExpirePut(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationExpirePutHandler) *DataCocsnRoutesRouteRouteDestinationExpirePut { + return &DataCocsnRoutesRouteRouteDestinationExpirePut{Context: ctx, Handler: handler} +} + +/*DataCocsnRoutesRouteRouteDestinationExpirePut swagger:route PUT /data/cocsn:routes/route={route-destination}/expire data put dataCocsnRoutesRouteRouteDestinationExpirePut + +Expiration timer of the route + +Expiration timer of the route + +*/ +type DataCocsnRoutesRouteRouteDestinationExpirePut struct { + Context *middleware.Context + Handler DataCocsnRoutesRouteRouteDestinationExpirePutHandler +} + +func (o *DataCocsnRoutesRouteRouteDestinationExpirePut) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + route, rCtx, _ := o.Context.RouteInfo(r) + if rCtx != nil { + r = rCtx + } + var Params = NewDataCocsnRoutesRouteRouteDestinationExpirePutParams() + + uprinc, aCtx, err := o.Context.Authorize(r, route) + if err != nil { + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + if aCtx != nil { + r = aCtx + } + var principal interface{} + if uprinc != nil { + principal = uprinc + } + + if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + + res := o.Handler.Handle(Params, principal) // actually handle the request + + o.Context.Respond(rw, r, route.Produces, route, res) + +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_put_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_put_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..85b342831a93e02f1a3418dfc5eab9ab68e611c9 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_put_parameters.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "io" + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/runtime/middleware" + "github.com/go-openapi/strfmt" + + "code.fbi.h-da.de/cocsn/cocsn-api/api/models" +) + +// NewDataCocsnRoutesRouteRouteDestinationExpirePutParams creates a new DataCocsnRoutesRouteRouteDestinationExpirePutParams object +// no default values defined in spec. +func NewDataCocsnRoutesRouteRouteDestinationExpirePutParams() DataCocsnRoutesRouteRouteDestinationExpirePutParams { + + return DataCocsnRoutesRouteRouteDestinationExpirePutParams{} +} + +// DataCocsnRoutesRouteRouteDestinationExpirePutParams contains all the bound params for the data cocsn routes route route destination expire put operation +// typically these are obtained from a http.Request +// +// swagger:parameters data_cocsn_routes_route_route_destination_expire_put +type DataCocsnRoutesRouteRouteDestinationExpirePutParams struct { + + // HTTP Request Object + HTTPRequest *http.Request `json:"-"` + + /*Expiration timer of the route + Required: true + In: body + */ + Expire *models.DataCocsnRoutesRouteRouteDestinationExpire + /*Route destination. IP network + Required: true + In: path + */ + RouteDestination string +} + +// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface +// for simple values it will use straight method calls. +// +// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationExpirePutParams() beforehand. +func (o *DataCocsnRoutesRouteRouteDestinationExpirePutParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { + var res []error + + o.HTTPRequest = r + + if runtime.HasBody(r) { + defer r.Body.Close() + var body models.DataCocsnRoutesRouteRouteDestinationExpire + if err := route.Consumer.Consume(r.Body, &body); err != nil { + if err == io.EOF { + res = append(res, errors.Required("expire", "body", "")) + } else { + res = append(res, errors.NewParseError("expire", "body", "", err)) + } + } else { + // validate body object + if err := body.Validate(route.Formats); err != nil { + res = append(res, err) + } + + if len(res) == 0 { + o.Expire = &body + } + } + } else { + res = append(res, errors.Required("expire", "body", "")) + } + rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") + if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindRouteDestination binds and validates parameter RouteDestination from path. +func (o *DataCocsnRoutesRouteRouteDestinationExpirePutParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + + o.RouteDestination = raw + + return nil +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_put_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_put_responses.go new file mode 100644 index 0000000000000000000000000000000000000000..cff8e39b01735280cee2a53461d98db6cb457271 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_put_responses.go @@ -0,0 +1,180 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime" +) + +// DataCocsnRoutesRouteRouteDestinationExpirePutCreatedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationExpirePutCreated +const DataCocsnRoutesRouteRouteDestinationExpirePutCreatedCode int = 201 + +/*DataCocsnRoutesRouteRouteDestinationExpirePutCreated leaf expire created or replaced + +swagger:response dataCocsnRoutesRouteRouteDestinationExpirePutCreated +*/ +type DataCocsnRoutesRouteRouteDestinationExpirePutCreated struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationExpirePutCreated creates DataCocsnRoutesRouteRouteDestinationExpirePutCreated with default headers values +func NewDataCocsnRoutesRouteRouteDestinationExpirePutCreated() *DataCocsnRoutesRouteRouteDestinationExpirePutCreated { + + return &DataCocsnRoutesRouteRouteDestinationExpirePutCreated{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationExpirePutCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(201) +} + +// DataCocsnRoutesRouteRouteDestinationExpirePutNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationExpirePutNoContent +const DataCocsnRoutesRouteRouteDestinationExpirePutNoContentCode int = 204 + +/*DataCocsnRoutesRouteRouteDestinationExpirePutNoContent No Content + +swagger:response dataCocsnRoutesRouteRouteDestinationExpirePutNoContent +*/ +type DataCocsnRoutesRouteRouteDestinationExpirePutNoContent struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationExpirePutNoContent creates DataCocsnRoutesRouteRouteDestinationExpirePutNoContent with default headers values +func NewDataCocsnRoutesRouteRouteDestinationExpirePutNoContent() *DataCocsnRoutesRouteRouteDestinationExpirePutNoContent { + + return &DataCocsnRoutesRouteRouteDestinationExpirePutNoContent{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationExpirePutNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(204) +} + +// DataCocsnRoutesRouteRouteDestinationExpirePutBadRequestCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationExpirePutBadRequest +const DataCocsnRoutesRouteRouteDestinationExpirePutBadRequestCode int = 400 + +/*DataCocsnRoutesRouteRouteDestinationExpirePutBadRequest Bad Request + +swagger:response dataCocsnRoutesRouteRouteDestinationExpirePutBadRequest +*/ +type DataCocsnRoutesRouteRouteDestinationExpirePutBadRequest struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationExpirePutBadRequest creates DataCocsnRoutesRouteRouteDestinationExpirePutBadRequest with default headers values +func NewDataCocsnRoutesRouteRouteDestinationExpirePutBadRequest() *DataCocsnRoutesRouteRouteDestinationExpirePutBadRequest { + + return &DataCocsnRoutesRouteRouteDestinationExpirePutBadRequest{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationExpirePutBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(400) +} + +// DataCocsnRoutesRouteRouteDestinationExpirePutUnauthorizedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationExpirePutUnauthorized +const DataCocsnRoutesRouteRouteDestinationExpirePutUnauthorizedCode int = 401 + +/*DataCocsnRoutesRouteRouteDestinationExpirePutUnauthorized Unauthorized + +swagger:response dataCocsnRoutesRouteRouteDestinationExpirePutUnauthorized +*/ +type DataCocsnRoutesRouteRouteDestinationExpirePutUnauthorized struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationExpirePutUnauthorized creates DataCocsnRoutesRouteRouteDestinationExpirePutUnauthorized with default headers values +func NewDataCocsnRoutesRouteRouteDestinationExpirePutUnauthorized() *DataCocsnRoutesRouteRouteDestinationExpirePutUnauthorized { + + return &DataCocsnRoutesRouteRouteDestinationExpirePutUnauthorized{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationExpirePutUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(401) +} + +// DataCocsnRoutesRouteRouteDestinationExpirePutNotFoundCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationExpirePutNotFound +const DataCocsnRoutesRouteRouteDestinationExpirePutNotFoundCode int = 404 + +/*DataCocsnRoutesRouteRouteDestinationExpirePutNotFound Not Found + +swagger:response dataCocsnRoutesRouteRouteDestinationExpirePutNotFound +*/ +type DataCocsnRoutesRouteRouteDestinationExpirePutNotFound struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationExpirePutNotFound creates DataCocsnRoutesRouteRouteDestinationExpirePutNotFound with default headers values +func NewDataCocsnRoutesRouteRouteDestinationExpirePutNotFound() *DataCocsnRoutesRouteRouteDestinationExpirePutNotFound { + + return &DataCocsnRoutesRouteRouteDestinationExpirePutNotFound{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationExpirePutNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(404) +} + +// DataCocsnRoutesRouteRouteDestinationExpirePutMethodNotAllowedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationExpirePutMethodNotAllowed +const DataCocsnRoutesRouteRouteDestinationExpirePutMethodNotAllowedCode int = 405 + +/*DataCocsnRoutesRouteRouteDestinationExpirePutMethodNotAllowed Method Not Allowed + +swagger:response dataCocsnRoutesRouteRouteDestinationExpirePutMethodNotAllowed +*/ +type DataCocsnRoutesRouteRouteDestinationExpirePutMethodNotAllowed struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationExpirePutMethodNotAllowed creates DataCocsnRoutesRouteRouteDestinationExpirePutMethodNotAllowed with default headers values +func NewDataCocsnRoutesRouteRouteDestinationExpirePutMethodNotAllowed() *DataCocsnRoutesRouteRouteDestinationExpirePutMethodNotAllowed { + + return &DataCocsnRoutesRouteRouteDestinationExpirePutMethodNotAllowed{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationExpirePutMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(405) +} + +// DataCocsnRoutesRouteRouteDestinationExpirePutConflictCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationExpirePutConflict +const DataCocsnRoutesRouteRouteDestinationExpirePutConflictCode int = 409 + +/*DataCocsnRoutesRouteRouteDestinationExpirePutConflict Conflict + +swagger:response dataCocsnRoutesRouteRouteDestinationExpirePutConflict +*/ +type DataCocsnRoutesRouteRouteDestinationExpirePutConflict struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationExpirePutConflict creates DataCocsnRoutesRouteRouteDestinationExpirePutConflict with default headers values +func NewDataCocsnRoutesRouteRouteDestinationExpirePutConflict() *DataCocsnRoutesRouteRouteDestinationExpirePutConflict { + + return &DataCocsnRoutesRouteRouteDestinationExpirePutConflict{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationExpirePutConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(409) +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_put_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_put_urlbuilder.go new file mode 100644 index 0000000000000000000000000000000000000000..7468eee60ba6dbd2bec2057b43d73e3e3eb1e431 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_expire_put_urlbuilder.go @@ -0,0 +1,99 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "errors" + "net/url" + golangswaggerpaths "path" + "strings" +) + +// DataCocsnRoutesRouteRouteDestinationExpirePutURL generates an URL for the data cocsn routes route route destination expire put operation +type DataCocsnRoutesRouteRouteDestinationExpirePutURL struct { + RouteDestination string + + _basePath string + // avoid unkeyed usage + _ struct{} +} + +// WithBasePath sets the base path for this url builder, only required when it's different from the +// base path specified in the swagger spec. +// When the value of the base path is an empty string +func (o *DataCocsnRoutesRouteRouteDestinationExpirePutURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationExpirePutURL { + o.SetBasePath(bp) + return o +} + +// SetBasePath sets the base path for this url builder, only required when it's different from the +// base path specified in the swagger spec. +// When the value of the base path is an empty string +func (o *DataCocsnRoutesRouteRouteDestinationExpirePutURL) SetBasePath(bp string) { + o._basePath = bp +} + +// Build a url path and query string +func (o *DataCocsnRoutesRouteRouteDestinationExpirePutURL) Build() (*url.URL, error) { + var _result url.URL + + var _path = "/data/cocsn:routes/route={route-destination}/expire" + + routeDestination := o.RouteDestination + if routeDestination != "" { + _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) + } else { + return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationExpirePutURL") + } + + _basePath := o._basePath + if _basePath == "" { + _basePath = "/restconf" + } + _result.Path = golangswaggerpaths.Join(_basePath, _path) + + return &_result, nil +} + +// Must is a helper function to panic when the url builder returns an error +func (o *DataCocsnRoutesRouteRouteDestinationExpirePutURL) Must(u *url.URL, err error) *url.URL { + if err != nil { + panic(err) + } + if u == nil { + panic("url can't be nil") + } + return u +} + +// String returns the string representation of the path with query string +func (o *DataCocsnRoutesRouteRouteDestinationExpirePutURL) String() string { + return o.Must(o.Build()).String() +} + +// BuildFull builds a full url with scheme, host, path and query string +func (o *DataCocsnRoutesRouteRouteDestinationExpirePutURL) BuildFull(scheme, host string) (*url.URL, error) { + if scheme == "" { + return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationExpirePutURL") + } + if host == "" { + return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationExpirePutURL") + } + + base, err := o.Build() + if err != nil { + return nil, err + } + + base.Scheme = scheme + base.Host = host + return base, nil +} + +// StringFull returns the string representation of a complete url +func (o *DataCocsnRoutesRouteRouteDestinationExpirePutURL) StringFull(scheme, host string) string { + return o.Must(o.BuildFull(scheme, host)).String() +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_delete.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_delete.go new file mode 100644 index 0000000000000000000000000000000000000000..7121a241bea8d2f6e7da5228feee47de63ea6299 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_delete.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime/middleware" +) + +// DataCocsnRoutesRouteRouteDestinationFlagsDeleteHandlerFunc turns a function with the right signature into a data cocsn routes route route destination flags delete handler +type DataCocsnRoutesRouteRouteDestinationFlagsDeleteHandlerFunc func(DataCocsnRoutesRouteRouteDestinationFlagsDeleteParams, interface{}) middleware.Responder + +// Handle executing the request and returning a response +func (fn DataCocsnRoutesRouteRouteDestinationFlagsDeleteHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationFlagsDeleteParams, principal interface{}) middleware.Responder { + return fn(params, principal) +} + +// DataCocsnRoutesRouteRouteDestinationFlagsDeleteHandler interface for that can handle valid data cocsn routes route route destination flags delete params +type DataCocsnRoutesRouteRouteDestinationFlagsDeleteHandler interface { + Handle(DataCocsnRoutesRouteRouteDestinationFlagsDeleteParams, interface{}) middleware.Responder +} + +// NewDataCocsnRoutesRouteRouteDestinationFlagsDelete creates a new http.Handler for the data cocsn routes route route destination flags delete operation +func NewDataCocsnRoutesRouteRouteDestinationFlagsDelete(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationFlagsDeleteHandler) *DataCocsnRoutesRouteRouteDestinationFlagsDelete { + return &DataCocsnRoutesRouteRouteDestinationFlagsDelete{Context: ctx, Handler: handler} +} + +/*DataCocsnRoutesRouteRouteDestinationFlagsDelete swagger:route DELETE /data/cocsn:routes/route={route-destination}/flags data delete dataCocsnRoutesRouteRouteDestinationFlagsDelete + +Flags of the route + +Flags of the route + +*/ +type DataCocsnRoutesRouteRouteDestinationFlagsDelete struct { + Context *middleware.Context + Handler DataCocsnRoutesRouteRouteDestinationFlagsDeleteHandler +} + +func (o *DataCocsnRoutesRouteRouteDestinationFlagsDelete) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + route, rCtx, _ := o.Context.RouteInfo(r) + if rCtx != nil { + r = rCtx + } + var Params = NewDataCocsnRoutesRouteRouteDestinationFlagsDeleteParams() + + uprinc, aCtx, err := o.Context.Authorize(r, route) + if err != nil { + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + if aCtx != nil { + r = aCtx + } + var principal interface{} + if uprinc != nil { + principal = uprinc + } + + if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + + res := o.Handler.Handle(Params, principal) // actually handle the request + + o.Context.Respond(rw, r, route.Produces, route, res) + +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_delete_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_delete_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..c81973097c1fdf5591c3c6d616fc4f21977446bc --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_delete_parameters.go @@ -0,0 +1,72 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime/middleware" + "github.com/go-openapi/strfmt" +) + +// NewDataCocsnRoutesRouteRouteDestinationFlagsDeleteParams creates a new DataCocsnRoutesRouteRouteDestinationFlagsDeleteParams object +// no default values defined in spec. +func NewDataCocsnRoutesRouteRouteDestinationFlagsDeleteParams() DataCocsnRoutesRouteRouteDestinationFlagsDeleteParams { + + return DataCocsnRoutesRouteRouteDestinationFlagsDeleteParams{} +} + +// DataCocsnRoutesRouteRouteDestinationFlagsDeleteParams contains all the bound params for the data cocsn routes route route destination flags delete operation +// typically these are obtained from a http.Request +// +// swagger:parameters data_cocsn_routes_route_route_destination_flags_delete +type DataCocsnRoutesRouteRouteDestinationFlagsDeleteParams struct { + + // HTTP Request Object + HTTPRequest *http.Request `json:"-"` + + /*Route destination. IP network + Required: true + In: path + */ + RouteDestination string +} + +// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface +// for simple values it will use straight method calls. +// +// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationFlagsDeleteParams() beforehand. +func (o *DataCocsnRoutesRouteRouteDestinationFlagsDeleteParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { + var res []error + + o.HTTPRequest = r + + rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") + if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindRouteDestination binds and validates parameter RouteDestination from path. +func (o *DataCocsnRoutesRouteRouteDestinationFlagsDeleteParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + + o.RouteDestination = raw + + return nil +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_delete_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_delete_responses.go new file mode 100644 index 0000000000000000000000000000000000000000..b8b1db5cc7ee374f12f3ad100741e69b403c8d06 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_delete_responses.go @@ -0,0 +1,36 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime" +) + +// DataCocsnRoutesRouteRouteDestinationFlagsDeleteNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationFlagsDeleteNoContent +const DataCocsnRoutesRouteRouteDestinationFlagsDeleteNoContentCode int = 204 + +/*DataCocsnRoutesRouteRouteDestinationFlagsDeleteNoContent No Content + +swagger:response dataCocsnRoutesRouteRouteDestinationFlagsDeleteNoContent +*/ +type DataCocsnRoutesRouteRouteDestinationFlagsDeleteNoContent struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationFlagsDeleteNoContent creates DataCocsnRoutesRouteRouteDestinationFlagsDeleteNoContent with default headers values +func NewDataCocsnRoutesRouteRouteDestinationFlagsDeleteNoContent() *DataCocsnRoutesRouteRouteDestinationFlagsDeleteNoContent { + + return &DataCocsnRoutesRouteRouteDestinationFlagsDeleteNoContent{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationFlagsDeleteNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(204) +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_delete_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_delete_urlbuilder.go new file mode 100644 index 0000000000000000000000000000000000000000..404dce0622ae1d48ed31e1b65fee24f3667bd299 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_delete_urlbuilder.go @@ -0,0 +1,99 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "errors" + "net/url" + golangswaggerpaths "path" + "strings" +) + +// DataCocsnRoutesRouteRouteDestinationFlagsDeleteURL generates an URL for the data cocsn routes route route destination flags delete operation +type DataCocsnRoutesRouteRouteDestinationFlagsDeleteURL struct { + RouteDestination string + + _basePath string + // avoid unkeyed usage + _ struct{} +} + +// WithBasePath sets the base path for this url builder, only required when it's different from the +// base path specified in the swagger spec. +// When the value of the base path is an empty string +func (o *DataCocsnRoutesRouteRouteDestinationFlagsDeleteURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationFlagsDeleteURL { + o.SetBasePath(bp) + return o +} + +// SetBasePath sets the base path for this url builder, only required when it's different from the +// base path specified in the swagger spec. +// When the value of the base path is an empty string +func (o *DataCocsnRoutesRouteRouteDestinationFlagsDeleteURL) SetBasePath(bp string) { + o._basePath = bp +} + +// Build a url path and query string +func (o *DataCocsnRoutesRouteRouteDestinationFlagsDeleteURL) Build() (*url.URL, error) { + var _result url.URL + + var _path = "/data/cocsn:routes/route={route-destination}/flags" + + routeDestination := o.RouteDestination + if routeDestination != "" { + _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) + } else { + return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationFlagsDeleteURL") + } + + _basePath := o._basePath + if _basePath == "" { + _basePath = "/restconf" + } + _result.Path = golangswaggerpaths.Join(_basePath, _path) + + return &_result, nil +} + +// Must is a helper function to panic when the url builder returns an error +func (o *DataCocsnRoutesRouteRouteDestinationFlagsDeleteURL) Must(u *url.URL, err error) *url.URL { + if err != nil { + panic(err) + } + if u == nil { + panic("url can't be nil") + } + return u +} + +// String returns the string representation of the path with query string +func (o *DataCocsnRoutesRouteRouteDestinationFlagsDeleteURL) String() string { + return o.Must(o.Build()).String() +} + +// BuildFull builds a full url with scheme, host, path and query string +func (o *DataCocsnRoutesRouteRouteDestinationFlagsDeleteURL) BuildFull(scheme, host string) (*url.URL, error) { + if scheme == "" { + return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationFlagsDeleteURL") + } + if host == "" { + return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationFlagsDeleteURL") + } + + base, err := o.Build() + if err != nil { + return nil, err + } + + base.Scheme = scheme + base.Host = host + return base, nil +} + +// StringFull returns the string representation of a complete url +func (o *DataCocsnRoutesRouteRouteDestinationFlagsDeleteURL) StringFull(scheme, host string) string { + return o.Must(o.BuildFull(scheme, host)).String() +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_patch.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_patch.go new file mode 100644 index 0000000000000000000000000000000000000000..6a1a89b2fe44317eb987810e4f693de22aa09513 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_patch.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime/middleware" +) + +// DataCocsnRoutesRouteRouteDestinationFlagsPatchHandlerFunc turns a function with the right signature into a data cocsn routes route route destination flags patch handler +type DataCocsnRoutesRouteRouteDestinationFlagsPatchHandlerFunc func(DataCocsnRoutesRouteRouteDestinationFlagsPatchParams, interface{}) middleware.Responder + +// Handle executing the request and returning a response +func (fn DataCocsnRoutesRouteRouteDestinationFlagsPatchHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationFlagsPatchParams, principal interface{}) middleware.Responder { + return fn(params, principal) +} + +// DataCocsnRoutesRouteRouteDestinationFlagsPatchHandler interface for that can handle valid data cocsn routes route route destination flags patch params +type DataCocsnRoutesRouteRouteDestinationFlagsPatchHandler interface { + Handle(DataCocsnRoutesRouteRouteDestinationFlagsPatchParams, interface{}) middleware.Responder +} + +// NewDataCocsnRoutesRouteRouteDestinationFlagsPatch creates a new http.Handler for the data cocsn routes route route destination flags patch operation +func NewDataCocsnRoutesRouteRouteDestinationFlagsPatch(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationFlagsPatchHandler) *DataCocsnRoutesRouteRouteDestinationFlagsPatch { + return &DataCocsnRoutesRouteRouteDestinationFlagsPatch{Context: ctx, Handler: handler} +} + +/*DataCocsnRoutesRouteRouteDestinationFlagsPatch swagger:route PATCH /data/cocsn:routes/route={route-destination}/flags data patch dataCocsnRoutesRouteRouteDestinationFlagsPatch + +Flags of the route + +Flags of the route + +*/ +type DataCocsnRoutesRouteRouteDestinationFlagsPatch struct { + Context *middleware.Context + Handler DataCocsnRoutesRouteRouteDestinationFlagsPatchHandler +} + +func (o *DataCocsnRoutesRouteRouteDestinationFlagsPatch) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + route, rCtx, _ := o.Context.RouteInfo(r) + if rCtx != nil { + r = rCtx + } + var Params = NewDataCocsnRoutesRouteRouteDestinationFlagsPatchParams() + + uprinc, aCtx, err := o.Context.Authorize(r, route) + if err != nil { + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + if aCtx != nil { + r = aCtx + } + var principal interface{} + if uprinc != nil { + principal = uprinc + } + + if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + + res := o.Handler.Handle(Params, principal) // actually handle the request + + o.Context.Respond(rw, r, route.Produces, route, res) + +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_patch_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_patch_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..0524bcfb7b5ce8b669f7f525915afe04f075c95d --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_patch_parameters.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "io" + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/runtime/middleware" + "github.com/go-openapi/strfmt" + + "code.fbi.h-da.de/cocsn/cocsn-api/api/models" +) + +// NewDataCocsnRoutesRouteRouteDestinationFlagsPatchParams creates a new DataCocsnRoutesRouteRouteDestinationFlagsPatchParams object +// no default values defined in spec. +func NewDataCocsnRoutesRouteRouteDestinationFlagsPatchParams() DataCocsnRoutesRouteRouteDestinationFlagsPatchParams { + + return DataCocsnRoutesRouteRouteDestinationFlagsPatchParams{} +} + +// DataCocsnRoutesRouteRouteDestinationFlagsPatchParams contains all the bound params for the data cocsn routes route route destination flags patch operation +// typically these are obtained from a http.Request +// +// swagger:parameters data_cocsn_routes_route_route_destination_flags_patch +type DataCocsnRoutesRouteRouteDestinationFlagsPatchParams struct { + + // HTTP Request Object + HTTPRequest *http.Request `json:"-"` + + /*Flags of the route + Required: true + In: body + */ + Flags *models.DataCocsnRoutesRouteRouteDestinationFlags + /*Route destination. IP network + Required: true + In: path + */ + RouteDestination string +} + +// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface +// for simple values it will use straight method calls. +// +// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationFlagsPatchParams() beforehand. +func (o *DataCocsnRoutesRouteRouteDestinationFlagsPatchParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { + var res []error + + o.HTTPRequest = r + + if runtime.HasBody(r) { + defer r.Body.Close() + var body models.DataCocsnRoutesRouteRouteDestinationFlags + if err := route.Consumer.Consume(r.Body, &body); err != nil { + if err == io.EOF { + res = append(res, errors.Required("flags", "body", "")) + } else { + res = append(res, errors.NewParseError("flags", "body", "", err)) + } + } else { + // validate body object + if err := body.Validate(route.Formats); err != nil { + res = append(res, err) + } + + if len(res) == 0 { + o.Flags = &body + } + } + } else { + res = append(res, errors.Required("flags", "body", "")) + } + rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") + if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindRouteDestination binds and validates parameter RouteDestination from path. +func (o *DataCocsnRoutesRouteRouteDestinationFlagsPatchParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + + o.RouteDestination = raw + + return nil +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_patch_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_patch_responses.go new file mode 100644 index 0000000000000000000000000000000000000000..3cfd0b2f108ac789697bef811c718b8c9cab1456 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_patch_responses.go @@ -0,0 +1,156 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime" +) + +// DataCocsnRoutesRouteRouteDestinationFlagsPatchNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationFlagsPatchNoContent +const DataCocsnRoutesRouteRouteDestinationFlagsPatchNoContentCode int = 204 + +/*DataCocsnRoutesRouteRouteDestinationFlagsPatchNoContent leaf flags updated + +swagger:response dataCocsnRoutesRouteRouteDestinationFlagsPatchNoContent +*/ +type DataCocsnRoutesRouteRouteDestinationFlagsPatchNoContent struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationFlagsPatchNoContent creates DataCocsnRoutesRouteRouteDestinationFlagsPatchNoContent with default headers values +func NewDataCocsnRoutesRouteRouteDestinationFlagsPatchNoContent() *DataCocsnRoutesRouteRouteDestinationFlagsPatchNoContent { + + return &DataCocsnRoutesRouteRouteDestinationFlagsPatchNoContent{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationFlagsPatchNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(204) +} + +// DataCocsnRoutesRouteRouteDestinationFlagsPatchBadRequestCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationFlagsPatchBadRequest +const DataCocsnRoutesRouteRouteDestinationFlagsPatchBadRequestCode int = 400 + +/*DataCocsnRoutesRouteRouteDestinationFlagsPatchBadRequest Bad Request + +swagger:response dataCocsnRoutesRouteRouteDestinationFlagsPatchBadRequest +*/ +type DataCocsnRoutesRouteRouteDestinationFlagsPatchBadRequest struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationFlagsPatchBadRequest creates DataCocsnRoutesRouteRouteDestinationFlagsPatchBadRequest with default headers values +func NewDataCocsnRoutesRouteRouteDestinationFlagsPatchBadRequest() *DataCocsnRoutesRouteRouteDestinationFlagsPatchBadRequest { + + return &DataCocsnRoutesRouteRouteDestinationFlagsPatchBadRequest{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationFlagsPatchBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(400) +} + +// DataCocsnRoutesRouteRouteDestinationFlagsPatchUnauthorizedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationFlagsPatchUnauthorized +const DataCocsnRoutesRouteRouteDestinationFlagsPatchUnauthorizedCode int = 401 + +/*DataCocsnRoutesRouteRouteDestinationFlagsPatchUnauthorized Unauthorized + +swagger:response dataCocsnRoutesRouteRouteDestinationFlagsPatchUnauthorized +*/ +type DataCocsnRoutesRouteRouteDestinationFlagsPatchUnauthorized struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationFlagsPatchUnauthorized creates DataCocsnRoutesRouteRouteDestinationFlagsPatchUnauthorized with default headers values +func NewDataCocsnRoutesRouteRouteDestinationFlagsPatchUnauthorized() *DataCocsnRoutesRouteRouteDestinationFlagsPatchUnauthorized { + + return &DataCocsnRoutesRouteRouteDestinationFlagsPatchUnauthorized{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationFlagsPatchUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(401) +} + +// DataCocsnRoutesRouteRouteDestinationFlagsPatchNotFoundCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationFlagsPatchNotFound +const DataCocsnRoutesRouteRouteDestinationFlagsPatchNotFoundCode int = 404 + +/*DataCocsnRoutesRouteRouteDestinationFlagsPatchNotFound Not Found + +swagger:response dataCocsnRoutesRouteRouteDestinationFlagsPatchNotFound +*/ +type DataCocsnRoutesRouteRouteDestinationFlagsPatchNotFound struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationFlagsPatchNotFound creates DataCocsnRoutesRouteRouteDestinationFlagsPatchNotFound with default headers values +func NewDataCocsnRoutesRouteRouteDestinationFlagsPatchNotFound() *DataCocsnRoutesRouteRouteDestinationFlagsPatchNotFound { + + return &DataCocsnRoutesRouteRouteDestinationFlagsPatchNotFound{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationFlagsPatchNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(404) +} + +// DataCocsnRoutesRouteRouteDestinationFlagsPatchMethodNotAllowedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationFlagsPatchMethodNotAllowed +const DataCocsnRoutesRouteRouteDestinationFlagsPatchMethodNotAllowedCode int = 405 + +/*DataCocsnRoutesRouteRouteDestinationFlagsPatchMethodNotAllowed Method Not Allowed + +swagger:response dataCocsnRoutesRouteRouteDestinationFlagsPatchMethodNotAllowed +*/ +type DataCocsnRoutesRouteRouteDestinationFlagsPatchMethodNotAllowed struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationFlagsPatchMethodNotAllowed creates DataCocsnRoutesRouteRouteDestinationFlagsPatchMethodNotAllowed with default headers values +func NewDataCocsnRoutesRouteRouteDestinationFlagsPatchMethodNotAllowed() *DataCocsnRoutesRouteRouteDestinationFlagsPatchMethodNotAllowed { + + return &DataCocsnRoutesRouteRouteDestinationFlagsPatchMethodNotAllowed{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationFlagsPatchMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(405) +} + +// DataCocsnRoutesRouteRouteDestinationFlagsPatchConflictCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationFlagsPatchConflict +const DataCocsnRoutesRouteRouteDestinationFlagsPatchConflictCode int = 409 + +/*DataCocsnRoutesRouteRouteDestinationFlagsPatchConflict Conflict + +swagger:response dataCocsnRoutesRouteRouteDestinationFlagsPatchConflict +*/ +type DataCocsnRoutesRouteRouteDestinationFlagsPatchConflict struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationFlagsPatchConflict creates DataCocsnRoutesRouteRouteDestinationFlagsPatchConflict with default headers values +func NewDataCocsnRoutesRouteRouteDestinationFlagsPatchConflict() *DataCocsnRoutesRouteRouteDestinationFlagsPatchConflict { + + return &DataCocsnRoutesRouteRouteDestinationFlagsPatchConflict{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationFlagsPatchConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(409) +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_patch_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_patch_urlbuilder.go new file mode 100644 index 0000000000000000000000000000000000000000..03e126f957d8bc7be05bdae05a851f2786fd15bc --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_patch_urlbuilder.go @@ -0,0 +1,99 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "errors" + "net/url" + golangswaggerpaths "path" + "strings" +) + +// DataCocsnRoutesRouteRouteDestinationFlagsPatchURL generates an URL for the data cocsn routes route route destination flags patch operation +type DataCocsnRoutesRouteRouteDestinationFlagsPatchURL struct { + RouteDestination string + + _basePath string + // avoid unkeyed usage + _ struct{} +} + +// WithBasePath sets the base path for this url builder, only required when it's different from the +// base path specified in the swagger spec. +// When the value of the base path is an empty string +func (o *DataCocsnRoutesRouteRouteDestinationFlagsPatchURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationFlagsPatchURL { + o.SetBasePath(bp) + return o +} + +// SetBasePath sets the base path for this url builder, only required when it's different from the +// base path specified in the swagger spec. +// When the value of the base path is an empty string +func (o *DataCocsnRoutesRouteRouteDestinationFlagsPatchURL) SetBasePath(bp string) { + o._basePath = bp +} + +// Build a url path and query string +func (o *DataCocsnRoutesRouteRouteDestinationFlagsPatchURL) Build() (*url.URL, error) { + var _result url.URL + + var _path = "/data/cocsn:routes/route={route-destination}/flags" + + routeDestination := o.RouteDestination + if routeDestination != "" { + _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) + } else { + return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationFlagsPatchURL") + } + + _basePath := o._basePath + if _basePath == "" { + _basePath = "/restconf" + } + _result.Path = golangswaggerpaths.Join(_basePath, _path) + + return &_result, nil +} + +// Must is a helper function to panic when the url builder returns an error +func (o *DataCocsnRoutesRouteRouteDestinationFlagsPatchURL) Must(u *url.URL, err error) *url.URL { + if err != nil { + panic(err) + } + if u == nil { + panic("url can't be nil") + } + return u +} + +// String returns the string representation of the path with query string +func (o *DataCocsnRoutesRouteRouteDestinationFlagsPatchURL) String() string { + return o.Must(o.Build()).String() +} + +// BuildFull builds a full url with scheme, host, path and query string +func (o *DataCocsnRoutesRouteRouteDestinationFlagsPatchURL) BuildFull(scheme, host string) (*url.URL, error) { + if scheme == "" { + return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationFlagsPatchURL") + } + if host == "" { + return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationFlagsPatchURL") + } + + base, err := o.Build() + if err != nil { + return nil, err + } + + base.Scheme = scheme + base.Host = host + return base, nil +} + +// StringFull returns the string representation of a complete url +func (o *DataCocsnRoutesRouteRouteDestinationFlagsPatchURL) StringFull(scheme, host string) string { + return o.Must(o.BuildFull(scheme, host)).String() +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_put.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_put.go new file mode 100644 index 0000000000000000000000000000000000000000..cb38a82c3755d69d23224eba8864d0097c682b0b --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_put.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime/middleware" +) + +// DataCocsnRoutesRouteRouteDestinationFlagsPutHandlerFunc turns a function with the right signature into a data cocsn routes route route destination flags put handler +type DataCocsnRoutesRouteRouteDestinationFlagsPutHandlerFunc func(DataCocsnRoutesRouteRouteDestinationFlagsPutParams, interface{}) middleware.Responder + +// Handle executing the request and returning a response +func (fn DataCocsnRoutesRouteRouteDestinationFlagsPutHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationFlagsPutParams, principal interface{}) middleware.Responder { + return fn(params, principal) +} + +// DataCocsnRoutesRouteRouteDestinationFlagsPutHandler interface for that can handle valid data cocsn routes route route destination flags put params +type DataCocsnRoutesRouteRouteDestinationFlagsPutHandler interface { + Handle(DataCocsnRoutesRouteRouteDestinationFlagsPutParams, interface{}) middleware.Responder +} + +// NewDataCocsnRoutesRouteRouteDestinationFlagsPut creates a new http.Handler for the data cocsn routes route route destination flags put operation +func NewDataCocsnRoutesRouteRouteDestinationFlagsPut(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationFlagsPutHandler) *DataCocsnRoutesRouteRouteDestinationFlagsPut { + return &DataCocsnRoutesRouteRouteDestinationFlagsPut{Context: ctx, Handler: handler} +} + +/*DataCocsnRoutesRouteRouteDestinationFlagsPut swagger:route PUT /data/cocsn:routes/route={route-destination}/flags data put dataCocsnRoutesRouteRouteDestinationFlagsPut + +Flags of the route + +Flags of the route + +*/ +type DataCocsnRoutesRouteRouteDestinationFlagsPut struct { + Context *middleware.Context + Handler DataCocsnRoutesRouteRouteDestinationFlagsPutHandler +} + +func (o *DataCocsnRoutesRouteRouteDestinationFlagsPut) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + route, rCtx, _ := o.Context.RouteInfo(r) + if rCtx != nil { + r = rCtx + } + var Params = NewDataCocsnRoutesRouteRouteDestinationFlagsPutParams() + + uprinc, aCtx, err := o.Context.Authorize(r, route) + if err != nil { + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + if aCtx != nil { + r = aCtx + } + var principal interface{} + if uprinc != nil { + principal = uprinc + } + + if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + + res := o.Handler.Handle(Params, principal) // actually handle the request + + o.Context.Respond(rw, r, route.Produces, route, res) + +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_put_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_put_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..f160031bf8a0e4dec68207e0d75f6225ab602ace --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_put_parameters.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "io" + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/runtime/middleware" + "github.com/go-openapi/strfmt" + + "code.fbi.h-da.de/cocsn/cocsn-api/api/models" +) + +// NewDataCocsnRoutesRouteRouteDestinationFlagsPutParams creates a new DataCocsnRoutesRouteRouteDestinationFlagsPutParams object +// no default values defined in spec. +func NewDataCocsnRoutesRouteRouteDestinationFlagsPutParams() DataCocsnRoutesRouteRouteDestinationFlagsPutParams { + + return DataCocsnRoutesRouteRouteDestinationFlagsPutParams{} +} + +// DataCocsnRoutesRouteRouteDestinationFlagsPutParams contains all the bound params for the data cocsn routes route route destination flags put operation +// typically these are obtained from a http.Request +// +// swagger:parameters data_cocsn_routes_route_route_destination_flags_put +type DataCocsnRoutesRouteRouteDestinationFlagsPutParams struct { + + // HTTP Request Object + HTTPRequest *http.Request `json:"-"` + + /*Flags of the route + Required: true + In: body + */ + Flags *models.DataCocsnRoutesRouteRouteDestinationFlags + /*Route destination. IP network + Required: true + In: path + */ + RouteDestination string +} + +// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface +// for simple values it will use straight method calls. +// +// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationFlagsPutParams() beforehand. +func (o *DataCocsnRoutesRouteRouteDestinationFlagsPutParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { + var res []error + + o.HTTPRequest = r + + if runtime.HasBody(r) { + defer r.Body.Close() + var body models.DataCocsnRoutesRouteRouteDestinationFlags + if err := route.Consumer.Consume(r.Body, &body); err != nil { + if err == io.EOF { + res = append(res, errors.Required("flags", "body", "")) + } else { + res = append(res, errors.NewParseError("flags", "body", "", err)) + } + } else { + // validate body object + if err := body.Validate(route.Formats); err != nil { + res = append(res, err) + } + + if len(res) == 0 { + o.Flags = &body + } + } + } else { + res = append(res, errors.Required("flags", "body", "")) + } + rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") + if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindRouteDestination binds and validates parameter RouteDestination from path. +func (o *DataCocsnRoutesRouteRouteDestinationFlagsPutParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + + o.RouteDestination = raw + + return nil +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_put_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_put_responses.go new file mode 100644 index 0000000000000000000000000000000000000000..c51f70916e6ccb32ae491eca0798f1cd50a1cae3 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_put_responses.go @@ -0,0 +1,180 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime" +) + +// DataCocsnRoutesRouteRouteDestinationFlagsPutCreatedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationFlagsPutCreated +const DataCocsnRoutesRouteRouteDestinationFlagsPutCreatedCode int = 201 + +/*DataCocsnRoutesRouteRouteDestinationFlagsPutCreated leaf flags created or replaced + +swagger:response dataCocsnRoutesRouteRouteDestinationFlagsPutCreated +*/ +type DataCocsnRoutesRouteRouteDestinationFlagsPutCreated struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationFlagsPutCreated creates DataCocsnRoutesRouteRouteDestinationFlagsPutCreated with default headers values +func NewDataCocsnRoutesRouteRouteDestinationFlagsPutCreated() *DataCocsnRoutesRouteRouteDestinationFlagsPutCreated { + + return &DataCocsnRoutesRouteRouteDestinationFlagsPutCreated{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationFlagsPutCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(201) +} + +// DataCocsnRoutesRouteRouteDestinationFlagsPutNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationFlagsPutNoContent +const DataCocsnRoutesRouteRouteDestinationFlagsPutNoContentCode int = 204 + +/*DataCocsnRoutesRouteRouteDestinationFlagsPutNoContent No Content + +swagger:response dataCocsnRoutesRouteRouteDestinationFlagsPutNoContent +*/ +type DataCocsnRoutesRouteRouteDestinationFlagsPutNoContent struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationFlagsPutNoContent creates DataCocsnRoutesRouteRouteDestinationFlagsPutNoContent with default headers values +func NewDataCocsnRoutesRouteRouteDestinationFlagsPutNoContent() *DataCocsnRoutesRouteRouteDestinationFlagsPutNoContent { + + return &DataCocsnRoutesRouteRouteDestinationFlagsPutNoContent{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationFlagsPutNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(204) +} + +// DataCocsnRoutesRouteRouteDestinationFlagsPutBadRequestCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationFlagsPutBadRequest +const DataCocsnRoutesRouteRouteDestinationFlagsPutBadRequestCode int = 400 + +/*DataCocsnRoutesRouteRouteDestinationFlagsPutBadRequest Bad Request + +swagger:response dataCocsnRoutesRouteRouteDestinationFlagsPutBadRequest +*/ +type DataCocsnRoutesRouteRouteDestinationFlagsPutBadRequest struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationFlagsPutBadRequest creates DataCocsnRoutesRouteRouteDestinationFlagsPutBadRequest with default headers values +func NewDataCocsnRoutesRouteRouteDestinationFlagsPutBadRequest() *DataCocsnRoutesRouteRouteDestinationFlagsPutBadRequest { + + return &DataCocsnRoutesRouteRouteDestinationFlagsPutBadRequest{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationFlagsPutBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(400) +} + +// DataCocsnRoutesRouteRouteDestinationFlagsPutUnauthorizedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationFlagsPutUnauthorized +const DataCocsnRoutesRouteRouteDestinationFlagsPutUnauthorizedCode int = 401 + +/*DataCocsnRoutesRouteRouteDestinationFlagsPutUnauthorized Unauthorized + +swagger:response dataCocsnRoutesRouteRouteDestinationFlagsPutUnauthorized +*/ +type DataCocsnRoutesRouteRouteDestinationFlagsPutUnauthorized struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationFlagsPutUnauthorized creates DataCocsnRoutesRouteRouteDestinationFlagsPutUnauthorized with default headers values +func NewDataCocsnRoutesRouteRouteDestinationFlagsPutUnauthorized() *DataCocsnRoutesRouteRouteDestinationFlagsPutUnauthorized { + + return &DataCocsnRoutesRouteRouteDestinationFlagsPutUnauthorized{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationFlagsPutUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(401) +} + +// DataCocsnRoutesRouteRouteDestinationFlagsPutNotFoundCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationFlagsPutNotFound +const DataCocsnRoutesRouteRouteDestinationFlagsPutNotFoundCode int = 404 + +/*DataCocsnRoutesRouteRouteDestinationFlagsPutNotFound Not Found + +swagger:response dataCocsnRoutesRouteRouteDestinationFlagsPutNotFound +*/ +type DataCocsnRoutesRouteRouteDestinationFlagsPutNotFound struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationFlagsPutNotFound creates DataCocsnRoutesRouteRouteDestinationFlagsPutNotFound with default headers values +func NewDataCocsnRoutesRouteRouteDestinationFlagsPutNotFound() *DataCocsnRoutesRouteRouteDestinationFlagsPutNotFound { + + return &DataCocsnRoutesRouteRouteDestinationFlagsPutNotFound{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationFlagsPutNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(404) +} + +// DataCocsnRoutesRouteRouteDestinationFlagsPutMethodNotAllowedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationFlagsPutMethodNotAllowed +const DataCocsnRoutesRouteRouteDestinationFlagsPutMethodNotAllowedCode int = 405 + +/*DataCocsnRoutesRouteRouteDestinationFlagsPutMethodNotAllowed Method Not Allowed + +swagger:response dataCocsnRoutesRouteRouteDestinationFlagsPutMethodNotAllowed +*/ +type DataCocsnRoutesRouteRouteDestinationFlagsPutMethodNotAllowed struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationFlagsPutMethodNotAllowed creates DataCocsnRoutesRouteRouteDestinationFlagsPutMethodNotAllowed with default headers values +func NewDataCocsnRoutesRouteRouteDestinationFlagsPutMethodNotAllowed() *DataCocsnRoutesRouteRouteDestinationFlagsPutMethodNotAllowed { + + return &DataCocsnRoutesRouteRouteDestinationFlagsPutMethodNotAllowed{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationFlagsPutMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(405) +} + +// DataCocsnRoutesRouteRouteDestinationFlagsPutConflictCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationFlagsPutConflict +const DataCocsnRoutesRouteRouteDestinationFlagsPutConflictCode int = 409 + +/*DataCocsnRoutesRouteRouteDestinationFlagsPutConflict Conflict + +swagger:response dataCocsnRoutesRouteRouteDestinationFlagsPutConflict +*/ +type DataCocsnRoutesRouteRouteDestinationFlagsPutConflict struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationFlagsPutConflict creates DataCocsnRoutesRouteRouteDestinationFlagsPutConflict with default headers values +func NewDataCocsnRoutesRouteRouteDestinationFlagsPutConflict() *DataCocsnRoutesRouteRouteDestinationFlagsPutConflict { + + return &DataCocsnRoutesRouteRouteDestinationFlagsPutConflict{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationFlagsPutConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(409) +} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_post_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_put_urlbuilder.go similarity index 55% rename from api/restapi/operations/data/data_cocsn_arp_table_post_urlbuilder.go rename to api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_put_urlbuilder.go index 4904f4e475d9d7883cb74687d97fb50df0257186..3042cebf2d5698a53236f2d6f4c037cb17b1b6b9 100644 --- a/api/restapi/operations/data/data_cocsn_arp_table_post_urlbuilder.go +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_flags_put_urlbuilder.go @@ -9,17 +9,22 @@ import ( "errors" "net/url" golangswaggerpaths "path" + "strings" ) -// DataCocsnArpTablePostURL generates an URL for the data cocsn arp table post operation -type DataCocsnArpTablePostURL struct { +// DataCocsnRoutesRouteRouteDestinationFlagsPutURL generates an URL for the data cocsn routes route route destination flags put operation +type DataCocsnRoutesRouteRouteDestinationFlagsPutURL struct { + RouteDestination string + _basePath string + // avoid unkeyed usage + _ struct{} } // WithBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *DataCocsnArpTablePostURL) WithBasePath(bp string) *DataCocsnArpTablePostURL { +func (o *DataCocsnRoutesRouteRouteDestinationFlagsPutURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationFlagsPutURL { o.SetBasePath(bp) return o } @@ -27,15 +32,22 @@ func (o *DataCocsnArpTablePostURL) WithBasePath(bp string) *DataCocsnArpTablePos // SetBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *DataCocsnArpTablePostURL) SetBasePath(bp string) { +func (o *DataCocsnRoutesRouteRouteDestinationFlagsPutURL) SetBasePath(bp string) { o._basePath = bp } // Build a url path and query string -func (o *DataCocsnArpTablePostURL) Build() (*url.URL, error) { +func (o *DataCocsnRoutesRouteRouteDestinationFlagsPutURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/data/cocsn:arp-table" + var _path = "/data/cocsn:routes/route={route-destination}/flags" + + routeDestination := o.RouteDestination + if routeDestination != "" { + _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) + } else { + return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationFlagsPutURL") + } _basePath := o._basePath if _basePath == "" { @@ -47,7 +59,7 @@ func (o *DataCocsnArpTablePostURL) Build() (*url.URL, error) { } // Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnArpTablePostURL) Must(u *url.URL, err error) *url.URL { +func (o *DataCocsnRoutesRouteRouteDestinationFlagsPutURL) Must(u *url.URL, err error) *url.URL { if err != nil { panic(err) } @@ -58,17 +70,17 @@ func (o *DataCocsnArpTablePostURL) Must(u *url.URL, err error) *url.URL { } // String returns the string representation of the path with query string -func (o *DataCocsnArpTablePostURL) String() string { +func (o *DataCocsnRoutesRouteRouteDestinationFlagsPutURL) String() string { return o.Must(o.Build()).String() } // BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnArpTablePostURL) BuildFull(scheme, host string) (*url.URL, error) { +func (o *DataCocsnRoutesRouteRouteDestinationFlagsPutURL) BuildFull(scheme, host string) (*url.URL, error) { if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnArpTablePostURL") + return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationFlagsPutURL") } if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnArpTablePostURL") + return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationFlagsPutURL") } base, err := o.Build() @@ -82,6 +94,6 @@ func (o *DataCocsnArpTablePostURL) BuildFull(scheme, host string) (*url.URL, err } // StringFull returns the string representation of a complete url -func (o *DataCocsnArpTablePostURL) StringFull(scheme, host string) string { +func (o *DataCocsnRoutesRouteRouteDestinationFlagsPutURL) StringFull(scheme, host string) string { return o.Must(o.BuildFull(scheme, host)).String() } diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_delete.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_delete.go new file mode 100644 index 0000000000000000000000000000000000000000..a70782631ff66ee59e31a44867098c7ceea2c48d --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_delete.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime/middleware" +) + +// DataCocsnRoutesRouteRouteDestinationGatewayDeleteHandlerFunc turns a function with the right signature into a data cocsn routes route route destination gateway delete handler +type DataCocsnRoutesRouteRouteDestinationGatewayDeleteHandlerFunc func(DataCocsnRoutesRouteRouteDestinationGatewayDeleteParams, interface{}) middleware.Responder + +// Handle executing the request and returning a response +func (fn DataCocsnRoutesRouteRouteDestinationGatewayDeleteHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationGatewayDeleteParams, principal interface{}) middleware.Responder { + return fn(params, principal) +} + +// DataCocsnRoutesRouteRouteDestinationGatewayDeleteHandler interface for that can handle valid data cocsn routes route route destination gateway delete params +type DataCocsnRoutesRouteRouteDestinationGatewayDeleteHandler interface { + Handle(DataCocsnRoutesRouteRouteDestinationGatewayDeleteParams, interface{}) middleware.Responder +} + +// NewDataCocsnRoutesRouteRouteDestinationGatewayDelete creates a new http.Handler for the data cocsn routes route route destination gateway delete operation +func NewDataCocsnRoutesRouteRouteDestinationGatewayDelete(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationGatewayDeleteHandler) *DataCocsnRoutesRouteRouteDestinationGatewayDelete { + return &DataCocsnRoutesRouteRouteDestinationGatewayDelete{Context: ctx, Handler: handler} +} + +/*DataCocsnRoutesRouteRouteDestinationGatewayDelete swagger:route DELETE /data/cocsn:routes/route={route-destination}/gateway data delete dataCocsnRoutesRouteRouteDestinationGatewayDelete + +Route gateway. IP address or host name + +Route gateway. IP address or host name + +*/ +type DataCocsnRoutesRouteRouteDestinationGatewayDelete struct { + Context *middleware.Context + Handler DataCocsnRoutesRouteRouteDestinationGatewayDeleteHandler +} + +func (o *DataCocsnRoutesRouteRouteDestinationGatewayDelete) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + route, rCtx, _ := o.Context.RouteInfo(r) + if rCtx != nil { + r = rCtx + } + var Params = NewDataCocsnRoutesRouteRouteDestinationGatewayDeleteParams() + + uprinc, aCtx, err := o.Context.Authorize(r, route) + if err != nil { + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + if aCtx != nil { + r = aCtx + } + var principal interface{} + if uprinc != nil { + principal = uprinc + } + + if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + + res := o.Handler.Handle(Params, principal) // actually handle the request + + o.Context.Respond(rw, r, route.Produces, route, res) + +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_delete_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_delete_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..f32fa96f9a722669bfedee1b6ced8ebd571a358a --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_delete_parameters.go @@ -0,0 +1,72 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime/middleware" + "github.com/go-openapi/strfmt" +) + +// NewDataCocsnRoutesRouteRouteDestinationGatewayDeleteParams creates a new DataCocsnRoutesRouteRouteDestinationGatewayDeleteParams object +// no default values defined in spec. +func NewDataCocsnRoutesRouteRouteDestinationGatewayDeleteParams() DataCocsnRoutesRouteRouteDestinationGatewayDeleteParams { + + return DataCocsnRoutesRouteRouteDestinationGatewayDeleteParams{} +} + +// DataCocsnRoutesRouteRouteDestinationGatewayDeleteParams contains all the bound params for the data cocsn routes route route destination gateway delete operation +// typically these are obtained from a http.Request +// +// swagger:parameters data_cocsn_routes_route_route_destination_gateway_delete +type DataCocsnRoutesRouteRouteDestinationGatewayDeleteParams struct { + + // HTTP Request Object + HTTPRequest *http.Request `json:"-"` + + /*Route destination. IP network + Required: true + In: path + */ + RouteDestination string +} + +// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface +// for simple values it will use straight method calls. +// +// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationGatewayDeleteParams() beforehand. +func (o *DataCocsnRoutesRouteRouteDestinationGatewayDeleteParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { + var res []error + + o.HTTPRequest = r + + rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") + if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindRouteDestination binds and validates parameter RouteDestination from path. +func (o *DataCocsnRoutesRouteRouteDestinationGatewayDeleteParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + + o.RouteDestination = raw + + return nil +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_delete_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_delete_responses.go new file mode 100644 index 0000000000000000000000000000000000000000..5aadf29694420c3b87c46c720cc5919aa430bda4 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_delete_responses.go @@ -0,0 +1,36 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime" +) + +// DataCocsnRoutesRouteRouteDestinationGatewayDeleteNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGatewayDeleteNoContent +const DataCocsnRoutesRouteRouteDestinationGatewayDeleteNoContentCode int = 204 + +/*DataCocsnRoutesRouteRouteDestinationGatewayDeleteNoContent No Content + +swagger:response dataCocsnRoutesRouteRouteDestinationGatewayDeleteNoContent +*/ +type DataCocsnRoutesRouteRouteDestinationGatewayDeleteNoContent struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationGatewayDeleteNoContent creates DataCocsnRoutesRouteRouteDestinationGatewayDeleteNoContent with default headers values +func NewDataCocsnRoutesRouteRouteDestinationGatewayDeleteNoContent() *DataCocsnRoutesRouteRouteDestinationGatewayDeleteNoContent { + + return &DataCocsnRoutesRouteRouteDestinationGatewayDeleteNoContent{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationGatewayDeleteNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(204) +} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_routes_ip_v4_static_route_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_delete_urlbuilder.go similarity index 54% rename from waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_routes_ip_v4_static_route_urlbuilder.go rename to api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_delete_urlbuilder.go index 023312c6b23699aaf55f165025098eb2148c7a3f..764c077ab043759df8f964d8b2bb3a16698e174e 100644 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_routes_ip_v4_static_route_urlbuilder.go +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_delete_urlbuilder.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package ciena_waveserver_interfaces +package data // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the generate command @@ -9,17 +9,22 @@ import ( "errors" "net/url" golangswaggerpaths "path" + "strings" ) -// PostDataWaveserverInterfacesRoutesIPV4StaticRouteURL generates an URL for the post data waveserver interfaces routes IP v4 static route operation -type PostDataWaveserverInterfacesRoutesIPV4StaticRouteURL struct { +// DataCocsnRoutesRouteRouteDestinationGatewayDeleteURL generates an URL for the data cocsn routes route route destination gateway delete operation +type DataCocsnRoutesRouteRouteDestinationGatewayDeleteURL struct { + RouteDestination string + _basePath string + // avoid unkeyed usage + _ struct{} } // WithBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *PostDataWaveserverInterfacesRoutesIPV4StaticRouteURL) WithBasePath(bp string) *PostDataWaveserverInterfacesRoutesIPV4StaticRouteURL { +func (o *DataCocsnRoutesRouteRouteDestinationGatewayDeleteURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationGatewayDeleteURL { o.SetBasePath(bp) return o } @@ -27,24 +32,34 @@ func (o *PostDataWaveserverInterfacesRoutesIPV4StaticRouteURL) WithBasePath(bp s // SetBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *PostDataWaveserverInterfacesRoutesIPV4StaticRouteURL) SetBasePath(bp string) { +func (o *DataCocsnRoutesRouteRouteDestinationGatewayDeleteURL) SetBasePath(bp string) { o._basePath = bp } // Build a url path and query string -func (o *PostDataWaveserverInterfacesRoutesIPV4StaticRouteURL) Build() (*url.URL, error) { +func (o *DataCocsnRoutesRouteRouteDestinationGatewayDeleteURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/data/waveserver-interfaces/routes/ipv4-static-route/" + var _path = "/data/cocsn:routes/route={route-destination}/gateway" + + routeDestination := o.RouteDestination + if routeDestination != "" { + _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) + } else { + return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationGatewayDeleteURL") + } _basePath := o._basePath + if _basePath == "" { + _basePath = "/restconf" + } _result.Path = golangswaggerpaths.Join(_basePath, _path) return &_result, nil } // Must is a helper function to panic when the url builder returns an error -func (o *PostDataWaveserverInterfacesRoutesIPV4StaticRouteURL) Must(u *url.URL, err error) *url.URL { +func (o *DataCocsnRoutesRouteRouteDestinationGatewayDeleteURL) Must(u *url.URL, err error) *url.URL { if err != nil { panic(err) } @@ -55,17 +70,17 @@ func (o *PostDataWaveserverInterfacesRoutesIPV4StaticRouteURL) Must(u *url.URL, } // String returns the string representation of the path with query string -func (o *PostDataWaveserverInterfacesRoutesIPV4StaticRouteURL) String() string { +func (o *DataCocsnRoutesRouteRouteDestinationGatewayDeleteURL) String() string { return o.Must(o.Build()).String() } // BuildFull builds a full url with scheme, host, path and query string -func (o *PostDataWaveserverInterfacesRoutesIPV4StaticRouteURL) BuildFull(scheme, host string) (*url.URL, error) { +func (o *DataCocsnRoutesRouteRouteDestinationGatewayDeleteURL) BuildFull(scheme, host string) (*url.URL, error) { if scheme == "" { - return nil, errors.New("scheme is required for a full url on PostDataWaveserverInterfacesRoutesIPV4StaticRouteURL") + return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationGatewayDeleteURL") } if host == "" { - return nil, errors.New("host is required for a full url on PostDataWaveserverInterfacesRoutesIPV4StaticRouteURL") + return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationGatewayDeleteURL") } base, err := o.Build() @@ -79,6 +94,6 @@ func (o *PostDataWaveserverInterfacesRoutesIPV4StaticRouteURL) BuildFull(scheme, } // StringFull returns the string representation of a complete url -func (o *PostDataWaveserverInterfacesRoutesIPV4StaticRouteURL) StringFull(scheme, host string) string { +func (o *DataCocsnRoutesRouteRouteDestinationGatewayDeleteURL) StringFull(scheme, host string) string { return o.Must(o.BuildFull(scheme, host)).String() } diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_patch.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_patch.go new file mode 100644 index 0000000000000000000000000000000000000000..44b2d6d89d18e3dfeb3b40aed7e7063664e3b5ba --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_patch.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime/middleware" +) + +// DataCocsnRoutesRouteRouteDestinationGatewayPatchHandlerFunc turns a function with the right signature into a data cocsn routes route route destination gateway patch handler +type DataCocsnRoutesRouteRouteDestinationGatewayPatchHandlerFunc func(DataCocsnRoutesRouteRouteDestinationGatewayPatchParams, interface{}) middleware.Responder + +// Handle executing the request and returning a response +func (fn DataCocsnRoutesRouteRouteDestinationGatewayPatchHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationGatewayPatchParams, principal interface{}) middleware.Responder { + return fn(params, principal) +} + +// DataCocsnRoutesRouteRouteDestinationGatewayPatchHandler interface for that can handle valid data cocsn routes route route destination gateway patch params +type DataCocsnRoutesRouteRouteDestinationGatewayPatchHandler interface { + Handle(DataCocsnRoutesRouteRouteDestinationGatewayPatchParams, interface{}) middleware.Responder +} + +// NewDataCocsnRoutesRouteRouteDestinationGatewayPatch creates a new http.Handler for the data cocsn routes route route destination gateway patch operation +func NewDataCocsnRoutesRouteRouteDestinationGatewayPatch(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationGatewayPatchHandler) *DataCocsnRoutesRouteRouteDestinationGatewayPatch { + return &DataCocsnRoutesRouteRouteDestinationGatewayPatch{Context: ctx, Handler: handler} +} + +/*DataCocsnRoutesRouteRouteDestinationGatewayPatch swagger:route PATCH /data/cocsn:routes/route={route-destination}/gateway data patch dataCocsnRoutesRouteRouteDestinationGatewayPatch + +Route gateway. IP address or host name + +Route gateway. IP address or host name + +*/ +type DataCocsnRoutesRouteRouteDestinationGatewayPatch struct { + Context *middleware.Context + Handler DataCocsnRoutesRouteRouteDestinationGatewayPatchHandler +} + +func (o *DataCocsnRoutesRouteRouteDestinationGatewayPatch) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + route, rCtx, _ := o.Context.RouteInfo(r) + if rCtx != nil { + r = rCtx + } + var Params = NewDataCocsnRoutesRouteRouteDestinationGatewayPatchParams() + + uprinc, aCtx, err := o.Context.Authorize(r, route) + if err != nil { + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + if aCtx != nil { + r = aCtx + } + var principal interface{} + if uprinc != nil { + principal = uprinc + } + + if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + + res := o.Handler.Handle(Params, principal) // actually handle the request + + o.Context.Respond(rw, r, route.Produces, route, res) + +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_patch_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_patch_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..41eef3801f1c6334b5e5d02ebb265b5f231b6c55 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_patch_parameters.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "io" + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/runtime/middleware" + "github.com/go-openapi/strfmt" + + "code.fbi.h-da.de/cocsn/cocsn-api/api/models" +) + +// NewDataCocsnRoutesRouteRouteDestinationGatewayPatchParams creates a new DataCocsnRoutesRouteRouteDestinationGatewayPatchParams object +// no default values defined in spec. +func NewDataCocsnRoutesRouteRouteDestinationGatewayPatchParams() DataCocsnRoutesRouteRouteDestinationGatewayPatchParams { + + return DataCocsnRoutesRouteRouteDestinationGatewayPatchParams{} +} + +// DataCocsnRoutesRouteRouteDestinationGatewayPatchParams contains all the bound params for the data cocsn routes route route destination gateway patch operation +// typically these are obtained from a http.Request +// +// swagger:parameters data_cocsn_routes_route_route_destination_gateway_patch +type DataCocsnRoutesRouteRouteDestinationGatewayPatchParams struct { + + // HTTP Request Object + HTTPRequest *http.Request `json:"-"` + + /*Route gateway. IP address or host name + Required: true + In: body + */ + Gateway *models.DataCocsnRoutesRouteRouteDestinationGateway + /*Route destination. IP network + Required: true + In: path + */ + RouteDestination string +} + +// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface +// for simple values it will use straight method calls. +// +// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationGatewayPatchParams() beforehand. +func (o *DataCocsnRoutesRouteRouteDestinationGatewayPatchParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { + var res []error + + o.HTTPRequest = r + + if runtime.HasBody(r) { + defer r.Body.Close() + var body models.DataCocsnRoutesRouteRouteDestinationGateway + if err := route.Consumer.Consume(r.Body, &body); err != nil { + if err == io.EOF { + res = append(res, errors.Required("gateway", "body", "")) + } else { + res = append(res, errors.NewParseError("gateway", "body", "", err)) + } + } else { + // validate body object + if err := body.Validate(route.Formats); err != nil { + res = append(res, err) + } + + if len(res) == 0 { + o.Gateway = &body + } + } + } else { + res = append(res, errors.Required("gateway", "body", "")) + } + rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") + if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindRouteDestination binds and validates parameter RouteDestination from path. +func (o *DataCocsnRoutesRouteRouteDestinationGatewayPatchParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + + o.RouteDestination = raw + + return nil +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_patch_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_patch_responses.go new file mode 100644 index 0000000000000000000000000000000000000000..fe2bd52169178403c5739544cc995564200d5990 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_patch_responses.go @@ -0,0 +1,156 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime" +) + +// DataCocsnRoutesRouteRouteDestinationGatewayPatchNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGatewayPatchNoContent +const DataCocsnRoutesRouteRouteDestinationGatewayPatchNoContentCode int = 204 + +/*DataCocsnRoutesRouteRouteDestinationGatewayPatchNoContent leaf gateway updated + +swagger:response dataCocsnRoutesRouteRouteDestinationGatewayPatchNoContent +*/ +type DataCocsnRoutesRouteRouteDestinationGatewayPatchNoContent struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationGatewayPatchNoContent creates DataCocsnRoutesRouteRouteDestinationGatewayPatchNoContent with default headers values +func NewDataCocsnRoutesRouteRouteDestinationGatewayPatchNoContent() *DataCocsnRoutesRouteRouteDestinationGatewayPatchNoContent { + + return &DataCocsnRoutesRouteRouteDestinationGatewayPatchNoContent{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationGatewayPatchNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(204) +} + +// DataCocsnRoutesRouteRouteDestinationGatewayPatchBadRequestCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGatewayPatchBadRequest +const DataCocsnRoutesRouteRouteDestinationGatewayPatchBadRequestCode int = 400 + +/*DataCocsnRoutesRouteRouteDestinationGatewayPatchBadRequest Bad Request + +swagger:response dataCocsnRoutesRouteRouteDestinationGatewayPatchBadRequest +*/ +type DataCocsnRoutesRouteRouteDestinationGatewayPatchBadRequest struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationGatewayPatchBadRequest creates DataCocsnRoutesRouteRouteDestinationGatewayPatchBadRequest with default headers values +func NewDataCocsnRoutesRouteRouteDestinationGatewayPatchBadRequest() *DataCocsnRoutesRouteRouteDestinationGatewayPatchBadRequest { + + return &DataCocsnRoutesRouteRouteDestinationGatewayPatchBadRequest{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationGatewayPatchBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(400) +} + +// DataCocsnRoutesRouteRouteDestinationGatewayPatchUnauthorizedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGatewayPatchUnauthorized +const DataCocsnRoutesRouteRouteDestinationGatewayPatchUnauthorizedCode int = 401 + +/*DataCocsnRoutesRouteRouteDestinationGatewayPatchUnauthorized Unauthorized + +swagger:response dataCocsnRoutesRouteRouteDestinationGatewayPatchUnauthorized +*/ +type DataCocsnRoutesRouteRouteDestinationGatewayPatchUnauthorized struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationGatewayPatchUnauthorized creates DataCocsnRoutesRouteRouteDestinationGatewayPatchUnauthorized with default headers values +func NewDataCocsnRoutesRouteRouteDestinationGatewayPatchUnauthorized() *DataCocsnRoutesRouteRouteDestinationGatewayPatchUnauthorized { + + return &DataCocsnRoutesRouteRouteDestinationGatewayPatchUnauthorized{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationGatewayPatchUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(401) +} + +// DataCocsnRoutesRouteRouteDestinationGatewayPatchNotFoundCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGatewayPatchNotFound +const DataCocsnRoutesRouteRouteDestinationGatewayPatchNotFoundCode int = 404 + +/*DataCocsnRoutesRouteRouteDestinationGatewayPatchNotFound Not Found + +swagger:response dataCocsnRoutesRouteRouteDestinationGatewayPatchNotFound +*/ +type DataCocsnRoutesRouteRouteDestinationGatewayPatchNotFound struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationGatewayPatchNotFound creates DataCocsnRoutesRouteRouteDestinationGatewayPatchNotFound with default headers values +func NewDataCocsnRoutesRouteRouteDestinationGatewayPatchNotFound() *DataCocsnRoutesRouteRouteDestinationGatewayPatchNotFound { + + return &DataCocsnRoutesRouteRouteDestinationGatewayPatchNotFound{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationGatewayPatchNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(404) +} + +// DataCocsnRoutesRouteRouteDestinationGatewayPatchMethodNotAllowedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGatewayPatchMethodNotAllowed +const DataCocsnRoutesRouteRouteDestinationGatewayPatchMethodNotAllowedCode int = 405 + +/*DataCocsnRoutesRouteRouteDestinationGatewayPatchMethodNotAllowed Method Not Allowed + +swagger:response dataCocsnRoutesRouteRouteDestinationGatewayPatchMethodNotAllowed +*/ +type DataCocsnRoutesRouteRouteDestinationGatewayPatchMethodNotAllowed struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationGatewayPatchMethodNotAllowed creates DataCocsnRoutesRouteRouteDestinationGatewayPatchMethodNotAllowed with default headers values +func NewDataCocsnRoutesRouteRouteDestinationGatewayPatchMethodNotAllowed() *DataCocsnRoutesRouteRouteDestinationGatewayPatchMethodNotAllowed { + + return &DataCocsnRoutesRouteRouteDestinationGatewayPatchMethodNotAllowed{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationGatewayPatchMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(405) +} + +// DataCocsnRoutesRouteRouteDestinationGatewayPatchConflictCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGatewayPatchConflict +const DataCocsnRoutesRouteRouteDestinationGatewayPatchConflictCode int = 409 + +/*DataCocsnRoutesRouteRouteDestinationGatewayPatchConflict Conflict + +swagger:response dataCocsnRoutesRouteRouteDestinationGatewayPatchConflict +*/ +type DataCocsnRoutesRouteRouteDestinationGatewayPatchConflict struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationGatewayPatchConflict creates DataCocsnRoutesRouteRouteDestinationGatewayPatchConflict with default headers values +func NewDataCocsnRoutesRouteRouteDestinationGatewayPatchConflict() *DataCocsnRoutesRouteRouteDestinationGatewayPatchConflict { + + return &DataCocsnRoutesRouteRouteDestinationGatewayPatchConflict{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationGatewayPatchConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(409) +} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_patch_urlbuilder.go similarity index 56% rename from waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_urlbuilder.go rename to api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_patch_urlbuilder.go index 840540e9f4d28a82927d0afd06fd20fcbe00cece..96135e13aa2ce3ecf751234baed139e4e73307a5 100644 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_urlbuilder.go +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_patch_urlbuilder.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package ciena_waveserver_interfaces +package data // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the generate command @@ -10,13 +10,11 @@ import ( "net/url" golangswaggerpaths "path" "strings" - - "github.com/go-openapi/swag" ) -// PutDataWaveserverInterfacesLogicalInterfaceIndexURL generates an URL for the put data waveserver interfaces logical interface index operation -type PutDataWaveserverInterfacesLogicalInterfaceIndexURL struct { - Index int64 +// DataCocsnRoutesRouteRouteDestinationGatewayPatchURL generates an URL for the data cocsn routes route route destination gateway patch operation +type DataCocsnRoutesRouteRouteDestinationGatewayPatchURL struct { + RouteDestination string _basePath string // avoid unkeyed usage @@ -26,7 +24,7 @@ type PutDataWaveserverInterfacesLogicalInterfaceIndexURL struct { // WithBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexURL) WithBasePath(bp string) *PutDataWaveserverInterfacesLogicalInterfaceIndexURL { +func (o *DataCocsnRoutesRouteRouteDestinationGatewayPatchURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationGatewayPatchURL { o.SetBasePath(bp) return o } @@ -34,31 +32,34 @@ func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexURL) WithBasePath(bp st // SetBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexURL) SetBasePath(bp string) { +func (o *DataCocsnRoutesRouteRouteDestinationGatewayPatchURL) SetBasePath(bp string) { o._basePath = bp } // Build a url path and query string -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexURL) Build() (*url.URL, error) { +func (o *DataCocsnRoutesRouteRouteDestinationGatewayPatchURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/data/waveserver-interfaces/logical-interface={index}/" + var _path = "/data/cocsn:routes/route={route-destination}/gateway" - index := swag.FormatInt64(o.Index) - if index != "" { - _path = strings.Replace(_path, "{index}", index, -1) + routeDestination := o.RouteDestination + if routeDestination != "" { + _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) } else { - return nil, errors.New("index is required on PutDataWaveserverInterfacesLogicalInterfaceIndexURL") + return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationGatewayPatchURL") } _basePath := o._basePath + if _basePath == "" { + _basePath = "/restconf" + } _result.Path = golangswaggerpaths.Join(_basePath, _path) return &_result, nil } // Must is a helper function to panic when the url builder returns an error -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexURL) Must(u *url.URL, err error) *url.URL { +func (o *DataCocsnRoutesRouteRouteDestinationGatewayPatchURL) Must(u *url.URL, err error) *url.URL { if err != nil { panic(err) } @@ -69,17 +70,17 @@ func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexURL) Must(u *url.URL, e } // String returns the string representation of the path with query string -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexURL) String() string { +func (o *DataCocsnRoutesRouteRouteDestinationGatewayPatchURL) String() string { return o.Must(o.Build()).String() } // BuildFull builds a full url with scheme, host, path and query string -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexURL) BuildFull(scheme, host string) (*url.URL, error) { +func (o *DataCocsnRoutesRouteRouteDestinationGatewayPatchURL) BuildFull(scheme, host string) (*url.URL, error) { if scheme == "" { - return nil, errors.New("scheme is required for a full url on PutDataWaveserverInterfacesLogicalInterfaceIndexURL") + return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationGatewayPatchURL") } if host == "" { - return nil, errors.New("host is required for a full url on PutDataWaveserverInterfacesLogicalInterfaceIndexURL") + return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationGatewayPatchURL") } base, err := o.Build() @@ -93,6 +94,6 @@ func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexURL) BuildFull(scheme, } // StringFull returns the string representation of a complete url -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexURL) StringFull(scheme, host string) string { +func (o *DataCocsnRoutesRouteRouteDestinationGatewayPatchURL) StringFull(scheme, host string) string { return o.Must(o.BuildFull(scheme, host)).String() } diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_put.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_put.go new file mode 100644 index 0000000000000000000000000000000000000000..9655b0002631f2717aff3a2d8f8944d7d0d6df85 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_put.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime/middleware" +) + +// DataCocsnRoutesRouteRouteDestinationGatewayPutHandlerFunc turns a function with the right signature into a data cocsn routes route route destination gateway put handler +type DataCocsnRoutesRouteRouteDestinationGatewayPutHandlerFunc func(DataCocsnRoutesRouteRouteDestinationGatewayPutParams, interface{}) middleware.Responder + +// Handle executing the request and returning a response +func (fn DataCocsnRoutesRouteRouteDestinationGatewayPutHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationGatewayPutParams, principal interface{}) middleware.Responder { + return fn(params, principal) +} + +// DataCocsnRoutesRouteRouteDestinationGatewayPutHandler interface for that can handle valid data cocsn routes route route destination gateway put params +type DataCocsnRoutesRouteRouteDestinationGatewayPutHandler interface { + Handle(DataCocsnRoutesRouteRouteDestinationGatewayPutParams, interface{}) middleware.Responder +} + +// NewDataCocsnRoutesRouteRouteDestinationGatewayPut creates a new http.Handler for the data cocsn routes route route destination gateway put operation +func NewDataCocsnRoutesRouteRouteDestinationGatewayPut(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationGatewayPutHandler) *DataCocsnRoutesRouteRouteDestinationGatewayPut { + return &DataCocsnRoutesRouteRouteDestinationGatewayPut{Context: ctx, Handler: handler} +} + +/*DataCocsnRoutesRouteRouteDestinationGatewayPut swagger:route PUT /data/cocsn:routes/route={route-destination}/gateway data put dataCocsnRoutesRouteRouteDestinationGatewayPut + +Route gateway. IP address or host name + +Route gateway. IP address or host name + +*/ +type DataCocsnRoutesRouteRouteDestinationGatewayPut struct { + Context *middleware.Context + Handler DataCocsnRoutesRouteRouteDestinationGatewayPutHandler +} + +func (o *DataCocsnRoutesRouteRouteDestinationGatewayPut) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + route, rCtx, _ := o.Context.RouteInfo(r) + if rCtx != nil { + r = rCtx + } + var Params = NewDataCocsnRoutesRouteRouteDestinationGatewayPutParams() + + uprinc, aCtx, err := o.Context.Authorize(r, route) + if err != nil { + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + if aCtx != nil { + r = aCtx + } + var principal interface{} + if uprinc != nil { + principal = uprinc + } + + if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + + res := o.Handler.Handle(Params, principal) // actually handle the request + + o.Context.Respond(rw, r, route.Produces, route, res) + +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_put_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_put_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..9726fb2286ece9cd5a19094e408e5358499072b0 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_put_parameters.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "io" + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/runtime/middleware" + "github.com/go-openapi/strfmt" + + "code.fbi.h-da.de/cocsn/cocsn-api/api/models" +) + +// NewDataCocsnRoutesRouteRouteDestinationGatewayPutParams creates a new DataCocsnRoutesRouteRouteDestinationGatewayPutParams object +// no default values defined in spec. +func NewDataCocsnRoutesRouteRouteDestinationGatewayPutParams() DataCocsnRoutesRouteRouteDestinationGatewayPutParams { + + return DataCocsnRoutesRouteRouteDestinationGatewayPutParams{} +} + +// DataCocsnRoutesRouteRouteDestinationGatewayPutParams contains all the bound params for the data cocsn routes route route destination gateway put operation +// typically these are obtained from a http.Request +// +// swagger:parameters data_cocsn_routes_route_route_destination_gateway_put +type DataCocsnRoutesRouteRouteDestinationGatewayPutParams struct { + + // HTTP Request Object + HTTPRequest *http.Request `json:"-"` + + /*Route gateway. IP address or host name + Required: true + In: body + */ + Gateway *models.DataCocsnRoutesRouteRouteDestinationGateway + /*Route destination. IP network + Required: true + In: path + */ + RouteDestination string +} + +// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface +// for simple values it will use straight method calls. +// +// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationGatewayPutParams() beforehand. +func (o *DataCocsnRoutesRouteRouteDestinationGatewayPutParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { + var res []error + + o.HTTPRequest = r + + if runtime.HasBody(r) { + defer r.Body.Close() + var body models.DataCocsnRoutesRouteRouteDestinationGateway + if err := route.Consumer.Consume(r.Body, &body); err != nil { + if err == io.EOF { + res = append(res, errors.Required("gateway", "body", "")) + } else { + res = append(res, errors.NewParseError("gateway", "body", "", err)) + } + } else { + // validate body object + if err := body.Validate(route.Formats); err != nil { + res = append(res, err) + } + + if len(res) == 0 { + o.Gateway = &body + } + } + } else { + res = append(res, errors.Required("gateway", "body", "")) + } + rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") + if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindRouteDestination binds and validates parameter RouteDestination from path. +func (o *DataCocsnRoutesRouteRouteDestinationGatewayPutParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + + o.RouteDestination = raw + + return nil +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_put_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_put_responses.go new file mode 100644 index 0000000000000000000000000000000000000000..d6e7ae3746ad426a965f5c1812d565567cd16a87 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_put_responses.go @@ -0,0 +1,180 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime" +) + +// DataCocsnRoutesRouteRouteDestinationGatewayPutCreatedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGatewayPutCreated +const DataCocsnRoutesRouteRouteDestinationGatewayPutCreatedCode int = 201 + +/*DataCocsnRoutesRouteRouteDestinationGatewayPutCreated leaf gateway created or replaced + +swagger:response dataCocsnRoutesRouteRouteDestinationGatewayPutCreated +*/ +type DataCocsnRoutesRouteRouteDestinationGatewayPutCreated struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationGatewayPutCreated creates DataCocsnRoutesRouteRouteDestinationGatewayPutCreated with default headers values +func NewDataCocsnRoutesRouteRouteDestinationGatewayPutCreated() *DataCocsnRoutesRouteRouteDestinationGatewayPutCreated { + + return &DataCocsnRoutesRouteRouteDestinationGatewayPutCreated{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationGatewayPutCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(201) +} + +// DataCocsnRoutesRouteRouteDestinationGatewayPutNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGatewayPutNoContent +const DataCocsnRoutesRouteRouteDestinationGatewayPutNoContentCode int = 204 + +/*DataCocsnRoutesRouteRouteDestinationGatewayPutNoContent No Content + +swagger:response dataCocsnRoutesRouteRouteDestinationGatewayPutNoContent +*/ +type DataCocsnRoutesRouteRouteDestinationGatewayPutNoContent struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationGatewayPutNoContent creates DataCocsnRoutesRouteRouteDestinationGatewayPutNoContent with default headers values +func NewDataCocsnRoutesRouteRouteDestinationGatewayPutNoContent() *DataCocsnRoutesRouteRouteDestinationGatewayPutNoContent { + + return &DataCocsnRoutesRouteRouteDestinationGatewayPutNoContent{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationGatewayPutNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(204) +} + +// DataCocsnRoutesRouteRouteDestinationGatewayPutBadRequestCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGatewayPutBadRequest +const DataCocsnRoutesRouteRouteDestinationGatewayPutBadRequestCode int = 400 + +/*DataCocsnRoutesRouteRouteDestinationGatewayPutBadRequest Bad Request + +swagger:response dataCocsnRoutesRouteRouteDestinationGatewayPutBadRequest +*/ +type DataCocsnRoutesRouteRouteDestinationGatewayPutBadRequest struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationGatewayPutBadRequest creates DataCocsnRoutesRouteRouteDestinationGatewayPutBadRequest with default headers values +func NewDataCocsnRoutesRouteRouteDestinationGatewayPutBadRequest() *DataCocsnRoutesRouteRouteDestinationGatewayPutBadRequest { + + return &DataCocsnRoutesRouteRouteDestinationGatewayPutBadRequest{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationGatewayPutBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(400) +} + +// DataCocsnRoutesRouteRouteDestinationGatewayPutUnauthorizedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGatewayPutUnauthorized +const DataCocsnRoutesRouteRouteDestinationGatewayPutUnauthorizedCode int = 401 + +/*DataCocsnRoutesRouteRouteDestinationGatewayPutUnauthorized Unauthorized + +swagger:response dataCocsnRoutesRouteRouteDestinationGatewayPutUnauthorized +*/ +type DataCocsnRoutesRouteRouteDestinationGatewayPutUnauthorized struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationGatewayPutUnauthorized creates DataCocsnRoutesRouteRouteDestinationGatewayPutUnauthorized with default headers values +func NewDataCocsnRoutesRouteRouteDestinationGatewayPutUnauthorized() *DataCocsnRoutesRouteRouteDestinationGatewayPutUnauthorized { + + return &DataCocsnRoutesRouteRouteDestinationGatewayPutUnauthorized{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationGatewayPutUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(401) +} + +// DataCocsnRoutesRouteRouteDestinationGatewayPutNotFoundCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGatewayPutNotFound +const DataCocsnRoutesRouteRouteDestinationGatewayPutNotFoundCode int = 404 + +/*DataCocsnRoutesRouteRouteDestinationGatewayPutNotFound Not Found + +swagger:response dataCocsnRoutesRouteRouteDestinationGatewayPutNotFound +*/ +type DataCocsnRoutesRouteRouteDestinationGatewayPutNotFound struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationGatewayPutNotFound creates DataCocsnRoutesRouteRouteDestinationGatewayPutNotFound with default headers values +func NewDataCocsnRoutesRouteRouteDestinationGatewayPutNotFound() *DataCocsnRoutesRouteRouteDestinationGatewayPutNotFound { + + return &DataCocsnRoutesRouteRouteDestinationGatewayPutNotFound{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationGatewayPutNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(404) +} + +// DataCocsnRoutesRouteRouteDestinationGatewayPutMethodNotAllowedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGatewayPutMethodNotAllowed +const DataCocsnRoutesRouteRouteDestinationGatewayPutMethodNotAllowedCode int = 405 + +/*DataCocsnRoutesRouteRouteDestinationGatewayPutMethodNotAllowed Method Not Allowed + +swagger:response dataCocsnRoutesRouteRouteDestinationGatewayPutMethodNotAllowed +*/ +type DataCocsnRoutesRouteRouteDestinationGatewayPutMethodNotAllowed struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationGatewayPutMethodNotAllowed creates DataCocsnRoutesRouteRouteDestinationGatewayPutMethodNotAllowed with default headers values +func NewDataCocsnRoutesRouteRouteDestinationGatewayPutMethodNotAllowed() *DataCocsnRoutesRouteRouteDestinationGatewayPutMethodNotAllowed { + + return &DataCocsnRoutesRouteRouteDestinationGatewayPutMethodNotAllowed{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationGatewayPutMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(405) +} + +// DataCocsnRoutesRouteRouteDestinationGatewayPutConflictCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationGatewayPutConflict +const DataCocsnRoutesRouteRouteDestinationGatewayPutConflictCode int = 409 + +/*DataCocsnRoutesRouteRouteDestinationGatewayPutConflict Conflict + +swagger:response dataCocsnRoutesRouteRouteDestinationGatewayPutConflict +*/ +type DataCocsnRoutesRouteRouteDestinationGatewayPutConflict struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationGatewayPutConflict creates DataCocsnRoutesRouteRouteDestinationGatewayPutConflict with default headers values +func NewDataCocsnRoutesRouteRouteDestinationGatewayPutConflict() *DataCocsnRoutesRouteRouteDestinationGatewayPutConflict { + + return &DataCocsnRoutesRouteRouteDestinationGatewayPutConflict{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationGatewayPutConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(409) +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_put_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_put_urlbuilder.go new file mode 100644 index 0000000000000000000000000000000000000000..054844e997f6cb57b4209d39034213df8340e72e --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_gateway_put_urlbuilder.go @@ -0,0 +1,99 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "errors" + "net/url" + golangswaggerpaths "path" + "strings" +) + +// DataCocsnRoutesRouteRouteDestinationGatewayPutURL generates an URL for the data cocsn routes route route destination gateway put operation +type DataCocsnRoutesRouteRouteDestinationGatewayPutURL struct { + RouteDestination string + + _basePath string + // avoid unkeyed usage + _ struct{} +} + +// WithBasePath sets the base path for this url builder, only required when it's different from the +// base path specified in the swagger spec. +// When the value of the base path is an empty string +func (o *DataCocsnRoutesRouteRouteDestinationGatewayPutURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationGatewayPutURL { + o.SetBasePath(bp) + return o +} + +// SetBasePath sets the base path for this url builder, only required when it's different from the +// base path specified in the swagger spec. +// When the value of the base path is an empty string +func (o *DataCocsnRoutesRouteRouteDestinationGatewayPutURL) SetBasePath(bp string) { + o._basePath = bp +} + +// Build a url path and query string +func (o *DataCocsnRoutesRouteRouteDestinationGatewayPutURL) Build() (*url.URL, error) { + var _result url.URL + + var _path = "/data/cocsn:routes/route={route-destination}/gateway" + + routeDestination := o.RouteDestination + if routeDestination != "" { + _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) + } else { + return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationGatewayPutURL") + } + + _basePath := o._basePath + if _basePath == "" { + _basePath = "/restconf" + } + _result.Path = golangswaggerpaths.Join(_basePath, _path) + + return &_result, nil +} + +// Must is a helper function to panic when the url builder returns an error +func (o *DataCocsnRoutesRouteRouteDestinationGatewayPutURL) Must(u *url.URL, err error) *url.URL { + if err != nil { + panic(err) + } + if u == nil { + panic("url can't be nil") + } + return u +} + +// String returns the string representation of the path with query string +func (o *DataCocsnRoutesRouteRouteDestinationGatewayPutURL) String() string { + return o.Must(o.Build()).String() +} + +// BuildFull builds a full url with scheme, host, path and query string +func (o *DataCocsnRoutesRouteRouteDestinationGatewayPutURL) BuildFull(scheme, host string) (*url.URL, error) { + if scheme == "" { + return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationGatewayPutURL") + } + if host == "" { + return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationGatewayPutURL") + } + + base, err := o.Build() + if err != nil { + return nil, err + } + + base.Scheme = scheme + base.Host = host + return base, nil +} + +// StringFull returns the string representation of a complete url +func (o *DataCocsnRoutesRouteRouteDestinationGatewayPutURL) StringFull(scheme, host string) string { + return o.Must(o.BuildFull(scheme, host)).String() +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_delete.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_delete.go new file mode 100644 index 0000000000000000000000000000000000000000..3a7e40c64bb9f13b575191c571d001b04013954e --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_delete.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime/middleware" +) + +// DataCocsnRoutesRouteRouteDestinationInterfaceDeleteHandlerFunc turns a function with the right signature into a data cocsn routes route route destination interface delete handler +type DataCocsnRoutesRouteRouteDestinationInterfaceDeleteHandlerFunc func(DataCocsnRoutesRouteRouteDestinationInterfaceDeleteParams, interface{}) middleware.Responder + +// Handle executing the request and returning a response +func (fn DataCocsnRoutesRouteRouteDestinationInterfaceDeleteHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationInterfaceDeleteParams, principal interface{}) middleware.Responder { + return fn(params, principal) +} + +// DataCocsnRoutesRouteRouteDestinationInterfaceDeleteHandler interface for that can handle valid data cocsn routes route route destination interface delete params +type DataCocsnRoutesRouteRouteDestinationInterfaceDeleteHandler interface { + Handle(DataCocsnRoutesRouteRouteDestinationInterfaceDeleteParams, interface{}) middleware.Responder +} + +// NewDataCocsnRoutesRouteRouteDestinationInterfaceDelete creates a new http.Handler for the data cocsn routes route route destination interface delete operation +func NewDataCocsnRoutesRouteRouteDestinationInterfaceDelete(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationInterfaceDeleteHandler) *DataCocsnRoutesRouteRouteDestinationInterfaceDelete { + return &DataCocsnRoutesRouteRouteDestinationInterfaceDelete{Context: ctx, Handler: handler} +} + +/*DataCocsnRoutesRouteRouteDestinationInterfaceDelete swagger:route DELETE /data/cocsn:routes/route={route-destination}/interface data delete dataCocsnRoutesRouteRouteDestinationInterfaceDelete + +Interface used for the route + +Interface used for the route + +*/ +type DataCocsnRoutesRouteRouteDestinationInterfaceDelete struct { + Context *middleware.Context + Handler DataCocsnRoutesRouteRouteDestinationInterfaceDeleteHandler +} + +func (o *DataCocsnRoutesRouteRouteDestinationInterfaceDelete) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + route, rCtx, _ := o.Context.RouteInfo(r) + if rCtx != nil { + r = rCtx + } + var Params = NewDataCocsnRoutesRouteRouteDestinationInterfaceDeleteParams() + + uprinc, aCtx, err := o.Context.Authorize(r, route) + if err != nil { + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + if aCtx != nil { + r = aCtx + } + var principal interface{} + if uprinc != nil { + principal = uprinc + } + + if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + + res := o.Handler.Handle(Params, principal) // actually handle the request + + o.Context.Respond(rw, r, route.Produces, route, res) + +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_delete_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_delete_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..6e040dd47d4f3dbbe489a15fa7979dffb2c4b583 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_delete_parameters.go @@ -0,0 +1,72 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime/middleware" + "github.com/go-openapi/strfmt" +) + +// NewDataCocsnRoutesRouteRouteDestinationInterfaceDeleteParams creates a new DataCocsnRoutesRouteRouteDestinationInterfaceDeleteParams object +// no default values defined in spec. +func NewDataCocsnRoutesRouteRouteDestinationInterfaceDeleteParams() DataCocsnRoutesRouteRouteDestinationInterfaceDeleteParams { + + return DataCocsnRoutesRouteRouteDestinationInterfaceDeleteParams{} +} + +// DataCocsnRoutesRouteRouteDestinationInterfaceDeleteParams contains all the bound params for the data cocsn routes route route destination interface delete operation +// typically these are obtained from a http.Request +// +// swagger:parameters data_cocsn_routes_route_route_destination_interface_delete +type DataCocsnRoutesRouteRouteDestinationInterfaceDeleteParams struct { + + // HTTP Request Object + HTTPRequest *http.Request `json:"-"` + + /*Route destination. IP network + Required: true + In: path + */ + RouteDestination string +} + +// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface +// for simple values it will use straight method calls. +// +// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationInterfaceDeleteParams() beforehand. +func (o *DataCocsnRoutesRouteRouteDestinationInterfaceDeleteParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { + var res []error + + o.HTTPRequest = r + + rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") + if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindRouteDestination binds and validates parameter RouteDestination from path. +func (o *DataCocsnRoutesRouteRouteDestinationInterfaceDeleteParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + + o.RouteDestination = raw + + return nil +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_delete_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_delete_responses.go new file mode 100644 index 0000000000000000000000000000000000000000..b322d808e1170c545c2ac4de1076ab9978150dd3 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_delete_responses.go @@ -0,0 +1,36 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime" +) + +// DataCocsnRoutesRouteRouteDestinationInterfaceDeleteNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationInterfaceDeleteNoContent +const DataCocsnRoutesRouteRouteDestinationInterfaceDeleteNoContentCode int = 204 + +/*DataCocsnRoutesRouteRouteDestinationInterfaceDeleteNoContent No Content + +swagger:response dataCocsnRoutesRouteRouteDestinationInterfaceDeleteNoContent +*/ +type DataCocsnRoutesRouteRouteDestinationInterfaceDeleteNoContent struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationInterfaceDeleteNoContent creates DataCocsnRoutesRouteRouteDestinationInterfaceDeleteNoContent with default headers values +func NewDataCocsnRoutesRouteRouteDestinationInterfaceDeleteNoContent() *DataCocsnRoutesRouteRouteDestinationInterfaceDeleteNoContent { + + return &DataCocsnRoutesRouteRouteDestinationInterfaceDeleteNoContent{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationInterfaceDeleteNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(204) +} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_id_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_delete_urlbuilder.go similarity index 55% rename from waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_id_urlbuilder.go rename to api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_delete_urlbuilder.go index 8d8e93a0aa23f24283ea83cc7b4311e13084260b..4745864b7ebf2f07d52d18085c0668ea887e3ab3 100644 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_id_urlbuilder.go +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_delete_urlbuilder.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package ciena_waveserver_interfaces +package data // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the generate command @@ -12,9 +12,9 @@ import ( "strings" ) -// PostDataWaveserverInterfacesPhysicalInterfaceNameIDURL generates an URL for the post data waveserver interfaces physical interface name ID operation -type PostDataWaveserverInterfacesPhysicalInterfaceNameIDURL struct { - Name string +// DataCocsnRoutesRouteRouteDestinationInterfaceDeleteURL generates an URL for the data cocsn routes route route destination interface delete operation +type DataCocsnRoutesRouteRouteDestinationInterfaceDeleteURL struct { + RouteDestination string _basePath string // avoid unkeyed usage @@ -24,7 +24,7 @@ type PostDataWaveserverInterfacesPhysicalInterfaceNameIDURL struct { // WithBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNameIDURL) WithBasePath(bp string) *PostDataWaveserverInterfacesPhysicalInterfaceNameIDURL { +func (o *DataCocsnRoutesRouteRouteDestinationInterfaceDeleteURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationInterfaceDeleteURL { o.SetBasePath(bp) return o } @@ -32,31 +32,34 @@ func (o *PostDataWaveserverInterfacesPhysicalInterfaceNameIDURL) WithBasePath(bp // SetBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNameIDURL) SetBasePath(bp string) { +func (o *DataCocsnRoutesRouteRouteDestinationInterfaceDeleteURL) SetBasePath(bp string) { o._basePath = bp } // Build a url path and query string -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNameIDURL) Build() (*url.URL, error) { +func (o *DataCocsnRoutesRouteRouteDestinationInterfaceDeleteURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/data/waveserver-interfaces/physical-interface={name}/id/" + var _path = "/data/cocsn:routes/route={route-destination}/interface" - name := o.Name - if name != "" { - _path = strings.Replace(_path, "{name}", name, -1) + routeDestination := o.RouteDestination + if routeDestination != "" { + _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) } else { - return nil, errors.New("name is required on PostDataWaveserverInterfacesPhysicalInterfaceNameIDURL") + return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationInterfaceDeleteURL") } _basePath := o._basePath + if _basePath == "" { + _basePath = "/restconf" + } _result.Path = golangswaggerpaths.Join(_basePath, _path) return &_result, nil } // Must is a helper function to panic when the url builder returns an error -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNameIDURL) Must(u *url.URL, err error) *url.URL { +func (o *DataCocsnRoutesRouteRouteDestinationInterfaceDeleteURL) Must(u *url.URL, err error) *url.URL { if err != nil { panic(err) } @@ -67,17 +70,17 @@ func (o *PostDataWaveserverInterfacesPhysicalInterfaceNameIDURL) Must(u *url.URL } // String returns the string representation of the path with query string -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNameIDURL) String() string { +func (o *DataCocsnRoutesRouteRouteDestinationInterfaceDeleteURL) String() string { return o.Must(o.Build()).String() } // BuildFull builds a full url with scheme, host, path and query string -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNameIDURL) BuildFull(scheme, host string) (*url.URL, error) { +func (o *DataCocsnRoutesRouteRouteDestinationInterfaceDeleteURL) BuildFull(scheme, host string) (*url.URL, error) { if scheme == "" { - return nil, errors.New("scheme is required for a full url on PostDataWaveserverInterfacesPhysicalInterfaceNameIDURL") + return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationInterfaceDeleteURL") } if host == "" { - return nil, errors.New("host is required for a full url on PostDataWaveserverInterfacesPhysicalInterfaceNameIDURL") + return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationInterfaceDeleteURL") } base, err := o.Build() @@ -91,6 +94,6 @@ func (o *PostDataWaveserverInterfacesPhysicalInterfaceNameIDURL) BuildFull(schem } // StringFull returns the string representation of a complete url -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNameIDURL) StringFull(scheme, host string) string { +func (o *DataCocsnRoutesRouteRouteDestinationInterfaceDeleteURL) StringFull(scheme, host string) string { return o.Must(o.BuildFull(scheme, host)).String() } diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_patch.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_patch.go new file mode 100644 index 0000000000000000000000000000000000000000..702687a037e8f215e9bafd5964d477f003f8af61 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_patch.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime/middleware" +) + +// DataCocsnRoutesRouteRouteDestinationInterfacePatchHandlerFunc turns a function with the right signature into a data cocsn routes route route destination interface patch handler +type DataCocsnRoutesRouteRouteDestinationInterfacePatchHandlerFunc func(DataCocsnRoutesRouteRouteDestinationInterfacePatchParams, interface{}) middleware.Responder + +// Handle executing the request and returning a response +func (fn DataCocsnRoutesRouteRouteDestinationInterfacePatchHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationInterfacePatchParams, principal interface{}) middleware.Responder { + return fn(params, principal) +} + +// DataCocsnRoutesRouteRouteDestinationInterfacePatchHandler interface for that can handle valid data cocsn routes route route destination interface patch params +type DataCocsnRoutesRouteRouteDestinationInterfacePatchHandler interface { + Handle(DataCocsnRoutesRouteRouteDestinationInterfacePatchParams, interface{}) middleware.Responder +} + +// NewDataCocsnRoutesRouteRouteDestinationInterfacePatch creates a new http.Handler for the data cocsn routes route route destination interface patch operation +func NewDataCocsnRoutesRouteRouteDestinationInterfacePatch(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationInterfacePatchHandler) *DataCocsnRoutesRouteRouteDestinationInterfacePatch { + return &DataCocsnRoutesRouteRouteDestinationInterfacePatch{Context: ctx, Handler: handler} +} + +/*DataCocsnRoutesRouteRouteDestinationInterfacePatch swagger:route PATCH /data/cocsn:routes/route={route-destination}/interface data patch dataCocsnRoutesRouteRouteDestinationInterfacePatch + +Interface used for the route + +Interface used for the route + +*/ +type DataCocsnRoutesRouteRouteDestinationInterfacePatch struct { + Context *middleware.Context + Handler DataCocsnRoutesRouteRouteDestinationInterfacePatchHandler +} + +func (o *DataCocsnRoutesRouteRouteDestinationInterfacePatch) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + route, rCtx, _ := o.Context.RouteInfo(r) + if rCtx != nil { + r = rCtx + } + var Params = NewDataCocsnRoutesRouteRouteDestinationInterfacePatchParams() + + uprinc, aCtx, err := o.Context.Authorize(r, route) + if err != nil { + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + if aCtx != nil { + r = aCtx + } + var principal interface{} + if uprinc != nil { + principal = uprinc + } + + if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + + res := o.Handler.Handle(Params, principal) // actually handle the request + + o.Context.Respond(rw, r, route.Produces, route, res) + +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_patch_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_patch_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..f5db0653951aee6160415bf287d5c5a57f09af42 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_patch_parameters.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "io" + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/runtime/middleware" + "github.com/go-openapi/strfmt" + + "code.fbi.h-da.de/cocsn/cocsn-api/api/models" +) + +// NewDataCocsnRoutesRouteRouteDestinationInterfacePatchParams creates a new DataCocsnRoutesRouteRouteDestinationInterfacePatchParams object +// no default values defined in spec. +func NewDataCocsnRoutesRouteRouteDestinationInterfacePatchParams() DataCocsnRoutesRouteRouteDestinationInterfacePatchParams { + + return DataCocsnRoutesRouteRouteDestinationInterfacePatchParams{} +} + +// DataCocsnRoutesRouteRouteDestinationInterfacePatchParams contains all the bound params for the data cocsn routes route route destination interface patch operation +// typically these are obtained from a http.Request +// +// swagger:parameters data_cocsn_routes_route_route_destination_interface_patch +type DataCocsnRoutesRouteRouteDestinationInterfacePatchParams struct { + + // HTTP Request Object + HTTPRequest *http.Request `json:"-"` + + /*Interface used for the route + Required: true + In: body + */ + Interface *models.DataCocsnRoutesRouteRouteDestinationInterface + /*Route destination. IP network + Required: true + In: path + */ + RouteDestination string +} + +// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface +// for simple values it will use straight method calls. +// +// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationInterfacePatchParams() beforehand. +func (o *DataCocsnRoutesRouteRouteDestinationInterfacePatchParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { + var res []error + + o.HTTPRequest = r + + if runtime.HasBody(r) { + defer r.Body.Close() + var body models.DataCocsnRoutesRouteRouteDestinationInterface + if err := route.Consumer.Consume(r.Body, &body); err != nil { + if err == io.EOF { + res = append(res, errors.Required("interface", "body", "")) + } else { + res = append(res, errors.NewParseError("interface", "body", "", err)) + } + } else { + // validate body object + if err := body.Validate(route.Formats); err != nil { + res = append(res, err) + } + + if len(res) == 0 { + o.Interface = &body + } + } + } else { + res = append(res, errors.Required("interface", "body", "")) + } + rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") + if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindRouteDestination binds and validates parameter RouteDestination from path. +func (o *DataCocsnRoutesRouteRouteDestinationInterfacePatchParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + + o.RouteDestination = raw + + return nil +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_patch_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_patch_responses.go new file mode 100644 index 0000000000000000000000000000000000000000..3816ca646ad9706ed63f694a0d6d071dad9dfb89 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_patch_responses.go @@ -0,0 +1,156 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime" +) + +// DataCocsnRoutesRouteRouteDestinationInterfacePatchNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationInterfacePatchNoContent +const DataCocsnRoutesRouteRouteDestinationInterfacePatchNoContentCode int = 204 + +/*DataCocsnRoutesRouteRouteDestinationInterfacePatchNoContent leaf interface updated + +swagger:response dataCocsnRoutesRouteRouteDestinationInterfacePatchNoContent +*/ +type DataCocsnRoutesRouteRouteDestinationInterfacePatchNoContent struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationInterfacePatchNoContent creates DataCocsnRoutesRouteRouteDestinationInterfacePatchNoContent with default headers values +func NewDataCocsnRoutesRouteRouteDestinationInterfacePatchNoContent() *DataCocsnRoutesRouteRouteDestinationInterfacePatchNoContent { + + return &DataCocsnRoutesRouteRouteDestinationInterfacePatchNoContent{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationInterfacePatchNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(204) +} + +// DataCocsnRoutesRouteRouteDestinationInterfacePatchBadRequestCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationInterfacePatchBadRequest +const DataCocsnRoutesRouteRouteDestinationInterfacePatchBadRequestCode int = 400 + +/*DataCocsnRoutesRouteRouteDestinationInterfacePatchBadRequest Bad Request + +swagger:response dataCocsnRoutesRouteRouteDestinationInterfacePatchBadRequest +*/ +type DataCocsnRoutesRouteRouteDestinationInterfacePatchBadRequest struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationInterfacePatchBadRequest creates DataCocsnRoutesRouteRouteDestinationInterfacePatchBadRequest with default headers values +func NewDataCocsnRoutesRouteRouteDestinationInterfacePatchBadRequest() *DataCocsnRoutesRouteRouteDestinationInterfacePatchBadRequest { + + return &DataCocsnRoutesRouteRouteDestinationInterfacePatchBadRequest{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationInterfacePatchBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(400) +} + +// DataCocsnRoutesRouteRouteDestinationInterfacePatchUnauthorizedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationInterfacePatchUnauthorized +const DataCocsnRoutesRouteRouteDestinationInterfacePatchUnauthorizedCode int = 401 + +/*DataCocsnRoutesRouteRouteDestinationInterfacePatchUnauthorized Unauthorized + +swagger:response dataCocsnRoutesRouteRouteDestinationInterfacePatchUnauthorized +*/ +type DataCocsnRoutesRouteRouteDestinationInterfacePatchUnauthorized struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationInterfacePatchUnauthorized creates DataCocsnRoutesRouteRouteDestinationInterfacePatchUnauthorized with default headers values +func NewDataCocsnRoutesRouteRouteDestinationInterfacePatchUnauthorized() *DataCocsnRoutesRouteRouteDestinationInterfacePatchUnauthorized { + + return &DataCocsnRoutesRouteRouteDestinationInterfacePatchUnauthorized{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationInterfacePatchUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(401) +} + +// DataCocsnRoutesRouteRouteDestinationInterfacePatchNotFoundCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationInterfacePatchNotFound +const DataCocsnRoutesRouteRouteDestinationInterfacePatchNotFoundCode int = 404 + +/*DataCocsnRoutesRouteRouteDestinationInterfacePatchNotFound Not Found + +swagger:response dataCocsnRoutesRouteRouteDestinationInterfacePatchNotFound +*/ +type DataCocsnRoutesRouteRouteDestinationInterfacePatchNotFound struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationInterfacePatchNotFound creates DataCocsnRoutesRouteRouteDestinationInterfacePatchNotFound with default headers values +func NewDataCocsnRoutesRouteRouteDestinationInterfacePatchNotFound() *DataCocsnRoutesRouteRouteDestinationInterfacePatchNotFound { + + return &DataCocsnRoutesRouteRouteDestinationInterfacePatchNotFound{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationInterfacePatchNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(404) +} + +// DataCocsnRoutesRouteRouteDestinationInterfacePatchMethodNotAllowedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationInterfacePatchMethodNotAllowed +const DataCocsnRoutesRouteRouteDestinationInterfacePatchMethodNotAllowedCode int = 405 + +/*DataCocsnRoutesRouteRouteDestinationInterfacePatchMethodNotAllowed Method Not Allowed + +swagger:response dataCocsnRoutesRouteRouteDestinationInterfacePatchMethodNotAllowed +*/ +type DataCocsnRoutesRouteRouteDestinationInterfacePatchMethodNotAllowed struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationInterfacePatchMethodNotAllowed creates DataCocsnRoutesRouteRouteDestinationInterfacePatchMethodNotAllowed with default headers values +func NewDataCocsnRoutesRouteRouteDestinationInterfacePatchMethodNotAllowed() *DataCocsnRoutesRouteRouteDestinationInterfacePatchMethodNotAllowed { + + return &DataCocsnRoutesRouteRouteDestinationInterfacePatchMethodNotAllowed{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationInterfacePatchMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(405) +} + +// DataCocsnRoutesRouteRouteDestinationInterfacePatchConflictCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationInterfacePatchConflict +const DataCocsnRoutesRouteRouteDestinationInterfacePatchConflictCode int = 409 + +/*DataCocsnRoutesRouteRouteDestinationInterfacePatchConflict Conflict + +swagger:response dataCocsnRoutesRouteRouteDestinationInterfacePatchConflict +*/ +type DataCocsnRoutesRouteRouteDestinationInterfacePatchConflict struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationInterfacePatchConflict creates DataCocsnRoutesRouteRouteDestinationInterfacePatchConflict with default headers values +func NewDataCocsnRoutesRouteRouteDestinationInterfacePatchConflict() *DataCocsnRoutesRouteRouteDestinationInterfacePatchConflict { + + return &DataCocsnRoutesRouteRouteDestinationInterfacePatchConflict{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationInterfacePatchConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(409) +} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_id_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_patch_urlbuilder.go similarity index 55% rename from waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_id_urlbuilder.go rename to api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_patch_urlbuilder.go index 84231fd182f1a975ec290a5c964878b23954df42..e8fb4ad5da764dce5aa6afd0ffeb7803b2424558 100644 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_id_urlbuilder.go +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_patch_urlbuilder.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package ciena_waveserver_interfaces +package data // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the generate command @@ -12,9 +12,9 @@ import ( "strings" ) -// GetDataWaveserverInterfacesPhysicalInterfaceNameIDURL generates an URL for the get data waveserver interfaces physical interface name ID operation -type GetDataWaveserverInterfacesPhysicalInterfaceNameIDURL struct { - Name string +// DataCocsnRoutesRouteRouteDestinationInterfacePatchURL generates an URL for the data cocsn routes route route destination interface patch operation +type DataCocsnRoutesRouteRouteDestinationInterfacePatchURL struct { + RouteDestination string _basePath string // avoid unkeyed usage @@ -24,7 +24,7 @@ type GetDataWaveserverInterfacesPhysicalInterfaceNameIDURL struct { // WithBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameIDURL) WithBasePath(bp string) *GetDataWaveserverInterfacesPhysicalInterfaceNameIDURL { +func (o *DataCocsnRoutesRouteRouteDestinationInterfacePatchURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationInterfacePatchURL { o.SetBasePath(bp) return o } @@ -32,31 +32,34 @@ func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameIDURL) WithBasePath(bp // SetBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameIDURL) SetBasePath(bp string) { +func (o *DataCocsnRoutesRouteRouteDestinationInterfacePatchURL) SetBasePath(bp string) { o._basePath = bp } // Build a url path and query string -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameIDURL) Build() (*url.URL, error) { +func (o *DataCocsnRoutesRouteRouteDestinationInterfacePatchURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/data/waveserver-interfaces/physical-interface={name}/id/" + var _path = "/data/cocsn:routes/route={route-destination}/interface" - name := o.Name - if name != "" { - _path = strings.Replace(_path, "{name}", name, -1) + routeDestination := o.RouteDestination + if routeDestination != "" { + _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) } else { - return nil, errors.New("name is required on GetDataWaveserverInterfacesPhysicalInterfaceNameIDURL") + return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationInterfacePatchURL") } _basePath := o._basePath + if _basePath == "" { + _basePath = "/restconf" + } _result.Path = golangswaggerpaths.Join(_basePath, _path) return &_result, nil } // Must is a helper function to panic when the url builder returns an error -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameIDURL) Must(u *url.URL, err error) *url.URL { +func (o *DataCocsnRoutesRouteRouteDestinationInterfacePatchURL) Must(u *url.URL, err error) *url.URL { if err != nil { panic(err) } @@ -67,17 +70,17 @@ func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameIDURL) Must(u *url.URL, } // String returns the string representation of the path with query string -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameIDURL) String() string { +func (o *DataCocsnRoutesRouteRouteDestinationInterfacePatchURL) String() string { return o.Must(o.Build()).String() } // BuildFull builds a full url with scheme, host, path and query string -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameIDURL) BuildFull(scheme, host string) (*url.URL, error) { +func (o *DataCocsnRoutesRouteRouteDestinationInterfacePatchURL) BuildFull(scheme, host string) (*url.URL, error) { if scheme == "" { - return nil, errors.New("scheme is required for a full url on GetDataWaveserverInterfacesPhysicalInterfaceNameIDURL") + return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationInterfacePatchURL") } if host == "" { - return nil, errors.New("host is required for a full url on GetDataWaveserverInterfacesPhysicalInterfaceNameIDURL") + return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationInterfacePatchURL") } base, err := o.Build() @@ -91,6 +94,6 @@ func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameIDURL) BuildFull(scheme } // StringFull returns the string representation of a complete url -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameIDURL) StringFull(scheme, host string) string { +func (o *DataCocsnRoutesRouteRouteDestinationInterfacePatchURL) StringFull(scheme, host string) string { return o.Must(o.BuildFull(scheme, host)).String() } diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_put.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_put.go new file mode 100644 index 0000000000000000000000000000000000000000..1d8147b3e5086b987b5d42f12e4dbcdb64018da9 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_put.go @@ -0,0 +1,73 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime/middleware" +) + +// DataCocsnRoutesRouteRouteDestinationInterfacePutHandlerFunc turns a function with the right signature into a data cocsn routes route route destination interface put handler +type DataCocsnRoutesRouteRouteDestinationInterfacePutHandlerFunc func(DataCocsnRoutesRouteRouteDestinationInterfacePutParams, interface{}) middleware.Responder + +// Handle executing the request and returning a response +func (fn DataCocsnRoutesRouteRouteDestinationInterfacePutHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationInterfacePutParams, principal interface{}) middleware.Responder { + return fn(params, principal) +} + +// DataCocsnRoutesRouteRouteDestinationInterfacePutHandler interface for that can handle valid data cocsn routes route route destination interface put params +type DataCocsnRoutesRouteRouteDestinationInterfacePutHandler interface { + Handle(DataCocsnRoutesRouteRouteDestinationInterfacePutParams, interface{}) middleware.Responder +} + +// NewDataCocsnRoutesRouteRouteDestinationInterfacePut creates a new http.Handler for the data cocsn routes route route destination interface put operation +func NewDataCocsnRoutesRouteRouteDestinationInterfacePut(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationInterfacePutHandler) *DataCocsnRoutesRouteRouteDestinationInterfacePut { + return &DataCocsnRoutesRouteRouteDestinationInterfacePut{Context: ctx, Handler: handler} +} + +/*DataCocsnRoutesRouteRouteDestinationInterfacePut swagger:route PUT /data/cocsn:routes/route={route-destination}/interface data put dataCocsnRoutesRouteRouteDestinationInterfacePut + +Interface used for the route + +Interface used for the route + +*/ +type DataCocsnRoutesRouteRouteDestinationInterfacePut struct { + Context *middleware.Context + Handler DataCocsnRoutesRouteRouteDestinationInterfacePutHandler +} + +func (o *DataCocsnRoutesRouteRouteDestinationInterfacePut) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + route, rCtx, _ := o.Context.RouteInfo(r) + if rCtx != nil { + r = rCtx + } + var Params = NewDataCocsnRoutesRouteRouteDestinationInterfacePutParams() + + uprinc, aCtx, err := o.Context.Authorize(r, route) + if err != nil { + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + if aCtx != nil { + r = aCtx + } + var principal interface{} + if uprinc != nil { + principal = uprinc + } + + if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + + res := o.Handler.Handle(Params, principal) // actually handle the request + + o.Context.Respond(rw, r, route.Produces, route, res) + +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_put_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_put_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..b3f558a40b0a82aa6457a35a0e33a808ac4b5b0a --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_put_parameters.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "io" + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/runtime/middleware" + "github.com/go-openapi/strfmt" + + "code.fbi.h-da.de/cocsn/cocsn-api/api/models" +) + +// NewDataCocsnRoutesRouteRouteDestinationInterfacePutParams creates a new DataCocsnRoutesRouteRouteDestinationInterfacePutParams object +// no default values defined in spec. +func NewDataCocsnRoutesRouteRouteDestinationInterfacePutParams() DataCocsnRoutesRouteRouteDestinationInterfacePutParams { + + return DataCocsnRoutesRouteRouteDestinationInterfacePutParams{} +} + +// DataCocsnRoutesRouteRouteDestinationInterfacePutParams contains all the bound params for the data cocsn routes route route destination interface put operation +// typically these are obtained from a http.Request +// +// swagger:parameters data_cocsn_routes_route_route_destination_interface_put +type DataCocsnRoutesRouteRouteDestinationInterfacePutParams struct { + + // HTTP Request Object + HTTPRequest *http.Request `json:"-"` + + /*Interface used for the route + Required: true + In: body + */ + Interface *models.DataCocsnRoutesRouteRouteDestinationInterface + /*Route destination. IP network + Required: true + In: path + */ + RouteDestination string +} + +// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface +// for simple values it will use straight method calls. +// +// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationInterfacePutParams() beforehand. +func (o *DataCocsnRoutesRouteRouteDestinationInterfacePutParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { + var res []error + + o.HTTPRequest = r + + if runtime.HasBody(r) { + defer r.Body.Close() + var body models.DataCocsnRoutesRouteRouteDestinationInterface + if err := route.Consumer.Consume(r.Body, &body); err != nil { + if err == io.EOF { + res = append(res, errors.Required("interface", "body", "")) + } else { + res = append(res, errors.NewParseError("interface", "body", "", err)) + } + } else { + // validate body object + if err := body.Validate(route.Formats); err != nil { + res = append(res, err) + } + + if len(res) == 0 { + o.Interface = &body + } + } + } else { + res = append(res, errors.Required("interface", "body", "")) + } + rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") + if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindRouteDestination binds and validates parameter RouteDestination from path. +func (o *DataCocsnRoutesRouteRouteDestinationInterfacePutParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + + o.RouteDestination = raw + + return nil +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_put_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_put_responses.go new file mode 100644 index 0000000000000000000000000000000000000000..d10af6ad5084dba4482e52c2e8d08f2d58d78615 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_put_responses.go @@ -0,0 +1,180 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime" +) + +// DataCocsnRoutesRouteRouteDestinationInterfacePutCreatedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationInterfacePutCreated +const DataCocsnRoutesRouteRouteDestinationInterfacePutCreatedCode int = 201 + +/*DataCocsnRoutesRouteRouteDestinationInterfacePutCreated leaf interface created or replaced + +swagger:response dataCocsnRoutesRouteRouteDestinationInterfacePutCreated +*/ +type DataCocsnRoutesRouteRouteDestinationInterfacePutCreated struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationInterfacePutCreated creates DataCocsnRoutesRouteRouteDestinationInterfacePutCreated with default headers values +func NewDataCocsnRoutesRouteRouteDestinationInterfacePutCreated() *DataCocsnRoutesRouteRouteDestinationInterfacePutCreated { + + return &DataCocsnRoutesRouteRouteDestinationInterfacePutCreated{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationInterfacePutCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(201) +} + +// DataCocsnRoutesRouteRouteDestinationInterfacePutNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationInterfacePutNoContent +const DataCocsnRoutesRouteRouteDestinationInterfacePutNoContentCode int = 204 + +/*DataCocsnRoutesRouteRouteDestinationInterfacePutNoContent No Content + +swagger:response dataCocsnRoutesRouteRouteDestinationInterfacePutNoContent +*/ +type DataCocsnRoutesRouteRouteDestinationInterfacePutNoContent struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationInterfacePutNoContent creates DataCocsnRoutesRouteRouteDestinationInterfacePutNoContent with default headers values +func NewDataCocsnRoutesRouteRouteDestinationInterfacePutNoContent() *DataCocsnRoutesRouteRouteDestinationInterfacePutNoContent { + + return &DataCocsnRoutesRouteRouteDestinationInterfacePutNoContent{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationInterfacePutNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(204) +} + +// DataCocsnRoutesRouteRouteDestinationInterfacePutBadRequestCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationInterfacePutBadRequest +const DataCocsnRoutesRouteRouteDestinationInterfacePutBadRequestCode int = 400 + +/*DataCocsnRoutesRouteRouteDestinationInterfacePutBadRequest Bad Request + +swagger:response dataCocsnRoutesRouteRouteDestinationInterfacePutBadRequest +*/ +type DataCocsnRoutesRouteRouteDestinationInterfacePutBadRequest struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationInterfacePutBadRequest creates DataCocsnRoutesRouteRouteDestinationInterfacePutBadRequest with default headers values +func NewDataCocsnRoutesRouteRouteDestinationInterfacePutBadRequest() *DataCocsnRoutesRouteRouteDestinationInterfacePutBadRequest { + + return &DataCocsnRoutesRouteRouteDestinationInterfacePutBadRequest{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationInterfacePutBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(400) +} + +// DataCocsnRoutesRouteRouteDestinationInterfacePutUnauthorizedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationInterfacePutUnauthorized +const DataCocsnRoutesRouteRouteDestinationInterfacePutUnauthorizedCode int = 401 + +/*DataCocsnRoutesRouteRouteDestinationInterfacePutUnauthorized Unauthorized + +swagger:response dataCocsnRoutesRouteRouteDestinationInterfacePutUnauthorized +*/ +type DataCocsnRoutesRouteRouteDestinationInterfacePutUnauthorized struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationInterfacePutUnauthorized creates DataCocsnRoutesRouteRouteDestinationInterfacePutUnauthorized with default headers values +func NewDataCocsnRoutesRouteRouteDestinationInterfacePutUnauthorized() *DataCocsnRoutesRouteRouteDestinationInterfacePutUnauthorized { + + return &DataCocsnRoutesRouteRouteDestinationInterfacePutUnauthorized{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationInterfacePutUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(401) +} + +// DataCocsnRoutesRouteRouteDestinationInterfacePutNotFoundCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationInterfacePutNotFound +const DataCocsnRoutesRouteRouteDestinationInterfacePutNotFoundCode int = 404 + +/*DataCocsnRoutesRouteRouteDestinationInterfacePutNotFound Not Found + +swagger:response dataCocsnRoutesRouteRouteDestinationInterfacePutNotFound +*/ +type DataCocsnRoutesRouteRouteDestinationInterfacePutNotFound struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationInterfacePutNotFound creates DataCocsnRoutesRouteRouteDestinationInterfacePutNotFound with default headers values +func NewDataCocsnRoutesRouteRouteDestinationInterfacePutNotFound() *DataCocsnRoutesRouteRouteDestinationInterfacePutNotFound { + + return &DataCocsnRoutesRouteRouteDestinationInterfacePutNotFound{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationInterfacePutNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(404) +} + +// DataCocsnRoutesRouteRouteDestinationInterfacePutMethodNotAllowedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationInterfacePutMethodNotAllowed +const DataCocsnRoutesRouteRouteDestinationInterfacePutMethodNotAllowedCode int = 405 + +/*DataCocsnRoutesRouteRouteDestinationInterfacePutMethodNotAllowed Method Not Allowed + +swagger:response dataCocsnRoutesRouteRouteDestinationInterfacePutMethodNotAllowed +*/ +type DataCocsnRoutesRouteRouteDestinationInterfacePutMethodNotAllowed struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationInterfacePutMethodNotAllowed creates DataCocsnRoutesRouteRouteDestinationInterfacePutMethodNotAllowed with default headers values +func NewDataCocsnRoutesRouteRouteDestinationInterfacePutMethodNotAllowed() *DataCocsnRoutesRouteRouteDestinationInterfacePutMethodNotAllowed { + + return &DataCocsnRoutesRouteRouteDestinationInterfacePutMethodNotAllowed{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationInterfacePutMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(405) +} + +// DataCocsnRoutesRouteRouteDestinationInterfacePutConflictCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationInterfacePutConflict +const DataCocsnRoutesRouteRouteDestinationInterfacePutConflictCode int = 409 + +/*DataCocsnRoutesRouteRouteDestinationInterfacePutConflict Conflict + +swagger:response dataCocsnRoutesRouteRouteDestinationInterfacePutConflict +*/ +type DataCocsnRoutesRouteRouteDestinationInterfacePutConflict struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationInterfacePutConflict creates DataCocsnRoutesRouteRouteDestinationInterfacePutConflict with default headers values +func NewDataCocsnRoutesRouteRouteDestinationInterfacePutConflict() *DataCocsnRoutesRouteRouteDestinationInterfacePutConflict { + + return &DataCocsnRoutesRouteRouteDestinationInterfacePutConflict{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationInterfacePutConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(409) +} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_put_urlbuilder.go similarity index 56% rename from waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_urlbuilder.go rename to api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_put_urlbuilder.go index d1aeefe19ef50e46016154c631eeff6973dbca8c..05d8a1a48ca7dbdd4aa27f9966104680f91266fe 100644 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_urlbuilder.go +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_interface_put_urlbuilder.go @@ -1,6 +1,6 @@ // Code generated by go-swagger; DO NOT EDIT. -package ciena_waveserver_interfaces +package data // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the generate command @@ -12,9 +12,9 @@ import ( "strings" ) -// PutDataWaveserverInterfacesPhysicalInterfaceNameURL generates an URL for the put data waveserver interfaces physical interface name operation -type PutDataWaveserverInterfacesPhysicalInterfaceNameURL struct { - Name string +// DataCocsnRoutesRouteRouteDestinationInterfacePutURL generates an URL for the data cocsn routes route route destination interface put operation +type DataCocsnRoutesRouteRouteDestinationInterfacePutURL struct { + RouteDestination string _basePath string // avoid unkeyed usage @@ -24,7 +24,7 @@ type PutDataWaveserverInterfacesPhysicalInterfaceNameURL struct { // WithBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameURL) WithBasePath(bp string) *PutDataWaveserverInterfacesPhysicalInterfaceNameURL { +func (o *DataCocsnRoutesRouteRouteDestinationInterfacePutURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationInterfacePutURL { o.SetBasePath(bp) return o } @@ -32,31 +32,34 @@ func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameURL) WithBasePath(bp st // SetBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameURL) SetBasePath(bp string) { +func (o *DataCocsnRoutesRouteRouteDestinationInterfacePutURL) SetBasePath(bp string) { o._basePath = bp } // Build a url path and query string -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameURL) Build() (*url.URL, error) { +func (o *DataCocsnRoutesRouteRouteDestinationInterfacePutURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/data/waveserver-interfaces/physical-interface={name}/" + var _path = "/data/cocsn:routes/route={route-destination}/interface" - name := o.Name - if name != "" { - _path = strings.Replace(_path, "{name}", name, -1) + routeDestination := o.RouteDestination + if routeDestination != "" { + _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) } else { - return nil, errors.New("name is required on PutDataWaveserverInterfacesPhysicalInterfaceNameURL") + return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationInterfacePutURL") } _basePath := o._basePath + if _basePath == "" { + _basePath = "/restconf" + } _result.Path = golangswaggerpaths.Join(_basePath, _path) return &_result, nil } // Must is a helper function to panic when the url builder returns an error -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameURL) Must(u *url.URL, err error) *url.URL { +func (o *DataCocsnRoutesRouteRouteDestinationInterfacePutURL) Must(u *url.URL, err error) *url.URL { if err != nil { panic(err) } @@ -67,17 +70,17 @@ func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameURL) Must(u *url.URL, e } // String returns the string representation of the path with query string -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameURL) String() string { +func (o *DataCocsnRoutesRouteRouteDestinationInterfacePutURL) String() string { return o.Must(o.Build()).String() } // BuildFull builds a full url with scheme, host, path and query string -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameURL) BuildFull(scheme, host string) (*url.URL, error) { +func (o *DataCocsnRoutesRouteRouteDestinationInterfacePutURL) BuildFull(scheme, host string) (*url.URL, error) { if scheme == "" { - return nil, errors.New("scheme is required for a full url on PutDataWaveserverInterfacesPhysicalInterfaceNameURL") + return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationInterfacePutURL") } if host == "" { - return nil, errors.New("host is required for a full url on PutDataWaveserverInterfacesPhysicalInterfaceNameURL") + return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationInterfacePutURL") } base, err := o.Build() @@ -91,6 +94,6 @@ func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameURL) BuildFull(scheme, } // StringFull returns the string representation of a complete url -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameURL) StringFull(scheme, host string) string { +func (o *DataCocsnRoutesRouteRouteDestinationInterfacePutURL) StringFull(scheme, host string) string { return o.Must(o.BuildFull(scheme, host)).String() } diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_patch.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_patch.go new file mode 100644 index 0000000000000000000000000000000000000000..d386f3f0b32a22e8b619f27dea7c7d23325f71b9 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_patch.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime/middleware" +) + +// DataCocsnRoutesRouteRouteDestinationPatchHandlerFunc turns a function with the right signature into a data cocsn routes route route destination patch handler +type DataCocsnRoutesRouteRouteDestinationPatchHandlerFunc func(DataCocsnRoutesRouteRouteDestinationPatchParams, interface{}) middleware.Responder + +// Handle executing the request and returning a response +func (fn DataCocsnRoutesRouteRouteDestinationPatchHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationPatchParams, principal interface{}) middleware.Responder { + return fn(params, principal) +} + +// DataCocsnRoutesRouteRouteDestinationPatchHandler interface for that can handle valid data cocsn routes route route destination patch params +type DataCocsnRoutesRouteRouteDestinationPatchHandler interface { + Handle(DataCocsnRoutesRouteRouteDestinationPatchParams, interface{}) middleware.Responder +} + +// NewDataCocsnRoutesRouteRouteDestinationPatch creates a new http.Handler for the data cocsn routes route route destination patch operation +func NewDataCocsnRoutesRouteRouteDestinationPatch(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationPatchHandler) *DataCocsnRoutesRouteRouteDestinationPatch { + return &DataCocsnRoutesRouteRouteDestinationPatch{Context: ctx, Handler: handler} +} + +/*DataCocsnRoutesRouteRouteDestinationPatch swagger:route PATCH /data/cocsn:routes/route={route-destination} data patch dataCocsnRoutesRouteRouteDestinationPatch + +DataCocsnRoutesRouteRouteDestinationPatch data cocsn routes route route destination patch API + +*/ +type DataCocsnRoutesRouteRouteDestinationPatch struct { + Context *middleware.Context + Handler DataCocsnRoutesRouteRouteDestinationPatchHandler +} + +func (o *DataCocsnRoutesRouteRouteDestinationPatch) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + route, rCtx, _ := o.Context.RouteInfo(r) + if rCtx != nil { + r = rCtx + } + var Params = NewDataCocsnRoutesRouteRouteDestinationPatchParams() + + uprinc, aCtx, err := o.Context.Authorize(r, route) + if err != nil { + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + if aCtx != nil { + r = aCtx + } + var principal interface{} + if uprinc != nil { + principal = uprinc + } + + if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + + res := o.Handler.Handle(Params, principal) // actually handle the request + + o.Context.Respond(rw, r, route.Produces, route, res) + +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_patch_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_patch_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..ae932348347e206e98e6b92806678bfb330cae1f --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_patch_parameters.go @@ -0,0 +1,103 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "io" + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/runtime/middleware" + "github.com/go-openapi/strfmt" + + "code.fbi.h-da.de/cocsn/cocsn-api/api/models" +) + +// NewDataCocsnRoutesRouteRouteDestinationPatchParams creates a new DataCocsnRoutesRouteRouteDestinationPatchParams object +// no default values defined in spec. +func NewDataCocsnRoutesRouteRouteDestinationPatchParams() DataCocsnRoutesRouteRouteDestinationPatchParams { + + return DataCocsnRoutesRouteRouteDestinationPatchParams{} +} + +// DataCocsnRoutesRouteRouteDestinationPatchParams contains all the bound params for the data cocsn routes route route destination patch operation +// typically these are obtained from a http.Request +// +// swagger:parameters data_cocsn_routes_route_route_destination_patch +type DataCocsnRoutesRouteRouteDestinationPatchParams struct { + + // HTTP Request Object + HTTPRequest *http.Request `json:"-"` + + /* + Required: true + In: body + */ + Route *models.DataCocsnRoutesRouteRouteDestination + /*Route destination. IP network + Required: true + In: path + */ + RouteDestination string +} + +// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface +// for simple values it will use straight method calls. +// +// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationPatchParams() beforehand. +func (o *DataCocsnRoutesRouteRouteDestinationPatchParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { + var res []error + + o.HTTPRequest = r + + if runtime.HasBody(r) { + defer r.Body.Close() + var body models.DataCocsnRoutesRouteRouteDestination + if err := route.Consumer.Consume(r.Body, &body); err != nil { + if err == io.EOF { + res = append(res, errors.Required("route", "body", "")) + } else { + res = append(res, errors.NewParseError("route", "body", "", err)) + } + } else { + // validate body object + if err := body.Validate(route.Formats); err != nil { + res = append(res, err) + } + + if len(res) == 0 { + o.Route = &body + } + } + } else { + res = append(res, errors.Required("route", "body", "")) + } + rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") + if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindRouteDestination binds and validates parameter RouteDestination from path. +func (o *DataCocsnRoutesRouteRouteDestinationPatchParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + + o.RouteDestination = raw + + return nil +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_patch_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_patch_responses.go new file mode 100644 index 0000000000000000000000000000000000000000..1810a07d458ae0db8a6f017dd10f5375a1630f34 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_patch_responses.go @@ -0,0 +1,156 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime" +) + +// DataCocsnRoutesRouteRouteDestinationPatchNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationPatchNoContent +const DataCocsnRoutesRouteRouteDestinationPatchNoContentCode int = 204 + +/*DataCocsnRoutesRouteRouteDestinationPatchNoContent list route updated + +swagger:response dataCocsnRoutesRouteRouteDestinationPatchNoContent +*/ +type DataCocsnRoutesRouteRouteDestinationPatchNoContent struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationPatchNoContent creates DataCocsnRoutesRouteRouteDestinationPatchNoContent with default headers values +func NewDataCocsnRoutesRouteRouteDestinationPatchNoContent() *DataCocsnRoutesRouteRouteDestinationPatchNoContent { + + return &DataCocsnRoutesRouteRouteDestinationPatchNoContent{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationPatchNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(204) +} + +// DataCocsnRoutesRouteRouteDestinationPatchBadRequestCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationPatchBadRequest +const DataCocsnRoutesRouteRouteDestinationPatchBadRequestCode int = 400 + +/*DataCocsnRoutesRouteRouteDestinationPatchBadRequest Bad Request + +swagger:response dataCocsnRoutesRouteRouteDestinationPatchBadRequest +*/ +type DataCocsnRoutesRouteRouteDestinationPatchBadRequest struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationPatchBadRequest creates DataCocsnRoutesRouteRouteDestinationPatchBadRequest with default headers values +func NewDataCocsnRoutesRouteRouteDestinationPatchBadRequest() *DataCocsnRoutesRouteRouteDestinationPatchBadRequest { + + return &DataCocsnRoutesRouteRouteDestinationPatchBadRequest{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationPatchBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(400) +} + +// DataCocsnRoutesRouteRouteDestinationPatchUnauthorizedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationPatchUnauthorized +const DataCocsnRoutesRouteRouteDestinationPatchUnauthorizedCode int = 401 + +/*DataCocsnRoutesRouteRouteDestinationPatchUnauthorized Unauthorized + +swagger:response dataCocsnRoutesRouteRouteDestinationPatchUnauthorized +*/ +type DataCocsnRoutesRouteRouteDestinationPatchUnauthorized struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationPatchUnauthorized creates DataCocsnRoutesRouteRouteDestinationPatchUnauthorized with default headers values +func NewDataCocsnRoutesRouteRouteDestinationPatchUnauthorized() *DataCocsnRoutesRouteRouteDestinationPatchUnauthorized { + + return &DataCocsnRoutesRouteRouteDestinationPatchUnauthorized{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationPatchUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(401) +} + +// DataCocsnRoutesRouteRouteDestinationPatchNotFoundCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationPatchNotFound +const DataCocsnRoutesRouteRouteDestinationPatchNotFoundCode int = 404 + +/*DataCocsnRoutesRouteRouteDestinationPatchNotFound Not Found + +swagger:response dataCocsnRoutesRouteRouteDestinationPatchNotFound +*/ +type DataCocsnRoutesRouteRouteDestinationPatchNotFound struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationPatchNotFound creates DataCocsnRoutesRouteRouteDestinationPatchNotFound with default headers values +func NewDataCocsnRoutesRouteRouteDestinationPatchNotFound() *DataCocsnRoutesRouteRouteDestinationPatchNotFound { + + return &DataCocsnRoutesRouteRouteDestinationPatchNotFound{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationPatchNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(404) +} + +// DataCocsnRoutesRouteRouteDestinationPatchMethodNotAllowedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationPatchMethodNotAllowed +const DataCocsnRoutesRouteRouteDestinationPatchMethodNotAllowedCode int = 405 + +/*DataCocsnRoutesRouteRouteDestinationPatchMethodNotAllowed Method Not Allowed + +swagger:response dataCocsnRoutesRouteRouteDestinationPatchMethodNotAllowed +*/ +type DataCocsnRoutesRouteRouteDestinationPatchMethodNotAllowed struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationPatchMethodNotAllowed creates DataCocsnRoutesRouteRouteDestinationPatchMethodNotAllowed with default headers values +func NewDataCocsnRoutesRouteRouteDestinationPatchMethodNotAllowed() *DataCocsnRoutesRouteRouteDestinationPatchMethodNotAllowed { + + return &DataCocsnRoutesRouteRouteDestinationPatchMethodNotAllowed{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationPatchMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(405) +} + +// DataCocsnRoutesRouteRouteDestinationPatchConflictCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationPatchConflict +const DataCocsnRoutesRouteRouteDestinationPatchConflictCode int = 409 + +/*DataCocsnRoutesRouteRouteDestinationPatchConflict Conflict + +swagger:response dataCocsnRoutesRouteRouteDestinationPatchConflict +*/ +type DataCocsnRoutesRouteRouteDestinationPatchConflict struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationPatchConflict creates DataCocsnRoutesRouteRouteDestinationPatchConflict with default headers values +func NewDataCocsnRoutesRouteRouteDestinationPatchConflict() *DataCocsnRoutesRouteRouteDestinationPatchConflict { + + return &DataCocsnRoutesRouteRouteDestinationPatchConflict{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationPatchConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(409) +} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_delete_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_patch_urlbuilder.go similarity index 56% rename from api/restapi/operations/data/data_cocsn_arp_table_delete_urlbuilder.go rename to api/restapi/operations/data/data_cocsn_routes_route_route_destination_patch_urlbuilder.go index 97d9492fadc5b7db7990e28695c44b9e8e36a314..307933a74af2dbb001ebd64f7ae1972a92b510d9 100644 --- a/api/restapi/operations/data/data_cocsn_arp_table_delete_urlbuilder.go +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_patch_urlbuilder.go @@ -9,17 +9,22 @@ import ( "errors" "net/url" golangswaggerpaths "path" + "strings" ) -// DataCocsnArpTableDeleteURL generates an URL for the data cocsn arp table delete operation -type DataCocsnArpTableDeleteURL struct { +// DataCocsnRoutesRouteRouteDestinationPatchURL generates an URL for the data cocsn routes route route destination patch operation +type DataCocsnRoutesRouteRouteDestinationPatchURL struct { + RouteDestination string + _basePath string + // avoid unkeyed usage + _ struct{} } // WithBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *DataCocsnArpTableDeleteURL) WithBasePath(bp string) *DataCocsnArpTableDeleteURL { +func (o *DataCocsnRoutesRouteRouteDestinationPatchURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationPatchURL { o.SetBasePath(bp) return o } @@ -27,15 +32,22 @@ func (o *DataCocsnArpTableDeleteURL) WithBasePath(bp string) *DataCocsnArpTableD // SetBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *DataCocsnArpTableDeleteURL) SetBasePath(bp string) { +func (o *DataCocsnRoutesRouteRouteDestinationPatchURL) SetBasePath(bp string) { o._basePath = bp } // Build a url path and query string -func (o *DataCocsnArpTableDeleteURL) Build() (*url.URL, error) { +func (o *DataCocsnRoutesRouteRouteDestinationPatchURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/data/cocsn:arp-table" + var _path = "/data/cocsn:routes/route={route-destination}" + + routeDestination := o.RouteDestination + if routeDestination != "" { + _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) + } else { + return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationPatchURL") + } _basePath := o._basePath if _basePath == "" { @@ -47,7 +59,7 @@ func (o *DataCocsnArpTableDeleteURL) Build() (*url.URL, error) { } // Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnArpTableDeleteURL) Must(u *url.URL, err error) *url.URL { +func (o *DataCocsnRoutesRouteRouteDestinationPatchURL) Must(u *url.URL, err error) *url.URL { if err != nil { panic(err) } @@ -58,17 +70,17 @@ func (o *DataCocsnArpTableDeleteURL) Must(u *url.URL, err error) *url.URL { } // String returns the string representation of the path with query string -func (o *DataCocsnArpTableDeleteURL) String() string { +func (o *DataCocsnRoutesRouteRouteDestinationPatchURL) String() string { return o.Must(o.Build()).String() } // BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnArpTableDeleteURL) BuildFull(scheme, host string) (*url.URL, error) { +func (o *DataCocsnRoutesRouteRouteDestinationPatchURL) BuildFull(scheme, host string) (*url.URL, error) { if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnArpTableDeleteURL") + return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationPatchURL") } if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnArpTableDeleteURL") + return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationPatchURL") } base, err := o.Build() @@ -82,6 +94,6 @@ func (o *DataCocsnArpTableDeleteURL) BuildFull(scheme, host string) (*url.URL, e } // StringFull returns the string representation of a complete url -func (o *DataCocsnArpTableDeleteURL) StringFull(scheme, host string) string { +func (o *DataCocsnRoutesRouteRouteDestinationPatchURL) StringFull(scheme, host string) string { return o.Must(o.BuildFull(scheme, host)).String() } diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_put.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_put.go new file mode 100644 index 0000000000000000000000000000000000000000..8fc07b25556d7b7322e85ce4564087debd2280e3 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_put.go @@ -0,0 +1,71 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime/middleware" +) + +// DataCocsnRoutesRouteRouteDestinationPutHandlerFunc turns a function with the right signature into a data cocsn routes route route destination put handler +type DataCocsnRoutesRouteRouteDestinationPutHandlerFunc func(DataCocsnRoutesRouteRouteDestinationPutParams, interface{}) middleware.Responder + +// Handle executing the request and returning a response +func (fn DataCocsnRoutesRouteRouteDestinationPutHandlerFunc) Handle(params DataCocsnRoutesRouteRouteDestinationPutParams, principal interface{}) middleware.Responder { + return fn(params, principal) +} + +// DataCocsnRoutesRouteRouteDestinationPutHandler interface for that can handle valid data cocsn routes route route destination put params +type DataCocsnRoutesRouteRouteDestinationPutHandler interface { + Handle(DataCocsnRoutesRouteRouteDestinationPutParams, interface{}) middleware.Responder +} + +// NewDataCocsnRoutesRouteRouteDestinationPut creates a new http.Handler for the data cocsn routes route route destination put operation +func NewDataCocsnRoutesRouteRouteDestinationPut(ctx *middleware.Context, handler DataCocsnRoutesRouteRouteDestinationPutHandler) *DataCocsnRoutesRouteRouteDestinationPut { + return &DataCocsnRoutesRouteRouteDestinationPut{Context: ctx, Handler: handler} +} + +/*DataCocsnRoutesRouteRouteDestinationPut swagger:route PUT /data/cocsn:routes/route={route-destination} data put dataCocsnRoutesRouteRouteDestinationPut + +DataCocsnRoutesRouteRouteDestinationPut data cocsn routes route route destination put API + +*/ +type DataCocsnRoutesRouteRouteDestinationPut struct { + Context *middleware.Context + Handler DataCocsnRoutesRouteRouteDestinationPutHandler +} + +func (o *DataCocsnRoutesRouteRouteDestinationPut) ServeHTTP(rw http.ResponseWriter, r *http.Request) { + route, rCtx, _ := o.Context.RouteInfo(r) + if rCtx != nil { + r = rCtx + } + var Params = NewDataCocsnRoutesRouteRouteDestinationPutParams() + + uprinc, aCtx, err := o.Context.Authorize(r, route) + if err != nil { + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + if aCtx != nil { + r = aCtx + } + var principal interface{} + if uprinc != nil { + principal = uprinc + } + + if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params + o.Context.Respond(rw, r, route.Produces, route, err) + return + } + + res := o.Handler.Handle(Params, principal) // actually handle the request + + o.Context.Respond(rw, r, route.Produces, route, res) + +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_put_parameters.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_put_parameters.go new file mode 100644 index 0000000000000000000000000000000000000000..940cf237ef72f3e4453ad7c7de8646b8322cadf3 --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_put_parameters.go @@ -0,0 +1,184 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "io" + "net/http" + + "github.com/go-openapi/errors" + "github.com/go-openapi/runtime" + "github.com/go-openapi/runtime/middleware" + "github.com/go-openapi/strfmt" + "github.com/go-openapi/validate" + + "code.fbi.h-da.de/cocsn/cocsn-api/api/models" +) + +// NewDataCocsnRoutesRouteRouteDestinationPutParams creates a new DataCocsnRoutesRouteRouteDestinationPutParams object +// with the default values initialized. +func NewDataCocsnRoutesRouteRouteDestinationPutParams() DataCocsnRoutesRouteRouteDestinationPutParams { + + var ( + // initialize parameters with default values + + insertDefault = string("first") + ) + + return DataCocsnRoutesRouteRouteDestinationPutParams{ + Insert: &insertDefault, + } +} + +// DataCocsnRoutesRouteRouteDestinationPutParams contains all the bound params for the data cocsn routes route route destination put operation +// typically these are obtained from a http.Request +// +// swagger:parameters data_cocsn_routes_route_route_destination_put +type DataCocsnRoutesRouteRouteDestinationPutParams struct { + + // HTTP Request Object + HTTPRequest *http.Request `json:"-"` + + /*controlling the order when adding new list elements + In: query + Default: "first" + */ + Insert *string + /*used to specify the insertion point + In: query + */ + Point *string + /* + Required: true + In: body + */ + Route *models.DataCocsnRoutesRouteRouteDestination + /*Route destination. IP network + Required: true + In: path + */ + RouteDestination string +} + +// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface +// for simple values it will use straight method calls. +// +// To ensure default values, the struct must have been initialized with NewDataCocsnRoutesRouteRouteDestinationPutParams() beforehand. +func (o *DataCocsnRoutesRouteRouteDestinationPutParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { + var res []error + + o.HTTPRequest = r + + qs := runtime.Values(r.URL.Query()) + + qInsert, qhkInsert, _ := qs.GetOK("insert") + if err := o.bindInsert(qInsert, qhkInsert, route.Formats); err != nil { + res = append(res, err) + } + + qPoint, qhkPoint, _ := qs.GetOK("point") + if err := o.bindPoint(qPoint, qhkPoint, route.Formats); err != nil { + res = append(res, err) + } + + if runtime.HasBody(r) { + defer r.Body.Close() + var body models.DataCocsnRoutesRouteRouteDestination + if err := route.Consumer.Consume(r.Body, &body); err != nil { + if err == io.EOF { + res = append(res, errors.Required("route", "body", "")) + } else { + res = append(res, errors.NewParseError("route", "body", "", err)) + } + } else { + // validate body object + if err := body.Validate(route.Formats); err != nil { + res = append(res, err) + } + + if len(res) == 0 { + o.Route = &body + } + } + } else { + res = append(res, errors.Required("route", "body", "")) + } + rRouteDestination, rhkRouteDestination, _ := route.Params.GetOK("route-destination") + if err := o.bindRouteDestination(rRouteDestination, rhkRouteDestination, route.Formats); err != nil { + res = append(res, err) + } + + if len(res) > 0 { + return errors.CompositeValidationError(res...) + } + return nil +} + +// bindInsert binds and validates parameter Insert from query. +func (o *DataCocsnRoutesRouteRouteDestinationPutParams) bindInsert(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: false + // AllowEmptyValue: false + if raw == "" { // empty values pass all other validations + // Default values have been previously initialized by NewDataCocsnRoutesRouteRouteDestinationPutParams() + return nil + } + + o.Insert = &raw + + if err := o.validateInsert(formats); err != nil { + return err + } + + return nil +} + +// validateInsert carries on validations for parameter Insert +func (o *DataCocsnRoutesRouteRouteDestinationPutParams) validateInsert(formats strfmt.Registry) error { + + if err := validate.EnumCase("insert", "query", *o.Insert, []interface{}{"first", "last", "before", "after"}, true); err != nil { + return err + } + + return nil +} + +// bindPoint binds and validates parameter Point from query. +func (o *DataCocsnRoutesRouteRouteDestinationPutParams) bindPoint(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: false + // AllowEmptyValue: false + if raw == "" { // empty values pass all other validations + return nil + } + + o.Point = &raw + + return nil +} + +// bindRouteDestination binds and validates parameter RouteDestination from path. +func (o *DataCocsnRoutesRouteRouteDestinationPutParams) bindRouteDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { + var raw string + if len(rawData) > 0 { + raw = rawData[len(rawData)-1] + } + + // Required: true + // Parameter is provided by construction from the route + + o.RouteDestination = raw + + return nil +} diff --git a/api/restapi/operations/data/data_cocsn_routes_route_route_destination_put_responses.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_put_responses.go new file mode 100644 index 0000000000000000000000000000000000000000..0a6edda8a15286349e77a7c5d1f23489beba197d --- /dev/null +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_put_responses.go @@ -0,0 +1,180 @@ +// Code generated by go-swagger; DO NOT EDIT. + +package data + +// This file was generated by the swagger tool. +// Editing this file might prove futile when you re-run the swagger generate command + +import ( + "net/http" + + "github.com/go-openapi/runtime" +) + +// DataCocsnRoutesRouteRouteDestinationPutCreatedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationPutCreated +const DataCocsnRoutesRouteRouteDestinationPutCreatedCode int = 201 + +/*DataCocsnRoutesRouteRouteDestinationPutCreated list route created or replaced + +swagger:response dataCocsnRoutesRouteRouteDestinationPutCreated +*/ +type DataCocsnRoutesRouteRouteDestinationPutCreated struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationPutCreated creates DataCocsnRoutesRouteRouteDestinationPutCreated with default headers values +func NewDataCocsnRoutesRouteRouteDestinationPutCreated() *DataCocsnRoutesRouteRouteDestinationPutCreated { + + return &DataCocsnRoutesRouteRouteDestinationPutCreated{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationPutCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(201) +} + +// DataCocsnRoutesRouteRouteDestinationPutNoContentCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationPutNoContent +const DataCocsnRoutesRouteRouteDestinationPutNoContentCode int = 204 + +/*DataCocsnRoutesRouteRouteDestinationPutNoContent No Content + +swagger:response dataCocsnRoutesRouteRouteDestinationPutNoContent +*/ +type DataCocsnRoutesRouteRouteDestinationPutNoContent struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationPutNoContent creates DataCocsnRoutesRouteRouteDestinationPutNoContent with default headers values +func NewDataCocsnRoutesRouteRouteDestinationPutNoContent() *DataCocsnRoutesRouteRouteDestinationPutNoContent { + + return &DataCocsnRoutesRouteRouteDestinationPutNoContent{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationPutNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(204) +} + +// DataCocsnRoutesRouteRouteDestinationPutBadRequestCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationPutBadRequest +const DataCocsnRoutesRouteRouteDestinationPutBadRequestCode int = 400 + +/*DataCocsnRoutesRouteRouteDestinationPutBadRequest Bad Request + +swagger:response dataCocsnRoutesRouteRouteDestinationPutBadRequest +*/ +type DataCocsnRoutesRouteRouteDestinationPutBadRequest struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationPutBadRequest creates DataCocsnRoutesRouteRouteDestinationPutBadRequest with default headers values +func NewDataCocsnRoutesRouteRouteDestinationPutBadRequest() *DataCocsnRoutesRouteRouteDestinationPutBadRequest { + + return &DataCocsnRoutesRouteRouteDestinationPutBadRequest{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationPutBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(400) +} + +// DataCocsnRoutesRouteRouteDestinationPutUnauthorizedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationPutUnauthorized +const DataCocsnRoutesRouteRouteDestinationPutUnauthorizedCode int = 401 + +/*DataCocsnRoutesRouteRouteDestinationPutUnauthorized Unauthorized + +swagger:response dataCocsnRoutesRouteRouteDestinationPutUnauthorized +*/ +type DataCocsnRoutesRouteRouteDestinationPutUnauthorized struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationPutUnauthorized creates DataCocsnRoutesRouteRouteDestinationPutUnauthorized with default headers values +func NewDataCocsnRoutesRouteRouteDestinationPutUnauthorized() *DataCocsnRoutesRouteRouteDestinationPutUnauthorized { + + return &DataCocsnRoutesRouteRouteDestinationPutUnauthorized{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationPutUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(401) +} + +// DataCocsnRoutesRouteRouteDestinationPutNotFoundCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationPutNotFound +const DataCocsnRoutesRouteRouteDestinationPutNotFoundCode int = 404 + +/*DataCocsnRoutesRouteRouteDestinationPutNotFound Not Found + +swagger:response dataCocsnRoutesRouteRouteDestinationPutNotFound +*/ +type DataCocsnRoutesRouteRouteDestinationPutNotFound struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationPutNotFound creates DataCocsnRoutesRouteRouteDestinationPutNotFound with default headers values +func NewDataCocsnRoutesRouteRouteDestinationPutNotFound() *DataCocsnRoutesRouteRouteDestinationPutNotFound { + + return &DataCocsnRoutesRouteRouteDestinationPutNotFound{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationPutNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(404) +} + +// DataCocsnRoutesRouteRouteDestinationPutMethodNotAllowedCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationPutMethodNotAllowed +const DataCocsnRoutesRouteRouteDestinationPutMethodNotAllowedCode int = 405 + +/*DataCocsnRoutesRouteRouteDestinationPutMethodNotAllowed Method Not Allowed + +swagger:response dataCocsnRoutesRouteRouteDestinationPutMethodNotAllowed +*/ +type DataCocsnRoutesRouteRouteDestinationPutMethodNotAllowed struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationPutMethodNotAllowed creates DataCocsnRoutesRouteRouteDestinationPutMethodNotAllowed with default headers values +func NewDataCocsnRoutesRouteRouteDestinationPutMethodNotAllowed() *DataCocsnRoutesRouteRouteDestinationPutMethodNotAllowed { + + return &DataCocsnRoutesRouteRouteDestinationPutMethodNotAllowed{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationPutMethodNotAllowed) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(405) +} + +// DataCocsnRoutesRouteRouteDestinationPutConflictCode is the HTTP code returned for type DataCocsnRoutesRouteRouteDestinationPutConflict +const DataCocsnRoutesRouteRouteDestinationPutConflictCode int = 409 + +/*DataCocsnRoutesRouteRouteDestinationPutConflict Conflict + +swagger:response dataCocsnRoutesRouteRouteDestinationPutConflict +*/ +type DataCocsnRoutesRouteRouteDestinationPutConflict struct { +} + +// NewDataCocsnRoutesRouteRouteDestinationPutConflict creates DataCocsnRoutesRouteRouteDestinationPutConflict with default headers values +func NewDataCocsnRoutesRouteRouteDestinationPutConflict() *DataCocsnRoutesRouteRouteDestinationPutConflict { + + return &DataCocsnRoutesRouteRouteDestinationPutConflict{} +} + +// WriteResponse to the client +func (o *DataCocsnRoutesRouteRouteDestinationPutConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { + + rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses + + rw.WriteHeader(409) +} diff --git a/api/restapi/operations/data/data_cocsn_arp_table_get_urlbuilder.go b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_put_urlbuilder.go similarity index 54% rename from api/restapi/operations/data/data_cocsn_arp_table_get_urlbuilder.go rename to api/restapi/operations/data/data_cocsn_routes_route_route_destination_put_urlbuilder.go index 275b266693b6310f67746b43eef499de8a38ab94..97210ce8ff62f821b31914bc33519bd91aa67912 100644 --- a/api/restapi/operations/data/data_cocsn_arp_table_get_urlbuilder.go +++ b/api/restapi/operations/data/data_cocsn_routes_route_route_destination_put_urlbuilder.go @@ -9,17 +9,15 @@ import ( "errors" "net/url" golangswaggerpaths "path" - - "github.com/go-openapi/swag" + "strings" ) -// DataCocsnArpTableGetURL generates an URL for the data cocsn arp table get operation -type DataCocsnArpTableGetURL struct { - Content *string - Depth *uint16 - Fields *string - Filter *string - WithDefaults *string +// DataCocsnRoutesRouteRouteDestinationPutURL generates an URL for the data cocsn routes route route destination put operation +type DataCocsnRoutesRouteRouteDestinationPutURL struct { + RouteDestination string + + Insert *string + Point *string _basePath string // avoid unkeyed usage @@ -29,7 +27,7 @@ type DataCocsnArpTableGetURL struct { // WithBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *DataCocsnArpTableGetURL) WithBasePath(bp string) *DataCocsnArpTableGetURL { +func (o *DataCocsnRoutesRouteRouteDestinationPutURL) WithBasePath(bp string) *DataCocsnRoutesRouteRouteDestinationPutURL { o.SetBasePath(bp) return o } @@ -37,15 +35,22 @@ func (o *DataCocsnArpTableGetURL) WithBasePath(bp string) *DataCocsnArpTableGetU // SetBasePath sets the base path for this url builder, only required when it's different from the // base path specified in the swagger spec. // When the value of the base path is an empty string -func (o *DataCocsnArpTableGetURL) SetBasePath(bp string) { +func (o *DataCocsnRoutesRouteRouteDestinationPutURL) SetBasePath(bp string) { o._basePath = bp } // Build a url path and query string -func (o *DataCocsnArpTableGetURL) Build() (*url.URL, error) { +func (o *DataCocsnRoutesRouteRouteDestinationPutURL) Build() (*url.URL, error) { var _result url.URL - var _path = "/data/cocsn:arp-table" + var _path = "/data/cocsn:routes/route={route-destination}" + + routeDestination := o.RouteDestination + if routeDestination != "" { + _path = strings.Replace(_path, "{route-destination}", routeDestination, -1) + } else { + return nil, errors.New("routeDestination is required on DataCocsnRoutesRouteRouteDestinationPutURL") + } _basePath := o._basePath if _basePath == "" { @@ -55,44 +60,20 @@ func (o *DataCocsnArpTableGetURL) Build() (*url.URL, error) { qs := make(url.Values) - var contentQ string - if o.Content != nil { - contentQ = *o.Content - } - if contentQ != "" { - qs.Set("content", contentQ) - } - - var depthQ string - if o.Depth != nil { - depthQ = swag.FormatUint16(*o.Depth) - } - if depthQ != "" { - qs.Set("depth", depthQ) - } - - var fieldsQ string - if o.Fields != nil { - fieldsQ = *o.Fields - } - if fieldsQ != "" { - qs.Set("fields", fieldsQ) - } - - var filterQ string - if o.Filter != nil { - filterQ = *o.Filter + var insertQ string + if o.Insert != nil { + insertQ = *o.Insert } - if filterQ != "" { - qs.Set("filter", filterQ) + if insertQ != "" { + qs.Set("insert", insertQ) } - var withDefaultsQ string - if o.WithDefaults != nil { - withDefaultsQ = *o.WithDefaults + var pointQ string + if o.Point != nil { + pointQ = *o.Point } - if withDefaultsQ != "" { - qs.Set("with-defaults", withDefaultsQ) + if pointQ != "" { + qs.Set("point", pointQ) } _result.RawQuery = qs.Encode() @@ -101,7 +82,7 @@ func (o *DataCocsnArpTableGetURL) Build() (*url.URL, error) { } // Must is a helper function to panic when the url builder returns an error -func (o *DataCocsnArpTableGetURL) Must(u *url.URL, err error) *url.URL { +func (o *DataCocsnRoutesRouteRouteDestinationPutURL) Must(u *url.URL, err error) *url.URL { if err != nil { panic(err) } @@ -112,17 +93,17 @@ func (o *DataCocsnArpTableGetURL) Must(u *url.URL, err error) *url.URL { } // String returns the string representation of the path with query string -func (o *DataCocsnArpTableGetURL) String() string { +func (o *DataCocsnRoutesRouteRouteDestinationPutURL) String() string { return o.Must(o.Build()).String() } // BuildFull builds a full url with scheme, host, path and query string -func (o *DataCocsnArpTableGetURL) BuildFull(scheme, host string) (*url.URL, error) { +func (o *DataCocsnRoutesRouteRouteDestinationPutURL) BuildFull(scheme, host string) (*url.URL, error) { if scheme == "" { - return nil, errors.New("scheme is required for a full url on DataCocsnArpTableGetURL") + return nil, errors.New("scheme is required for a full url on DataCocsnRoutesRouteRouteDestinationPutURL") } if host == "" { - return nil, errors.New("host is required for a full url on DataCocsnArpTableGetURL") + return nil, errors.New("host is required for a full url on DataCocsnRoutesRouteRouteDestinationPutURL") } base, err := o.Build() @@ -136,6 +117,6 @@ func (o *DataCocsnArpTableGetURL) BuildFull(scheme, host string) (*url.URL, erro } // StringFull returns the string representation of a complete url -func (o *DataCocsnArpTableGetURL) StringFull(scheme, host string) string { +func (o *DataCocsnRoutesRouteRouteDestinationPutURL) StringFull(scheme, host string) string { return o.Must(o.BuildFull(scheme, host)).String() } diff --git a/cocsn-v0.0.1.yml b/cocsn-v0.0.1.yml deleted file mode 100644 index 7e788a75687ce1e2f7428e64ff32a8faa51fa89f..0000000000000000000000000000000000000000 --- a/cocsn-v0.0.1.yml +++ /dev/null @@ -1,98 +0,0 @@ -swagger: '2.0' -info: - version: '0.0.1' - title: CoCSN - description: Simple RESTCONF API - contact: - name: Your name -basePath: /restconf -schemes: - - http -consumes: - - application/json -produces: - - application/json -paths: - /data/cocsn-interfaces: - get: - summary: 'Returns a list of interfaces' - operationId: getInterfaces - tags: - - interface - produces: - - application/json - responses: - 200: - description: OK - schema: - $ref: '#/definitions/Interfaces' - 404: - description: An error occurred. - default: - description: Unexpected error - /data/cocsn-interface/{interface}/ip-addresses: - get: - summary: 'Returns IP addresses of an interface' - operationId: getIPAddresses - parameters: - - in: path - name: interface - description: interface to fetch - required: true - type: string - tags: - - interface - produces: - - application/json - responses: - 200: - description: OK - schema: - $ref: '#/definitions/LogicalAddresses' - 404: - description: An error occurred. - default: - description: Unexpected error - /data/cocsn-interface/{interface}/mac-address: - get: - summary: 'Returns MAC address of an interface' - operationId: getMACAddress - parameters: - - in: path - name: interface - description: interface to fetch - required: true - type: string - tags: - - interface - produces: - - application/json - responses: - 200: - description: OK - schema: - $ref: '#/definitions/PhysicalAddress' - 404: - description: An error occurred. - default: - description: Unexpected error -definitions: - Interfaces: - type: array - items: - type: string - properties: - name: - type: string - PhysicalAddress: - type: string - properties: - name: - type: string - LogicalAddresses: - type: array - items: - type: string - properties: - name: - type: string \ No newline at end of file diff --git a/cocsn.json b/cocsn.json index 7222ac03f9919e770d5602d3bf60839c207d2740..1ce6d9bf34af4c50c6a86a19995b2d562cbc552e 100644 --- a/cocsn.json +++ b/cocsn.json @@ -584,6 +584,8 @@ } }, "/data/cocsn:interfaces/interface": { + }, + "/data/cocsn:interfaces/interface={interface-name}": { "get": { "tags": [ "data", @@ -591,11 +593,14 @@ ], "summary": "", "description": "", - "operationId": "data_cocsn_interfaces_interface_get", + "operationId": "data_cocsn_interfaces_interface_interface_name_get", "produces": [ "application/yang-data+json" ], "parameters": [ + { + "$ref": "#/parameters/interface-name" + }, { "$ref": "#/parameters/content" }, @@ -616,7 +621,7 @@ "200": { "description": "OK", "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface" + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name" } }, "204": { @@ -643,17 +648,15 @@ "basicAuth": [] } ] - } - }, - "/data/cocsn:interfaces/interface={interface-name}": { - "get": { + }, + "put": { "tags": [ "data", - "get" + "put" ], "summary": "", "description": "", - "operationId": "data_cocsn_interfaces_interface_interface_name_get", + "operationId": "data_cocsn_interfaces_interface_interface_name_put", "produces": [ "application/yang-data+json" ], @@ -662,27 +665,18 @@ "$ref": "#/parameters/interface-name" }, { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" + "$ref": "#/parameters/data_cocsn_interfaces_interface_interface-name" }, { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" + "$ref": "#/parameters/insert" }, { - "$ref": "#/parameters/with-defaults" + "$ref": "#/parameters/point" } ], "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name" - } + "201": { + "description": "list interface created or replaced" }, "204": { "$ref": "#/responses/204" @@ -708,17 +702,15 @@ "basicAuth": [] } ] - } - }, - "/data/cocsn:interfaces/interface={interface-name}/name": { - "get": { + }, + "patch": { "tags": [ "data", - "get" + "patch" ], - "summary": "Interface name. Example value: en0", - "description": "Interface name. Example value: en0", - "operationId": "data_cocsn_interfaces_interface_interface_name_name_get", + "summary": "", + "description": "", + "operationId": "data_cocsn_interfaces_interface_interface_name_patch", "produces": [ "application/yang-data+json" ], @@ -727,30 +719,12 @@ "$ref": "#/parameters/interface-name" }, { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" + "$ref": "#/parameters/data_cocsn_interfaces_interface_interface-name" } ], "responses": { - "200": { - "description": "Interface name. Example value: en0", - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_name" - } - }, "204": { - "$ref": "#/responses/204" + "description": "list interface updated" }, "400": { "$ref": "#/responses/400" @@ -773,17 +747,44 @@ "basicAuth": [] } ] + }, + "delete": { + "tags": [ + "data", + "delete" + ], + "summary": "", + "description": "", + "operationId": "data_cocsn_interfaces_interface_interface_name_delete", + "produces": [ + "application/yang-data+json" + ], + "parameters": [ + { + "$ref": "#/parameters/interface-name" + } + ], + "responses": { + "204": { + "$ref": "#/responses/204" + } + }, + "security": [ + { + "basicAuth": [] + } + ] } }, - "/data/cocsn:interfaces/interface={interface-name}/addresses": { + "/data/cocsn:interfaces/interface={interface-name}/name": { "get": { "tags": [ "data", "get" ], - "summary": "Interface IP address. Example value: 10.10.10.1", - "description": "Interface IP address. Example value: 10.10.10.1", - "operationId": "data_cocsn_interfaces_interface_interface_name_addresses_get", + "summary": "Interface name. Example value: en0", + "description": "Interface name. Example value: en0", + "operationId": "data_cocsn_interfaces_interface_interface_name_name_get", "produces": [ "application/yang-data+json" ], @@ -809,9 +810,9 @@ ], "responses": { "200": { - "description": "Interface IP address. Example value: 10.10.10.1", + "description": "Interface name. Example value: en0", "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_addresses" + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_name" } }, "204": { @@ -838,17 +839,15 @@ "basicAuth": [] } ] - } - }, - "/data/cocsn:interfaces/interface={interface-name}/addresses={addresses-id}": { - "get": { + }, + "put": { "tags": [ "data", - "get" + "put" ], - "summary": "Interface IP address. Example value: 10.10.10.1", - "description": "Interface IP address. Example value: 10.10.10.1", - "operationId": "data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_get", + "summary": "Interface name. Example value: en0", + "description": "Interface name. Example value: en0", + "operationId": "data_cocsn_interfaces_interface_interface_name_name_put", "produces": [ "application/yang-data+json" ], @@ -857,30 +856,12 @@ "$ref": "#/parameters/interface-name" }, { - "$ref": "#/parameters/addresses-id" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" + "$ref": "#/parameters/data_cocsn_interfaces_interface_interface-name_name" } ], "responses": { - "200": { - "description": "Interface IP address. Example value: 10.10.10.1", - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_addresses_addresses-id" - } + "201": { + "description": "leaf name created or replaced" }, "204": { "$ref": "#/responses/204" @@ -906,17 +887,15 @@ "basicAuth": [] } ] - } - }, - "/data/cocsn:interfaces/interface={interface-name}/phys-address": { - "get": { + }, + "patch": { "tags": [ "data", - "get" + "patch" ], - "summary": "The interface's address at its protocol sub-layer. For\nexample, for an 802.x interface, this object normally\ncontains a Media Access Control (MAC) address. The\ninterface's media-specific modules must define the bit\nand byte ordering and the format of the value of this\nobject. For interfaces that do not have such an address\n(e.g., a serial line), this node is not present.", - "description": "The interface's address at its protocol sub-layer. For\nexample, for an 802.x interface, this object normally\ncontains a Media Access Control (MAC) address. The\ninterface's media-specific modules must define the bit\nand byte ordering and the format of the value of this\nobject. For interfaces that do not have such an address\n(e.g., a serial line), this node is not present.", - "operationId": "data_cocsn_interfaces_interface_interface_name_phys_address_get", + "summary": "Interface name. Example value: en0", + "description": "Interface name. Example value: en0", + "operationId": "data_cocsn_interfaces_interface_interface_name_name_patch", "produces": [ "application/yang-data+json" ], @@ -925,30 +904,12 @@ "$ref": "#/parameters/interface-name" }, { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" + "$ref": "#/parameters/data_cocsn_interfaces_interface_interface-name_name" } ], "responses": { - "200": { - "description": "The interface's address at its protocol sub-layer. For\nexample, for an 802.x interface, this object normally\ncontains a Media Access Control (MAC) address. The\ninterface's media-specific modules must define the bit\nand byte ordering and the format of the value of this\nobject. For interfaces that do not have such an address\n(e.g., a serial line), this node is not present.", - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_phys-address" - } - }, "204": { - "$ref": "#/responses/204" + "description": "leaf name updated" }, "400": { "$ref": "#/responses/400" @@ -971,17 +932,46 @@ "basicAuth": [] } ] + }, + "delete": { + "tags": [ + "data", + "delete" + ], + "summary": "Interface name. Example value: en0", + "description": "Interface name. Example value: en0", + "operationId": "data_cocsn_interfaces_interface_interface_name_name_delete", + "produces": [ + "application/yang-data+json" + ], + "parameters": [ + { + "$ref": "#/parameters/interface-name" + } + ], + "responses": { + "204": { + "$ref": "#/responses/204" + } + }, + "security": [ + { + "basicAuth": [] + } + ] } }, - "/data/cocsn:interfaces/interface={interface-name}/enabled": { + "/data/cocsn:interfaces/interface={interface-name}/addresses": { + }, + "/data/cocsn:interfaces/interface={interface-name}/addresses={addresses-id}": { "get": { "tags": [ "data", "get" ], - "summary": "Enable or disable the interface. Example value: true", - "description": "Enable or disable the interface. Example value: true", - "operationId": "data_cocsn_interfaces_interface_interface_name_enabled_get", + "summary": "Interface IP address. Example value: 10.10.10.1", + "description": "Interface IP address. Example value: 10.10.10.1", + "operationId": "data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_get", "produces": [ "application/yang-data+json" ], @@ -989,6 +979,9 @@ { "$ref": "#/parameters/interface-name" }, + { + "$ref": "#/parameters/addresses-id" + }, { "$ref": "#/parameters/content" }, @@ -1007,9 +1000,9 @@ ], "responses": { "200": { - "description": "Enable or disable the interface. Example value: true", + "description": "Interface IP address. Example value: 10.10.10.1", "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_enabled" + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_addresses_addresses-id" } }, "204": { @@ -1036,17 +1029,15 @@ "basicAuth": [] } ] - } - }, - "/data/cocsn:interfaces/interface={interface-name}/oper-status": { - "get": { + }, + "put": { "tags": [ "data", - "get" + "put" ], - "summary": "Describes whether the interface is physically up or down", - "description": "Describes whether the interface is physically up or down", - "operationId": "data_cocsn_interfaces_interface_interface_name_oper_status_get", + "summary": "Interface IP address. Example value: 10.10.10.1", + "description": "Interface IP address. Example value: 10.10.10.1", + "operationId": "data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_put", "produces": [ "application/yang-data+json" ], @@ -1055,27 +1046,21 @@ "$ref": "#/parameters/interface-name" }, { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" + "$ref": "#/parameters/addresses-id" }, { - "$ref": "#/parameters/fields" + "$ref": "#/parameters/data_cocsn_interfaces_interface_interface-name_addresses_addresses-id" }, { - "$ref": "#/parameters/filter" + "$ref": "#/parameters/insert" }, { - "$ref": "#/parameters/with-defaults" + "$ref": "#/parameters/point" } ], "responses": { - "200": { - "description": "Describes whether the interface is physically up or down", - "schema": { - "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_oper-status" - } + "201": { + "description": "leaf-list addresses created or replaced" }, "204": { "$ref": "#/responses/204" @@ -1101,29 +1086,542 @@ "basicAuth": [] } ] - } - }, - "/data/cocsn:routes": { - "get": { + }, + "patch": { "tags": [ "data", - "get" + "patch" ], - "summary": "", - "description": "", - "operationId": "data_cocsn_routes_get", + "summary": "Interface IP address. Example value: 10.10.10.1", + "description": "Interface IP address. Example value: 10.10.10.1", + "operationId": "data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_patch", "produces": [ "application/yang-data+json" ], "parameters": [ { - "$ref": "#/parameters/content" + "$ref": "#/parameters/interface-name" }, { - "$ref": "#/parameters/depth" + "$ref": "#/parameters/addresses-id" }, { - "$ref": "#/parameters/fields" + "$ref": "#/parameters/data_cocsn_interfaces_interface_interface-name_addresses_addresses-id" + } + ], + "responses": { + "204": { + "description": "leaf-list addresses updated" + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "404": { + "$ref": "#/responses/404" + }, + "405": { + "$ref": "#/responses/405" + }, + "409": { + "$ref": "#/responses/409" + } + }, + "security": [ + { + "basicAuth": [] + } + ] + }, + "delete": { + "tags": [ + "data", + "delete" + ], + "summary": "Interface IP address. Example value: 10.10.10.1", + "description": "Interface IP address. Example value: 10.10.10.1", + "operationId": "data_cocsn_interfaces_interface_interface_name_addresses_addresses_id_delete", + "produces": [ + "application/yang-data+json" + ], + "parameters": [ + { + "$ref": "#/parameters/interface-name" + }, + { + "$ref": "#/parameters/addresses-id" + } + ], + "responses": { + "204": { + "$ref": "#/responses/204" + } + }, + "security": [ + { + "basicAuth": [] + } + ] + } + }, + "/data/cocsn:interfaces/interface={interface-name}/phys-address": { + "get": { + "tags": [ + "data", + "get" + ], + "summary": "The interface's address at its protocol sub-layer. For\nexample, for an 802.x interface, this object normally\ncontains a Media Access Control (MAC) address. The\ninterface's media-specific modules must define the bit\nand byte ordering and the format of the value of this\nobject. For interfaces that do not have such an address\n(e.g., a serial line), this node is not present.", + "description": "The interface's address at its protocol sub-layer. For\nexample, for an 802.x interface, this object normally\ncontains a Media Access Control (MAC) address. The\ninterface's media-specific modules must define the bit\nand byte ordering and the format of the value of this\nobject. For interfaces that do not have such an address\n(e.g., a serial line), this node is not present.", + "operationId": "data_cocsn_interfaces_interface_interface_name_phys_address_get", + "produces": [ + "application/yang-data+json" + ], + "parameters": [ + { + "$ref": "#/parameters/interface-name" + }, + { + "$ref": "#/parameters/content" + }, + { + "$ref": "#/parameters/depth" + }, + { + "$ref": "#/parameters/fields" + }, + { + "$ref": "#/parameters/filter" + }, + { + "$ref": "#/parameters/with-defaults" + } + ], + "responses": { + "200": { + "description": "The interface's address at its protocol sub-layer. For\nexample, for an 802.x interface, this object normally\ncontains a Media Access Control (MAC) address. The\ninterface's media-specific modules must define the bit\nand byte ordering and the format of the value of this\nobject. For interfaces that do not have such an address\n(e.g., a serial line), this node is not present.", + "schema": { + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_phys-address" + } + }, + "204": { + "$ref": "#/responses/204" + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "404": { + "$ref": "#/responses/404" + }, + "405": { + "$ref": "#/responses/405" + }, + "409": { + "$ref": "#/responses/409" + } + }, + "security": [ + { + "basicAuth": [] + } + ] + } + }, + "/data/cocsn:interfaces/interface={interface-name}/enabled": { + "get": { + "tags": [ + "data", + "get" + ], + "summary": "Enable or disable the interface. Example value: true", + "description": "Enable or disable the interface. Example value: true", + "operationId": "data_cocsn_interfaces_interface_interface_name_enabled_get", + "produces": [ + "application/yang-data+json" + ], + "parameters": [ + { + "$ref": "#/parameters/interface-name" + }, + { + "$ref": "#/parameters/content" + }, + { + "$ref": "#/parameters/depth" + }, + { + "$ref": "#/parameters/fields" + }, + { + "$ref": "#/parameters/filter" + }, + { + "$ref": "#/parameters/with-defaults" + } + ], + "responses": { + "200": { + "description": "Enable or disable the interface. Example value: true", + "schema": { + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_enabled" + } + }, + "204": { + "$ref": "#/responses/204" + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "404": { + "$ref": "#/responses/404" + }, + "405": { + "$ref": "#/responses/405" + }, + "409": { + "$ref": "#/responses/409" + } + }, + "security": [ + { + "basicAuth": [] + } + ] + }, + "put": { + "tags": [ + "data", + "put" + ], + "summary": "Enable or disable the interface. Example value: true", + "description": "Enable or disable the interface. Example value: true", + "operationId": "data_cocsn_interfaces_interface_interface_name_enabled_put", + "produces": [ + "application/yang-data+json" + ], + "parameters": [ + { + "$ref": "#/parameters/interface-name" + }, + { + "$ref": "#/parameters/data_cocsn_interfaces_interface_interface-name_enabled" + } + ], + "responses": { + "201": { + "description": "leaf enabled created or replaced" + }, + "204": { + "$ref": "#/responses/204" + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "404": { + "$ref": "#/responses/404" + }, + "405": { + "$ref": "#/responses/405" + }, + "409": { + "$ref": "#/responses/409" + } + }, + "security": [ + { + "basicAuth": [] + } + ] + }, + "patch": { + "tags": [ + "data", + "patch" + ], + "summary": "Enable or disable the interface. Example value: true", + "description": "Enable or disable the interface. Example value: true", + "operationId": "data_cocsn_interfaces_interface_interface_name_enabled_patch", + "produces": [ + "application/yang-data+json" + ], + "parameters": [ + { + "$ref": "#/parameters/interface-name" + }, + { + "$ref": "#/parameters/data_cocsn_interfaces_interface_interface-name_enabled" + } + ], + "responses": { + "204": { + "description": "leaf enabled updated" + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "404": { + "$ref": "#/responses/404" + }, + "405": { + "$ref": "#/responses/405" + }, + "409": { + "$ref": "#/responses/409" + } + }, + "security": [ + { + "basicAuth": [] + } + ] + }, + "delete": { + "tags": [ + "data", + "delete" + ], + "summary": "Enable or disable the interface. Example value: true", + "description": "Enable or disable the interface. Example value: true", + "operationId": "data_cocsn_interfaces_interface_interface_name_enabled_delete", + "produces": [ + "application/yang-data+json" + ], + "parameters": [ + { + "$ref": "#/parameters/interface-name" + } + ], + "responses": { + "204": { + "$ref": "#/responses/204" + } + }, + "security": [ + { + "basicAuth": [] + } + ] + } + }, + "/data/cocsn:interfaces/interface={interface-name}/oper-status": { + "get": { + "tags": [ + "data", + "get" + ], + "summary": "Describes whether the interface is physically up or down", + "description": "Describes whether the interface is physically up or down", + "operationId": "data_cocsn_interfaces_interface_interface_name_oper_status_get", + "produces": [ + "application/yang-data+json" + ], + "parameters": [ + { + "$ref": "#/parameters/interface-name" + }, + { + "$ref": "#/parameters/content" + }, + { + "$ref": "#/parameters/depth" + }, + { + "$ref": "#/parameters/fields" + }, + { + "$ref": "#/parameters/filter" + }, + { + "$ref": "#/parameters/with-defaults" + } + ], + "responses": { + "200": { + "description": "Describes whether the interface is physically up or down", + "schema": { + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_oper-status" + } + }, + "204": { + "$ref": "#/responses/204" + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "404": { + "$ref": "#/responses/404" + }, + "405": { + "$ref": "#/responses/405" + }, + "409": { + "$ref": "#/responses/409" + } + }, + "security": [ + { + "basicAuth": [] + } + ] + }, + "put": { + "tags": [ + "data", + "put" + ], + "summary": "Describes whether the interface is physically up or down", + "description": "Describes whether the interface is physically up or down", + "operationId": "data_cocsn_interfaces_interface_interface_name_oper_status_put", + "produces": [ + "application/yang-data+json" + ], + "parameters": [ + { + "$ref": "#/parameters/interface-name" + }, + { + "$ref": "#/parameters/data_cocsn_interfaces_interface_interface-name_oper-status" + } + ], + "responses": { + "201": { + "description": "leaf oper-status created or replaced" + }, + "204": { + "$ref": "#/responses/204" + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "404": { + "$ref": "#/responses/404" + }, + "405": { + "$ref": "#/responses/405" + }, + "409": { + "$ref": "#/responses/409" + } + }, + "security": [ + { + "basicAuth": [] + } + ] + }, + "patch": { + "tags": [ + "data", + "patch" + ], + "summary": "Describes whether the interface is physically up or down", + "description": "Describes whether the interface is physically up or down", + "operationId": "data_cocsn_interfaces_interface_interface_name_oper_status_patch", + "produces": [ + "application/yang-data+json" + ], + "parameters": [ + { + "$ref": "#/parameters/interface-name" + }, + { + "$ref": "#/parameters/data_cocsn_interfaces_interface_interface-name_oper-status" + } + ], + "responses": { + "204": { + "description": "leaf oper-status updated" + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "404": { + "$ref": "#/responses/404" + }, + "405": { + "$ref": "#/responses/405" + }, + "409": { + "$ref": "#/responses/409" + } + }, + "security": [ + { + "basicAuth": [] + } + ] + }, + "delete": { + "tags": [ + "data", + "delete" + ], + "summary": "Describes whether the interface is physically up or down", + "description": "Describes whether the interface is physically up or down", + "operationId": "data_cocsn_interfaces_interface_interface_name_oper_status_delete", + "produces": [ + "application/yang-data+json" + ], + "parameters": [ + { + "$ref": "#/parameters/interface-name" + } + ], + "responses": { + "204": { + "$ref": "#/responses/204" + } + }, + "security": [ + { + "basicAuth": [] + } + ] + } + }, + "/data/cocsn:routes": { + "get": { + "tags": [ + "data", + "get" + ], + "summary": "", + "description": "", + "operationId": "data_cocsn_routes_get", + "produces": [ + "application/yang-data+json" + ], + "parameters": [ + { + "$ref": "#/parameters/content" + }, + { + "$ref": "#/parameters/depth" + }, + { + "$ref": "#/parameters/fields" }, { "$ref": "#/parameters/filter" @@ -1167,22 +1665,200 @@ "post": { "tags": [ "data", - "post" + "post" + ], + "summary": "", + "description": "", + "operationId": "data_cocsn_routes_post", + "produces": [ + "application/yang-data+json" + ], + "parameters": [ + { + "$ref": "#/parameters/data_cocsn_routes-post" + } + ], + "responses": { + "201": { + "description": "container routes created" + }, + "204": { + "$ref": "#/responses/204" + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "404": { + "$ref": "#/responses/404" + }, + "405": { + "$ref": "#/responses/405" + }, + "409": { + "$ref": "#/responses/409" + } + }, + "security": [ + { + "basicAuth": [] + } + ] + }, + "put": { + "tags": [ + "data", + "put" + ], + "summary": "", + "description": "", + "operationId": "data_cocsn_routes_put", + "produces": [ + "application/yang-data+json" + ], + "parameters": [ + { + "$ref": "#/parameters/data_cocsn_routes" + } + ], + "responses": { + "201": { + "description": "container routes created or replaced" + }, + "204": { + "$ref": "#/responses/204" + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "404": { + "$ref": "#/responses/404" + }, + "405": { + "$ref": "#/responses/405" + }, + "409": { + "$ref": "#/responses/409" + } + }, + "security": [ + { + "basicAuth": [] + } + ] + }, + "patch": { + "tags": [ + "data", + "patch" + ], + "summary": "", + "description": "", + "operationId": "data_cocsn_routes_patch", + "produces": [ + "application/yang-data+json" + ], + "parameters": [ + { + "$ref": "#/parameters/data_cocsn_routes" + } + ], + "responses": { + "204": { + "description": "container routes updated" + }, + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "404": { + "$ref": "#/responses/404" + }, + "405": { + "$ref": "#/responses/405" + }, + "409": { + "$ref": "#/responses/409" + } + }, + "security": [ + { + "basicAuth": [] + } + ] + }, + "delete": { + "tags": [ + "data", + "delete" + ], + "summary": "", + "description": "", + "operationId": "data_cocsn_routes_delete", + "produces": [ + "application/yang-data+json" + ], + "parameters": [ + ], + "responses": { + "204": { + "$ref": "#/responses/204" + } + }, + "security": [ + { + "basicAuth": [] + } + ] + } + }, + "/data/cocsn:routes/route": { + }, + "/data/cocsn:routes/route={route-destination}": { + "get": { + "tags": [ + "data", + "get" ], "summary": "", "description": "", - "operationId": "data_cocsn_routes_post", + "operationId": "data_cocsn_routes_route_route_destination_get", "produces": [ "application/yang-data+json" ], "parameters": [ { - "$ref": "#/parameters/data_cocsn_routes-post" + "$ref": "#/parameters/route-destination" + }, + { + "$ref": "#/parameters/content" + }, + { + "$ref": "#/parameters/depth" + }, + { + "$ref": "#/parameters/fields" + }, + { + "$ref": "#/parameters/filter" + }, + { + "$ref": "#/parameters/with-defaults" } ], "responses": { - "201": { - "description": "container routes created" + "200": { + "description": "OK", + "schema": { + "$ref": "#/definitions/data_cocsn_routes_route_route-destination" + } }, "204": { "$ref": "#/responses/204" @@ -1216,18 +1892,27 @@ ], "summary": "", "description": "", - "operationId": "data_cocsn_routes_put", + "operationId": "data_cocsn_routes_route_route_destination_put", "produces": [ "application/yang-data+json" ], "parameters": [ { - "$ref": "#/parameters/data_cocsn_routes" + "$ref": "#/parameters/route-destination" + }, + { + "$ref": "#/parameters/data_cocsn_routes_route_route-destination" + }, + { + "$ref": "#/parameters/insert" + }, + { + "$ref": "#/parameters/point" } ], "responses": { "201": { - "description": "container routes created or replaced" + "description": "list route created or replaced" }, "204": { "$ref": "#/responses/204" @@ -1261,18 +1946,21 @@ ], "summary": "", "description": "", - "operationId": "data_cocsn_routes_patch", + "operationId": "data_cocsn_routes_route_route_destination_patch", "produces": [ "application/yang-data+json" ], "parameters": [ { - "$ref": "#/parameters/data_cocsn_routes" + "$ref": "#/parameters/route-destination" + }, + { + "$ref": "#/parameters/data_cocsn_routes_route_route-destination" } ], "responses": { "204": { - "description": "container routes updated" + "description": "list route updated" }, "400": { "$ref": "#/responses/400" @@ -1303,11 +1991,14 @@ ], "summary": "", "description": "", - "operationId": "data_cocsn_routes_delete", + "operationId": "data_cocsn_routes_route_route_destination_delete", "produces": [ "application/yang-data+json" ], "parameters": [ + { + "$ref": "#/parameters/route-destination" + } ], "responses": { "204": { @@ -1321,19 +2012,22 @@ ] } }, - "/data/cocsn:routes/route": { + "/data/cocsn:routes/route={route-destination}/destination": { "get": { "tags": [ "data", "get" ], - "summary": "", - "description": "", - "operationId": "data_cocsn_routes_route_get", + "summary": "Route destination. IP network", + "description": "Route destination. IP network", + "operationId": "data_cocsn_routes_route_route_destination_destination_get", "produces": [ "application/yang-data+json" ], "parameters": [ + { + "$ref": "#/parameters/route-destination" + }, { "$ref": "#/parameters/content" }, @@ -1352,9 +2046,9 @@ ], "responses": { "200": { - "description": "OK", + "description": "Route destination. IP network", "schema": { - "$ref": "#/definitions/data_cocsn_routes_route" + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_destination" } }, "204": { @@ -1381,17 +2075,15 @@ "basicAuth": [] } ] - } - }, - "/data/cocsn:routes/route={route-destination}": { - "get": { + }, + "put": { "tags": [ "data", - "get" + "put" ], - "summary": "", - "description": "", - "operationId": "data_cocsn_routes_route_route_destination_get", + "summary": "Route destination. IP network", + "description": "Route destination. IP network", + "operationId": "data_cocsn_routes_route_route_destination_destination_put", "produces": [ "application/yang-data+json" ], @@ -1400,27 +2092,12 @@ "$ref": "#/parameters/route-destination" }, { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" + "$ref": "#/parameters/data_cocsn_routes_route_route-destination_destination" } ], "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination" - } + "201": { + "description": "leaf destination created or replaced" }, "204": { "$ref": "#/responses/204" @@ -1446,17 +2123,15 @@ "basicAuth": [] } ] - } - }, - "/data/cocsn:routes/route={route-destination}/destination": { - "get": { + }, + "patch": { "tags": [ "data", - "get" + "patch" ], "summary": "Route destination. IP network", "description": "Route destination. IP network", - "operationId": "data_cocsn_routes_route_route_destination_destination_get", + "operationId": "data_cocsn_routes_route_route_destination_destination_patch", "produces": [ "application/yang-data+json" ], @@ -1465,30 +2140,12 @@ "$ref": "#/parameters/route-destination" }, { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" + "$ref": "#/parameters/data_cocsn_routes_route_route-destination_destination" } ], "responses": { - "200": { - "description": "Route destination. IP network", - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_destination" - } - }, "204": { - "$ref": "#/responses/204" + "description": "leaf destination updated" }, "400": { "$ref": "#/responses/400" @@ -1511,64 +2168,26 @@ "basicAuth": [] } ] - } - }, - "/data/cocsn:routes/route={route-destination}/gateway": { - "get": { + }, + "delete": { "tags": [ "data", - "get" + "delete" ], - "summary": "Route gateway. IP address or host name", - "description": "Route gateway. IP address or host name", - "operationId": "data_cocsn_routes_route_route_destination_gateway_get", + "summary": "Route destination. IP network", + "description": "Route destination. IP network", + "operationId": "data_cocsn_routes_route_route_destination_destination_delete", "produces": [ "application/yang-data+json" ], "parameters": [ { "$ref": "#/parameters/route-destination" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" } ], "responses": { - "200": { - "description": "Route gateway. IP address or host name", - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_gateway" - } - }, "204": { "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" } }, "security": [ @@ -1578,15 +2197,15 @@ ] } }, - "/data/cocsn:routes/route={route-destination}/flags": { + "/data/cocsn:routes/route={route-destination}/gateway": { "get": { "tags": [ "data", "get" ], - "summary": "Flags of the route", - "description": "Flags of the route", - "operationId": "data_cocsn_routes_route_route_destination_flags_get", + "summary": "Route gateway. IP address or host name", + "description": "Route gateway. IP address or host name", + "operationId": "data_cocsn_routes_route_route_destination_gateway_get", "produces": [ "application/yang-data+json" ], @@ -1612,9 +2231,9 @@ ], "responses": { "200": { - "description": "Flags of the route", + "description": "Route gateway. IP address or host name", "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_flags" + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_gateway" } }, "204": { @@ -1641,17 +2260,15 @@ "basicAuth": [] } ] - } - }, - "/data/cocsn:routes/route={route-destination}/interface": { - "get": { + }, + "put": { "tags": [ "data", - "get" + "put" ], - "summary": "Interface used for the route", - "description": "Interface used for the route", - "operationId": "data_cocsn_routes_route_route_destination_interface_get", + "summary": "Route gateway. IP address or host name", + "description": "Route gateway. IP address or host name", + "operationId": "data_cocsn_routes_route_route_destination_gateway_put", "produces": [ "application/yang-data+json" ], @@ -1660,27 +2277,12 @@ "$ref": "#/parameters/route-destination" }, { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" + "$ref": "#/parameters/data_cocsn_routes_route_route-destination_gateway" } ], "responses": { - "200": { - "description": "Interface used for the route", - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_interface" - } + "201": { + "description": "leaf gateway created or replaced" }, "204": { "$ref": "#/responses/204" @@ -1706,49 +2308,29 @@ "basicAuth": [] } ] - } - }, - "/data/cocsn:routes/route={route-destination}/expire": { - "get": { + }, + "patch": { "tags": [ "data", - "get" + "patch" ], - "summary": "Expiration timer of the route", - "description": "Expiration timer of the route", - "operationId": "data_cocsn_routes_route_route_destination_expire_get", + "summary": "Route gateway. IP address or host name", + "description": "Route gateway. IP address or host name", + "operationId": "data_cocsn_routes_route_route_destination_gateway_patch", "produces": [ "application/yang-data+json" ], "parameters": [ { - "$ref": "#/parameters/route-destination" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "Expiration timer of the route", - "schema": { - "$ref": "#/definitions/data_cocsn_routes_route_route-destination_expire" - } + "$ref": "#/parameters/route-destination" }, + { + "$ref": "#/parameters/data_cocsn_routes_route_route-destination_gateway" + } + ], + "responses": { "204": { - "$ref": "#/responses/204" + "description": "leaf gateway updated" }, "400": { "$ref": "#/responses/400" @@ -1771,61 +2353,26 @@ "basicAuth": [] } ] - } - }, - "/data/cocsn:arp-table": { - "get": { + }, + "delete": { "tags": [ "data", - "get" + "delete" ], - "summary": "", - "description": "", - "operationId": "data_cocsn_arp_table_get", + "summary": "Route gateway. IP address or host name", + "description": "Route gateway. IP address or host name", + "operationId": "data_cocsn_routes_route_route_destination_gateway_delete", "produces": [ "application/yang-data+json" ], "parameters": [ { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" + "$ref": "#/parameters/route-destination" } ], "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/data_cocsn_arp-table" - } - }, "204": { "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" } }, "security": [ @@ -1833,26 +2380,46 @@ "basicAuth": [] } ] - }, - "post": { + } + }, + "/data/cocsn:routes/route={route-destination}/flags": { + "get": { "tags": [ "data", - "post" + "get" ], - "summary": "", - "description": "", - "operationId": "data_cocsn_arp_table_post", + "summary": "Flags of the route", + "description": "Flags of the route", + "operationId": "data_cocsn_routes_route_route_destination_flags_get", "produces": [ "application/yang-data+json" ], "parameters": [ { - "$ref": "#/parameters/data_cocsn_arp-table-post" + "$ref": "#/parameters/route-destination" + }, + { + "$ref": "#/parameters/content" + }, + { + "$ref": "#/parameters/depth" + }, + { + "$ref": "#/parameters/fields" + }, + { + "$ref": "#/parameters/filter" + }, + { + "$ref": "#/parameters/with-defaults" } ], "responses": { - "201": { - "description": "container arp-table created" + "200": { + "description": "Flags of the route", + "schema": { + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_flags" + } }, "204": { "$ref": "#/responses/204" @@ -1884,20 +2451,23 @@ "data", "put" ], - "summary": "", - "description": "", - "operationId": "data_cocsn_arp_table_put", + "summary": "Flags of the route", + "description": "Flags of the route", + "operationId": "data_cocsn_routes_route_route_destination_flags_put", "produces": [ "application/yang-data+json" ], "parameters": [ { - "$ref": "#/parameters/data_cocsn_arp-table" + "$ref": "#/parameters/route-destination" + }, + { + "$ref": "#/parameters/data_cocsn_routes_route_route-destination_flags" } ], "responses": { "201": { - "description": "container arp-table created or replaced" + "description": "leaf flags created or replaced" }, "204": { "$ref": "#/responses/204" @@ -1929,20 +2499,23 @@ "data", "patch" ], - "summary": "", - "description": "", - "operationId": "data_cocsn_arp_table_patch", + "summary": "Flags of the route", + "description": "Flags of the route", + "operationId": "data_cocsn_routes_route_route_destination_flags_patch", "produces": [ "application/yang-data+json" ], "parameters": [ { - "$ref": "#/parameters/data_cocsn_arp-table" + "$ref": "#/parameters/route-destination" + }, + { + "$ref": "#/parameters/data_cocsn_routes_route_route-destination_flags" } ], "responses": { "204": { - "description": "container arp-table updated" + "description": "leaf flags updated" }, "400": { "$ref": "#/responses/400" @@ -1971,13 +2544,16 @@ "data", "delete" ], - "summary": "", - "description": "", - "operationId": "data_cocsn_arp_table_delete", + "summary": "Flags of the route", + "description": "Flags of the route", + "operationId": "data_cocsn_routes_route_route_destination_flags_delete", "produces": [ "application/yang-data+json" ], "parameters": [ + { + "$ref": "#/parameters/route-destination" + } ], "responses": { "204": { @@ -1991,19 +2567,22 @@ ] } }, - "/data/cocsn:arp-table/arp-entry": { + "/data/cocsn:routes/route={route-destination}/interface": { "get": { "tags": [ "data", "get" ], - "summary": "", - "description": "", - "operationId": "data_cocsn_arp_table_arp_entry_get", + "summary": "Interface used for the route", + "description": "Interface used for the route", + "operationId": "data_cocsn_routes_route_route_destination_interface_get", "produces": [ "application/yang-data+json" ], "parameters": [ + { + "$ref": "#/parameters/route-destination" + }, { "$ref": "#/parameters/content" }, @@ -2022,9 +2601,9 @@ ], "responses": { "200": { - "description": "OK", + "description": "Interface used for the route", "schema": { - "$ref": "#/definitions/data_cocsn_arp-table_arp-entry" + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_interface" } }, "204": { @@ -2051,46 +2630,29 @@ "basicAuth": [] } ] - } - }, - "/data/cocsn:arp-table/arp-entry={arp-entry-address}": { - "get": { + }, + "put": { "tags": [ "data", - "get" + "put" ], - "summary": "", - "description": "", - "operationId": "data_cocsn_arp_table_arp_entry_arp_entry_address_get", + "summary": "Interface used for the route", + "description": "Interface used for the route", + "operationId": "data_cocsn_routes_route_route_destination_interface_put", "produces": [ "application/yang-data+json" ], "parameters": [ { - "$ref": "#/parameters/arp-entry-address" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" + "$ref": "#/parameters/route-destination" }, { - "$ref": "#/parameters/with-defaults" + "$ref": "#/parameters/data_cocsn_routes_route_route-destination_interface" } ], "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/data_cocsn_arp-table_arp-entry_arp-entry-address" - } + "201": { + "description": "leaf interface created or replaced" }, "204": { "$ref": "#/responses/204" @@ -2116,49 +2678,29 @@ "basicAuth": [] } ] - } - }, - "/data/cocsn:arp-table/arp-entry={arp-entry-address}/address": { - "get": { + }, + "patch": { "tags": [ "data", - "get" + "patch" ], - "summary": "IP address of the arp entry", - "description": "IP address of the arp entry", - "operationId": "data_cocsn_arp_table_arp_entry_arp_entry_address_address_get", + "summary": "Interface used for the route", + "description": "Interface used for the route", + "operationId": "data_cocsn_routes_route_route_destination_interface_patch", "produces": [ "application/yang-data+json" ], "parameters": [ { - "$ref": "#/parameters/arp-entry-address" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" + "$ref": "#/parameters/route-destination" }, { - "$ref": "#/parameters/with-defaults" + "$ref": "#/parameters/data_cocsn_routes_route_route-destination_interface" } ], "responses": { - "200": { - "description": "IP address of the arp entry", - "schema": { - "$ref": "#/definitions/data_cocsn_arp-table_arp-entry_arp-entry-address_address" - } - }, "204": { - "$ref": "#/responses/204" + "description": "leaf interface updated" }, "400": { "$ref": "#/responses/400" @@ -2181,23 +2723,50 @@ "basicAuth": [] } ] + }, + "delete": { + "tags": [ + "data", + "delete" + ], + "summary": "Interface used for the route", + "description": "Interface used for the route", + "operationId": "data_cocsn_routes_route_route_destination_interface_delete", + "produces": [ + "application/yang-data+json" + ], + "parameters": [ + { + "$ref": "#/parameters/route-destination" + } + ], + "responses": { + "204": { + "$ref": "#/responses/204" + } + }, + "security": [ + { + "basicAuth": [] + } + ] } }, - "/data/cocsn:arp-table/arp-entry={arp-entry-address}/phs-address": { + "/data/cocsn:routes/route={route-destination}/expire": { "get": { "tags": [ "data", "get" ], - "summary": "MAC address of the arp entry", - "description": "MAC address of the arp entry", - "operationId": "data_cocsn_arp_table_arp_entry_arp_entry_address_phs_address_get", + "summary": "Expiration timer of the route", + "description": "Expiration timer of the route", + "operationId": "data_cocsn_routes_route_route_destination_expire_get", "produces": [ "application/yang-data+json" ], "parameters": [ { - "$ref": "#/parameters/arp-entry-address" + "$ref": "#/parameters/route-destination" }, { "$ref": "#/parameters/content" @@ -2217,9 +2786,9 @@ ], "responses": { "200": { - "description": "MAC address of the arp entry", + "description": "Expiration timer of the route", "schema": { - "$ref": "#/definitions/data_cocsn_arp-table_arp-entry_arp-entry-address_phs-address" + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_expire" } }, "204": { @@ -2246,49 +2815,77 @@ "basicAuth": [] } ] - } - }, - "/data/cocsn:arp-table/arp-entry={arp-entry-address}/interface": { - "get": { + }, + "put": { "tags": [ "data", - "get" + "put" ], - "summary": "Interface of the arp entry", - "description": "Interface of the arp entry", - "operationId": "data_cocsn_arp_table_arp_entry_arp_entry_address_interface_get", + "summary": "Expiration timer of the route", + "description": "Expiration timer of the route", + "operationId": "data_cocsn_routes_route_route_destination_expire_put", "produces": [ "application/yang-data+json" ], "parameters": [ { - "$ref": "#/parameters/arp-entry-address" + "$ref": "#/parameters/route-destination" }, { - "$ref": "#/parameters/content" + "$ref": "#/parameters/data_cocsn_routes_route_route-destination_expire" + } + ], + "responses": { + "201": { + "description": "leaf expire created or replaced" }, - { - "$ref": "#/parameters/depth" + "204": { + "$ref": "#/responses/204" }, - { - "$ref": "#/parameters/fields" + "400": { + "$ref": "#/responses/400" + }, + "401": { + "$ref": "#/responses/401" + }, + "404": { + "$ref": "#/responses/404" + }, + "405": { + "$ref": "#/responses/405" }, + "409": { + "$ref": "#/responses/409" + } + }, + "security": [ + { + "basicAuth": [] + } + ] + }, + "patch": { + "tags": [ + "data", + "patch" + ], + "summary": "Expiration timer of the route", + "description": "Expiration timer of the route", + "operationId": "data_cocsn_routes_route_route_destination_expire_patch", + "produces": [ + "application/yang-data+json" + ], + "parameters": [ { - "$ref": "#/parameters/filter" + "$ref": "#/parameters/route-destination" }, { - "$ref": "#/parameters/with-defaults" + "$ref": "#/parameters/data_cocsn_routes_route_route-destination_expire" } ], "responses": { - "200": { - "description": "Interface of the arp entry", - "schema": { - "$ref": "#/definitions/data_cocsn_arp-table_arp-entry_arp-entry-address_interface" - } - }, "204": { - "$ref": "#/responses/204" + "description": "leaf expire updated" }, "400": { "$ref": "#/responses/400" @@ -2311,6 +2908,33 @@ "basicAuth": [] } ] + }, + "delete": { + "tags": [ + "data", + "delete" + ], + "summary": "Expiration timer of the route", + "description": "Expiration timer of the route", + "operationId": "data_cocsn_routes_route_route_destination_expire_delete", + "produces": [ + "application/yang-data+json" + ], + "parameters": [ + { + "$ref": "#/parameters/route-destination" + } + ], + "responses": { + "204": { + "$ref": "#/responses/204" + } + }, + "security": [ + { + "basicAuth": [] + } + ] } } }, @@ -2407,6 +3031,60 @@ "type": "string", "format": "string" }, + "data_cocsn_routes_route_route-destination_interface": { + "name": "interface", + "in": "body", + "description": "Interface used for the route", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_interface" + } + }, + "data_cocsn_routes_route_route-destination_gateway": { + "name": "gateway", + "in": "body", + "description": "Route gateway. IP address or host name", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_gateway" + } + }, + "data_cocsn_routes_route_route-destination_flags": { + "name": "flags", + "in": "body", + "description": "Flags of the route", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_flags" + } + }, + "data_cocsn_routes_route_route-destination_expire": { + "name": "expire", + "in": "body", + "description": "Expiration timer of the route", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_expire" + } + }, + "data_cocsn_routes_route_route-destination_destination": { + "name": "destination", + "in": "body", + "description": "Route destination. IP network", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_routes_route_route-destination_destination" + } + }, + "data_cocsn_routes_route_route-destination": { + "name": "route", + "in": "body", + "description": "", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_routes_route_route-destination" + } + }, "data_cocsn_routes-post": { "name": "routes", "in": "body", @@ -2425,40 +3103,67 @@ "$ref": "#/definitions/data_cocsn_routes" } }, - "data_cocsn_interfaces-post": { - "name": "interfaces", + "data_cocsn_interfaces_interface_interface-name_oper-status": { + "name": "oper-status", "in": "body", - "description": "", + "description": "Describes whether the interface is physically up or down", "required": true, "schema": { - "$ref": "#/definitions/data_cocsn_interfaces-post" + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_oper-status" } }, - "data_cocsn_interfaces": { - "name": "interfaces", + "data_cocsn_interfaces_interface_interface-name_name": { + "name": "name", + "in": "body", + "description": "Interface name. Example value: en0", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_name" + } + }, + "data_cocsn_interfaces_interface_interface-name_enabled": { + "name": "enabled", + "in": "body", + "description": "Enable or disable the interface. Example value: true", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_enabled" + } + }, + "data_cocsn_interfaces_interface_interface-name_addresses_addresses-id": { + "name": "addresses", + "in": "body", + "description": "Interface IP address. Example value: 10.10.10.1", + "required": true, + "schema": { + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name_addresses_addresses-id" + } + }, + "data_cocsn_interfaces_interface_interface-name": { + "name": "interface", "in": "body", "description": "", "required": true, "schema": { - "$ref": "#/definitions/data_cocsn_interfaces" + "$ref": "#/definitions/data_cocsn_interfaces_interface_interface-name" } }, - "data_cocsn_arp-table-post": { - "name": "arp-table", + "data_cocsn_interfaces-post": { + "name": "interfaces", "in": "body", "description": "", "required": true, "schema": { - "$ref": "#/definitions/data_cocsn_arp-table-post" + "$ref": "#/definitions/data_cocsn_interfaces-post" } }, - "data_cocsn_arp-table": { - "name": "arp-table", + "data_cocsn_interfaces": { + "name": "interfaces", "in": "body", "description": "", "required": true, "schema": { - "$ref": "#/definitions/data_cocsn_arp-table" + "$ref": "#/definitions/data_cocsn_interfaces" } }, "data-put-patch": { @@ -2479,14 +3184,6 @@ "$ref": "#/definitions/data-post" } }, - "arp-entry-address": { - "name": "arp-entry-address", - "in": "path", - "description": "IP address of the arp entry", - "required": true, - "type": "string", - "format": "string" - }, "addresses-id": { "name": "addresses-id", "in": "path", @@ -2706,63 +3403,6 @@ } } }, - "data_cocsn_routes_route": { - "type": "object", - "properties": { - "cocsn:route": { - "type": "array", - "description": "(list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "destination": { - "description": "Route destination. IP network (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "expire": { - "description": "Expiration timer of the route (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "flags": { - "description": "Flags of the route (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "gateway": { - "description": "Route gateway. IP address or host name (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "interface": { - "description": "Interface used for the route (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - } - } - } - }, "data_cocsn_routes-post": { "type": "object", "properties": { @@ -2955,93 +3595,12 @@ "items": { "description": "Interface IP address. Example value: 10.10.10.1 (leaf-list)", "type": "string", - "format": "string" - } - } - } - }, - "data_cocsn_interfaces_interface_interface-name_addresses": { - "type": "object", - "properties": { - "cocsn:addresses": { - "type": "array", - "x-yang": { - "type": "leaf-list" - }, - "items": { - "description": "Interface IP address. Example value: 10.10.10.1 (leaf-list)", - "type": "string", - "format": "string" - } - } - } - }, - "data_cocsn_interfaces_interface_interface-name": { - "type": "object", - "properties": { - "cocsn:interface": { - "type": "array", - "description": "(list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "addresses": { - "type": "array", - "x-yang": { - "type": "leaf-list" - }, - "items": { - "description": "Interface IP address. Example value: 10.10.10.1 (leaf-list)", - "type": "string", - "format": "string" - } - }, - "enabled": { - "description": "Enable or disable the interface. Example value: true (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - }, - "name": { - "description": "Interface name. Example value: en0 (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "oper-status": { - "description": "Describes whether the interface is physically up or down (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "up", - "enum": [ - "up", - "down" - ] - }, - "phys-address": { - "description": "The interface's address at its protocol sub-layer. For\nexample, for an 802.x interface, this object normally\ncontains a Media Access Control (MAC) address. The\ninterface's media-specific modules must define the bit\nand byte ordering and the format of the value of this\nobject. For interfaces that do not have such an address\n(e.g., a serial line), this node is not present. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } + "format": "string" } } } }, - "data_cocsn_interfaces_interface": { + "data_cocsn_interfaces_interface_interface-name": { "type": "object", "properties": { "cocsn:interface": { @@ -3246,219 +3805,6 @@ } } }, - "data_cocsn_arp-table_arp-entry_arp-entry-address_phs-address": { - "type": "object", - "properties": { - "cocsn:phs-address": { - "description": "MAC address of the arp entry (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - }, - "data_cocsn_arp-table_arp-entry_arp-entry-address_interface": { - "type": "object", - "properties": { - "cocsn:interface": { - "description": "Interface of the arp entry (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - }, - "data_cocsn_arp-table_arp-entry_arp-entry-address_address": { - "type": "object", - "properties": { - "cocsn:address": { - "description": "IP address of the arp entry (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - }, - "data_cocsn_arp-table_arp-entry_arp-entry-address": { - "type": "object", - "properties": { - "cocsn:arp-entry": { - "type": "array", - "description": "(list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "address": { - "description": "IP address of the arp entry (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "interface": { - "description": "Interface of the arp entry (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "phs-address": { - "description": "MAC address of the arp entry (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - } - } - } - }, - "data_cocsn_arp-table_arp-entry": { - "type": "object", - "properties": { - "cocsn:arp-entry": { - "type": "array", - "description": "(list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "address": { - "description": "IP address of the arp entry (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "interface": { - "description": "Interface of the arp entry (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "phs-address": { - "description": "MAC address of the arp entry (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - } - } - } - }, - "data_cocsn_arp-table-post": { - "type": "object", - "properties": { - "cocsn:arp-entry": { - "type": "array", - "description": "(list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "address": { - "description": "IP address of the arp entry (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "interface": { - "description": "Interface of the arp entry (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "phs-address": { - "description": "MAC address of the arp entry (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - } - } - } - }, - "data_cocsn_arp-table": { - "type": "object", - "properties": { - "cocsn:arp-table": { - "description": "(non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "arp-entry": { - "type": "array", - "description": "(list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "address": { - "description": "IP address of the arp entry (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "interface": { - "description": "Interface of the arp entry (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "phs-address": { - "description": "MAC address of the arp entry (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - } - } - } - } - } - }, "data-put-patch": { "type": "object", "properties": { @@ -3600,52 +3946,6 @@ } } } - }, - "cocsn:arp-table": { - "description": "(non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "arp-entry": { - "type": "array", - "description": "(list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "address": { - "description": "IP address of the arp entry (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "interface": { - "description": "Interface of the arp entry (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "phs-address": { - "description": "MAC address of the arp entry (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - } - } - } } } } @@ -3785,52 +4085,6 @@ } } } - }, - "cocsn:arp-table": { - "description": "(non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "arp-entry": { - "type": "array", - "description": "(list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "address": { - "description": "IP address of the arp entry (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "interface": { - "description": "Interface of the arp entry (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "phs-address": { - "description": "MAC address of the arp entry (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - } - } - } } } }, diff --git a/debug.json b/debug.json deleted file mode 100644 index 13efd8b6e01e8f3aa205674c2bdf7ac9bdec1a3e..0000000000000000000000000000000000000000 --- a/debug.json +++ /dev/null @@ -1,1206 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "debug", - "description": "example", - "version": "2020-08-17" - }, - "basePath": "/restconf", - "tags": [ - { - "name": "root", - "description": "root resources" - }, - { - "name": "operations", - "description": "operations resources" - }, - { - "name": "data", - "description": "data resources" - }, - { - "name": "get", - "description": "get resources" - }, - { - "name": "post", - "description": "post resources" - }, - { - "name": "patch", - "description": "patch resources" - }, - { - "name": "put", - "description": "put resources" - }, - { - "name": "delete", - "description": "delete resources" - } - ], - "schemes": [ - "http", - "https" - ], - "produces": [ - "application/yang-data+json" - ], - "consumes": [ - "application/yang-data+json" - ], - "paths": { - "/": { - "get": { - "tags": [ - "root", - "get" - ], - "summary": "example", - "description": "example", - "operationId": "root_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - ], - "responses": { - "200": { - "description": "example", - "schema": { - "$ref": "#/definitions/root" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/operations": { - "get": { - "tags": [ - "operations", - "get" - ], - "summary": "example", - "description": "example", - "operationId": "operations_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - ], - "responses": { - "200": { - "description": "example", - "schema": { - "$ref": "#/definitions/operations" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/yang-library-version": { - "get": { - "tags": [ - "yang-library-version", - "get" - ], - "summary": "example", - "description": "example", - "operationId": "yang_library_version_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - ], - "responses": { - "200": { - "description": "example", - "schema": { - "$ref": "#/definitions/yang-library-version" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "example", - "description": "example", - "operationId": "data_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - ], - "responses": { - "200": { - "description": "example", - "schema": { - "$ref": "#/definitions/data" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "post": { - "tags": [ - "data", - "post" - ], - "summary": "example", - "description": "example", - "operationId": "data_post", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/data-post" - } - ], - "responses": { - "201": { - "description": "example" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "put": { - "tags": [ - "data", - "put" - ], - "summary": "example", - "description": "example", - "operationId": "data_put", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/data-put-patch" - } - ], - "responses": { - "201": { - "description": "example" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "patch": { - "tags": [ - "data", - "patch" - ], - "summary": "example", - "description": "example", - "operationId": "data_patch", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/data-put-patch" - } - ], - "responses": { - "204": { - "description": "example" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/debug:interfaces": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "", - "description": "", - "operationId": "data_debug_interfaces_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/data_debug_interfaces" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "post": { - "tags": [ - "data", - "post" - ], - "summary": "", - "description": "", - "operationId": "data_debug_interfaces_post", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/data_debug_interfaces-post" - } - ], - "responses": { - "201": { - "description": "container interfaces created" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "put": { - "tags": [ - "data", - "put" - ], - "summary": "", - "description": "", - "operationId": "data_debug_interfaces_put", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/data_debug_interfaces" - } - ], - "responses": { - "201": { - "description": "container interfaces created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "patch": { - "tags": [ - "data", - "patch" - ], - "summary": "", - "description": "", - "operationId": "data_debug_interfaces_patch", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/data_debug_interfaces" - } - ], - "responses": { - "204": { - "description": "container interfaces updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "delete": { - "tags": [ - "data", - "delete" - ], - "summary": "", - "description": "", - "operationId": "data_debug_interfaces_delete", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/debug:interfaces/interface": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "", - "description": "", - "operationId": "data_debug_interfaces_interface_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/data_debug_interfaces_interface" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/debug:interfaces/interface={interface-name}": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "", - "description": "", - "operationId": "data_debug_interfaces_interface_interface_name_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/interface-name" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/data_debug_interfaces_interface_interface-name" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/debug:interfaces/interface={interface-name}/name": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "Interface name. Example value: en0", - "description": "Interface name. Example value: en0", - "operationId": "data_debug_interfaces_interface_interface_name_name_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/interface-name" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "Interface name. Example value: en0", - "schema": { - "$ref": "#/definitions/data_debug_interfaces_interface_interface-name_name" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - } - }, - "parameters": { - "content": { - "name": "content", - "in": "query", - "description": "controlling descendant nodes in response", - "required": false, - "type": "string", - "format": "enumeration", - "default": "config", - "enum": [ - "config", - "nonconfig", - "all" - ] - }, - "depth": { - "name": "depth", - "in": "query", - "description": "limit the depth of nodes in response", - "required": false, - "type": "integer", - "format": "uint16" - }, - "fields": { - "name": "fields", - "in": "query", - "description": "optionally identify specific data nodes in response", - "required": false, - "type": "string", - "format": "string" - }, - "filter": { - "name": "filter", - "in": "query", - "description": "xpath expression to filter data nodes in response", - "required": false, - "type": "string", - "format": "string" - }, - "with-defaults": { - "name": "with-defaults", - "in": "query", - "description": "controlling default values in response", - "required": false, - "type": "string", - "format": "enumeration", - "default": "report-all", - "enum": [ - "report-all", - "trim", - "explicit", - "report-all-tagged" - ] - }, - "insert": { - "name": "insert", - "in": "query", - "description": "controlling the order when adding new list elements", - "required": false, - "type": "string", - "format": "enumeration", - "default": "first", - "enum": [ - "first", - "last", - "before", - "after" - ] - }, - "point": { - "name": "point", - "in": "query", - "description": "used to specify the insertion point", - "required": false, - "type": "string", - "format": "string" - }, - "interface-name": { - "name": "interface-name", - "in": "path", - "description": "Interface name. Example value: en0", - "required": true, - "type": "string", - "format": "string" - }, - "data_debug_interfaces-post": { - "name": "interfaces", - "in": "body", - "description": "", - "required": true, - "schema": { - "$ref": "#/definitions/data_debug_interfaces-post" - } - }, - "data_debug_interfaces": { - "name": "interfaces", - "in": "body", - "description": "", - "required": true, - "schema": { - "$ref": "#/definitions/data_debug_interfaces" - } - }, - "data-put-patch": { - "name": "data", - "in": "body", - "description": "example", - "required": true, - "schema": { - "$ref": "#/definitions/data-put-patch" - } - }, - "data-post": { - "name": "data", - "in": "body", - "description": "example", - "required": true, - "schema": { - "$ref": "#/definitions/data-post" - } - } - }, - "responses": { - "200": { - "description": "OK" - }, - "201": { - "description": "Created" - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - }, - "securityDefinitions": { - "basicAuth": { - "type": "basic" - } - }, - "definitions": { - "yang-library-version": { - "type": "object", - "properties": { - "ietf-restconf:yang-library-version": { - "type": "object", - "description": "This leaf identifies the revision date of the 'ietf-yang-library' YANG module that is implemented by this server. See RESTCONF RFC 8040 for further information.", - "x-yang": { - "type": "leaf" - }, - "properties": { - } - } - } - }, - "root": { - "type": "object", - "properties": { - "ietf-restconf:restconf": { - "type": "object", - "x-yang": { - "type": "root" - }, - "description": "This is the RESTCONF root resource for the RESTCONF datastore and operation resources. See RESTCONF RFC 8040 for further information.", - "properties": { - "data": { - "type": "object", - "properties": { - } - }, - "operations": { - "type": "object", - "properties": { - } - }, - "yang-library-version": { - "type": "string" - } - } - } - } - }, - "operations": { - "type": "object", - "properties": { - "ietf-restconf:operations": { - "type": "object", - "x-yang": { - "type": "operations" - }, - "description": "This resource is a container that provides access to the data-model-specific RPC operations supported by the server. See RESTCONF RFC 8040 for further information.", - "properties": { - - } - } - } - }, - "data_debug_interfaces_interface_interface-name_name": { - "type": "object", - "properties": { - "debug:name": { - "description": "Interface name. Example value: en0 (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - }, - "data_debug_interfaces_interface_interface-name": { - "type": "object", - "properties": { - "debug:interface": { - "type": "array", - "description": "(list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "name": { - "description": "Interface name. Example value: en0 (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - } - } - } - }, - "data_debug_interfaces_interface": { - "type": "object", - "properties": { - "debug:interface": { - "type": "array", - "description": "(list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "name": { - "description": "Interface name. Example value: en0 (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - } - } - } - }, - "data_debug_interfaces-post": { - "type": "object", - "properties": { - "debug:interface": { - "type": "array", - "description": "(list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "name": { - "description": "Interface name. Example value: en0 (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - } - } - } - }, - "data_debug_interfaces": { - "type": "object", - "properties": { - "debug:interfaces": { - "description": "(non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "interface": { - "type": "array", - "description": "(list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "name": { - "description": "Interface name. Example value: en0 (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - } - } - } - } - } - }, - "data-put-patch": { - "type": "object", - "properties": { - "ietf-restconf:data": { - "description": "example", - "type": "object", - "x-yang": { - "type": "datastore" - }, - "properties": { - "debug:interfaces": { - "description": "(non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "interface": { - "type": "array", - "description": "(list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "name": { - "description": "Interface name. Example value: en0 (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - } - } - } - } - } - } - } - }, - "data-post": { - "type": "object", - "properties": { - "debug:interfaces": { - "description": "(non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "interface": { - "type": "array", - "description": "(list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "name": { - "description": "Interface name. Example value: en0 (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - } - } - } - } - } - }, - "data": { - "type": "object", - "properties": { - "ietf-restconf:data": { - "type": "object", - "description": "This resource represents the combined configuration and state data resources that can be accessed by a client and cannot be created or deleted by the client. See RESTCONF RFC 8040 for further information.", - "x-yang": { - "type": "datastore" - }, - "properties": { - } - } - } - } - } -} diff --git a/legacy/cmd/cocsn-server/cocsn-server b/legacy/cmd/cocsn-server/cocsn-server deleted file mode 100755 index 90fe50b7b5fefb99cdc04218cc3f7e739e298d36..0000000000000000000000000000000000000000 Binary files a/legacy/cmd/cocsn-server/cocsn-server and /dev/null differ diff --git a/legacy/cmd/cocsn-server/main.go b/legacy/cmd/cocsn-server/main.go deleted file mode 100644 index 2dda11b818c6c4c76d53c37bf93ba5db00d12f69..0000000000000000000000000000000000000000 --- a/legacy/cmd/cocsn-server/main.go +++ /dev/null @@ -1,68 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package main - -import ( - "code.fbi.h-da.de/cocsn/cocsn-api/legacy/models" - . "code.fbi.h-da.de/cocsn/cocsn-api/legacy/restapi/operations/interface_operations" - "github.com/go-openapi/runtime/middleware" - "log" - "os" - - "code.fbi.h-da.de/cocsn/cocsn-api/legacy/restapi" - "code.fbi.h-da.de/cocsn/cocsn-api/legacy/restapi/operations" - "github.com/go-openapi/loads" - flags "github.com/jessevdk/go-flags" -) - -// This file was generated by the swagger tool. -// Make sure not to overwrite this file after you generated it because all your edits would be lost! - -func main() { - - swaggerSpec, err := loads.Embedded(restapi.SwaggerJSON, restapi.FlatSwaggerJSON) - if err != nil { - log.Fatalln(err) - } - - api := operations.NewCocsnAPI(swaggerSpec) - api.InterfaceOperationsGetIPAddressesHandler = getIpHandler{} - server := restapi.NewServer(api) - defer server.Shutdown() - - parser := flags.NewParser(server, flags.Default) - parser.ShortDescription = "CoCSN" - parser.LongDescription = "Simple RESTCONF API" - server.ConfigureFlags() - for _, optsGroup := range api.CommandLineOptionsGroups { - _, err := parser.AddGroup(optsGroup.ShortDescription, optsGroup.LongDescription, optsGroup.Options) - if err != nil { - log.Fatalln(err) - } - } - - if _, err := parser.Parse(); err != nil { - code := 1 - if fe, ok := err.(*flags.Error); ok { - if fe.Type == flags.ErrHelp { - code = 0 - } - } - os.Exit(code) - } - - server.ConfigureAPI() - - if err := server.Serve(); err != nil { - log.Fatalln(err) - } - -} - -type getIpHandler struct { - -} - -func (handler getIpHandler) Handle(params GetIPAddressesParams) middleware.Responder { - return NewGetIPAddressesOK().WithPayload(models.LogicalAddresses{}) -} \ No newline at end of file diff --git a/legacy/models/interfaces.go b/legacy/models/interfaces.go deleted file mode 100644 index 689857dc1a7735be7d9c923604595c8053674fa8..0000000000000000000000000000000000000000 --- a/legacy/models/interfaces.go +++ /dev/null @@ -1,26 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" -) - -// Interfaces interfaces -// -// swagger:model Interfaces -type Interfaces []string - -// Validate validates this interfaces -func (m Interfaces) Validate(formats strfmt.Registry) error { - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/legacy/models/logical_addresses.go b/legacy/models/logical_addresses.go deleted file mode 100644 index baa93b3354c26e9804ceee18fa0dd45da690e8bb..0000000000000000000000000000000000000000 --- a/legacy/models/logical_addresses.go +++ /dev/null @@ -1,26 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" -) - -// LogicalAddresses logical addresses -// -// swagger:model LogicalAddresses -type LogicalAddresses []string - -// Validate validates this logical addresses -func (m LogicalAddresses) Validate(formats strfmt.Registry) error { - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/legacy/models/physical_address.go b/legacy/models/physical_address.go deleted file mode 100644 index d139da9ffe7871cb1c1f628b301ecf02ec794e6f..0000000000000000000000000000000000000000 --- a/legacy/models/physical_address.go +++ /dev/null @@ -1,26 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" -) - -// PhysicalAddress physical address -// -// swagger:model PhysicalAddress -type PhysicalAddress string - -// Validate validates this physical address -func (m PhysicalAddress) Validate(formats strfmt.Registry) error { - var res []error - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/legacy/restapi/configure_cocsn.go b/legacy/restapi/configure_cocsn.go deleted file mode 100644 index 39c8dad006f89b5aca69b2b05538bc21f86aa91c..0000000000000000000000000000000000000000 --- a/legacy/restapi/configure_cocsn.go +++ /dev/null @@ -1,86 +0,0 @@ -// This file is safe to edit. Once it exists it will not be overwritten - -package restapi - -import ( - "crypto/tls" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - - "code.fbi.h-da.de/cocsn/cocsn-api/legacy/restapi/operations" - "code.fbi.h-da.de/cocsn/cocsn-api/legacy/restapi/operations/interface_operations" -) - -//go:generate swagger generate server --target ../../v0.0.1 --name Cocsn --spec ../../cocsn-v0.0.1.yml --principal interface{} - -func configureFlags(api *operations.CocsnAPI) { - // api.CommandLineOptionsGroups = []swag.CommandLineOptionsGroup{ ... } -} - -func configureAPI(api *operations.CocsnAPI) http.Handler { - // configure the api here - api.ServeError = errors.ServeError - - // Set your custom logger if needed. Default one is log.Printf - // Expected interface func(string, ...interface{}) - // - // Example: - // api.Logger = log.Printf - - api.UseSwaggerUI() - // To continue using redoc as your UI, uncomment the following line - // api.UseRedoc() - - api.JSONConsumer = runtime.JSONConsumer() - - api.JSONProducer = runtime.JSONProducer() - - if api.InterfaceOperationsGetIPAddressesHandler == nil { - api.InterfaceOperationsGetIPAddressesHandler = interface_operations.GetIPAddressesHandlerFunc(func(params interface_operations.GetIPAddressesParams) middleware.Responder { - return middleware.NotImplemented("operation interface_operations.GetIPAddresses has not yet been implemented") - }) - } - if api.InterfaceOperationsGetInterfacesHandler == nil { - api.InterfaceOperationsGetInterfacesHandler = interface_operations.GetInterfacesHandlerFunc(func(params interface_operations.GetInterfacesParams) middleware.Responder { - return middleware.NotImplemented("operation interface_operations.GetInterfaces has not yet been implemented") - }) - } - if api.InterfaceOperationsGetMACAddressHandler == nil { - api.InterfaceOperationsGetMACAddressHandler = interface_operations.GetMACAddressHandlerFunc(func(params interface_operations.GetMACAddressParams) middleware.Responder { - return middleware.NotImplemented("operation interface_operations.GetMACAddress has not yet been implemented") - }) - } - - api.PreServerShutdown = func() {} - - api.ServerShutdown = func() {} - - return setupGlobalMiddleware(api.Serve(setupMiddlewares)) -} - -// The TLS configuration before HTTPS server starts. -func configureTLS(tlsConfig *tls.Config) { - // Make all necessary changes to the TLS configuration here. -} - -// As soon as server is initialized but not run yet, this function will be called. -// If you need to modify a config, store server instance to stop it individually later, this is the place. -// This function can be called multiple times, depending on the number of serving schemes. -// scheme value will be set accordingly: "http", "https" or "unix" -func configureServer(s *http.Server, scheme, addr string) { -} - -// The middleware configuration is for the handler executors. These do not apply to the swagger.json document. -// The middleware executes after routing but before authentication, binding and validation -func setupMiddlewares(handler http.Handler) http.Handler { - return handler -} - -// The middleware configuration happens before anything, this middleware also applies to serving the swagger.json document. -// So this is a good place to plug in a panic handling middleware, logging and metrics -func setupGlobalMiddleware(handler http.Handler) http.Handler { - return handler -} diff --git a/legacy/restapi/doc.go b/legacy/restapi/doc.go deleted file mode 100644 index 0e478f6cd8e660a928ffec27a7bc8987ecac5ea6..0000000000000000000000000000000000000000 --- a/legacy/restapi/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Package restapi CoCSN -// -// Simple RESTCONF API -// Schemes: -// http -// Host: localhost -// BasePath: /restconf -// Version: 0.0.1 -// Contact: Your name -// -// Consumes: -// - application/json -// -// Produces: -// - application/json -// -// swagger:meta -package restapi diff --git a/legacy/restapi/embedded_spec.go b/legacy/restapi/embedded_spec.go deleted file mode 100644 index 95b6f4629b693bb3e0ea21deb41883c32065cfd3..0000000000000000000000000000000000000000 --- a/legacy/restapi/embedded_spec.go +++ /dev/null @@ -1,322 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restapi - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" -) - -var ( - // SwaggerJSON embedded version of the swagger document used at generation time - SwaggerJSON json.RawMessage - // FlatSwaggerJSON embedded flattened version of the swagger document used at generation time - FlatSwaggerJSON json.RawMessage -) - -func init() { - SwaggerJSON = json.RawMessage([]byte(`{ - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "schemes": [ - "http" - ], - "swagger": "2.0", - "info": { - "description": "Simple RESTCONF API", - "title": "CoCSN", - "contact": { - "name": "Your name" - }, - "version": "0.0.1" - }, - "basePath": "/restconf", - "paths": { - "/data/cocsn-interface/{interface}/ip-addresses": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "interface" - ], - "summary": "Returns IP addresses of an interface", - "operationId": "getIPAddresses", - "parameters": [ - { - "type": "string", - "description": "interface to fetch", - "name": "interface", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/LogicalAddresses" - } - }, - "404": { - "description": "An error occurred." - }, - "default": { - "description": "Unexpected error" - } - } - } - }, - "/data/cocsn-interface/{interface}/mac-address": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "interface" - ], - "summary": "Returns MAC address of an interface", - "operationId": "getMACAddress", - "parameters": [ - { - "type": "string", - "description": "interface to fetch", - "name": "interface", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/PhysicalAddress" - } - }, - "404": { - "description": "An error occurred." - }, - "default": { - "description": "Unexpected error" - } - } - } - }, - "/data/cocsn-interfaces": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "interface" - ], - "summary": "Returns a list of interfaces", - "operationId": "getInterfaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Interfaces" - } - }, - "404": { - "description": "An error occurred." - }, - "default": { - "description": "Unexpected error" - } - } - } - } - }, - "definitions": { - "Interfaces": { - "type": "array", - "items": { - "type": "string" - }, - "properties": { - "name": { - "type": "string" - } - } - }, - "LogicalAddresses": { - "type": "array", - "items": { - "type": "string" - }, - "properties": { - "name": { - "type": "string" - } - } - }, - "PhysicalAddress": { - "type": "string", - "properties": { - "name": { - "type": "string" - } - } - } - } -}`)) - FlatSwaggerJSON = json.RawMessage([]byte(`{ - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "schemes": [ - "http" - ], - "swagger": "2.0", - "info": { - "description": "Simple RESTCONF API", - "title": "CoCSN", - "contact": { - "name": "Your name" - }, - "version": "0.0.1" - }, - "basePath": "/restconf", - "paths": { - "/data/cocsn-interface/{interface}/ip-addresses": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "interface" - ], - "summary": "Returns IP addresses of an interface", - "operationId": "getIPAddresses", - "parameters": [ - { - "type": "string", - "description": "interface to fetch", - "name": "interface", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/LogicalAddresses" - } - }, - "404": { - "description": "An error occurred." - }, - "default": { - "description": "Unexpected error" - } - } - } - }, - "/data/cocsn-interface/{interface}/mac-address": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "interface" - ], - "summary": "Returns MAC address of an interface", - "operationId": "getMACAddress", - "parameters": [ - { - "type": "string", - "description": "interface to fetch", - "name": "interface", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/PhysicalAddress" - } - }, - "404": { - "description": "An error occurred." - }, - "default": { - "description": "Unexpected error" - } - } - } - }, - "/data/cocsn-interfaces": { - "get": { - "produces": [ - "application/json" - ], - "tags": [ - "interface" - ], - "summary": "Returns a list of interfaces", - "operationId": "getInterfaces", - "responses": { - "200": { - "description": "OK", - "schema": { - "$ref": "#/definitions/Interfaces" - } - }, - "404": { - "description": "An error occurred." - }, - "default": { - "description": "Unexpected error" - } - } - } - } - }, - "definitions": { - "Interfaces": { - "type": "array", - "items": { - "type": "string" - }, - "properties": { - "name": { - "type": "string" - } - } - }, - "LogicalAddresses": { - "type": "array", - "items": { - "type": "string" - }, - "properties": { - "name": { - "type": "string" - } - } - }, - "PhysicalAddress": { - "type": "string", - "properties": { - "name": { - "type": "string" - } - } - } - } -}`)) -} diff --git a/legacy/restapi/operations/cocsn_api.go b/legacy/restapi/operations/cocsn_api.go deleted file mode 100644 index 2e04f825818269c38e9d305e35e28360587a5ecf..0000000000000000000000000000000000000000 --- a/legacy/restapi/operations/cocsn_api.go +++ /dev/null @@ -1,324 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "net/http" - "strings" - - "github.com/go-openapi/errors" - "github.com/go-openapi/loads" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/runtime/security" - "github.com/go-openapi/spec" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - - "code.fbi.h-da.de/cocsn/cocsn-api/legacy/restapi/operations/interface_operations" -) - -// NewCocsnAPI creates a new Cocsn instance -func NewCocsnAPI(spec *loads.Document) *CocsnAPI { - return &CocsnAPI{ - handlers: make(map[string]map[string]http.Handler), - formats: strfmt.Default, - defaultConsumes: "application/json", - defaultProduces: "application/json", - customConsumers: make(map[string]runtime.Consumer), - customProducers: make(map[string]runtime.Producer), - PreServerShutdown: func() {}, - ServerShutdown: func() {}, - spec: spec, - useSwaggerUI: false, - ServeError: errors.ServeError, - BasicAuthenticator: security.BasicAuth, - APIKeyAuthenticator: security.APIKeyAuth, - BearerAuthenticator: security.BearerAuth, - - JSONConsumer: runtime.JSONConsumer(), - - JSONProducer: runtime.JSONProducer(), - - InterfaceOperationsGetIPAddressesHandler: interface_operations.GetIPAddressesHandlerFunc(func(params interface_operations.GetIPAddressesParams) middleware.Responder { - return middleware.NotImplemented("operation interface_operations.GetIPAddresses has not yet been implemented") - }), - InterfaceOperationsGetInterfacesHandler: interface_operations.GetInterfacesHandlerFunc(func(params interface_operations.GetInterfacesParams) middleware.Responder { - return middleware.NotImplemented("operation interface_operations.GetInterfaces has not yet been implemented") - }), - InterfaceOperationsGetMACAddressHandler: interface_operations.GetMACAddressHandlerFunc(func(params interface_operations.GetMACAddressParams) middleware.Responder { - return middleware.NotImplemented("operation interface_operations.GetMACAddress has not yet been implemented") - }), - } -} - -/*CocsnAPI Simple RESTCONF API */ -type CocsnAPI struct { - spec *loads.Document - context *middleware.Context - handlers map[string]map[string]http.Handler - formats strfmt.Registry - customConsumers map[string]runtime.Consumer - customProducers map[string]runtime.Producer - defaultConsumes string - defaultProduces string - Middleware func(middleware.Builder) http.Handler - useSwaggerUI bool - - // BasicAuthenticator generates a runtime.Authenticator from the supplied basic auth function. - // It has a default implementation in the security package, however you can replace it for your particular usage. - BasicAuthenticator func(security.UserPassAuthentication) runtime.Authenticator - // APIKeyAuthenticator generates a runtime.Authenticator from the supplied token auth function. - // It has a default implementation in the security package, however you can replace it for your particular usage. - APIKeyAuthenticator func(string, string, security.TokenAuthentication) runtime.Authenticator - // BearerAuthenticator generates a runtime.Authenticator from the supplied bearer token auth function. - // It has a default implementation in the security package, however you can replace it for your particular usage. - BearerAuthenticator func(string, security.ScopedTokenAuthentication) runtime.Authenticator - - // JSONConsumer registers a consumer for the following mime types: - // - application/json - JSONConsumer runtime.Consumer - - // JSONProducer registers a producer for the following mime types: - // - application/json - JSONProducer runtime.Producer - - // InterfaceOperationsGetIPAddressesHandler sets the operation handler for the get IP addresses operation - InterfaceOperationsGetIPAddressesHandler interface_operations.GetIPAddressesHandler - // InterfaceOperationsGetInterfacesHandler sets the operation handler for the get interfaces operation - InterfaceOperationsGetInterfacesHandler interface_operations.GetInterfacesHandler - // InterfaceOperationsGetMACAddressHandler sets the operation handler for the get m a c address operation - InterfaceOperationsGetMACAddressHandler interface_operations.GetMACAddressHandler - // ServeError is called when an error is received, there is a default handler - // but you can set your own with this - ServeError func(http.ResponseWriter, *http.Request, error) - - // PreServerShutdown is called before the HTTP(S) server is shutdown - // This allows for custom functions to get executed before the HTTP(S) server stops accepting traffic - PreServerShutdown func() - - // ServerShutdown is called when the HTTP(S) server is shut down and done - // handling all active connections and does not accept connections any more - ServerShutdown func() - - // Custom command line argument groups with their descriptions - CommandLineOptionsGroups []swag.CommandLineOptionsGroup - - // User defined logger function. - Logger func(string, ...interface{}) -} - -// UseRedoc for documentation at /docs -func (o *CocsnAPI) UseRedoc() { - o.useSwaggerUI = false -} - -// UseSwaggerUI for documentation at /docs -func (o *CocsnAPI) UseSwaggerUI() { - o.useSwaggerUI = true -} - -// SetDefaultProduces sets the default produces media type -func (o *CocsnAPI) SetDefaultProduces(mediaType string) { - o.defaultProduces = mediaType -} - -// SetDefaultConsumes returns the default consumes media type -func (o *CocsnAPI) SetDefaultConsumes(mediaType string) { - o.defaultConsumes = mediaType -} - -// SetSpec sets a spec that will be served for the clients. -func (o *CocsnAPI) SetSpec(spec *loads.Document) { - o.spec = spec -} - -// DefaultProduces returns the default produces media type -func (o *CocsnAPI) DefaultProduces() string { - return o.defaultProduces -} - -// DefaultConsumes returns the default consumes media type -func (o *CocsnAPI) DefaultConsumes() string { - return o.defaultConsumes -} - -// Formats returns the registered string formats -func (o *CocsnAPI) Formats() strfmt.Registry { - return o.formats -} - -// RegisterFormat registers a custom format validator -func (o *CocsnAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator) { - o.formats.Add(name, format, validator) -} - -// Validate validates the registrations in the CocsnAPI -func (o *CocsnAPI) Validate() error { - var unregistered []string - - if o.JSONConsumer == nil { - unregistered = append(unregistered, "JSONConsumer") - } - - if o.JSONProducer == nil { - unregistered = append(unregistered, "JSONProducer") - } - - if o.InterfaceOperationsGetIPAddressesHandler == nil { - unregistered = append(unregistered, "interface_operations.GetIPAddressesHandler") - } - if o.InterfaceOperationsGetInterfacesHandler == nil { - unregistered = append(unregistered, "interface_operations.GetInterfacesHandler") - } - if o.InterfaceOperationsGetMACAddressHandler == nil { - unregistered = append(unregistered, "interface_operations.GetMACAddressHandler") - } - - if len(unregistered) > 0 { - return fmt.Errorf("missing registration: %s", strings.Join(unregistered, ", ")) - } - - return nil -} - -// ServeErrorFor gets a error handler for a given operation id -func (o *CocsnAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error) { - return o.ServeError -} - -// AuthenticatorsFor gets the authenticators for the specified security schemes -func (o *CocsnAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator { - return nil -} - -// Authorizer returns the registered authorizer -func (o *CocsnAPI) Authorizer() runtime.Authorizer { - return nil -} - -// ConsumersFor gets the consumers for the specified media types. -// MIME type parameters are ignored here. -func (o *CocsnAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer { - result := make(map[string]runtime.Consumer, len(mediaTypes)) - for _, mt := range mediaTypes { - switch mt { - case "application/json": - result["application/json"] = o.JSONConsumer - } - - if c, ok := o.customConsumers[mt]; ok { - result[mt] = c - } - } - return result -} - -// ProducersFor gets the producers for the specified media types. -// MIME type parameters are ignored here. -func (o *CocsnAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer { - result := make(map[string]runtime.Producer, len(mediaTypes)) - for _, mt := range mediaTypes { - switch mt { - case "application/json": - result["application/json"] = o.JSONProducer - } - - if p, ok := o.customProducers[mt]; ok { - result[mt] = p - } - } - return result -} - -// HandlerFor gets a http.Handler for the provided operation method and path -func (o *CocsnAPI) HandlerFor(method, path string) (http.Handler, bool) { - if o.handlers == nil { - return nil, false - } - um := strings.ToUpper(method) - if _, ok := o.handlers[um]; !ok { - return nil, false - } - if path == "/" { - path = "" - } - h, ok := o.handlers[um][path] - return h, ok -} - -// Context returns the middleware context for the cocsn API -func (o *CocsnAPI) Context() *middleware.Context { - if o.context == nil { - o.context = middleware.NewRoutableContext(o.spec, o, nil) - } - - return o.context -} - -func (o *CocsnAPI) initHandlerCache() { - o.Context() // don't care about the result, just that the initialization happened - if o.handlers == nil { - o.handlers = make(map[string]map[string]http.Handler) - } - - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data/cocsn-interface/{interface}/ip-addresses"] = interface_operations.NewGetIPAddresses(o.context, o.InterfaceOperationsGetIPAddressesHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data/cocsn-interfaces"] = interface_operations.NewGetInterfaces(o.context, o.InterfaceOperationsGetInterfacesHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data/cocsn-interface/{interface}/mac-address"] = interface_operations.NewGetMACAddress(o.context, o.InterfaceOperationsGetMACAddressHandler) -} - -// Serve creates a http handler to serve the API over HTTP -// can be used directly in http.ListenAndServe(":8000", api.Serve(nil)) -func (o *CocsnAPI) Serve(builder middleware.Builder) http.Handler { - o.Init() - - if o.Middleware != nil { - return o.Middleware(builder) - } - if o.useSwaggerUI { - return o.context.APIHandlerSwaggerUI(builder) - } - return o.context.APIHandler(builder) -} - -// Init allows you to just initialize the handler cache, you can then recompose the middleware as you see fit -func (o *CocsnAPI) Init() { - if len(o.handlers) == 0 { - o.initHandlerCache() - } -} - -// RegisterConsumer allows you to add (or override) a consumer for a media type. -func (o *CocsnAPI) RegisterConsumer(mediaType string, consumer runtime.Consumer) { - o.customConsumers[mediaType] = consumer -} - -// RegisterProducer allows you to add (or override) a producer for a media type. -func (o *CocsnAPI) RegisterProducer(mediaType string, producer runtime.Producer) { - o.customProducers[mediaType] = producer -} - -// AddMiddlewareFor adds a http middleware to existing handler -func (o *CocsnAPI) AddMiddlewareFor(method, path string, builder middleware.Builder) { - um := strings.ToUpper(method) - if path == "/" { - path = "" - } - o.Init() - if h, ok := o.handlers[um][path]; ok { - o.handlers[method][path] = builder(h) - } -} diff --git a/legacy/restapi/operations/interface_operations/get_interfaces.go b/legacy/restapi/operations/interface_operations/get_interfaces.go deleted file mode 100644 index cba107c3de571db8bb388570681755f4aa7f0efa..0000000000000000000000000000000000000000 --- a/legacy/restapi/operations/interface_operations/get_interfaces.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package interface_operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// GetInterfacesHandlerFunc turns a function with the right signature into a get interfaces handler -type GetInterfacesHandlerFunc func(GetInterfacesParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn GetInterfacesHandlerFunc) Handle(params GetInterfacesParams) middleware.Responder { - return fn(params) -} - -// GetInterfacesHandler interface for that can handle valid get interfaces params -type GetInterfacesHandler interface { - Handle(GetInterfacesParams) middleware.Responder -} - -// NewGetInterfaces creates a new http.Handler for the get interfaces operation -func NewGetInterfaces(ctx *middleware.Context, handler GetInterfacesHandler) *GetInterfaces { - return &GetInterfaces{Context: ctx, Handler: handler} -} - -/*GetInterfaces swagger:route GET /data/cocsn-interfaces interface getInterfaces - -Returns a list of interfaces - -*/ -type GetInterfaces struct { - Context *middleware.Context - Handler GetInterfacesHandler -} - -func (o *GetInterfaces) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewGetInterfacesParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/legacy/restapi/operations/interface_operations/get_interfaces_parameters.go b/legacy/restapi/operations/interface_operations/get_interfaces_parameters.go deleted file mode 100644 index 330b0af7ebff75099597a508361325b1d01770a0..0000000000000000000000000000000000000000 --- a/legacy/restapi/operations/interface_operations/get_interfaces_parameters.go +++ /dev/null @@ -1,45 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package interface_operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" -) - -// NewGetInterfacesParams creates a new GetInterfacesParams object -// no default values defined in spec. -func NewGetInterfacesParams() GetInterfacesParams { - - return GetInterfacesParams{} -} - -// GetInterfacesParams contains all the bound params for the get interfaces operation -// typically these are obtained from a http.Request -// -// swagger:parameters getInterfaces -type GetInterfacesParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewGetInterfacesParams() beforehand. -func (o *GetInterfacesParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/legacy/restapi/operations/interface_operations/get_interfaces_responses.go b/legacy/restapi/operations/interface_operations/get_interfaces_responses.go deleted file mode 100644 index c7897180c4e58e899eee7802d142d85a55eb27d7..0000000000000000000000000000000000000000 --- a/legacy/restapi/operations/interface_operations/get_interfaces_responses.go +++ /dev/null @@ -1,123 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package interface_operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/legacy/models" -) - -// GetInterfacesOKCode is the HTTP code returned for type GetInterfacesOK -const GetInterfacesOKCode int = 200 - -/*GetInterfacesOK OK - -swagger:response getInterfacesOK -*/ -type GetInterfacesOK struct { - - /* - In: Body - */ - Payload models.Interfaces `json:"body,omitempty"` -} - -// NewGetInterfacesOK creates GetInterfacesOK with default headers values -func NewGetInterfacesOK() *GetInterfacesOK { - - return &GetInterfacesOK{} -} - -// WithPayload adds the payload to the get interfaces o k response -func (o *GetInterfacesOK) WithPayload(payload models.Interfaces) *GetInterfacesOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the get interfaces o k response -func (o *GetInterfacesOK) SetPayload(payload models.Interfaces) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *GetInterfacesOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - payload := o.Payload - if payload == nil { - // return empty array - payload = models.Interfaces{} - } - - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } -} - -// GetInterfacesNotFoundCode is the HTTP code returned for type GetInterfacesNotFound -const GetInterfacesNotFoundCode int = 404 - -/*GetInterfacesNotFound An error occurred. - -swagger:response getInterfacesNotFound -*/ -type GetInterfacesNotFound struct { -} - -// NewGetInterfacesNotFound creates GetInterfacesNotFound with default headers values -func NewGetInterfacesNotFound() *GetInterfacesNotFound { - - return &GetInterfacesNotFound{} -} - -// WriteResponse to the client -func (o *GetInterfacesNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -/*GetInterfacesDefault Unexpected error - -swagger:response getInterfacesDefault -*/ -type GetInterfacesDefault struct { - _statusCode int -} - -// NewGetInterfacesDefault creates GetInterfacesDefault with default headers values -func NewGetInterfacesDefault(code int) *GetInterfacesDefault { - if code <= 0 { - code = 500 - } - - return &GetInterfacesDefault{ - _statusCode: code, - } -} - -// WithStatusCode adds the status to the get interfaces default response -func (o *GetInterfacesDefault) WithStatusCode(code int) *GetInterfacesDefault { - o._statusCode = code - return o -} - -// SetStatusCode sets the status to the get interfaces default response -func (o *GetInterfacesDefault) SetStatusCode(code int) { - o._statusCode = code -} - -// WriteResponse to the client -func (o *GetInterfacesDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(o._statusCode) -} diff --git a/legacy/restapi/operations/interface_operations/get_interfaces_urlbuilder.go b/legacy/restapi/operations/interface_operations/get_interfaces_urlbuilder.go deleted file mode 100644 index eff39694c876fb9058acd067177c0b4308283fe7..0000000000000000000000000000000000000000 --- a/legacy/restapi/operations/interface_operations/get_interfaces_urlbuilder.go +++ /dev/null @@ -1,87 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package interface_operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" -) - -// GetInterfacesURL generates an URL for the get interfaces operation -type GetInterfacesURL struct { - _basePath string -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *GetInterfacesURL) WithBasePath(bp string) *GetInterfacesURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *GetInterfacesURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *GetInterfacesURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn-interfaces" - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *GetInterfacesURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *GetInterfacesURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *GetInterfacesURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on GetInterfacesURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on GetInterfacesURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *GetInterfacesURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/legacy/restapi/operations/interface_operations/get_ip_addresses.go b/legacy/restapi/operations/interface_operations/get_ip_addresses.go deleted file mode 100644 index e3f2089c35cd417fd9a913b44c130598744b24f1..0000000000000000000000000000000000000000 --- a/legacy/restapi/operations/interface_operations/get_ip_addresses.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package interface_operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// GetIPAddressesHandlerFunc turns a function with the right signature into a get IP addresses handler -type GetIPAddressesHandlerFunc func(GetIPAddressesParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn GetIPAddressesHandlerFunc) Handle(params GetIPAddressesParams) middleware.Responder { - return fn(params) -} - -// GetIPAddressesHandler interface for that can handle valid get IP addresses params -type GetIPAddressesHandler interface { - Handle(GetIPAddressesParams) middleware.Responder -} - -// NewGetIPAddresses creates a new http.Handler for the get IP addresses operation -func NewGetIPAddresses(ctx *middleware.Context, handler GetIPAddressesHandler) *GetIPAddresses { - return &GetIPAddresses{Context: ctx, Handler: handler} -} - -/*GetIPAddresses swagger:route GET /data/cocsn-interface/{interface}/ip-addresses interface getIpAddresses - -Returns IP addresses of an interface - -*/ -type GetIPAddresses struct { - Context *middleware.Context - Handler GetIPAddressesHandler -} - -func (o *GetIPAddresses) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewGetIPAddressesParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/legacy/restapi/operations/interface_operations/get_ip_addresses_parameters.go b/legacy/restapi/operations/interface_operations/get_ip_addresses_parameters.go deleted file mode 100644 index b20a991f97ae8f9e93a3ef152a2f0a0bac71d0b4..0000000000000000000000000000000000000000 --- a/legacy/restapi/operations/interface_operations/get_ip_addresses_parameters.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package interface_operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" -) - -// NewGetIPAddressesParams creates a new GetIPAddressesParams object -// no default values defined in spec. -func NewGetIPAddressesParams() GetIPAddressesParams { - - return GetIPAddressesParams{} -} - -// GetIPAddressesParams contains all the bound params for the get IP addresses operation -// typically these are obtained from a http.Request -// -// swagger:parameters getIPAddresses -type GetIPAddressesParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*interface to fetch - Required: true - In: path - */ - Interface string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewGetIPAddressesParams() beforehand. -func (o *GetIPAddressesParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rInterface, rhkInterface, _ := route.Params.GetOK("interface") - if err := o.bindInterface(rInterface, rhkInterface, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindInterface binds and validates parameter Interface from path. -func (o *GetIPAddressesParams) bindInterface(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.Interface = raw - - return nil -} diff --git a/legacy/restapi/operations/interface_operations/get_ip_addresses_responses.go b/legacy/restapi/operations/interface_operations/get_ip_addresses_responses.go deleted file mode 100644 index 134f2a525b7724cca6b867237cfa668a841acbd4..0000000000000000000000000000000000000000 --- a/legacy/restapi/operations/interface_operations/get_ip_addresses_responses.go +++ /dev/null @@ -1,123 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package interface_operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/legacy/models" -) - -// GetIPAddressesOKCode is the HTTP code returned for type GetIPAddressesOK -const GetIPAddressesOKCode int = 200 - -/*GetIPAddressesOK OK - -swagger:response getIpAddressesOK -*/ -type GetIPAddressesOK struct { - - /* - In: Body - */ - Payload models.LogicalAddresses `json:"body,omitempty"` -} - -// NewGetIPAddressesOK creates GetIPAddressesOK with default headers values -func NewGetIPAddressesOK() *GetIPAddressesOK { - - return &GetIPAddressesOK{} -} - -// WithPayload adds the payload to the get Ip addresses o k response -func (o *GetIPAddressesOK) WithPayload(payload models.LogicalAddresses) *GetIPAddressesOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the get Ip addresses o k response -func (o *GetIPAddressesOK) SetPayload(payload models.LogicalAddresses) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *GetIPAddressesOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - payload := o.Payload - if payload == nil { - // return empty array - payload = models.LogicalAddresses{} - } - - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } -} - -// GetIPAddressesNotFoundCode is the HTTP code returned for type GetIPAddressesNotFound -const GetIPAddressesNotFoundCode int = 404 - -/*GetIPAddressesNotFound An error occurred. - -swagger:response getIpAddressesNotFound -*/ -type GetIPAddressesNotFound struct { -} - -// NewGetIPAddressesNotFound creates GetIPAddressesNotFound with default headers values -func NewGetIPAddressesNotFound() *GetIPAddressesNotFound { - - return &GetIPAddressesNotFound{} -} - -// WriteResponse to the client -func (o *GetIPAddressesNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -/*GetIPAddressesDefault Unexpected error - -swagger:response getIpAddressesDefault -*/ -type GetIPAddressesDefault struct { - _statusCode int -} - -// NewGetIPAddressesDefault creates GetIPAddressesDefault with default headers values -func NewGetIPAddressesDefault(code int) *GetIPAddressesDefault { - if code <= 0 { - code = 500 - } - - return &GetIPAddressesDefault{ - _statusCode: code, - } -} - -// WithStatusCode adds the status to the get IP addresses default response -func (o *GetIPAddressesDefault) WithStatusCode(code int) *GetIPAddressesDefault { - o._statusCode = code - return o -} - -// SetStatusCode sets the status to the get IP addresses default response -func (o *GetIPAddressesDefault) SetStatusCode(code int) { - o._statusCode = code -} - -// WriteResponse to the client -func (o *GetIPAddressesDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(o._statusCode) -} diff --git a/legacy/restapi/operations/interface_operations/get_ip_addresses_urlbuilder.go b/legacy/restapi/operations/interface_operations/get_ip_addresses_urlbuilder.go deleted file mode 100644 index 75fc2c3e247a8e0eccddedc39b8cfc1b5b0cafa2..0000000000000000000000000000000000000000 --- a/legacy/restapi/operations/interface_operations/get_ip_addresses_urlbuilder.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package interface_operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// GetIPAddressesURL generates an URL for the get IP addresses operation -type GetIPAddressesURL struct { - Interface string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *GetIPAddressesURL) WithBasePath(bp string) *GetIPAddressesURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *GetIPAddressesURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *GetIPAddressesURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn-interface/{interface}/ip-addresses" - - interfaceVar := o.Interface - if interfaceVar != "" { - _path = strings.Replace(_path, "{interface}", interfaceVar, -1) - } else { - return nil, errors.New("interface is required on GetIPAddressesURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *GetIPAddressesURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *GetIPAddressesURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *GetIPAddressesURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on GetIPAddressesURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on GetIPAddressesURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *GetIPAddressesURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/legacy/restapi/operations/interface_operations/get_m_a_c_address.go b/legacy/restapi/operations/interface_operations/get_m_a_c_address.go deleted file mode 100644 index 8c96a9e56bd2c66c74a27015de37b23731c4bd84..0000000000000000000000000000000000000000 --- a/legacy/restapi/operations/interface_operations/get_m_a_c_address.go +++ /dev/null @@ -1,58 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package interface_operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// GetMACAddressHandlerFunc turns a function with the right signature into a get m a c address handler -type GetMACAddressHandlerFunc func(GetMACAddressParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn GetMACAddressHandlerFunc) Handle(params GetMACAddressParams) middleware.Responder { - return fn(params) -} - -// GetMACAddressHandler interface for that can handle valid get m a c address params -type GetMACAddressHandler interface { - Handle(GetMACAddressParams) middleware.Responder -} - -// NewGetMACAddress creates a new http.Handler for the get m a c address operation -func NewGetMACAddress(ctx *middleware.Context, handler GetMACAddressHandler) *GetMACAddress { - return &GetMACAddress{Context: ctx, Handler: handler} -} - -/*GetMACAddress swagger:route GET /data/cocsn-interface/{interface}/mac-address interface getMACAddress - -Returns MAC address of an interface - -*/ -type GetMACAddress struct { - Context *middleware.Context - Handler GetMACAddressHandler -} - -func (o *GetMACAddress) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewGetMACAddressParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/legacy/restapi/operations/interface_operations/get_m_a_c_address_parameters.go b/legacy/restapi/operations/interface_operations/get_m_a_c_address_parameters.go deleted file mode 100644 index b8dd99c33e68aeb41d5bb547e6e3ccb541741d8e..0000000000000000000000000000000000000000 --- a/legacy/restapi/operations/interface_operations/get_m_a_c_address_parameters.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package interface_operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" -) - -// NewGetMACAddressParams creates a new GetMACAddressParams object -// no default values defined in spec. -func NewGetMACAddressParams() GetMACAddressParams { - - return GetMACAddressParams{} -} - -// GetMACAddressParams contains all the bound params for the get m a c address operation -// typically these are obtained from a http.Request -// -// swagger:parameters getMACAddress -type GetMACAddressParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*interface to fetch - Required: true - In: path - */ - Interface string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewGetMACAddressParams() beforehand. -func (o *GetMACAddressParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rInterface, rhkInterface, _ := route.Params.GetOK("interface") - if err := o.bindInterface(rInterface, rhkInterface, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindInterface binds and validates parameter Interface from path. -func (o *GetMACAddressParams) bindInterface(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.Interface = raw - - return nil -} diff --git a/legacy/restapi/operations/interface_operations/get_m_a_c_address_responses.go b/legacy/restapi/operations/interface_operations/get_m_a_c_address_responses.go deleted file mode 100644 index 3c000366af969db3a58e68cf1cc45315e008c859..0000000000000000000000000000000000000000 --- a/legacy/restapi/operations/interface_operations/get_m_a_c_address_responses.go +++ /dev/null @@ -1,118 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package interface_operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/legacy/models" -) - -// GetMACAddressOKCode is the HTTP code returned for type GetMACAddressOK -const GetMACAddressOKCode int = 200 - -/*GetMACAddressOK OK - -swagger:response getMACAddressOK -*/ -type GetMACAddressOK struct { - - /* - In: Body - */ - Payload models.PhysicalAddress `json:"body,omitempty"` -} - -// NewGetMACAddressOK creates GetMACAddressOK with default headers values -func NewGetMACAddressOK() *GetMACAddressOK { - - return &GetMACAddressOK{} -} - -// WithPayload adds the payload to the get m a c address o k response -func (o *GetMACAddressOK) WithPayload(payload models.PhysicalAddress) *GetMACAddressOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the get m a c address o k response -func (o *GetMACAddressOK) SetPayload(payload models.PhysicalAddress) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *GetMACAddressOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } -} - -// GetMACAddressNotFoundCode is the HTTP code returned for type GetMACAddressNotFound -const GetMACAddressNotFoundCode int = 404 - -/*GetMACAddressNotFound An error occurred. - -swagger:response getMACAddressNotFound -*/ -type GetMACAddressNotFound struct { -} - -// NewGetMACAddressNotFound creates GetMACAddressNotFound with default headers values -func NewGetMACAddressNotFound() *GetMACAddressNotFound { - - return &GetMACAddressNotFound{} -} - -// WriteResponse to the client -func (o *GetMACAddressNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(404) -} - -/*GetMACAddressDefault Unexpected error - -swagger:response getMACAddressDefault -*/ -type GetMACAddressDefault struct { - _statusCode int -} - -// NewGetMACAddressDefault creates GetMACAddressDefault with default headers values -func NewGetMACAddressDefault(code int) *GetMACAddressDefault { - if code <= 0 { - code = 500 - } - - return &GetMACAddressDefault{ - _statusCode: code, - } -} - -// WithStatusCode adds the status to the get m a c address default response -func (o *GetMACAddressDefault) WithStatusCode(code int) *GetMACAddressDefault { - o._statusCode = code - return o -} - -// SetStatusCode sets the status to the get m a c address default response -func (o *GetMACAddressDefault) SetStatusCode(code int) { - o._statusCode = code -} - -// WriteResponse to the client -func (o *GetMACAddressDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(o._statusCode) -} diff --git a/legacy/restapi/operations/interface_operations/get_m_a_c_address_urlbuilder.go b/legacy/restapi/operations/interface_operations/get_m_a_c_address_urlbuilder.go deleted file mode 100644 index ce8bf56661b549a90ca29454dbd5d930b5be8273..0000000000000000000000000000000000000000 --- a/legacy/restapi/operations/interface_operations/get_m_a_c_address_urlbuilder.go +++ /dev/null @@ -1,99 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package interface_operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// GetMACAddressURL generates an URL for the get m a c address operation -type GetMACAddressURL struct { - Interface string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *GetMACAddressURL) WithBasePath(bp string) *GetMACAddressURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *GetMACAddressURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *GetMACAddressURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/cocsn-interface/{interface}/mac-address" - - interfaceVar := o.Interface - if interfaceVar != "" { - _path = strings.Replace(_path, "{interface}", interfaceVar, -1) - } else { - return nil, errors.New("interface is required on GetMACAddressURL") - } - - _basePath := o._basePath - if _basePath == "" { - _basePath = "/restconf" - } - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *GetMACAddressURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *GetMACAddressURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *GetMACAddressURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on GetMACAddressURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on GetMACAddressURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *GetMACAddressURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/legacy/restapi/server.go b/legacy/restapi/server.go deleted file mode 100644 index 53878d2524eef212451aa3f24a1c69e2cb8597aa..0000000000000000000000000000000000000000 --- a/legacy/restapi/server.go +++ /dev/null @@ -1,511 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restapi - -import ( - "context" - "crypto/tls" - "crypto/x509" - "errors" - "fmt" - "io/ioutil" - "log" - "net" - "net/http" - "os" - "os/signal" - "strconv" - "sync" - "sync/atomic" - "syscall" - "time" - - "github.com/go-openapi/runtime/flagext" - "github.com/go-openapi/swag" - flags "github.com/jessevdk/go-flags" - "golang.org/x/net/netutil" - - "code.fbi.h-da.de/cocsn/cocsn-api/legacy/restapi/operations" -) - -const ( - schemeHTTP = "http" - schemeHTTPS = "https" - schemeUnix = "unix" -) - -var defaultSchemes []string - -func init() { - defaultSchemes = []string{ - schemeHTTP, - } -} - -// NewServer creates a new api cocsn server but does not configure it -func NewServer(api *operations.CocsnAPI) *Server { - s := new(Server) - - s.shutdown = make(chan struct{}) - s.api = api - s.interrupt = make(chan os.Signal, 1) - return s -} - -// ConfigureAPI configures the API and handlers. -func (s *Server) ConfigureAPI() { - if s.api != nil { - s.handler = configureAPI(s.api) - } -} - -// ConfigureFlags configures the additional flags defined by the handlers. Needs to be called before the parser.Parse -func (s *Server) ConfigureFlags() { - if s.api != nil { - configureFlags(s.api) - } -} - -// Server for the cocsn API -type Server struct { - EnabledListeners []string `long:"scheme" description:"the listeners to enable, this can be repeated and defaults to the schemes in the swagger spec"` - CleanupTimeout time.Duration `long:"cleanup-timeout" description:"grace period for which to wait before killing idle connections" default:"10s"` - GracefulTimeout time.Duration `long:"graceful-timeout" description:"grace period for which to wait before shutting down the server" default:"15s"` - MaxHeaderSize flagext.ByteSize `long:"max-header-size" description:"controls the maximum number of bytes the server will read parsing the request header's keys and values, including the request line. It does not limit the size of the request body." default:"1MiB"` - - SocketPath flags.Filename `long:"socket-path" description:"the unix socket to listen on" default:"/var/run/cocsn.sock"` - domainSocketL net.Listener - - Host string `long:"host" description:"the IP to listen on" default:"localhost" env:"HOST"` - Port int `long:"port" description:"the port to listen on for insecure connections, defaults to a random value" env:"PORT"` - ListenLimit int `long:"listen-limit" description:"limit the number of outstanding requests"` - KeepAlive time.Duration `long:"keep-alive" description:"sets the TCP keep-alive timeouts on accepted connections. It prunes dead TCP connections ( e.g. closing laptop mid-download)" default:"3m"` - ReadTimeout time.Duration `long:"read-timeout" description:"maximum duration before timing out read of the request" default:"30s"` - WriteTimeout time.Duration `long:"write-timeout" description:"maximum duration before timing out write of the response" default:"60s"` - httpServerL net.Listener - - TLSHost string `long:"tls-host" description:"the IP to listen on for tls, when not specified it's the same as --host" env:"TLS_HOST"` - TLSPort int `long:"tls-port" description:"the port to listen on for secure connections, defaults to a random value" env:"TLS_PORT"` - TLSCertificate flags.Filename `long:"tls-certificate" description:"the certificate to use for secure connections" env:"TLS_CERTIFICATE"` - TLSCertificateKey flags.Filename `long:"tls-key" description:"the private key to use for secure connections" env:"TLS_PRIVATE_KEY"` - TLSCACertificate flags.Filename `long:"tls-ca" description:"the certificate authority file to be used with mutual tls auth" env:"TLS_CA_CERTIFICATE"` - TLSListenLimit int `long:"tls-listen-limit" description:"limit the number of outstanding requests"` - TLSKeepAlive time.Duration `long:"tls-keep-alive" description:"sets the TCP keep-alive timeouts on accepted connections. It prunes dead TCP connections ( e.g. closing laptop mid-download)"` - TLSReadTimeout time.Duration `long:"tls-read-timeout" description:"maximum duration before timing out read of the request"` - TLSWriteTimeout time.Duration `long:"tls-write-timeout" description:"maximum duration before timing out write of the response"` - httpsServerL net.Listener - - api *operations.CocsnAPI - handler http.Handler - hasListeners bool - shutdown chan struct{} - shuttingDown int32 - interrupted bool - interrupt chan os.Signal -} - -// Logf logs message either via defined user logger or via system one if no user logger is defined. -func (s *Server) Logf(f string, args ...interface{}) { - if s.api != nil && s.api.Logger != nil { - s.api.Logger(f, args...) - } else { - log.Printf(f, args...) - } -} - -// Fatalf logs message either via defined user logger or via system one if no user logger is defined. -// Exits with non-zero status after printing -func (s *Server) Fatalf(f string, args ...interface{}) { - if s.api != nil && s.api.Logger != nil { - s.api.Logger(f, args...) - os.Exit(1) - } else { - log.Fatalf(f, args...) - } -} - -// SetAPI configures the server with the specified API. Needs to be called before Serve -func (s *Server) SetAPI(api *operations.CocsnAPI) { - if api == nil { - s.api = nil - s.handler = nil - return - } - - s.api = api - s.handler = configureAPI(api) -} - -func (s *Server) hasScheme(scheme string) bool { - schemes := s.EnabledListeners - if len(schemes) == 0 { - schemes = defaultSchemes - } - - for _, v := range schemes { - if v == scheme { - return true - } - } - return false -} - -// Serve the api -func (s *Server) Serve() (err error) { - if !s.hasListeners { - if err = s.Listen(); err != nil { - return err - } - } - - // set default handler, if none is set - if s.handler == nil { - if s.api == nil { - return errors.New("can't create the default handler, as no api is set") - } - - s.SetHandler(s.api.Serve(nil)) - } - - wg := new(sync.WaitGroup) - once := new(sync.Once) - signalNotify(s.interrupt) - go handleInterrupt(once, s) - - servers := []*http.Server{} - - if s.hasScheme(schemeUnix) { - domainSocket := new(http.Server) - domainSocket.MaxHeaderBytes = int(s.MaxHeaderSize) - domainSocket.Handler = s.handler - if int64(s.CleanupTimeout) > 0 { - domainSocket.IdleTimeout = s.CleanupTimeout - } - - configureServer(domainSocket, "unix", string(s.SocketPath)) - - servers = append(servers, domainSocket) - wg.Add(1) - s.Logf("Serving cocsn at unix://%s", s.SocketPath) - go func(l net.Listener) { - defer wg.Done() - if err := domainSocket.Serve(l); err != nil && err != http.ErrServerClosed { - s.Fatalf("%v", err) - } - s.Logf("Stopped serving cocsn at unix://%s", s.SocketPath) - }(s.domainSocketL) - } - - if s.hasScheme(schemeHTTP) { - httpServer := new(http.Server) - httpServer.MaxHeaderBytes = int(s.MaxHeaderSize) - httpServer.ReadTimeout = s.ReadTimeout - httpServer.WriteTimeout = s.WriteTimeout - httpServer.SetKeepAlivesEnabled(int64(s.KeepAlive) > 0) - if s.ListenLimit > 0 { - s.httpServerL = netutil.LimitListener(s.httpServerL, s.ListenLimit) - } - - if int64(s.CleanupTimeout) > 0 { - httpServer.IdleTimeout = s.CleanupTimeout - } - - httpServer.Handler = s.handler - - configureServer(httpServer, "http", s.httpServerL.Addr().String()) - - servers = append(servers, httpServer) - wg.Add(1) - s.Logf("Serving cocsn at http://%s", s.httpServerL.Addr()) - go func(l net.Listener) { - defer wg.Done() - if err := httpServer.Serve(l); err != nil && err != http.ErrServerClosed { - s.Fatalf("%v", err) - } - s.Logf("Stopped serving cocsn at http://%s", l.Addr()) - }(s.httpServerL) - } - - if s.hasScheme(schemeHTTPS) { - httpsServer := new(http.Server) - httpsServer.MaxHeaderBytes = int(s.MaxHeaderSize) - httpsServer.ReadTimeout = s.TLSReadTimeout - httpsServer.WriteTimeout = s.TLSWriteTimeout - httpsServer.SetKeepAlivesEnabled(int64(s.TLSKeepAlive) > 0) - if s.TLSListenLimit > 0 { - s.httpsServerL = netutil.LimitListener(s.httpsServerL, s.TLSListenLimit) - } - if int64(s.CleanupTimeout) > 0 { - httpsServer.IdleTimeout = s.CleanupTimeout - } - httpsServer.Handler = s.handler - - // Inspired by https://blog.bracebin.com/achieving-perfect-ssl-labs-score-with-go - httpsServer.TLSConfig = &tls.Config{ - // Causes servers to use Go's default ciphersuite preferences, - // which are tuned to avoid attacks. Does nothing on clients. - PreferServerCipherSuites: true, - // Only use curves which have assembly implementations - // https://github.com/golang/go/tree/master/src/crypto/elliptic - CurvePreferences: []tls.CurveID{tls.CurveP256}, - // Use modern tls mode https://wiki.mozilla.org/Security/Server_Side_TLS#Modern_compatibility - NextProtos: []string{"h2", "http/1.1"}, - // https://www.owasp.org/index.php/Transport_Layer_Protection_Cheat_Sheet#Rule_-_Only_Support_Strong_Protocols - MinVersion: tls.VersionTLS12, - // These ciphersuites support Forward Secrecy: https://en.wikipedia.org/wiki/Forward_secrecy - CipherSuites: []uint16{ - tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, - tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, - tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, - tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, - tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305, - tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305, - }, - } - - // build standard config from server options - if s.TLSCertificate != "" && s.TLSCertificateKey != "" { - httpsServer.TLSConfig.Certificates = make([]tls.Certificate, 1) - httpsServer.TLSConfig.Certificates[0], err = tls.LoadX509KeyPair(string(s.TLSCertificate), string(s.TLSCertificateKey)) - if err != nil { - return err - } - } - - if s.TLSCACertificate != "" { - // include specified CA certificate - caCert, caCertErr := ioutil.ReadFile(string(s.TLSCACertificate)) - if caCertErr != nil { - return caCertErr - } - caCertPool := x509.NewCertPool() - ok := caCertPool.AppendCertsFromPEM(caCert) - if !ok { - return fmt.Errorf("cannot parse CA certificate") - } - httpsServer.TLSConfig.ClientCAs = caCertPool - httpsServer.TLSConfig.ClientAuth = tls.RequireAndVerifyClientCert - } - - // call custom TLS configurator - configureTLS(httpsServer.TLSConfig) - - if len(httpsServer.TLSConfig.Certificates) == 0 && httpsServer.TLSConfig.GetCertificate == nil { - // after standard and custom config are passed, this ends up with no certificate - if s.TLSCertificate == "" { - if s.TLSCertificateKey == "" { - s.Fatalf("the required flags `--tls-certificate` and `--tls-key` were not specified") - } - s.Fatalf("the required flag `--tls-certificate` was not specified") - } - if s.TLSCertificateKey == "" { - s.Fatalf("the required flag `--tls-key` was not specified") - } - // this happens with a wrong custom TLS configurator - s.Fatalf("no certificate was configured for TLS") - } - - // must have at least one certificate or panics - httpsServer.TLSConfig.BuildNameToCertificate() - - configureServer(httpsServer, "https", s.httpsServerL.Addr().String()) - - servers = append(servers, httpsServer) - wg.Add(1) - s.Logf("Serving cocsn at https://%s", s.httpsServerL.Addr()) - go func(l net.Listener) { - defer wg.Done() - if err := httpsServer.Serve(l); err != nil && err != http.ErrServerClosed { - s.Fatalf("%v", err) - } - s.Logf("Stopped serving cocsn at https://%s", l.Addr()) - }(tls.NewListener(s.httpsServerL, httpsServer.TLSConfig)) - } - - wg.Add(1) - go s.handleShutdown(wg, &servers) - - wg.Wait() - return nil -} - -// Listen creates the listeners for the server -func (s *Server) Listen() error { - if s.hasListeners { // already done this - return nil - } - - if s.hasScheme(schemeHTTPS) { - // Use http host if https host wasn't defined - if s.TLSHost == "" { - s.TLSHost = s.Host - } - // Use http listen limit if https listen limit wasn't defined - if s.TLSListenLimit == 0 { - s.TLSListenLimit = s.ListenLimit - } - // Use http tcp keep alive if https tcp keep alive wasn't defined - if int64(s.TLSKeepAlive) == 0 { - s.TLSKeepAlive = s.KeepAlive - } - // Use http read timeout if https read timeout wasn't defined - if int64(s.TLSReadTimeout) == 0 { - s.TLSReadTimeout = s.ReadTimeout - } - // Use http write timeout if https write timeout wasn't defined - if int64(s.TLSWriteTimeout) == 0 { - s.TLSWriteTimeout = s.WriteTimeout - } - } - - if s.hasScheme(schemeUnix) { - domSockListener, err := net.Listen("unix", string(s.SocketPath)) - if err != nil { - return err - } - s.domainSocketL = domSockListener - } - - if s.hasScheme(schemeHTTP) { - listener, err := net.Listen("tcp", net.JoinHostPort(s.Host, strconv.Itoa(s.Port))) - if err != nil { - return err - } - - h, p, err := swag.SplitHostPort(listener.Addr().String()) - if err != nil { - return err - } - s.Host = h - s.Port = p - s.httpServerL = listener - } - - if s.hasScheme(schemeHTTPS) { - tlsListener, err := net.Listen("tcp", net.JoinHostPort(s.TLSHost, strconv.Itoa(s.TLSPort))) - if err != nil { - return err - } - - sh, sp, err := swag.SplitHostPort(tlsListener.Addr().String()) - if err != nil { - return err - } - s.TLSHost = sh - s.TLSPort = sp - s.httpsServerL = tlsListener - } - - s.hasListeners = true - return nil -} - -// Shutdown server and clean up resources -func (s *Server) Shutdown() error { - if atomic.CompareAndSwapInt32(&s.shuttingDown, 0, 1) { - close(s.shutdown) - } - return nil -} - -func (s *Server) handleShutdown(wg *sync.WaitGroup, serversPtr *[]*http.Server) { - // wg.Done must occur last, after s.api.ServerShutdown() - // (to preserve old behaviour) - defer wg.Done() - - <-s.shutdown - - servers := *serversPtr - - ctx, cancel := context.WithTimeout(context.TODO(), s.GracefulTimeout) - defer cancel() - - // first execute the pre-shutdown hook - s.api.PreServerShutdown() - - shutdownChan := make(chan bool) - for i := range servers { - server := servers[i] - go func() { - var success bool - defer func() { - shutdownChan <- success - }() - if err := server.Shutdown(ctx); err != nil { - // Error from closing listeners, or context timeout: - s.Logf("HTTP server Shutdown: %v", err) - } else { - success = true - } - }() - } - - // Wait until all listeners have successfully shut down before calling ServerShutdown - success := true - for range servers { - success = success && <-shutdownChan - } - if success { - s.api.ServerShutdown() - } -} - -// GetHandler returns a handler useful for testing -func (s *Server) GetHandler() http.Handler { - return s.handler -} - -// SetHandler allows for setting a http handler on this server -func (s *Server) SetHandler(handler http.Handler) { - s.handler = handler -} - -// UnixListener returns the domain socket listener -func (s *Server) UnixListener() (net.Listener, error) { - if !s.hasListeners { - if err := s.Listen(); err != nil { - return nil, err - } - } - return s.domainSocketL, nil -} - -// HTTPListener returns the http listener -func (s *Server) HTTPListener() (net.Listener, error) { - if !s.hasListeners { - if err := s.Listen(); err != nil { - return nil, err - } - } - return s.httpServerL, nil -} - -// TLSListener returns the https listener -func (s *Server) TLSListener() (net.Listener, error) { - if !s.hasListeners { - if err := s.Listen(); err != nil { - return nil, err - } - } - return s.httpsServerL, nil -} - -func handleInterrupt(once *sync.Once, s *Server) { - once.Do(func() { - for range s.interrupt { - if s.interrupted { - s.Logf("Server already shutting down") - continue - } - s.interrupted = true - s.Logf("Shutting down... ") - if err := s.Shutdown(); err != nil { - s.Logf("HTTP server Shutdown: %v", err) - } - } - }) -} - -func signalNotify(interrupt chan<- os.Signal) { - signal.Notify(interrupt, syscall.SIGINT, syscall.SIGTERM) -} diff --git a/waveserver/cmd/cocsn-server/cocsn-server b/waveserver/cmd/cocsn-server/cocsn-server deleted file mode 100755 index 4340ecb120e72188553d1959818b9de7999d1b32..0000000000000000000000000000000000000000 Binary files a/waveserver/cmd/cocsn-server/cocsn-server and /dev/null differ diff --git a/waveserver/cmd/cocsn-server/main.go b/waveserver/cmd/cocsn-server/main.go deleted file mode 100644 index 77dc5e456615fe07e77f921d626789da9fd0580d..0000000000000000000000000000000000000000 --- a/waveserver/cmd/cocsn-server/main.go +++ /dev/null @@ -1,67 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package main - -import ( - . "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/restapi/operations/ciena_waveserver_interfaces" - "github.com/go-openapi/runtime/middleware" - "log" - "os" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/restapi" - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/restapi/operations" - "github.com/go-openapi/loads" - flags "github.com/jessevdk/go-flags" -) - -// This file was generated by the swagger tool. -// Make sure not to overwrite this file after you generated it because all your edits would be lost! - -type getInterfaceHandler struct { - -} - -func (ifh getInterfaceHandler) Handle(params GetDataWaveserverInterfacesLogicalInterfaceIndexParams) middleware.Responder { - return NewGetDataWaveserverInterfacesLogicalInterfaceIndexOK() -} - -func main() { - - swaggerSpec, err := loads.Embedded(restapi.SwaggerJSON, restapi.FlatSwaggerJSON) - if err != nil { - log.Fatalln(err) - } - - api := operations.NewCocsnAPI(swaggerSpec) - api.CienaWaveserverInterfacesGetDataWaveserverInterfacesLogicalInterfaceIndexHandler = getInterfaceHandler{} - server := restapi.NewServer(api) - defer server.Shutdown() - - parser := flags.NewParser(server, flags.Default) - parser.ShortDescription = "ciena-waveserver-interfaces API" - parser.LongDescription = "This module defines Ethernet and IP management interfaces support for\n Ciena's Waveserver Platform." - server.ConfigureFlags() - for _, optsGroup := range api.CommandLineOptionsGroups { - _, err := parser.AddGroup(optsGroup.ShortDescription, optsGroup.LongDescription, optsGroup.Options) - if err != nil { - log.Fatalln(err) - } - } - - if _, err := parser.Parse(); err != nil { - code := 1 - if fe, ok := err.(*flags.Error); ok { - if fe.Type == flags.ErrHelp { - code = 0 - } - } - os.Exit(code) - } - - server.ConfigureAPI() - - if err := server.Serve(); err != nil { - log.Fatalln(err) - } - -} diff --git a/waveserver/models/ciena_waveserver_interfaces_duplex_enumeration.go b/waveserver/models/ciena_waveserver_interfaces_duplex_enumeration.go deleted file mode 100644 index e7346b293c17abbb84b52ed95ad70bb8a6f79c43..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_interfaces_duplex_enumeration.go +++ /dev/null @@ -1,66 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/validate" -) - -// CienaWaveserverInterfacesDuplexEnumeration ciena waveserver interfaces duplex enumeration -// -// swagger:model ciena.waveserver.interfaces.DuplexEnumeration -type CienaWaveserverInterfacesDuplexEnumeration string - -const ( - - // CienaWaveserverInterfacesDuplexEnumerationUnknown captures enum value "Unknown" - CienaWaveserverInterfacesDuplexEnumerationUnknown CienaWaveserverInterfacesDuplexEnumeration = "Unknown" - - // CienaWaveserverInterfacesDuplexEnumerationFull captures enum value "full" - CienaWaveserverInterfacesDuplexEnumerationFull CienaWaveserverInterfacesDuplexEnumeration = "full" - - // CienaWaveserverInterfacesDuplexEnumerationHalf captures enum value "half" - CienaWaveserverInterfacesDuplexEnumerationHalf CienaWaveserverInterfacesDuplexEnumeration = "half" -) - -// for schema -var cienaWaveserverInterfacesDuplexEnumerationEnum []interface{} - -func init() { - var res []CienaWaveserverInterfacesDuplexEnumeration - if err := json.Unmarshal([]byte(`["Unknown","full","half"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cienaWaveserverInterfacesDuplexEnumerationEnum = append(cienaWaveserverInterfacesDuplexEnumerationEnum, v) - } -} - -func (m CienaWaveserverInterfacesDuplexEnumeration) validateCienaWaveserverInterfacesDuplexEnumerationEnum(path, location string, value CienaWaveserverInterfacesDuplexEnumeration) error { - if err := validate.EnumCase(path, location, value, cienaWaveserverInterfacesDuplexEnumerationEnum, true); err != nil { - return err - } - return nil -} - -// Validate validates this ciena waveserver interfaces duplex enumeration -func (m CienaWaveserverInterfacesDuplexEnumeration) Validate(formats strfmt.Registry) error { - var res []error - - // value enum - if err := m.validateCienaWaveserverInterfacesDuplexEnumerationEnum("", "body", m); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/waveserver/models/ciena_waveserver_interfaces_ethernet_if_properties_group.go b/waveserver/models/ciena_waveserver_interfaces_ethernet_if_properties_group.go deleted file mode 100644 index 969fcadd4240f9b97e3c257311bb3d192b175658..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_interfaces_ethernet_if_properties_group.go +++ /dev/null @@ -1,105 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CienaWaveserverInterfacesEthernetIfPropertiesGroup ciena waveserver interfaces ethernet if properties group -// -// swagger:model ciena.waveserver.interfaces.EthernetIfPropertiesGroup -type CienaWaveserverInterfacesEthernetIfPropertiesGroup struct { - - // Specifies whether the interface should negotiate common transmission - // parameters, such as speed, duplex, and flow control with its peer. REF:IEEE 802.3-2012 auto-negotiation transmission parameters - AutoNegotiation *bool `json:"auto-negotiation,omitempty"` - - // Ethernet interface duplex mode. For ports with auto-negotiation enabled, - // this represents the negotiated duplex mode. - Duplex CienaWaveserverInterfacesDuplexEnumeration `json:"duplex,omitempty"` - - // Specifies whether this interface will participate in Ethernet flow - // control, via pause frames. - FlowControl *bool `json:"flow-control,omitempty"` - - // The system-assigned MAC address of the Ethernet interface. - MacAddress string `json:"mac-address,omitempty"` - - // Ethernet port speed. For ports with auto-negotiation enabled, this - // represents the negotiated port speed. - Speed CienaWaveserverInterfacesSpeedEnumeration `json:"speed,omitempty"` -} - -// Validate validates this ciena waveserver interfaces ethernet if properties group -func (m *CienaWaveserverInterfacesEthernetIfPropertiesGroup) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateDuplex(formats); err != nil { - res = append(res, err) - } - - if err := m.validateSpeed(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CienaWaveserverInterfacesEthernetIfPropertiesGroup) validateDuplex(formats strfmt.Registry) error { - - if swag.IsZero(m.Duplex) { // not required - return nil - } - - if err := m.Duplex.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("duplex") - } - return err - } - - return nil -} - -func (m *CienaWaveserverInterfacesEthernetIfPropertiesGroup) validateSpeed(formats strfmt.Registry) error { - - if swag.IsZero(m.Speed) { // not required - return nil - } - - if err := m.Speed.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("speed") - } - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CienaWaveserverInterfacesEthernetIfPropertiesGroup) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CienaWaveserverInterfacesEthernetIfPropertiesGroup) UnmarshalBinary(b []byte) error { - var res CienaWaveserverInterfacesEthernetIfPropertiesGroup - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/waveserver/models/ciena_waveserver_interfaces_ethernet_if_properties_group_wrapper.go b/waveserver/models/ciena_waveserver_interfaces_ethernet_if_properties_group_wrapper.go deleted file mode 100644 index 131abfad0c81ab1067d99db7a1e8a8636c261c90..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_interfaces_ethernet_if_properties_group_wrapper.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CienaWaveserverInterfacesEthernetIfPropertiesGroupWrapper ciena waveserver interfaces ethernet if properties group wrapper -// -// swagger:model ciena.waveserver.interfaces.EthernetIfPropertiesGroupWrapper -type CienaWaveserverInterfacesEthernetIfPropertiesGroupWrapper struct { - - // ethernet - Ethernet *CienaWaveserverInterfacesEthernetIfPropertiesGroup `json:"ethernet,omitempty"` -} - -// Validate validates this ciena waveserver interfaces ethernet if properties group wrapper -func (m *CienaWaveserverInterfacesEthernetIfPropertiesGroupWrapper) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEthernet(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CienaWaveserverInterfacesEthernetIfPropertiesGroupWrapper) validateEthernet(formats strfmt.Registry) error { - - if swag.IsZero(m.Ethernet) { // not required - return nil - } - - if m.Ethernet != nil { - if err := m.Ethernet.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ethernet") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CienaWaveserverInterfacesEthernetIfPropertiesGroupWrapper) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CienaWaveserverInterfacesEthernetIfPropertiesGroupWrapper) UnmarshalBinary(b []byte) error { - var res CienaWaveserverInterfacesEthernetIfPropertiesGroupWrapper - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/waveserver/models/ciena_waveserver_interfaces_management_if_properties_group.go b/waveserver/models/ciena_waveserver_interfaces_management_if_properties_group.go deleted file mode 100644 index a0a05ac7be6b710c2bb772b249f525123227b821..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_interfaces_management_if_properties_group.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CienaWaveserverInterfacesManagementIfPropertiesGroup ciena waveserver interfaces management if properties group -// -// swagger:model ciena.waveserver.interfaces.ManagementIfPropertiesGroup -type CienaWaveserverInterfacesManagementIfPropertiesGroup struct { - - // Management port mode. Specifies whether the port is configured as a - // local management interface or wayside communications channel (carry - // through). - Mode CienaWaveserverInterfacesModeEnumeration `json:"mode,omitempty"` -} - -// Validate validates this ciena waveserver interfaces management if properties group -func (m *CienaWaveserverInterfacesManagementIfPropertiesGroup) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateMode(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CienaWaveserverInterfacesManagementIfPropertiesGroup) validateMode(formats strfmt.Registry) error { - - if swag.IsZero(m.Mode) { // not required - return nil - } - - if err := m.Mode.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("mode") - } - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CienaWaveserverInterfacesManagementIfPropertiesGroup) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CienaWaveserverInterfacesManagementIfPropertiesGroup) UnmarshalBinary(b []byte) error { - var res CienaWaveserverInterfacesManagementIfPropertiesGroup - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/waveserver/models/ciena_waveserver_interfaces_management_if_properties_group_wrapper.go b/waveserver/models/ciena_waveserver_interfaces_management_if_properties_group_wrapper.go deleted file mode 100644 index f7ab62a118d29ccca40b467b76da82d3163c2082..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_interfaces_management_if_properties_group_wrapper.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CienaWaveserverInterfacesManagementIfPropertiesGroupWrapper ciena waveserver interfaces management if properties group wrapper -// -// swagger:model ciena.waveserver.interfaces.ManagementIfPropertiesGroupWrapper -type CienaWaveserverInterfacesManagementIfPropertiesGroupWrapper struct { - - // management - Management *CienaWaveserverInterfacesManagementIfPropertiesGroup `json:"management,omitempty"` -} - -// Validate validates this ciena waveserver interfaces management if properties group wrapper -func (m *CienaWaveserverInterfacesManagementIfPropertiesGroupWrapper) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateManagement(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CienaWaveserverInterfacesManagementIfPropertiesGroupWrapper) validateManagement(formats strfmt.Registry) error { - - if swag.IsZero(m.Management) { // not required - return nil - } - - if m.Management != nil { - if err := m.Management.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("management") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CienaWaveserverInterfacesManagementIfPropertiesGroupWrapper) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CienaWaveserverInterfacesManagementIfPropertiesGroupWrapper) UnmarshalBinary(b []byte) error { - var res CienaWaveserverInterfacesManagementIfPropertiesGroupWrapper - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/waveserver/models/ciena_waveserver_interfaces_mode_enumeration.go b/waveserver/models/ciena_waveserver_interfaces_mode_enumeration.go deleted file mode 100644 index 78cd5a568b20f4c9be07bd1aa8d0547d116a9ee3..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_interfaces_mode_enumeration.go +++ /dev/null @@ -1,63 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/validate" -) - -// CienaWaveserverInterfacesModeEnumeration ciena waveserver interfaces mode enumeration -// -// swagger:model ciena.waveserver.interfaces.ModeEnumeration -type CienaWaveserverInterfacesModeEnumeration string - -const ( - - // CienaWaveserverInterfacesModeEnumerationManagement captures enum value "management" - CienaWaveserverInterfacesModeEnumerationManagement CienaWaveserverInterfacesModeEnumeration = "management" - - // CienaWaveserverInterfacesModeEnumerationWaysideChannel captures enum value "wayside-channel" - CienaWaveserverInterfacesModeEnumerationWaysideChannel CienaWaveserverInterfacesModeEnumeration = "wayside-channel" -) - -// for schema -var cienaWaveserverInterfacesModeEnumerationEnum []interface{} - -func init() { - var res []CienaWaveserverInterfacesModeEnumeration - if err := json.Unmarshal([]byte(`["management","wayside-channel"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cienaWaveserverInterfacesModeEnumerationEnum = append(cienaWaveserverInterfacesModeEnumerationEnum, v) - } -} - -func (m CienaWaveserverInterfacesModeEnumeration) validateCienaWaveserverInterfacesModeEnumerationEnum(path, location string, value CienaWaveserverInterfacesModeEnumeration) error { - if err := validate.EnumCase(path, location, value, cienaWaveserverInterfacesModeEnumerationEnum, true); err != nil { - return err - } - return nil -} - -// Validate validates this ciena waveserver interfaces mode enumeration -func (m CienaWaveserverInterfacesModeEnumeration) Validate(formats strfmt.Registry) error { - var res []error - - // value enum - if err := m.validateCienaWaveserverInterfacesModeEnumerationEnum("", "body", m); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/waveserver/models/ciena_waveserver_interfaces_route_next_hop_group.go b/waveserver/models/ciena_waveserver_interfaces_route_next_hop_group.go deleted file mode 100644 index 53e9fa210768d8b57f47a2166708a9023a1fc1be..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_interfaces_route_next_hop_group.go +++ /dev/null @@ -1,57 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CienaWaveserverInterfacesRouteNextHopGroup ciena waveserver interfaces route next hop group -// -// swagger:model ciena.waveserver.interfaces.RouteNextHopGroup -type CienaWaveserverInterfacesRouteNextHopGroup struct { - - // Specifies whether the route is active (present in the kernel IP - // routing table). - Active *bool `json:"active,omitempty"` - - // Reference to the associated logical-interface name of the route entry. - // Defaults to the 'local' interface for routes within the subnet - // associated with the active IP address configured on the local - // management interface. - AssociatedInterface string `json:"associated-interface,omitempty"` - - // Routing metric cost. - Metric int64 `json:"metric,omitempty"` - - // Specifies whether the route entry is user-created (static) or - // dynamically created by a routing protocol. - Static *bool `json:"static,omitempty"` -} - -// Validate validates this ciena waveserver interfaces route next hop group -func (m *CienaWaveserverInterfacesRouteNextHopGroup) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CienaWaveserverInterfacesRouteNextHopGroup) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CienaWaveserverInterfacesRouteNextHopGroup) UnmarshalBinary(b []byte) error { - var res CienaWaveserverInterfacesRouteNextHopGroup - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/waveserver/models/ciena_waveserver_interfaces_speed_enumeration.go b/waveserver/models/ciena_waveserver_interfaces_speed_enumeration.go deleted file mode 100644 index 10f5d4f6fcbd7ab6a23fb104d084638173b196ae..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_interfaces_speed_enumeration.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/validate" -) - -// CienaWaveserverInterfacesSpeedEnumeration ciena waveserver interfaces speed enumeration -// -// swagger:model ciena.waveserver.interfaces.SpeedEnumeration -type CienaWaveserverInterfacesSpeedEnumeration string - -const ( - - // CienaWaveserverInterfacesSpeedEnumerationUnknown captures enum value "Unknown" - CienaWaveserverInterfacesSpeedEnumerationUnknown CienaWaveserverInterfacesSpeedEnumeration = "Unknown" - - // CienaWaveserverInterfacesSpeedEnumerationNr10M captures enum value "10M" - CienaWaveserverInterfacesSpeedEnumerationNr10M CienaWaveserverInterfacesSpeedEnumeration = "10M" - - // CienaWaveserverInterfacesSpeedEnumerationNr100M captures enum value "100M" - CienaWaveserverInterfacesSpeedEnumerationNr100M CienaWaveserverInterfacesSpeedEnumeration = "100M" - - // CienaWaveserverInterfacesSpeedEnumerationNr1G captures enum value "1G" - CienaWaveserverInterfacesSpeedEnumerationNr1G CienaWaveserverInterfacesSpeedEnumeration = "1G" - - // CienaWaveserverInterfacesSpeedEnumerationNr10G captures enum value "10G" - CienaWaveserverInterfacesSpeedEnumerationNr10G CienaWaveserverInterfacesSpeedEnumeration = "10G" -) - -// for schema -var cienaWaveserverInterfacesSpeedEnumerationEnum []interface{} - -func init() { - var res []CienaWaveserverInterfacesSpeedEnumeration - if err := json.Unmarshal([]byte(`["Unknown","10M","100M","1G","10G"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cienaWaveserverInterfacesSpeedEnumerationEnum = append(cienaWaveserverInterfacesSpeedEnumerationEnum, v) - } -} - -func (m CienaWaveserverInterfacesSpeedEnumeration) validateCienaWaveserverInterfacesSpeedEnumerationEnum(path, location string, value CienaWaveserverInterfacesSpeedEnumeration) error { - if err := validate.EnumCase(path, location, value, cienaWaveserverInterfacesSpeedEnumerationEnum, true); err != nil { - return err - } - return nil -} - -// Validate validates this ciena waveserver interfaces speed enumeration -func (m CienaWaveserverInterfacesSpeedEnumeration) Validate(formats strfmt.Registry) error { - var res []error - - // value enum - if err := m.validateCienaWaveserverInterfacesSpeedEnumerationEnum("", "body", m); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/waveserver/models/ciena_waveserver_interfaces_type_enumeration.go b/waveserver/models/ciena_waveserver_interfaces_type_enumeration.go deleted file mode 100644 index d92ece119a79dfcbf09ad872b3e98507afc30388..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_interfaces_type_enumeration.go +++ /dev/null @@ -1,63 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/validate" -) - -// CienaWaveserverInterfacesTypeEnumeration ciena waveserver interfaces type enumeration -// -// swagger:model ciena.waveserver.interfaces.TypeEnumeration -type CienaWaveserverInterfacesTypeEnumeration string - -const ( - - // CienaWaveserverInterfacesTypeEnumerationEthernet captures enum value "ethernet" - CienaWaveserverInterfacesTypeEnumerationEthernet CienaWaveserverInterfacesTypeEnumeration = "ethernet" - - // CienaWaveserverInterfacesTypeEnumerationSerial captures enum value "serial" - CienaWaveserverInterfacesTypeEnumerationSerial CienaWaveserverInterfacesTypeEnumeration = "serial" -) - -// for schema -var cienaWaveserverInterfacesTypeEnumerationEnum []interface{} - -func init() { - var res []CienaWaveserverInterfacesTypeEnumeration - if err := json.Unmarshal([]byte(`["ethernet","serial"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cienaWaveserverInterfacesTypeEnumerationEnum = append(cienaWaveserverInterfacesTypeEnumerationEnum, v) - } -} - -func (m CienaWaveserverInterfacesTypeEnumeration) validateCienaWaveserverInterfacesTypeEnumerationEnum(path, location string, value CienaWaveserverInterfacesTypeEnumeration) error { - if err := validate.EnumCase(path, location, value, cienaWaveserverInterfacesTypeEnumerationEnum, true); err != nil { - return err - } - return nil -} - -// Validate validates this ciena waveserver interfaces type enumeration -func (m CienaWaveserverInterfacesTypeEnumeration) Validate(formats strfmt.Registry) error { - var res []error - - // value enum - if err := m.validateCienaWaveserverInterfacesTypeEnumerationEnum("", "body", m); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/waveserver/models/ciena_waveserver_interfaces_waveserver_interfaces.go b/waveserver/models/ciena_waveserver_interfaces_waveserver_interfaces.go deleted file mode 100644 index 82d5899404808f3ab6723e27c5523e98e49950ff..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_interfaces_waveserver_interfaces.go +++ /dev/null @@ -1,137 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CienaWaveserverInterfacesWaveserverInterfaces ciena waveserver interfaces waveserver interfaces -// -// swagger:model ciena.waveserver.interfaces.WaveserverInterfaces -type CienaWaveserverInterfacesWaveserverInterfaces struct { - - // List of logical IP management interfaces (e.g. 'local'). - LogicalInterface []*CienaWaveserverInterfacesWaveserverinterfacesLogicalInterface `json:"logical-interface"` - - // List of physical Ethernet management interfaces. - PhysicalInterface []*CienaWaveserverInterfacesWaveserverinterfacesPhysicalInterface `json:"physical-interface"` - - // Top-level container for IP route configuration and operational data. - Routes *CienaWaveserverInterfacesWaveserverinterfacesRoutes `json:"routes,omitempty"` -} - -// Validate validates this ciena waveserver interfaces waveserver interfaces -func (m *CienaWaveserverInterfacesWaveserverInterfaces) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLogicalInterface(formats); err != nil { - res = append(res, err) - } - - if err := m.validatePhysicalInterface(formats); err != nil { - res = append(res, err) - } - - if err := m.validateRoutes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CienaWaveserverInterfacesWaveserverInterfaces) validateLogicalInterface(formats strfmt.Registry) error { - - if swag.IsZero(m.LogicalInterface) { // not required - return nil - } - - for i := 0; i < len(m.LogicalInterface); i++ { - if swag.IsZero(m.LogicalInterface[i]) { // not required - continue - } - - if m.LogicalInterface[i] != nil { - if err := m.LogicalInterface[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logical-interface" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CienaWaveserverInterfacesWaveserverInterfaces) validatePhysicalInterface(formats strfmt.Registry) error { - - if swag.IsZero(m.PhysicalInterface) { // not required - return nil - } - - for i := 0; i < len(m.PhysicalInterface); i++ { - if swag.IsZero(m.PhysicalInterface[i]) { // not required - continue - } - - if m.PhysicalInterface[i] != nil { - if err := m.PhysicalInterface[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physical-interface" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -func (m *CienaWaveserverInterfacesWaveserverInterfaces) validateRoutes(formats strfmt.Registry) error { - - if swag.IsZero(m.Routes) { // not required - return nil - } - - if m.Routes != nil { - if err := m.Routes.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("routes") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverInterfaces) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverInterfaces) UnmarshalBinary(b []byte) error { - var res CienaWaveserverInterfacesWaveserverInterfaces - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/waveserver/models/ciena_waveserver_interfaces_waveserver_interfaces_wrapper.go b/waveserver/models/ciena_waveserver_interfaces_waveserver_interfaces_wrapper.go deleted file mode 100644 index a7f988fe9c16d4e15176f7973758c4237e03e90a..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_interfaces_waveserver_interfaces_wrapper.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CienaWaveserverInterfacesWaveserverInterfacesWrapper ciena waveserver interfaces waveserver interfaces wrapper -// -// swagger:model ciena.waveserver.interfaces.WaveserverInterfacesWrapper -type CienaWaveserverInterfacesWaveserverInterfacesWrapper struct { - - // waveserver interfaces - WaveserverInterfaces *CienaWaveserverInterfacesWaveserverInterfaces `json:"waveserver-interfaces,omitempty"` -} - -// Validate validates this ciena waveserver interfaces waveserver interfaces wrapper -func (m *CienaWaveserverInterfacesWaveserverInterfacesWrapper) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateWaveserverInterfaces(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CienaWaveserverInterfacesWaveserverInterfacesWrapper) validateWaveserverInterfaces(formats strfmt.Registry) error { - - if swag.IsZero(m.WaveserverInterfaces) { // not required - return nil - } - - if m.WaveserverInterfaces != nil { - if err := m.WaveserverInterfaces.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("waveserver-interfaces") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverInterfacesWrapper) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverInterfacesWrapper) UnmarshalBinary(b []byte) error { - var res CienaWaveserverInterfacesWaveserverInterfacesWrapper - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_logical_interface.go b/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_logical_interface.go deleted file mode 100644 index a5180cc9d44edb7bf4d71d3cdcebbac25443232b..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_logical_interface.go +++ /dev/null @@ -1,124 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CienaWaveserverInterfacesWaveserverinterfacesLogicalInterface ciena waveserver interfaces waveserverinterfaces logical interface -// -// swagger:model ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface -type CienaWaveserverInterfacesWaveserverinterfacesLogicalInterface struct { - - // Identification information of this logical management interface. - ID *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceID `json:"id,omitempty"` - - // References the system-assigned index of the logical interface. - Index int64 `json:"index,omitempty"` - - // All the configuration data of the logical management interface. - Properties *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceProperties `json:"properties,omitempty"` - - // Logical interface state information. - State *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceState `json:"state,omitempty"` -} - -// Validate validates this ciena waveserver interfaces waveserverinterfaces logical interface -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalInterface) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProperties(formats); err != nil { - res = append(res, err) - } - - if err := m.validateState(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalInterface) validateID(formats strfmt.Registry) error { - - if swag.IsZero(m.ID) { // not required - return nil - } - - if m.ID != nil { - if err := m.ID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("id") - } - return err - } - } - - return nil -} - -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalInterface) validateProperties(formats strfmt.Registry) error { - - if swag.IsZero(m.Properties) { // not required - return nil - } - - if m.Properties != nil { - if err := m.Properties.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("properties") - } - return err - } - } - - return nil -} - -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalInterface) validateState(formats strfmt.Registry) error { - - if swag.IsZero(m.State) { // not required - return nil - } - - if m.State != nil { - if err := m.State.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("state") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalInterface) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalInterface) UnmarshalBinary(b []byte) error { - var res CienaWaveserverInterfacesWaveserverinterfacesLogicalInterface - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_logical_interface_wrapper.go b/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_logical_interface_wrapper.go deleted file mode 100644 index 96ab113811b4db0da6e20a273239b2de99dc1878..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_logical_interface_wrapper.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CienaWaveserverInterfacesWaveserverinterfacesLogicalInterfaceWrapper ciena waveserver interfaces waveserverinterfaces logical interface wrapper -// -// swagger:model ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterfaceWrapper -type CienaWaveserverInterfacesWaveserverinterfacesLogicalInterfaceWrapper struct { - - // logical interface - LogicalInterface *CienaWaveserverInterfacesWaveserverinterfacesLogicalInterface `json:"logical-interface,omitempty"` -} - -// Validate validates this ciena waveserver interfaces waveserverinterfaces logical interface wrapper -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalInterfaceWrapper) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateLogicalInterface(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalInterfaceWrapper) validateLogicalInterface(formats strfmt.Registry) error { - - if swag.IsZero(m.LogicalInterface) { // not required - return nil - } - - if m.LogicalInterface != nil { - if err := m.LogicalInterface.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("logical-interface") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalInterfaceWrapper) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalInterfaceWrapper) UnmarshalBinary(b []byte) error { - var res CienaWaveserverInterfacesWaveserverinterfacesLogicalInterfaceWrapper - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_logicalinterface_id.go b/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_logicalinterface_id.go deleted file mode 100644 index a6f7dd400d08cf91b810ec53cd07e7e2d97f0b35..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_logicalinterface_id.go +++ /dev/null @@ -1,52 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceID ciena waveserver interfaces waveserverinterfaces logicalinterface Id -// -// swagger:model ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id -type CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceID struct { - - // The system-assigned interface index number, corresponding to the - // ifIndex in SNMP IF-MIB. REF:RFC 2863 - The Interfaces Group MIB - Ifindex int64 `json:"ifindex,omitempty"` - - // The index of the logical management interface. Waveserver supports - // a single logical interface 'local' that is automatically created by - // the system. The default index is 1 for the 'local' interface. - Index int64 `json:"index,omitempty"` - - // The name of the logical management interface, e.g. 'local'. - Name string `json:"name,omitempty"` -} - -// Validate validates this ciena waveserver interfaces waveserverinterfaces logicalinterface Id -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceID) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceID) UnmarshalBinary(b []byte) error { - var res CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_logicalinterface_id_wrapper.go b/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_logicalinterface_id_wrapper.go deleted file mode 100644 index dfef9246432e0e702e487b12536236cbb03c56fc..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_logicalinterface_id_wrapper.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceIDWrapper ciena waveserver interfaces waveserverinterfaces logicalinterface Id wrapper -// -// swagger:model ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.IdWrapper -type CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceIDWrapper struct { - - // id - ID *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceID `json:"id,omitempty"` -} - -// Validate validates this ciena waveserver interfaces waveserverinterfaces logicalinterface Id wrapper -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceIDWrapper) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceIDWrapper) validateID(formats strfmt.Registry) error { - - if swag.IsZero(m.ID) { // not required - return nil - } - - if m.ID != nil { - if err := m.ID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("id") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceIDWrapper) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceIDWrapper) UnmarshalBinary(b []byte) error { - var res CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceIDWrapper - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_logicalinterface_properties.go b/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_logicalinterface_properties.go deleted file mode 100644 index 46866b7d9def7552608ca1ef31cb3db9ff15dcc3..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_logicalinterface_properties.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceProperties ciena waveserver interfaces waveserverinterfaces logicalinterface properties -// -// swagger:model ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties -type CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceProperties struct { - - // IPv4 configuration and operational data. - IPV4 *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesIPV4 `json:"ipv4,omitempty"` -} - -// Validate validates this ciena waveserver interfaces waveserverinterfaces logicalinterface properties -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceProperties) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIPV4(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceProperties) validateIPV4(formats strfmt.Registry) error { - - if swag.IsZero(m.IPV4) { // not required - return nil - } - - if m.IPV4 != nil { - if err := m.IPV4.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ipv4") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceProperties) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceProperties) UnmarshalBinary(b []byte) error { - var res CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceProperties - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_logicalinterface_properties_ip_v4.go b/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_logicalinterface_properties_ip_v4.go deleted file mode 100644 index 00892ab9f27810a9ee32c8ac9148086bee5578d4..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_logicalinterface_properties_ip_v4.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesIPV4 ciena waveserver interfaces waveserverinterfaces logicalinterface properties Ipv4 -// -// swagger:model ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4 -type CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesIPV4 struct { - - // Whether IPv4 stack is enabled or disabled on this interface. - // Always enabled for the local management interface. - AdminState CienaWaveserverTypedefsEnabledDisabledEnum `json:"admin-state,omitempty"` - - // The Automatic Private IP Addressing (APIPA) assigned IPv4 address - // and prefix on the interface. - ApipaIPAddress string `json:"apipa-ip-address,omitempty"` - - // The user-configured backup IPv4 gateway on the interface. - BackupGateway string `json:"backup-gateway,omitempty"` - - // The DHCP-assigned IPv4 gateway on the interface. - DhcpGateway string `json:"dhcp-gateway,omitempty"` - - // The DHCP-assigned IPv4 address and prefix on the interface. - DhcpIPAddress string `json:"dhcp-ip-address,omitempty"` - - // The operational IPv4 gateway on the interface. - OperGateway string `json:"oper-gateway,omitempty"` - - // The operational IPv4 address and prefix on the interface. - OperIPAddress string `json:"oper-ip-address,omitempty"` - - // The user-configured primary IPv4 gateway on the interface. - UserGateway string `json:"user-gateway,omitempty"` - - // The user-configured IPv4 address and prefix on the interface. - UserIPAddress string `json:"user-ip-address,omitempty"` -} - -// Validate validates this ciena waveserver interfaces waveserverinterfaces logicalinterface properties Ipv4 -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesIPV4) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAdminState(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesIPV4) validateAdminState(formats strfmt.Registry) error { - - if swag.IsZero(m.AdminState) { // not required - return nil - } - - if err := m.AdminState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("admin-state") - } - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesIPV4) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesIPV4) UnmarshalBinary(b []byte) error { - var res CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesIPV4 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_logicalinterface_properties_ip_v4_wrapper.go b/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_logicalinterface_properties_ip_v4_wrapper.go deleted file mode 100644 index 993b13fc45d8211a08dcfeeacfb704f6597b9276..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_logicalinterface_properties_ip_v4_wrapper.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesIPV4Wrapper ciena waveserver interfaces waveserverinterfaces logicalinterface properties Ipv4 wrapper -// -// swagger:model ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4Wrapper -type CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesIPV4Wrapper struct { - - // ipv4 - IPV4 *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesIPV4 `json:"ipv4,omitempty"` -} - -// Validate validates this ciena waveserver interfaces waveserverinterfaces logicalinterface properties Ipv4 wrapper -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesIPV4Wrapper) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIPV4(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesIPV4Wrapper) validateIPV4(formats strfmt.Registry) error { - - if swag.IsZero(m.IPV4) { // not required - return nil - } - - if m.IPV4 != nil { - if err := m.IPV4.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ipv4") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesIPV4Wrapper) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesIPV4Wrapper) UnmarshalBinary(b []byte) error { - var res CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesIPV4Wrapper - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_logicalinterface_properties_wrapper.go b/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_logicalinterface_properties_wrapper.go deleted file mode 100644 index ba41ae966fe7aadb02d701becb48aa823099178d..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_logicalinterface_properties_wrapper.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesWrapper ciena waveserver interfaces waveserverinterfaces logicalinterface properties wrapper -// -// swagger:model ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.PropertiesWrapper -type CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesWrapper struct { - - // properties - Properties *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceProperties `json:"properties,omitempty"` -} - -// Validate validates this ciena waveserver interfaces waveserverinterfaces logicalinterface properties wrapper -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesWrapper) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProperties(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesWrapper) validateProperties(formats strfmt.Registry) error { - - if swag.IsZero(m.Properties) { // not required - return nil - } - - if m.Properties != nil { - if err := m.Properties.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("properties") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesWrapper) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesWrapper) UnmarshalBinary(b []byte) error { - var res CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesWrapper - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_logicalinterface_state.go b/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_logicalinterface_state.go deleted file mode 100644 index d65363acf3dae2a58762940cc5ec92c8b5eaf4c4..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_logicalinterface_state.go +++ /dev/null @@ -1,92 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceState ciena waveserver interfaces waveserverinterfaces logicalinterface state -// -// swagger:model ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State -type CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceState struct { - - // Whether Admin State is enabled or disabled for this management interface. - AdminState CienaWaveserverTypedefsEnabledDisabledEnum `json:"admin-state,omitempty"` - - // Operational state of this management interface. - OperationalState CienaWaveserverTypedefsUpDownEnum `json:"operational-state,omitempty"` -} - -// Validate validates this ciena waveserver interfaces waveserverinterfaces logicalinterface state -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceState) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAdminState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOperationalState(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceState) validateAdminState(formats strfmt.Registry) error { - - if swag.IsZero(m.AdminState) { // not required - return nil - } - - if err := m.AdminState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("admin-state") - } - return err - } - - return nil -} - -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceState) validateOperationalState(formats strfmt.Registry) error { - - if swag.IsZero(m.OperationalState) { // not required - return nil - } - - if err := m.OperationalState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("operational-state") - } - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceState) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceState) UnmarshalBinary(b []byte) error { - var res CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceState - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_logicalinterface_state_wrapper.go b/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_logicalinterface_state_wrapper.go deleted file mode 100644 index 6afd0823fa7368a1a7acceec396c3eac1edb305a..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_logicalinterface_state_wrapper.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceStateWrapper ciena waveserver interfaces waveserverinterfaces logicalinterface state wrapper -// -// swagger:model ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.StateWrapper -type CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceStateWrapper struct { - - // state - State *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceState `json:"state,omitempty"` -} - -// Validate validates this ciena waveserver interfaces waveserverinterfaces logicalinterface state wrapper -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceStateWrapper) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateState(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceStateWrapper) validateState(formats strfmt.Registry) error { - - if swag.IsZero(m.State) { // not required - return nil - } - - if m.State != nil { - if err := m.State.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("state") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceStateWrapper) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceStateWrapper) UnmarshalBinary(b []byte) error { - var res CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceStateWrapper - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_physical_interface.go b/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_physical_interface.go deleted file mode 100644 index fe7f3b75af48876519a115c798e898f52fd96634..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_physical_interface.go +++ /dev/null @@ -1,124 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CienaWaveserverInterfacesWaveserverinterfacesPhysicalInterface ciena waveserver interfaces waveserverinterfaces physical interface -// -// swagger:model ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface -type CienaWaveserverInterfacesWaveserverinterfacesPhysicalInterface struct { - - // Identification information of this management interface. - ID *CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceID `json:"id,omitempty"` - - // References the system-assigned name of the interface. - Name string `json:"name,omitempty"` - - // All the configuration data of the physical management interface. - Properties *CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceProperties `json:"properties,omitempty"` - - // Physical management interface state information. - State *CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceState `json:"state,omitempty"` -} - -// Validate validates this ciena waveserver interfaces waveserverinterfaces physical interface -func (m *CienaWaveserverInterfacesWaveserverinterfacesPhysicalInterface) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if err := m.validateProperties(formats); err != nil { - res = append(res, err) - } - - if err := m.validateState(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CienaWaveserverInterfacesWaveserverinterfacesPhysicalInterface) validateID(formats strfmt.Registry) error { - - if swag.IsZero(m.ID) { // not required - return nil - } - - if m.ID != nil { - if err := m.ID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("id") - } - return err - } - } - - return nil -} - -func (m *CienaWaveserverInterfacesWaveserverinterfacesPhysicalInterface) validateProperties(formats strfmt.Registry) error { - - if swag.IsZero(m.Properties) { // not required - return nil - } - - if m.Properties != nil { - if err := m.Properties.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("properties") - } - return err - } - } - - return nil -} - -func (m *CienaWaveserverInterfacesWaveserverinterfacesPhysicalInterface) validateState(formats strfmt.Registry) error { - - if swag.IsZero(m.State) { // not required - return nil - } - - if m.State != nil { - if err := m.State.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("state") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesPhysicalInterface) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesPhysicalInterface) UnmarshalBinary(b []byte) error { - var res CienaWaveserverInterfacesWaveserverinterfacesPhysicalInterface - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_physical_interface_wrapper.go b/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_physical_interface_wrapper.go deleted file mode 100644 index f10a697eae5b694af96b575d7956b6bcb37e0115..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_physical_interface_wrapper.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CienaWaveserverInterfacesWaveserverinterfacesPhysicalInterfaceWrapper ciena waveserver interfaces waveserverinterfaces physical interface wrapper -// -// swagger:model ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterfaceWrapper -type CienaWaveserverInterfacesWaveserverinterfacesPhysicalInterfaceWrapper struct { - - // physical interface - PhysicalInterface *CienaWaveserverInterfacesWaveserverinterfacesPhysicalInterface `json:"physical-interface,omitempty"` -} - -// Validate validates this ciena waveserver interfaces waveserverinterfaces physical interface wrapper -func (m *CienaWaveserverInterfacesWaveserverinterfacesPhysicalInterfaceWrapper) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validatePhysicalInterface(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CienaWaveserverInterfacesWaveserverinterfacesPhysicalInterfaceWrapper) validatePhysicalInterface(formats strfmt.Registry) error { - - if swag.IsZero(m.PhysicalInterface) { // not required - return nil - } - - if m.PhysicalInterface != nil { - if err := m.PhysicalInterface.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("physical-interface") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesPhysicalInterfaceWrapper) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesPhysicalInterfaceWrapper) UnmarshalBinary(b []byte) error { - var res CienaWaveserverInterfacesWaveserverinterfacesPhysicalInterfaceWrapper - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_physicalinterface_id.go b/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_physicalinterface_id.go deleted file mode 100644 index 4e33958579417d3e6bf1146cfa3a76a343eac00c..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_physicalinterface_id.go +++ /dev/null @@ -1,82 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceID ciena waveserver interfaces waveserverinterfaces physicalinterface Id -// -// swagger:model ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id -type CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceID struct { - - // Physical interface description, e.g. 'Management'. - Description string `json:"description,omitempty"` - - // The system-assigned interface index number, corresponding to the - // ifIndex in SNMP IF-MIB. REF:RFC 2863 - The Interfaces Group MIB - Ifindex int64 `json:"ifindex,omitempty"` - - // The system-assigned name of the physical interface (e.g. DCN, - // ILAN-1, ILAN-2). The names are predefined. - Name string `json:"name,omitempty"` - - // Management port type. If the port is DCN, ILAN-1, or ILAN-2, the - // port type will be 'ethernet'. If the port is Console, the port - // type will be 'serial'. REF:RFC 2863 - The Interfaces Group MIB - Type CienaWaveserverInterfacesTypeEnumeration `json:"type,omitempty"` -} - -// Validate validates this ciena waveserver interfaces waveserverinterfaces physicalinterface Id -func (m *CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceID) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateType(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceID) validateType(formats strfmt.Registry) error { - - if swag.IsZero(m.Type) { // not required - return nil - } - - if err := m.Type.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("type") - } - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceID) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceID) UnmarshalBinary(b []byte) error { - var res CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceID - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_physicalinterface_id_wrapper.go b/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_physicalinterface_id_wrapper.go deleted file mode 100644 index 297a5763d8cec71f4762d6e70ad39b0a2df53827..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_physicalinterface_id_wrapper.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceIDWrapper ciena waveserver interfaces waveserverinterfaces physicalinterface Id wrapper -// -// swagger:model ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.IdWrapper -type CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceIDWrapper struct { - - // id - ID *CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceID `json:"id,omitempty"` -} - -// Validate validates this ciena waveserver interfaces waveserverinterfaces physicalinterface Id wrapper -func (m *CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceIDWrapper) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateID(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceIDWrapper) validateID(formats strfmt.Registry) error { - - if swag.IsZero(m.ID) { // not required - return nil - } - - if m.ID != nil { - if err := m.ID.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("id") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceIDWrapper) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceIDWrapper) UnmarshalBinary(b []byte) error { - var res CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceIDWrapper - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_physicalinterface_properties.go b/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_physicalinterface_properties.go deleted file mode 100644 index 593b15e65ad9736ed4d3e96e8ba4082598b6b657..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_physicalinterface_properties.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceProperties ciena waveserver interfaces waveserverinterfaces physicalinterface properties -// -// swagger:model ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties -type CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceProperties struct { - - // Ethernet interface attributes. - Ethernet *CienaWaveserverInterfacesEthernetIfPropertiesGroup `json:"ethernet,omitempty"` - - // Management interface attributes. - Management *CienaWaveserverInterfacesManagementIfPropertiesGroup `json:"management,omitempty"` -} - -// Validate validates this ciena waveserver interfaces waveserverinterfaces physicalinterface properties -func (m *CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceProperties) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateEthernet(formats); err != nil { - res = append(res, err) - } - - if err := m.validateManagement(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceProperties) validateEthernet(formats strfmt.Registry) error { - - if swag.IsZero(m.Ethernet) { // not required - return nil - } - - if m.Ethernet != nil { - if err := m.Ethernet.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ethernet") - } - return err - } - } - - return nil -} - -func (m *CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceProperties) validateManagement(formats strfmt.Registry) error { - - if swag.IsZero(m.Management) { // not required - return nil - } - - if m.Management != nil { - if err := m.Management.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("management") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceProperties) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceProperties) UnmarshalBinary(b []byte) error { - var res CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceProperties - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_physicalinterface_properties_wrapper.go b/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_physicalinterface_properties_wrapper.go deleted file mode 100644 index 9b3d899fd3b066efa16a7bd783975621ee0dfc22..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_physicalinterface_properties_wrapper.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfacePropertiesWrapper ciena waveserver interfaces waveserverinterfaces physicalinterface properties wrapper -// -// swagger:model ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.PropertiesWrapper -type CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfacePropertiesWrapper struct { - - // properties - Properties *CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceProperties `json:"properties,omitempty"` -} - -// Validate validates this ciena waveserver interfaces waveserverinterfaces physicalinterface properties wrapper -func (m *CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfacePropertiesWrapper) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateProperties(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfacePropertiesWrapper) validateProperties(formats strfmt.Registry) error { - - if swag.IsZero(m.Properties) { // not required - return nil - } - - if m.Properties != nil { - if err := m.Properties.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("properties") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfacePropertiesWrapper) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfacePropertiesWrapper) UnmarshalBinary(b []byte) error { - var res CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfacePropertiesWrapper - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_physicalinterface_state.go b/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_physicalinterface_state.go deleted file mode 100644 index 0318571837852d109efa00e7c819c415dd04c57f..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_physicalinterface_state.go +++ /dev/null @@ -1,92 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceState ciena waveserver interfaces waveserverinterfaces physicalinterface state -// -// swagger:model ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State -type CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceState struct { - - // Whether Admin State is enabled or disabled for this management interface. - AdminState CienaWaveserverTypedefsEnabledDisabledEnum `json:"admin-state,omitempty"` - - // Operational state of this management interface. - OperationalState CienaWaveserverTypedefsUpDownEnum `json:"operational-state,omitempty"` -} - -// Validate validates this ciena waveserver interfaces waveserverinterfaces physicalinterface state -func (m *CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceState) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateAdminState(formats); err != nil { - res = append(res, err) - } - - if err := m.validateOperationalState(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceState) validateAdminState(formats strfmt.Registry) error { - - if swag.IsZero(m.AdminState) { // not required - return nil - } - - if err := m.AdminState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("admin-state") - } - return err - } - - return nil -} - -func (m *CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceState) validateOperationalState(formats strfmt.Registry) error { - - if swag.IsZero(m.OperationalState) { // not required - return nil - } - - if err := m.OperationalState.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("operational-state") - } - return err - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceState) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceState) UnmarshalBinary(b []byte) error { - var res CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceState - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_physicalinterface_state_wrapper.go b/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_physicalinterface_state_wrapper.go deleted file mode 100644 index de66599e7390ea46945dd4b601d5ed5355214d0e..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_physicalinterface_state_wrapper.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceStateWrapper ciena waveserver interfaces waveserverinterfaces physicalinterface state wrapper -// -// swagger:model ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.StateWrapper -type CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceStateWrapper struct { - - // state - State *CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceState `json:"state,omitempty"` -} - -// Validate validates this ciena waveserver interfaces waveserverinterfaces physicalinterface state wrapper -func (m *CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceStateWrapper) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateState(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceStateWrapper) validateState(formats strfmt.Registry) error { - - if swag.IsZero(m.State) { // not required - return nil - } - - if m.State != nil { - if err := m.State.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("state") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceStateWrapper) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceStateWrapper) UnmarshalBinary(b []byte) error { - var res CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceStateWrapper - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_routes.go b/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_routes.go deleted file mode 100644 index ff569d7585e0f6125a4166f679e941cf59f285b7..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_routes.go +++ /dev/null @@ -1,80 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CienaWaveserverInterfacesWaveserverinterfacesRoutes ciena waveserver interfaces waveserverinterfaces routes -// -// swagger:model ciena.waveserver.interfaces.waveserverinterfaces.Routes -type CienaWaveserverInterfacesWaveserverinterfacesRoutes struct { - - // List of IPv4 static routing entries. - IPV4StaticRoute []*CienaWaveserverInterfacesWaveserverinterfacesRoutesIPV4StaticRoute `json:"ipv4-static-route"` -} - -// Validate validates this ciena waveserver interfaces waveserverinterfaces routes -func (m *CienaWaveserverInterfacesWaveserverinterfacesRoutes) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIPV4StaticRoute(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CienaWaveserverInterfacesWaveserverinterfacesRoutes) validateIPV4StaticRoute(formats strfmt.Registry) error { - - if swag.IsZero(m.IPV4StaticRoute) { // not required - return nil - } - - for i := 0; i < len(m.IPV4StaticRoute); i++ { - if swag.IsZero(m.IPV4StaticRoute[i]) { // not required - continue - } - - if m.IPV4StaticRoute[i] != nil { - if err := m.IPV4StaticRoute[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ipv4-static-route" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesRoutes) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesRoutes) UnmarshalBinary(b []byte) error { - var res CienaWaveserverInterfacesWaveserverinterfacesRoutes - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_routes_ip_v4_static_route.go b/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_routes_ip_v4_static_route.go deleted file mode 100644 index 5b80eeada7a3b24d979b4105220d11c417ec5656..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_routes_ip_v4_static_route.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "strconv" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CienaWaveserverInterfacesWaveserverinterfacesRoutesIPV4StaticRoute ciena waveserver interfaces waveserverinterfaces routes Ipv4 static route -// -// swagger:model ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute -type CienaWaveserverInterfacesWaveserverinterfacesRoutesIPV4StaticRoute struct { - - // IPv4 route destination prefix for the static route. Only one static - // routing entry per unique destination ip/prefix can be configured. - Destination string `json:"destination,omitempty"` - - // A list of next-hop entries associated with the static route. - NextHop []*CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHop `json:"next-hop"` -} - -// Validate validates this ciena waveserver interfaces waveserverinterfaces routes Ipv4 static route -func (m *CienaWaveserverInterfacesWaveserverinterfacesRoutesIPV4StaticRoute) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNextHop(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CienaWaveserverInterfacesWaveserverinterfacesRoutesIPV4StaticRoute) validateNextHop(formats strfmt.Registry) error { - - if swag.IsZero(m.NextHop) { // not required - return nil - } - - for i := 0; i < len(m.NextHop); i++ { - if swag.IsZero(m.NextHop[i]) { // not required - continue - } - - if m.NextHop[i] != nil { - if err := m.NextHop[i].Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("next-hop" + "." + strconv.Itoa(i)) - } - return err - } - } - - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesRoutesIPV4StaticRoute) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesRoutesIPV4StaticRoute) UnmarshalBinary(b []byte) error { - var res CienaWaveserverInterfacesWaveserverinterfacesRoutesIPV4StaticRoute - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_routes_ip_v4_static_route_wrapper.go b/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_routes_ip_v4_static_route_wrapper.go deleted file mode 100644 index 611143fa12a5a6d399544f40627c6a8e1b6eba43..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_routes_ip_v4_static_route_wrapper.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CienaWaveserverInterfacesWaveserverinterfacesRoutesIPV4StaticRouteWrapper ciena waveserver interfaces waveserverinterfaces routes Ipv4 static route wrapper -// -// swagger:model ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRouteWrapper -type CienaWaveserverInterfacesWaveserverinterfacesRoutesIPV4StaticRouteWrapper struct { - - // ipv4 static route - IPV4StaticRoute *CienaWaveserverInterfacesWaveserverinterfacesRoutesIPV4StaticRoute `json:"ipv4-static-route,omitempty"` -} - -// Validate validates this ciena waveserver interfaces waveserverinterfaces routes Ipv4 static route wrapper -func (m *CienaWaveserverInterfacesWaveserverinterfacesRoutesIPV4StaticRouteWrapper) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateIPV4StaticRoute(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CienaWaveserverInterfacesWaveserverinterfacesRoutesIPV4StaticRouteWrapper) validateIPV4StaticRoute(formats strfmt.Registry) error { - - if swag.IsZero(m.IPV4StaticRoute) { // not required - return nil - } - - if m.IPV4StaticRoute != nil { - if err := m.IPV4StaticRoute.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("ipv4-static-route") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesRoutesIPV4StaticRouteWrapper) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesRoutesIPV4StaticRouteWrapper) UnmarshalBinary(b []byte) error { - var res CienaWaveserverInterfacesWaveserverinterfacesRoutesIPV4StaticRouteWrapper - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_routes_ipv4staticroute_next_hop.go b/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_routes_ipv4staticroute_next_hop.go deleted file mode 100644 index dee864820d8c8240c549c7814ce211a2540c5e42..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_routes_ipv4staticroute_next_hop.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHop ciena waveserver interfaces waveserverinterfaces routes ipv4staticroute next hop -// -// swagger:model ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop -type CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHop struct { - CienaWaveserverInterfacesRouteNextHopGroup - - CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHopAllOf1 -} - -// UnmarshalJSON unmarshals this object from a JSON structure -func (m *CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHop) UnmarshalJSON(raw []byte) error { - // AO0 - var aO0 CienaWaveserverInterfacesRouteNextHopGroup - if err := swag.ReadJSON(raw, &aO0); err != nil { - return err - } - m.CienaWaveserverInterfacesRouteNextHopGroup = aO0 - - // AO1 - var aO1 CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHopAllOf1 - if err := swag.ReadJSON(raw, &aO1); err != nil { - return err - } - m.CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHopAllOf1 = aO1 - - return nil -} - -// MarshalJSON marshals this object to a JSON structure -func (m CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHop) MarshalJSON() ([]byte, error) { - _parts := make([][]byte, 0, 2) - - aO0, err := swag.WriteJSON(m.CienaWaveserverInterfacesRouteNextHopGroup) - if err != nil { - return nil, err - } - _parts = append(_parts, aO0) - - aO1, err := swag.WriteJSON(m.CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHopAllOf1) - if err != nil { - return nil, err - } - _parts = append(_parts, aO1) - return swag.ConcatJSON(_parts...), nil -} - -// Validate validates this ciena waveserver interfaces waveserverinterfaces routes ipv4staticroute next hop -func (m *CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHop) Validate(formats strfmt.Registry) error { - var res []error - - // validation for a type composition with CienaWaveserverInterfacesRouteNextHopGroup - if err := m.CienaWaveserverInterfacesRouteNextHopGroup.Validate(formats); err != nil { - res = append(res, err) - } - // validation for a type composition with CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHopAllOf1 - if err := m.CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHopAllOf1.Validate(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// MarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHop) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHop) UnmarshalBinary(b []byte) error { - var res CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHop - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_routes_ipv4staticroute_next_hop_all_of1.go b/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_routes_ipv4staticroute_next_hop_all_of1.go deleted file mode 100644 index 590da40778c4cee6ad68f1f210daa50652c8cb90..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_routes_ipv4staticroute_next_hop_all_of1.go +++ /dev/null @@ -1,50 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHopAllOf1 A list of next-hop entries associated with the static route. -// -// swagger:model cienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHopAllOf1 -type CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHopAllOf1 struct { - - // The index key of the entry in the next-hop list. Currently only - // one static entry is supported per destination prefix, so the - // index should always be 1. - Index int64 `json:"index,omitempty"` - - // IPv4 route next-hop or gateway address associated with the route. If - // not specified, the default gateway value for the local management - // interface will be used. - IPAddress string `json:"ip-address,omitempty"` -} - -// Validate validates this ciena waveserver interfaces waveserverinterfaces routes ipv4staticroute next hop all of1 -func (m *CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHopAllOf1) Validate(formats strfmt.Registry) error { - return nil -} - -// MarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHopAllOf1) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHopAllOf1) UnmarshalBinary(b []byte) error { - var res CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHopAllOf1 - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_routes_ipv4staticroute_next_hop_wrapper.go b/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_routes_ipv4staticroute_next_hop_wrapper.go deleted file mode 100644 index 610c94fd60dcf8ac8d212b48a91d4b20ee1b99e1..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_routes_ipv4staticroute_next_hop_wrapper.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHopWrapper ciena waveserver interfaces waveserverinterfaces routes ipv4staticroute next hop wrapper -// -// swagger:model ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHopWrapper -type CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHopWrapper struct { - - // next hop - NextHop *CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHop `json:"next-hop,omitempty"` -} - -// Validate validates this ciena waveserver interfaces waveserverinterfaces routes ipv4staticroute next hop wrapper -func (m *CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHopWrapper) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateNextHop(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHopWrapper) validateNextHop(formats strfmt.Registry) error { - - if swag.IsZero(m.NextHop) { // not required - return nil - } - - if m.NextHop != nil { - if err := m.NextHop.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("next-hop") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHopWrapper) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHopWrapper) UnmarshalBinary(b []byte) error { - var res CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHopWrapper - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_routes_wrapper.go b/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_routes_wrapper.go deleted file mode 100644 index da3a1572119bbbbe18006d74fbe84126bc49b906..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_interfaces_waveserverinterfaces_routes_wrapper.go +++ /dev/null @@ -1,71 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// CienaWaveserverInterfacesWaveserverinterfacesRoutesWrapper ciena waveserver interfaces waveserverinterfaces routes wrapper -// -// swagger:model ciena.waveserver.interfaces.waveserverinterfaces.RoutesWrapper -type CienaWaveserverInterfacesWaveserverinterfacesRoutesWrapper struct { - - // routes - Routes *CienaWaveserverInterfacesWaveserverinterfacesRoutes `json:"routes,omitempty"` -} - -// Validate validates this ciena waveserver interfaces waveserverinterfaces routes wrapper -func (m *CienaWaveserverInterfacesWaveserverinterfacesRoutesWrapper) Validate(formats strfmt.Registry) error { - var res []error - - if err := m.validateRoutes(formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -func (m *CienaWaveserverInterfacesWaveserverinterfacesRoutesWrapper) validateRoutes(formats strfmt.Registry) error { - - if swag.IsZero(m.Routes) { // not required - return nil - } - - if m.Routes != nil { - if err := m.Routes.Validate(formats); err != nil { - if ve, ok := err.(*errors.Validation); ok { - return ve.ValidateName("routes") - } - return err - } - } - - return nil -} - -// MarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesRoutesWrapper) MarshalBinary() ([]byte, error) { - if m == nil { - return nil, nil - } - return swag.WriteJSON(m) -} - -// UnmarshalBinary interface implementation -func (m *CienaWaveserverInterfacesWaveserverinterfacesRoutesWrapper) UnmarshalBinary(b []byte) error { - var res CienaWaveserverInterfacesWaveserverinterfacesRoutesWrapper - if err := swag.ReadJSON(b, &res); err != nil { - return err - } - *m = res - return nil -} diff --git a/waveserver/models/ciena_waveserver_typedefs_enabled_disabled_enum.go b/waveserver/models/ciena_waveserver_typedefs_enabled_disabled_enum.go deleted file mode 100644 index 6c97b01f2b64a4b138219903257409a22817ea83..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_typedefs_enabled_disabled_enum.go +++ /dev/null @@ -1,63 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/validate" -) - -// CienaWaveserverTypedefsEnabledDisabledEnum ciena waveserver typedefs enabled disabled enum -// -// swagger:model ciena.waveserver.typedefs.EnabledDisabledEnum -type CienaWaveserverTypedefsEnabledDisabledEnum string - -const ( - - // CienaWaveserverTypedefsEnabledDisabledEnumDisabled captures enum value "disabled" - CienaWaveserverTypedefsEnabledDisabledEnumDisabled CienaWaveserverTypedefsEnabledDisabledEnum = "disabled" - - // CienaWaveserverTypedefsEnabledDisabledEnumEnabled captures enum value "enabled" - CienaWaveserverTypedefsEnabledDisabledEnumEnabled CienaWaveserverTypedefsEnabledDisabledEnum = "enabled" -) - -// for schema -var cienaWaveserverTypedefsEnabledDisabledEnumEnum []interface{} - -func init() { - var res []CienaWaveserverTypedefsEnabledDisabledEnum - if err := json.Unmarshal([]byte(`["disabled","enabled"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cienaWaveserverTypedefsEnabledDisabledEnumEnum = append(cienaWaveserverTypedefsEnabledDisabledEnumEnum, v) - } -} - -func (m CienaWaveserverTypedefsEnabledDisabledEnum) validateCienaWaveserverTypedefsEnabledDisabledEnumEnum(path, location string, value CienaWaveserverTypedefsEnabledDisabledEnum) error { - if err := validate.EnumCase(path, location, value, cienaWaveserverTypedefsEnabledDisabledEnumEnum, true); err != nil { - return err - } - return nil -} - -// Validate validates this ciena waveserver typedefs enabled disabled enum -func (m CienaWaveserverTypedefsEnabledDisabledEnum) Validate(formats strfmt.Registry) error { - var res []error - - // value enum - if err := m.validateCienaWaveserverTypedefsEnabledDisabledEnumEnum("", "body", m); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/waveserver/models/ciena_waveserver_typedefs_up_down_enum.go b/waveserver/models/ciena_waveserver_typedefs_up_down_enum.go deleted file mode 100644 index 1aa82eda80621cb7adae4ac28109a0bee961c213..0000000000000000000000000000000000000000 --- a/waveserver/models/ciena_waveserver_typedefs_up_down_enum.go +++ /dev/null @@ -1,63 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package models - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" - - "github.com/go-openapi/errors" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/validate" -) - -// CienaWaveserverTypedefsUpDownEnum ciena waveserver typedefs up down enum -// -// swagger:model ciena.waveserver.typedefs.UpDownEnum -type CienaWaveserverTypedefsUpDownEnum string - -const ( - - // CienaWaveserverTypedefsUpDownEnumDown captures enum value "down" - CienaWaveserverTypedefsUpDownEnumDown CienaWaveserverTypedefsUpDownEnum = "down" - - // CienaWaveserverTypedefsUpDownEnumUp captures enum value "up" - CienaWaveserverTypedefsUpDownEnumUp CienaWaveserverTypedefsUpDownEnum = "up" -) - -// for schema -var cienaWaveserverTypedefsUpDownEnumEnum []interface{} - -func init() { - var res []CienaWaveserverTypedefsUpDownEnum - if err := json.Unmarshal([]byte(`["down","up"]`), &res); err != nil { - panic(err) - } - for _, v := range res { - cienaWaveserverTypedefsUpDownEnumEnum = append(cienaWaveserverTypedefsUpDownEnumEnum, v) - } -} - -func (m CienaWaveserverTypedefsUpDownEnum) validateCienaWaveserverTypedefsUpDownEnumEnum(path, location string, value CienaWaveserverTypedefsUpDownEnum) error { - if err := validate.EnumCase(path, location, value, cienaWaveserverTypedefsUpDownEnumEnum, true); err != nil { - return err - } - return nil -} - -// Validate validates this ciena waveserver typedefs up down enum -func (m CienaWaveserverTypedefsUpDownEnum) Validate(formats strfmt.Registry) error { - var res []error - - // value enum - if err := m.validateCienaWaveserverTypedefsUpDownEnumEnum("", "body", m); err != nil { - return err - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/waveserver/restapi/configure_cocsn.go b/waveserver/restapi/configure_cocsn.go deleted file mode 100644 index c780745f30f5f366cdb5007efe28d6409e7240f0..0000000000000000000000000000000000000000 --- a/waveserver/restapi/configure_cocsn.go +++ /dev/null @@ -1,371 +0,0 @@ -// This file is safe to edit. Once it exists it will not be overwritten - -package restapi - -import ( - "crypto/tls" - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/restapi/operations" - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/restapi/operations/ciena_waveserver_interfaces" -) - -//go:generate swagger generate server --target ../../waveserver --name Cocsn --spec ../ws-if.yml --principal interface{} - -func configureFlags(api *operations.CocsnAPI) { - // api.CommandLineOptionsGroups = []swag.CommandLineOptionsGroup{ ... } -} - -func configureAPI(api *operations.CocsnAPI) http.Handler { - // configure the api here - api.ServeError = errors.ServeError - - // Set your custom logger if needed. Default one is log.Printf - // Expected interface func(string, ...interface{}) - // - // Example: - // api.Logger = log.Printf - - api.UseSwaggerUI() - // To continue using redoc as your UI, uncomment the following line - // api.UseRedoc() - - api.JSONConsumer = runtime.JSONConsumer() - - api.JSONProducer = runtime.JSONProducer() - - if api.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesHandler == nil { - api.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesHandler = ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesHandlerFunc(func(params ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.DeleteDataWaveserverInterfaces has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesLogicalInterfaceIndexHandler == nil { - api.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesLogicalInterfaceIndexHandler = ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexHandlerFunc(func(params ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndex has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesLogicalInterfaceIndexIDHandler == nil { - api.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesLogicalInterfaceIndexIDHandler = ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDHandlerFunc(func(params ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexID has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler == nil { - api.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler = ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandlerFunc(func(params ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexProperties has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler == nil { - api.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler = ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4HandlerFunc(func(params ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4 has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesLogicalInterfaceIndexStateHandler == nil { - api.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesLogicalInterfaceIndexStateHandler = ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateHandlerFunc(func(params ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexState has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNameHandler == nil { - api.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNameHandler = ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNameHandlerFunc(func(params ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNameParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceName has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNameIDHandler == nil { - api.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNameIDHandler = ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDHandlerFunc(func(params ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNameID has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler == nil { - api.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler = ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandlerFunc(func(params ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNameProperties has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler == nil { - api.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler = ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandlerFunc(func(params ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler == nil { - api.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler = ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandlerFunc(func(params ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNameStateHandler == nil { - api.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNameStateHandler = ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateHandlerFunc(func(params ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNameState has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesRoutesHandler == nil { - api.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesRoutesHandler = ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesRoutesHandlerFunc(func(params ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesRoutesParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesRoutes has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler == nil { - api.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler = ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandlerFunc(func(params ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestination has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler == nil { - api.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler = ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandlerFunc(func(params ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndex has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesGetDataWaveserverInterfacesHandler == nil { - api.CienaWaveserverInterfacesGetDataWaveserverInterfacesHandler = ciena_waveserver_interfaces.GetDataWaveserverInterfacesHandlerFunc(func(params ciena_waveserver_interfaces.GetDataWaveserverInterfacesParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.GetDataWaveserverInterfaces has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesGetDataWaveserverInterfacesLogicalInterfaceIndexHandler == nil { - api.CienaWaveserverInterfacesGetDataWaveserverInterfacesLogicalInterfaceIndexHandler = ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexHandlerFunc(func(params ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndex has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesGetDataWaveserverInterfacesLogicalInterfaceIndexIDHandler == nil { - api.CienaWaveserverInterfacesGetDataWaveserverInterfacesLogicalInterfaceIndexIDHandler = ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexIDHandlerFunc(func(params ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexIDParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexID has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesGetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler == nil { - api.CienaWaveserverInterfacesGetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler = ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandlerFunc(func(params ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexProperties has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesGetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler == nil { - api.CienaWaveserverInterfacesGetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler = ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4HandlerFunc(func(params ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4 has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesGetDataWaveserverInterfacesLogicalInterfaceIndexStateHandler == nil { - api.CienaWaveserverInterfacesGetDataWaveserverInterfacesLogicalInterfaceIndexStateHandler = ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexStateHandlerFunc(func(params ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexStateParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexState has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNameHandler == nil { - api.CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNameHandler = ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNameHandlerFunc(func(params ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNameParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceName has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNameIDHandler == nil { - api.CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNameIDHandler = ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNameIDHandlerFunc(func(params ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNameIDParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNameID has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler == nil { - api.CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler = ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandlerFunc(func(params ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNameProperties has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler == nil { - api.CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler = ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandlerFunc(func(params ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler == nil { - api.CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler = ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandlerFunc(func(params ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNameStateHandler == nil { - api.CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNameStateHandler = ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNameStateHandlerFunc(func(params ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNameStateParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNameState has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesGetDataWaveserverInterfacesRoutesHandler == nil { - api.CienaWaveserverInterfacesGetDataWaveserverInterfacesRoutesHandler = ciena_waveserver_interfaces.GetDataWaveserverInterfacesRoutesHandlerFunc(func(params ciena_waveserver_interfaces.GetDataWaveserverInterfacesRoutesParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.GetDataWaveserverInterfacesRoutes has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesGetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler == nil { - api.CienaWaveserverInterfacesGetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler = ciena_waveserver_interfaces.GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandlerFunc(func(params ciena_waveserver_interfaces.GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestination has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesGetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler == nil { - api.CienaWaveserverInterfacesGetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler = ciena_waveserver_interfaces.GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandlerFunc(func(params ciena_waveserver_interfaces.GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndex has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesPostDataWaveserverInterfacesHandler == nil { - api.CienaWaveserverInterfacesPostDataWaveserverInterfacesHandler = ciena_waveserver_interfaces.PostDataWaveserverInterfacesHandlerFunc(func(params ciena_waveserver_interfaces.PostDataWaveserverInterfacesParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PostDataWaveserverInterfaces has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesPostDataWaveserverInterfacesLogicalInterfaceHandler == nil { - api.CienaWaveserverInterfacesPostDataWaveserverInterfacesLogicalInterfaceHandler = ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceHandlerFunc(func(params ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterface has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesPostDataWaveserverInterfacesLogicalInterfaceIndexIDHandler == nil { - api.CienaWaveserverInterfacesPostDataWaveserverInterfacesLogicalInterfaceIndexIDHandler = ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceIndexIDHandlerFunc(func(params ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceIndexIDParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceIndexID has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler == nil { - api.CienaWaveserverInterfacesPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler = ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandlerFunc(func(params ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceIndexProperties has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler == nil { - api.CienaWaveserverInterfacesPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler = ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4HandlerFunc(func(params ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4 has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesPostDataWaveserverInterfacesLogicalInterfaceIndexStateHandler == nil { - api.CienaWaveserverInterfacesPostDataWaveserverInterfacesLogicalInterfaceIndexStateHandler = ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceIndexStateHandlerFunc(func(params ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceIndexStateParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceIndexState has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceHandler == nil { - api.CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceHandler = ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceHandlerFunc(func(params ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterface has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceNameIDHandler == nil { - api.CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceNameIDHandler = ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNameIDHandlerFunc(func(params ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNameIDParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNameID has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler == nil { - api.CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler = ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandlerFunc(func(params ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNameProperties has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler == nil { - api.CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler = ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandlerFunc(func(params ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler == nil { - api.CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler = ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandlerFunc(func(params ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceNameStateHandler == nil { - api.CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceNameStateHandler = ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNameStateHandlerFunc(func(params ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNameStateParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNameState has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesPostDataWaveserverInterfacesRoutesHandler == nil { - api.CienaWaveserverInterfacesPostDataWaveserverInterfacesRoutesHandler = ciena_waveserver_interfaces.PostDataWaveserverInterfacesRoutesHandlerFunc(func(params ciena_waveserver_interfaces.PostDataWaveserverInterfacesRoutesParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PostDataWaveserverInterfacesRoutes has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesPostDataWaveserverInterfacesRoutesIPV4StaticRouteHandler == nil { - api.CienaWaveserverInterfacesPostDataWaveserverInterfacesRoutesIPV4StaticRouteHandler = ciena_waveserver_interfaces.PostDataWaveserverInterfacesRoutesIPV4StaticRouteHandlerFunc(func(params ciena_waveserver_interfaces.PostDataWaveserverInterfacesRoutesIPV4StaticRouteParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PostDataWaveserverInterfacesRoutesIPV4StaticRoute has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesPostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopHandler == nil { - api.CienaWaveserverInterfacesPostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopHandler = ciena_waveserver_interfaces.PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopHandlerFunc(func(params ciena_waveserver_interfaces.PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHop has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesPutDataWaveserverInterfacesHandler == nil { - api.CienaWaveserverInterfacesPutDataWaveserverInterfacesHandler = ciena_waveserver_interfaces.PutDataWaveserverInterfacesHandlerFunc(func(params ciena_waveserver_interfaces.PutDataWaveserverInterfacesParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PutDataWaveserverInterfaces has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesPutDataWaveserverInterfacesLogicalInterfaceIndexHandler == nil { - api.CienaWaveserverInterfacesPutDataWaveserverInterfacesLogicalInterfaceIndexHandler = ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexHandlerFunc(func(params ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndex has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesPutDataWaveserverInterfacesLogicalInterfaceIndexIDHandler == nil { - api.CienaWaveserverInterfacesPutDataWaveserverInterfacesLogicalInterfaceIndexIDHandler = ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexIDHandlerFunc(func(params ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexIDParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexID has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler == nil { - api.CienaWaveserverInterfacesPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler = ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandlerFunc(func(params ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexProperties has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler == nil { - api.CienaWaveserverInterfacesPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler = ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4HandlerFunc(func(params ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4 has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesPutDataWaveserverInterfacesLogicalInterfaceIndexStateHandler == nil { - api.CienaWaveserverInterfacesPutDataWaveserverInterfacesLogicalInterfaceIndexStateHandler = ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexStateHandlerFunc(func(params ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexStateParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexState has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNameHandler == nil { - api.CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNameHandler = ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNameHandlerFunc(func(params ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNameParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceName has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNameIDHandler == nil { - api.CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNameIDHandler = ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNameIDHandlerFunc(func(params ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNameIDParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNameID has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler == nil { - api.CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler = ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandlerFunc(func(params ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNameProperties has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler == nil { - api.CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler = ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandlerFunc(func(params ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler == nil { - api.CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler = ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandlerFunc(func(params ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNameStateHandler == nil { - api.CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNameStateHandler = ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNameStateHandlerFunc(func(params ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNameStateParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNameState has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesPutDataWaveserverInterfacesRoutesHandler == nil { - api.CienaWaveserverInterfacesPutDataWaveserverInterfacesRoutesHandler = ciena_waveserver_interfaces.PutDataWaveserverInterfacesRoutesHandlerFunc(func(params ciena_waveserver_interfaces.PutDataWaveserverInterfacesRoutesParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PutDataWaveserverInterfacesRoutes has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler == nil { - api.CienaWaveserverInterfacesPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler = ciena_waveserver_interfaces.PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandlerFunc(func(params ciena_waveserver_interfaces.PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestination has not yet been implemented") - }) - } - if api.CienaWaveserverInterfacesPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler == nil { - api.CienaWaveserverInterfacesPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler = ciena_waveserver_interfaces.PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandlerFunc(func(params ciena_waveserver_interfaces.PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndex has not yet been implemented") - }) - } - - api.PreServerShutdown = func() {} - - api.ServerShutdown = func() {} - - return setupGlobalMiddleware(api.Serve(setupMiddlewares)) -} - -// The TLS configuration before HTTPS server starts. -func configureTLS(tlsConfig *tls.Config) { - // Make all necessary changes to the TLS configuration here. -} - -// As soon as server is initialized but not run yet, this function will be called. -// If you need to modify a config, store server instance to stop it individually later, this is the place. -// This function can be called multiple times, depending on the number of serving schemes. -// scheme value will be set accordingly: "http", "https" or "unix" -func configureServer(s *http.Server, scheme, addr string) { -} - -// The middleware configuration is for the handler executors. These do not apply to the swagger.json document. -// The middleware executes after routing but before authentication, binding and validation -func setupMiddlewares(handler http.Handler) http.Handler { - return handler -} - -// The middleware configuration happens before anything, this middleware also applies to serving the swagger.json document. -// So this is a good place to plug in a panic handling middleware, logging and metrics -func setupGlobalMiddleware(handler http.Handler) http.Handler { - return handler -} diff --git a/waveserver/restapi/doc.go b/waveserver/restapi/doc.go deleted file mode 100644 index 7618b2ef9984ee5747149812a9d6d621770c8cf9..0000000000000000000000000000000000000000 --- a/waveserver/restapi/doc.go +++ /dev/null @@ -1,20 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -// Package restapi ciena-waveserver-interfaces API -// -// This module defines Ethernet and IP management interfaces support for -// Ciena's Waveserver Platform. -// Schemes: -// http -// Host: localhost:1234 -// BasePath: / -// Version: 1.0 -// -// Consumes: -// - application/yang-data+json -// -// Produces: -// - application/yang-data+json -// -// swagger:meta -package restapi diff --git a/waveserver/restapi/embedded_spec.go b/waveserver/restapi/embedded_spec.go deleted file mode 100644 index 3fc1f466bf289ab17b25da00e2667786a7f3fd8b..0000000000000000000000000000000000000000 --- a/waveserver/restapi/embedded_spec.go +++ /dev/null @@ -1,4604 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restapi - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "encoding/json" -) - -var ( - // SwaggerJSON embedded version of the swagger document used at generation time - SwaggerJSON json.RawMessage - // FlatSwaggerJSON embedded flattened version of the swagger document used at generation time - FlatSwaggerJSON json.RawMessage -) - -func init() { - SwaggerJSON = json.RawMessage([]byte(`{ - "consumes": [ - "application/yang-data+json" - ], - "produces": [ - "application/yang-data+json" - ], - "swagger": "2.0", - "info": { - "description": "This module defines Ethernet and IP management interfaces support for\n Ciena's Waveserver Platform.", - "title": "ciena-waveserver-interfaces API", - "version": "1.0" - }, - "host": "localhost:1234", - "paths": { - "/data/waveserver-interfaces/": { - "get": { - "description": "Top level container for configuration and operational data for physical\n and logical network interfaces.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "returns ciena.waveserver.interfaces.WaveserverInterfaces", - "responses": { - "200": { - "description": "ciena.waveserver.interfaces.WaveserverInterfaces", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.WaveserverInterfacesWrapper" - } - }, - "400": { - "description": "Internal error" - } - } - }, - "put": { - "description": "Top level container for configuration and operational data for physical\n and logical network interfaces.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates or updates ciena.waveserver.interfaces.WaveserverInterfaces", - "parameters": [ - { - "description": "ciena.waveserver.interfaces.WaveserverInterfaces to be added or updated", - "name": "ciena.waveserver.interfaces.WaveserverInterfaces.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.WaveserverInterfacesWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "204": { - "description": "Object modified" - }, - "400": { - "description": "Internal error" - } - } - }, - "post": { - "description": "Top level container for configuration and operational data for physical\n and logical network interfaces.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates ciena.waveserver.interfaces.WaveserverInterfaces", - "parameters": [ - { - "description": "ciena.waveserver.interfaces.WaveserverInterfaces to be added to list", - "name": "ciena.waveserver.interfaces.WaveserverInterfaces.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.WaveserverInterfacesWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "400": { - "description": "Internal error" - }, - "409": { - "description": "Object already exists" - } - } - }, - "delete": { - "description": "Top level container for configuration and operational data for physical\n and logical network interfaces.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "removes ciena.waveserver.interfaces.WaveserverInterfaces", - "responses": { - "204": { - "description": "Object deleted" - }, - "400": { - "description": "Internal error" - } - } - } - }, - "/data/waveserver-interfaces/logical-interface/": { - "post": { - "description": "List of logical IP management interfaces (e.g. 'local').", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface", - "parameters": [ - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface to be added to list", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterfaceWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "400": { - "description": "Internal error" - }, - "409": { - "description": "Object already exists" - } - } - } - }, - "/data/waveserver-interfaces/logical-interface={index}/": { - "get": { - "description": "List of logical IP management interfaces (e.g. 'local').", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "returns ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterfaceWrapper" - } - }, - "400": { - "description": "Internal error" - } - } - }, - "put": { - "description": "List of logical IP management interfaces (e.g. 'local').", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates or updates ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface to be added or updated", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterfaceWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "204": { - "description": "Object modified" - }, - "400": { - "description": "Internal error" - } - } - }, - "delete": { - "description": "List of logical IP management interfaces (e.g. 'local').", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "removes ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "Object deleted" - }, - "400": { - "description": "Internal error" - } - } - } - }, - "/data/waveserver-interfaces/logical-interface={index}/id/": { - "get": { - "description": "Identification information of this logical management interface.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "returns ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.IdWrapper" - } - }, - "400": { - "description": "Internal error" - } - } - }, - "put": { - "description": "Identification information of this logical management interface.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates or updates ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id to be added or updated", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.IdWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "204": { - "description": "Object modified" - }, - "400": { - "description": "Internal error" - } - } - }, - "post": { - "description": "Identification information of this logical management interface.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id to be added to list", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.IdWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "400": { - "description": "Internal error" - }, - "409": { - "description": "Object already exists" - } - } - }, - "delete": { - "description": "Identification information of this logical management interface.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "removes ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "Object deleted" - }, - "400": { - "description": "Internal error" - } - } - } - }, - "/data/waveserver-interfaces/logical-interface={index}/properties/": { - "get": { - "description": "All the configuration data of the logical management interface.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "returns ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.PropertiesWrapper" - } - }, - "400": { - "description": "Internal error" - } - } - }, - "put": { - "description": "All the configuration data of the logical management interface.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates or updates ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties to be added or updated", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.PropertiesWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "204": { - "description": "Object modified" - }, - "400": { - "description": "Internal error" - } - } - }, - "post": { - "description": "All the configuration data of the logical management interface.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties to be added to list", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.PropertiesWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "400": { - "description": "Internal error" - }, - "409": { - "description": "Object already exists" - } - } - }, - "delete": { - "description": "All the configuration data of the logical management interface.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "removes ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "Object deleted" - }, - "400": { - "description": "Internal error" - } - } - } - }, - "/data/waveserver-interfaces/logical-interface={index}/properties/ipv4/": { - "get": { - "description": "IPv4 configuration and operational data.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "returns ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4Wrapper" - } - }, - "400": { - "description": "Internal error" - } - } - }, - "put": { - "description": "IPv4 configuration and operational data.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates or updates ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4 to be added or updated", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4Wrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "204": { - "description": "Object modified" - }, - "400": { - "description": "Internal error" - } - } - }, - "post": { - "description": "IPv4 configuration and operational data.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4 to be added to list", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4Wrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "400": { - "description": "Internal error" - }, - "409": { - "description": "Object already exists" - } - } - }, - "delete": { - "description": "IPv4 configuration and operational data.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "removes ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "Object deleted" - }, - "400": { - "description": "Internal error" - } - } - } - }, - "/data/waveserver-interfaces/logical-interface={index}/state/": { - "get": { - "description": "Logical interface state information.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "returns ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.StateWrapper" - } - }, - "400": { - "description": "Internal error" - } - } - }, - "put": { - "description": "Logical interface state information.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates or updates ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State to be added or updated", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.StateWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "204": { - "description": "Object modified" - }, - "400": { - "description": "Internal error" - } - } - }, - "post": { - "description": "Logical interface state information.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State to be added to list", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.StateWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "400": { - "description": "Internal error" - }, - "409": { - "description": "Object already exists" - } - } - }, - "delete": { - "description": "Logical interface state information.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "removes ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "Object deleted" - }, - "400": { - "description": "Internal error" - } - } - } - }, - "/data/waveserver-interfaces/physical-interface/": { - "post": { - "description": "List of physical Ethernet management interfaces.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface", - "parameters": [ - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface to be added to list", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterfaceWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "400": { - "description": "Internal error" - }, - "409": { - "description": "Object already exists" - } - } - } - }, - "/data/waveserver-interfaces/physical-interface={name}/": { - "get": { - "description": "List of physical Ethernet management interfaces.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "returns ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterfaceWrapper" - } - }, - "400": { - "description": "Internal error" - } - } - }, - "put": { - "description": "List of physical Ethernet management interfaces.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates or updates ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface to be added or updated", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterfaceWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "204": { - "description": "Object modified" - }, - "400": { - "description": "Internal error" - } - } - }, - "delete": { - "description": "List of physical Ethernet management interfaces.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "removes ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "Object deleted" - }, - "400": { - "description": "Internal error" - } - } - } - }, - "/data/waveserver-interfaces/physical-interface={name}/id/": { - "get": { - "description": "Identification information of this management interface.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "returns ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.IdWrapper" - } - }, - "400": { - "description": "Internal error" - } - } - }, - "put": { - "description": "Identification information of this management interface.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates or updates ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id to be added or updated", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.IdWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "204": { - "description": "Object modified" - }, - "400": { - "description": "Internal error" - } - } - }, - "post": { - "description": "Identification information of this management interface.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id to be added to list", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.IdWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "400": { - "description": "Internal error" - }, - "409": { - "description": "Object already exists" - } - } - }, - "delete": { - "description": "Identification information of this management interface.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "removes ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "Object deleted" - }, - "400": { - "description": "Internal error" - } - } - } - }, - "/data/waveserver-interfaces/physical-interface={name}/properties/": { - "get": { - "description": "All the configuration data of the physical management interface.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "returns ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.PropertiesWrapper" - } - }, - "400": { - "description": "Internal error" - } - } - }, - "put": { - "description": "All the configuration data of the physical management interface.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates or updates ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties to be added or updated", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.PropertiesWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "204": { - "description": "Object modified" - }, - "400": { - "description": "Internal error" - } - } - }, - "post": { - "description": "All the configuration data of the physical management interface.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties to be added to list", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.PropertiesWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "400": { - "description": "Internal error" - }, - "409": { - "description": "Object already exists" - } - } - }, - "delete": { - "description": "All the configuration data of the physical management interface.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "removes ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "Object deleted" - }, - "400": { - "description": "Internal error" - } - } - } - }, - "/data/waveserver-interfaces/physical-interface={name}/properties/ethernet/": { - "get": { - "description": "Ethernet interface attributes.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "returns ciena.waveserver.interfaces.EthernetIfPropertiesGroup", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ciena.waveserver.interfaces.EthernetIfPropertiesGroup", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.EthernetIfPropertiesGroupWrapper" - } - }, - "400": { - "description": "Internal error" - } - } - }, - "put": { - "description": "Ethernet interface attributes.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates or updates ciena.waveserver.interfaces.EthernetIfPropertiesGroup", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.EthernetIfPropertiesGroup to be added or updated", - "name": "ciena.waveserver.interfaces.EthernetIfPropertiesGroup.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.EthernetIfPropertiesGroupWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "204": { - "description": "Object modified" - }, - "400": { - "description": "Internal error" - } - } - }, - "post": { - "description": "Ethernet interface attributes.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates ciena.waveserver.interfaces.EthernetIfPropertiesGroup", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.EthernetIfPropertiesGroup to be added to list", - "name": "ciena.waveserver.interfaces.EthernetIfPropertiesGroup.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.EthernetIfPropertiesGroupWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "400": { - "description": "Internal error" - }, - "409": { - "description": "Object already exists" - } - } - }, - "delete": { - "description": "Ethernet interface attributes.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "removes ciena.waveserver.interfaces.EthernetIfPropertiesGroup", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "Object deleted" - }, - "400": { - "description": "Internal error" - } - } - } - }, - "/data/waveserver-interfaces/physical-interface={name}/properties/management/": { - "get": { - "description": "Management interface attributes.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "returns ciena.waveserver.interfaces.ManagementIfPropertiesGroup", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ciena.waveserver.interfaces.ManagementIfPropertiesGroup", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.ManagementIfPropertiesGroupWrapper" - } - }, - "400": { - "description": "Internal error" - } - } - }, - "put": { - "description": "Management interface attributes.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates or updates ciena.waveserver.interfaces.ManagementIfPropertiesGroup", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.ManagementIfPropertiesGroup to be added or updated", - "name": "ciena.waveserver.interfaces.ManagementIfPropertiesGroup.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.ManagementIfPropertiesGroupWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "204": { - "description": "Object modified" - }, - "400": { - "description": "Internal error" - } - } - }, - "post": { - "description": "Management interface attributes.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates ciena.waveserver.interfaces.ManagementIfPropertiesGroup", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.ManagementIfPropertiesGroup to be added to list", - "name": "ciena.waveserver.interfaces.ManagementIfPropertiesGroup.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.ManagementIfPropertiesGroupWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "400": { - "description": "Internal error" - }, - "409": { - "description": "Object already exists" - } - } - }, - "delete": { - "description": "Management interface attributes.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "removes ciena.waveserver.interfaces.ManagementIfPropertiesGroup", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "Object deleted" - }, - "400": { - "description": "Internal error" - } - } - } - }, - "/data/waveserver-interfaces/physical-interface={name}/state/": { - "get": { - "description": "Physical management interface state information.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "returns ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.StateWrapper" - } - }, - "400": { - "description": "Internal error" - } - } - }, - "put": { - "description": "Physical management interface state information.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates or updates ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State to be added or updated", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.StateWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "204": { - "description": "Object modified" - }, - "400": { - "description": "Internal error" - } - } - }, - "post": { - "description": "Physical management interface state information.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State to be added to list", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.StateWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "400": { - "description": "Internal error" - }, - "409": { - "description": "Object already exists" - } - } - }, - "delete": { - "description": "Physical management interface state information.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "removes ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "Object deleted" - }, - "400": { - "description": "Internal error" - } - } - } - }, - "/data/waveserver-interfaces/routes/": { - "get": { - "description": "Top-level container for IP route configuration and operational data.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "returns ciena.waveserver.interfaces.waveserverinterfaces.Routes", - "responses": { - "200": { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.Routes", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.RoutesWrapper" - } - }, - "400": { - "description": "Internal error" - } - } - }, - "put": { - "description": "Top-level container for IP route configuration and operational data.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates or updates ciena.waveserver.interfaces.waveserverinterfaces.Routes", - "parameters": [ - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.Routes to be added or updated", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.Routes.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.RoutesWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "204": { - "description": "Object modified" - }, - "400": { - "description": "Internal error" - } - } - }, - "post": { - "description": "Top-level container for IP route configuration and operational data.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates ciena.waveserver.interfaces.waveserverinterfaces.Routes", - "parameters": [ - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.Routes to be added to list", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.Routes.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.RoutesWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "400": { - "description": "Internal error" - }, - "409": { - "description": "Object already exists" - } - } - }, - "delete": { - "description": "Top-level container for IP route configuration and operational data.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "removes ciena.waveserver.interfaces.waveserverinterfaces.Routes", - "responses": { - "204": { - "description": "Object deleted" - }, - "400": { - "description": "Internal error" - } - } - } - }, - "/data/waveserver-interfaces/routes/ipv4-static-route/": { - "post": { - "description": "List of IPv4 static routing entries.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute", - "parameters": [ - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute to be added to list", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRouteWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "400": { - "description": "Internal error" - }, - "409": { - "description": "Object already exists" - } - } - } - }, - "/data/waveserver-interfaces/routes/ipv4-static-route={destination}/": { - "get": { - "description": "List of IPv4 static routing entries.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "returns ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute", - "parameters": [ - { - "type": "string", - "description": "Id of ipv4-static-route", - "name": "destination", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRouteWrapper" - } - }, - "400": { - "description": "Internal error" - } - } - }, - "put": { - "description": "List of IPv4 static routing entries.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates or updates ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute", - "parameters": [ - { - "type": "string", - "description": "Id of ipv4-static-route", - "name": "destination", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute to be added or updated", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRouteWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "204": { - "description": "Object modified" - }, - "400": { - "description": "Internal error" - } - } - }, - "delete": { - "description": "List of IPv4 static routing entries.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "removes ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute", - "parameters": [ - { - "type": "string", - "description": "Id of ipv4-static-route", - "name": "destination", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "Object deleted" - }, - "400": { - "description": "Internal error" - } - } - } - }, - "/data/waveserver-interfaces/routes/ipv4-static-route={destination}/next-hop/": { - "post": { - "description": "A list of next-hop entries associated with the static route.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop", - "parameters": [ - { - "type": "string", - "description": "Id of ipv4-static-route", - "name": "destination", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop to be added to list", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHopWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "400": { - "description": "Internal error" - }, - "409": { - "description": "Object already exists" - } - } - } - }, - "/data/waveserver-interfaces/routes/ipv4-static-route={destination}/next-hop={index}/": { - "get": { - "description": "A list of next-hop entries associated with the static route.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "returns ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop", - "parameters": [ - { - "type": "string", - "description": "Id of ipv4-static-route", - "name": "destination", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "Id of next-hop", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHopWrapper" - } - }, - "400": { - "description": "Internal error" - } - } - }, - "put": { - "description": "A list of next-hop entries associated with the static route.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates or updates ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop", - "parameters": [ - { - "type": "string", - "description": "Id of ipv4-static-route", - "name": "destination", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "Id of next-hop", - "name": "index", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop to be added or updated", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHopWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "204": { - "description": "Object modified" - }, - "400": { - "description": "Internal error" - } - } - }, - "delete": { - "description": "A list of next-hop entries associated with the static route.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "removes ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop", - "parameters": [ - { - "type": "string", - "description": "Id of ipv4-static-route", - "name": "destination", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "Id of next-hop", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "Object deleted" - }, - "400": { - "description": "Internal error" - } - } - } - } - }, - "definitions": { - "ciena.waveserver.interfaces.DuplexEnumeration": { - "type": "string", - "enum": [ - "Unknown", - "full", - "half" - ] - }, - "ciena.waveserver.interfaces.EthernetIfPropertiesGroup": { - "type": "object", - "properties": { - "auto-negotiation": { - "description": "Specifies whether the interface should negotiate common transmission\n parameters, such as speed, duplex, and flow control with its peer. REF:IEEE 802.3-2012 auto-negotiation transmission parameters", - "type": "boolean", - "default": false - }, - "duplex": { - "description": "Ethernet interface duplex mode. For ports with auto-negotiation enabled,\n this represents the negotiated duplex mode.", - "$ref": "#/definitions/ciena.waveserver.interfaces.DuplexEnumeration" - }, - "flow-control": { - "description": "Specifies whether this interface will participate in Ethernet flow\n control, via pause frames.", - "type": "boolean", - "default": false - }, - "mac-address": { - "description": "The system-assigned MAC address of the Ethernet interface.", - "type": "string" - }, - "speed": { - "description": "Ethernet port speed. For ports with auto-negotiation enabled, this\n represents the negotiated port speed.", - "$ref": "#/definitions/ciena.waveserver.interfaces.SpeedEnumeration" - } - } - }, - "ciena.waveserver.interfaces.EthernetIfPropertiesGroupWrapper": { - "properties": { - "ethernet": { - "$ref": "#/definitions/ciena.waveserver.interfaces.EthernetIfPropertiesGroup" - } - } - }, - "ciena.waveserver.interfaces.ManagementIfPropertiesGroup": { - "type": "object", - "properties": { - "mode": { - "description": "Management port mode. Specifies whether the port is configured as a\n local management interface or wayside communications channel (carry\n through).", - "$ref": "#/definitions/ciena.waveserver.interfaces.ModeEnumeration" - } - } - }, - "ciena.waveserver.interfaces.ManagementIfPropertiesGroupWrapper": { - "properties": { - "management": { - "$ref": "#/definitions/ciena.waveserver.interfaces.ManagementIfPropertiesGroup" - } - } - }, - "ciena.waveserver.interfaces.ModeEnumeration": { - "type": "string", - "enum": [ - "management", - "wayside-channel" - ] - }, - "ciena.waveserver.interfaces.RouteNextHopGroup": { - "type": "object", - "properties": { - "active": { - "description": "Specifies whether the route is active (present in the kernel IP\n routing table).", - "type": "boolean", - "default": false - }, - "associated-interface": { - "description": "Reference to the associated logical-interface name of the route entry.\n Defaults to the 'local' interface for routes within the subnet\n associated with the active IP address configured on the local\n management interface.", - "type": "string" - }, - "metric": { - "description": "Routing metric cost.", - "type": "integer", - "format": "int64", - "default": 0 - }, - "static": { - "description": "Specifies whether the route entry is user-created (static) or\n dynamically created by a routing protocol.", - "type": "boolean", - "default": false - } - } - }, - "ciena.waveserver.interfaces.SpeedEnumeration": { - "type": "string", - "enum": [ - "Unknown", - "10M", - "100M", - "1G", - "10G" - ] - }, - "ciena.waveserver.interfaces.TypeEnumeration": { - "type": "string", - "enum": [ - "ethernet", - "serial" - ] - }, - "ciena.waveserver.interfaces.WaveserverInterfaces": { - "type": "object", - "properties": { - "logical-interface": { - "description": "List of logical IP management interfaces (e.g. 'local').", - "type": "array", - "items": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface" - } - }, - "physical-interface": { - "description": "List of physical Ethernet management interfaces.", - "type": "array", - "items": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface" - } - }, - "routes": { - "description": "Top-level container for IP route configuration and operational data.", - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.Routes" - } - } - }, - "ciena.waveserver.interfaces.WaveserverInterfacesWrapper": { - "properties": { - "waveserver-interfaces": { - "$ref": "#/definitions/ciena.waveserver.interfaces.WaveserverInterfaces" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface": { - "type": "object", - "properties": { - "id": { - "description": "Identification information of this logical management interface.", - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id" - }, - "index": { - "description": "References the system-assigned index of the logical interface.", - "type": "integer", - "format": "int64", - "x-path": "../id/index" - }, - "properties": { - "description": "All the configuration data of the logical management interface.", - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties" - }, - "state": { - "description": "Logical interface state information.", - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterfaceWrapper": { - "properties": { - "logical-interface": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface": { - "type": "object", - "properties": { - "id": { - "description": "Identification information of this management interface.", - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id" - }, - "name": { - "description": "References the system-assigned name of the interface.", - "type": "string", - "x-path": "../id/name" - }, - "properties": { - "description": "All the configuration data of the physical management interface.", - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties" - }, - "state": { - "description": "Physical management interface state information.", - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterfaceWrapper": { - "properties": { - "physical-interface": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.Routes": { - "type": "object", - "properties": { - "ipv4-static-route": { - "description": "List of IPv4 static routing entries.", - "type": "array", - "items": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute" - } - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.RoutesWrapper": { - "properties": { - "routes": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.Routes" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id": { - "type": "object", - "properties": { - "ifindex": { - "description": "The system-assigned interface index number, corresponding to the\n ifIndex in SNMP IF-MIB. REF:RFC 2863 - The Interfaces Group MIB", - "type": "integer", - "format": "int64" - }, - "index": { - "description": "The index of the logical management interface. Waveserver supports\n a single logical interface 'local' that is automatically created by\n the system. The default index is 1 for the 'local' interface.", - "type": "integer", - "format": "int64" - }, - "name": { - "description": "The name of the logical management interface, e.g. 'local'.", - "type": "string" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.IdWrapper": { - "properties": { - "id": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties": { - "type": "object", - "properties": { - "ipv4": { - "description": "IPv4 configuration and operational data.", - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.PropertiesWrapper": { - "properties": { - "properties": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State": { - "type": "object", - "properties": { - "admin-state": { - "description": "Whether Admin State is enabled or disabled for this management interface.", - "$ref": "#/definitions/ciena.waveserver.typedefs.EnabledDisabledEnum" - }, - "operational-state": { - "description": "Operational state of this management interface.", - "$ref": "#/definitions/ciena.waveserver.typedefs.UpDownEnum" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.StateWrapper": { - "properties": { - "state": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4": { - "type": "object", - "properties": { - "admin-state": { - "description": "Whether IPv4 stack is enabled or disabled on this interface.\n Always enabled for the local management interface.", - "$ref": "#/definitions/ciena.waveserver.typedefs.EnabledDisabledEnum" - }, - "apipa-ip-address": { - "description": "The Automatic Private IP Addressing (APIPA) assigned IPv4 address\n and prefix on the interface.", - "type": "string" - }, - "backup-gateway": { - "description": "The user-configured backup IPv4 gateway on the interface.", - "type": "string" - }, - "dhcp-gateway": { - "description": "The DHCP-assigned IPv4 gateway on the interface.", - "type": "string" - }, - "dhcp-ip-address": { - "description": "The DHCP-assigned IPv4 address and prefix on the interface.", - "type": "string" - }, - "oper-gateway": { - "description": "The operational IPv4 gateway on the interface.", - "type": "string" - }, - "oper-ip-address": { - "description": "The operational IPv4 address and prefix on the interface.", - "type": "string" - }, - "user-gateway": { - "description": "The user-configured primary IPv4 gateway on the interface.", - "type": "string" - }, - "user-ip-address": { - "description": "The user-configured IPv4 address and prefix on the interface.", - "type": "string" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4Wrapper": { - "properties": { - "ipv4": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id": { - "type": "object", - "properties": { - "description": { - "description": "Physical interface description, e.g. 'Management'.", - "type": "string" - }, - "ifindex": { - "description": "The system-assigned interface index number, corresponding to the\n ifIndex in SNMP IF-MIB. REF:RFC 2863 - The Interfaces Group MIB", - "type": "integer", - "format": "int64" - }, - "name": { - "description": "The system-assigned name of the physical interface (e.g. DCN,\n ILAN-1, ILAN-2). The names are predefined.", - "type": "string" - }, - "type": { - "description": "Management port type. If the port is DCN, ILAN-1, or ILAN-2, the\n port type will be 'ethernet'. If the port is Console, the port\n type will be 'serial'. REF:RFC 2863 - The Interfaces Group MIB", - "$ref": "#/definitions/ciena.waveserver.interfaces.TypeEnumeration" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.IdWrapper": { - "properties": { - "id": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties": { - "type": "object", - "properties": { - "ethernet": { - "description": "Ethernet interface attributes.", - "$ref": "#/definitions/ciena.waveserver.interfaces.EthernetIfPropertiesGroup" - }, - "management": { - "description": "Management interface attributes.", - "$ref": "#/definitions/ciena.waveserver.interfaces.ManagementIfPropertiesGroup" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.PropertiesWrapper": { - "properties": { - "properties": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State": { - "type": "object", - "properties": { - "admin-state": { - "description": "Whether Admin State is enabled or disabled for this management interface.", - "$ref": "#/definitions/ciena.waveserver.typedefs.EnabledDisabledEnum" - }, - "operational-state": { - "description": "Operational state of this management interface.", - "$ref": "#/definitions/ciena.waveserver.typedefs.UpDownEnum" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.StateWrapper": { - "properties": { - "state": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute": { - "type": "object", - "properties": { - "destination": { - "description": "IPv4 route destination prefix for the static route. Only one static\n routing entry per unique destination ip/prefix can be configured.", - "type": "string" - }, - "next-hop": { - "description": "A list of next-hop entries associated with the static route.", - "type": "array", - "items": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop" - } - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRouteWrapper": { - "properties": { - "ipv4-static-route": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop": { - "allOf": [ - { - "$ref": "#/definitions/ciena.waveserver.interfaces.RouteNextHopGroup" - }, - { - "description": "A list of next-hop entries associated with the static route.", - "type": "object", - "properties": { - "index": { - "description": "The index key of the entry in the next-hop list. Currently only\n one static entry is supported per destination prefix, so the\n index should always be 1.", - "type": "integer", - "format": "int64" - }, - "ip-address": { - "description": "IPv4 route next-hop or gateway address associated with the route. If\n not specified, the default gateway value for the local management\n interface will be used.", - "type": "string" - } - } - } - ] - }, - "ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHopWrapper": { - "properties": { - "next-hop": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop" - } - } - }, - "ciena.waveserver.typedefs.EnabledDisabledEnum": { - "type": "string", - "enum": [ - "disabled", - "enabled" - ] - }, - "ciena.waveserver.typedefs.UpDownEnum": { - "type": "string", - "enum": [ - "down", - "up" - ] - } - } -}`)) - FlatSwaggerJSON = json.RawMessage([]byte(`{ - "consumes": [ - "application/yang-data+json" - ], - "produces": [ - "application/yang-data+json" - ], - "swagger": "2.0", - "info": { - "description": "This module defines Ethernet and IP management interfaces support for\n Ciena's Waveserver Platform.", - "title": "ciena-waveserver-interfaces API", - "version": "1.0" - }, - "host": "localhost:1234", - "paths": { - "/data/waveserver-interfaces/": { - "get": { - "description": "Top level container for configuration and operational data for physical\n and logical network interfaces.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "returns ciena.waveserver.interfaces.WaveserverInterfaces", - "responses": { - "200": { - "description": "ciena.waveserver.interfaces.WaveserverInterfaces", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.WaveserverInterfacesWrapper" - } - }, - "400": { - "description": "Internal error" - } - } - }, - "put": { - "description": "Top level container for configuration and operational data for physical\n and logical network interfaces.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates or updates ciena.waveserver.interfaces.WaveserverInterfaces", - "parameters": [ - { - "description": "ciena.waveserver.interfaces.WaveserverInterfaces to be added or updated", - "name": "ciena.waveserver.interfaces.WaveserverInterfaces.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.WaveserverInterfacesWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "204": { - "description": "Object modified" - }, - "400": { - "description": "Internal error" - } - } - }, - "post": { - "description": "Top level container for configuration and operational data for physical\n and logical network interfaces.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates ciena.waveserver.interfaces.WaveserverInterfaces", - "parameters": [ - { - "description": "ciena.waveserver.interfaces.WaveserverInterfaces to be added to list", - "name": "ciena.waveserver.interfaces.WaveserverInterfaces.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.WaveserverInterfacesWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "400": { - "description": "Internal error" - }, - "409": { - "description": "Object already exists" - } - } - }, - "delete": { - "description": "Top level container for configuration and operational data for physical\n and logical network interfaces.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "removes ciena.waveserver.interfaces.WaveserverInterfaces", - "responses": { - "204": { - "description": "Object deleted" - }, - "400": { - "description": "Internal error" - } - } - } - }, - "/data/waveserver-interfaces/logical-interface/": { - "post": { - "description": "List of logical IP management interfaces (e.g. 'local').", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface", - "parameters": [ - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface to be added to list", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterfaceWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "400": { - "description": "Internal error" - }, - "409": { - "description": "Object already exists" - } - } - } - }, - "/data/waveserver-interfaces/logical-interface={index}/": { - "get": { - "description": "List of logical IP management interfaces (e.g. 'local').", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "returns ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterfaceWrapper" - } - }, - "400": { - "description": "Internal error" - } - } - }, - "put": { - "description": "List of logical IP management interfaces (e.g. 'local').", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates or updates ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface to be added or updated", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterfaceWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "204": { - "description": "Object modified" - }, - "400": { - "description": "Internal error" - } - } - }, - "delete": { - "description": "List of logical IP management interfaces (e.g. 'local').", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "removes ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "Object deleted" - }, - "400": { - "description": "Internal error" - } - } - } - }, - "/data/waveserver-interfaces/logical-interface={index}/id/": { - "get": { - "description": "Identification information of this logical management interface.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "returns ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.IdWrapper" - } - }, - "400": { - "description": "Internal error" - } - } - }, - "put": { - "description": "Identification information of this logical management interface.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates or updates ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id to be added or updated", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.IdWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "204": { - "description": "Object modified" - }, - "400": { - "description": "Internal error" - } - } - }, - "post": { - "description": "Identification information of this logical management interface.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id to be added to list", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.IdWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "400": { - "description": "Internal error" - }, - "409": { - "description": "Object already exists" - } - } - }, - "delete": { - "description": "Identification information of this logical management interface.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "removes ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "Object deleted" - }, - "400": { - "description": "Internal error" - } - } - } - }, - "/data/waveserver-interfaces/logical-interface={index}/properties/": { - "get": { - "description": "All the configuration data of the logical management interface.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "returns ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.PropertiesWrapper" - } - }, - "400": { - "description": "Internal error" - } - } - }, - "put": { - "description": "All the configuration data of the logical management interface.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates or updates ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties to be added or updated", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.PropertiesWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "204": { - "description": "Object modified" - }, - "400": { - "description": "Internal error" - } - } - }, - "post": { - "description": "All the configuration data of the logical management interface.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties to be added to list", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.PropertiesWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "400": { - "description": "Internal error" - }, - "409": { - "description": "Object already exists" - } - } - }, - "delete": { - "description": "All the configuration data of the logical management interface.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "removes ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "Object deleted" - }, - "400": { - "description": "Internal error" - } - } - } - }, - "/data/waveserver-interfaces/logical-interface={index}/properties/ipv4/": { - "get": { - "description": "IPv4 configuration and operational data.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "returns ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4Wrapper" - } - }, - "400": { - "description": "Internal error" - } - } - }, - "put": { - "description": "IPv4 configuration and operational data.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates or updates ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4 to be added or updated", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4Wrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "204": { - "description": "Object modified" - }, - "400": { - "description": "Internal error" - } - } - }, - "post": { - "description": "IPv4 configuration and operational data.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4 to be added to list", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4Wrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "400": { - "description": "Internal error" - }, - "409": { - "description": "Object already exists" - } - } - }, - "delete": { - "description": "IPv4 configuration and operational data.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "removes ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "Object deleted" - }, - "400": { - "description": "Internal error" - } - } - } - }, - "/data/waveserver-interfaces/logical-interface={index}/state/": { - "get": { - "description": "Logical interface state information.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "returns ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.StateWrapper" - } - }, - "400": { - "description": "Internal error" - } - } - }, - "put": { - "description": "Logical interface state information.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates or updates ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State to be added or updated", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.StateWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "204": { - "description": "Object modified" - }, - "400": { - "description": "Internal error" - } - } - }, - "post": { - "description": "Logical interface state information.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State to be added to list", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.StateWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "400": { - "description": "Internal error" - }, - "409": { - "description": "Object already exists" - } - } - }, - "delete": { - "description": "Logical interface state information.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "removes ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State", - "parameters": [ - { - "type": "integer", - "format": "int64", - "description": "Id of logical-interface", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "Object deleted" - }, - "400": { - "description": "Internal error" - } - } - } - }, - "/data/waveserver-interfaces/physical-interface/": { - "post": { - "description": "List of physical Ethernet management interfaces.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface", - "parameters": [ - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface to be added to list", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterfaceWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "400": { - "description": "Internal error" - }, - "409": { - "description": "Object already exists" - } - } - } - }, - "/data/waveserver-interfaces/physical-interface={name}/": { - "get": { - "description": "List of physical Ethernet management interfaces.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "returns ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterfaceWrapper" - } - }, - "400": { - "description": "Internal error" - } - } - }, - "put": { - "description": "List of physical Ethernet management interfaces.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates or updates ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface to be added or updated", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterfaceWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "204": { - "description": "Object modified" - }, - "400": { - "description": "Internal error" - } - } - }, - "delete": { - "description": "List of physical Ethernet management interfaces.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "removes ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "Object deleted" - }, - "400": { - "description": "Internal error" - } - } - } - }, - "/data/waveserver-interfaces/physical-interface={name}/id/": { - "get": { - "description": "Identification information of this management interface.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "returns ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.IdWrapper" - } - }, - "400": { - "description": "Internal error" - } - } - }, - "put": { - "description": "Identification information of this management interface.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates or updates ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id to be added or updated", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.IdWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "204": { - "description": "Object modified" - }, - "400": { - "description": "Internal error" - } - } - }, - "post": { - "description": "Identification information of this management interface.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id to be added to list", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.IdWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "400": { - "description": "Internal error" - }, - "409": { - "description": "Object already exists" - } - } - }, - "delete": { - "description": "Identification information of this management interface.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "removes ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "Object deleted" - }, - "400": { - "description": "Internal error" - } - } - } - }, - "/data/waveserver-interfaces/physical-interface={name}/properties/": { - "get": { - "description": "All the configuration data of the physical management interface.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "returns ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.PropertiesWrapper" - } - }, - "400": { - "description": "Internal error" - } - } - }, - "put": { - "description": "All the configuration data of the physical management interface.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates or updates ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties to be added or updated", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.PropertiesWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "204": { - "description": "Object modified" - }, - "400": { - "description": "Internal error" - } - } - }, - "post": { - "description": "All the configuration data of the physical management interface.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties to be added to list", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.PropertiesWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "400": { - "description": "Internal error" - }, - "409": { - "description": "Object already exists" - } - } - }, - "delete": { - "description": "All the configuration data of the physical management interface.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "removes ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "Object deleted" - }, - "400": { - "description": "Internal error" - } - } - } - }, - "/data/waveserver-interfaces/physical-interface={name}/properties/ethernet/": { - "get": { - "description": "Ethernet interface attributes.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "returns ciena.waveserver.interfaces.EthernetIfPropertiesGroup", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ciena.waveserver.interfaces.EthernetIfPropertiesGroup", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.EthernetIfPropertiesGroupWrapper" - } - }, - "400": { - "description": "Internal error" - } - } - }, - "put": { - "description": "Ethernet interface attributes.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates or updates ciena.waveserver.interfaces.EthernetIfPropertiesGroup", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.EthernetIfPropertiesGroup to be added or updated", - "name": "ciena.waveserver.interfaces.EthernetIfPropertiesGroup.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.EthernetIfPropertiesGroupWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "204": { - "description": "Object modified" - }, - "400": { - "description": "Internal error" - } - } - }, - "post": { - "description": "Ethernet interface attributes.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates ciena.waveserver.interfaces.EthernetIfPropertiesGroup", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.EthernetIfPropertiesGroup to be added to list", - "name": "ciena.waveserver.interfaces.EthernetIfPropertiesGroup.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.EthernetIfPropertiesGroupWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "400": { - "description": "Internal error" - }, - "409": { - "description": "Object already exists" - } - } - }, - "delete": { - "description": "Ethernet interface attributes.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "removes ciena.waveserver.interfaces.EthernetIfPropertiesGroup", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "Object deleted" - }, - "400": { - "description": "Internal error" - } - } - } - }, - "/data/waveserver-interfaces/physical-interface={name}/properties/management/": { - "get": { - "description": "Management interface attributes.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "returns ciena.waveserver.interfaces.ManagementIfPropertiesGroup", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ciena.waveserver.interfaces.ManagementIfPropertiesGroup", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.ManagementIfPropertiesGroupWrapper" - } - }, - "400": { - "description": "Internal error" - } - } - }, - "put": { - "description": "Management interface attributes.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates or updates ciena.waveserver.interfaces.ManagementIfPropertiesGroup", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.ManagementIfPropertiesGroup to be added or updated", - "name": "ciena.waveserver.interfaces.ManagementIfPropertiesGroup.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.ManagementIfPropertiesGroupWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "204": { - "description": "Object modified" - }, - "400": { - "description": "Internal error" - } - } - }, - "post": { - "description": "Management interface attributes.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates ciena.waveserver.interfaces.ManagementIfPropertiesGroup", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.ManagementIfPropertiesGroup to be added to list", - "name": "ciena.waveserver.interfaces.ManagementIfPropertiesGroup.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.ManagementIfPropertiesGroupWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "400": { - "description": "Internal error" - }, - "409": { - "description": "Object already exists" - } - } - }, - "delete": { - "description": "Management interface attributes.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "removes ciena.waveserver.interfaces.ManagementIfPropertiesGroup", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "Object deleted" - }, - "400": { - "description": "Internal error" - } - } - } - }, - "/data/waveserver-interfaces/physical-interface={name}/state/": { - "get": { - "description": "Physical management interface state information.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "returns ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.StateWrapper" - } - }, - "400": { - "description": "Internal error" - } - } - }, - "put": { - "description": "Physical management interface state information.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates or updates ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State to be added or updated", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.StateWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "204": { - "description": "Object modified" - }, - "400": { - "description": "Internal error" - } - } - }, - "post": { - "description": "Physical management interface state information.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State to be added to list", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.StateWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "400": { - "description": "Internal error" - }, - "409": { - "description": "Object already exists" - } - } - }, - "delete": { - "description": "Physical management interface state information.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "removes ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State", - "parameters": [ - { - "type": "string", - "description": "Id of physical-interface", - "name": "name", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "Object deleted" - }, - "400": { - "description": "Internal error" - } - } - } - }, - "/data/waveserver-interfaces/routes/": { - "get": { - "description": "Top-level container for IP route configuration and operational data.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "returns ciena.waveserver.interfaces.waveserverinterfaces.Routes", - "responses": { - "200": { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.Routes", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.RoutesWrapper" - } - }, - "400": { - "description": "Internal error" - } - } - }, - "put": { - "description": "Top-level container for IP route configuration and operational data.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates or updates ciena.waveserver.interfaces.waveserverinterfaces.Routes", - "parameters": [ - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.Routes to be added or updated", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.Routes.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.RoutesWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "204": { - "description": "Object modified" - }, - "400": { - "description": "Internal error" - } - } - }, - "post": { - "description": "Top-level container for IP route configuration and operational data.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates ciena.waveserver.interfaces.waveserverinterfaces.Routes", - "parameters": [ - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.Routes to be added to list", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.Routes.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.RoutesWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "400": { - "description": "Internal error" - }, - "409": { - "description": "Object already exists" - } - } - }, - "delete": { - "description": "Top-level container for IP route configuration and operational data.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "removes ciena.waveserver.interfaces.waveserverinterfaces.Routes", - "responses": { - "204": { - "description": "Object deleted" - }, - "400": { - "description": "Internal error" - } - } - } - }, - "/data/waveserver-interfaces/routes/ipv4-static-route/": { - "post": { - "description": "List of IPv4 static routing entries.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute", - "parameters": [ - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute to be added to list", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRouteWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "400": { - "description": "Internal error" - }, - "409": { - "description": "Object already exists" - } - } - } - }, - "/data/waveserver-interfaces/routes/ipv4-static-route={destination}/": { - "get": { - "description": "List of IPv4 static routing entries.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "returns ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute", - "parameters": [ - { - "type": "string", - "description": "Id of ipv4-static-route", - "name": "destination", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRouteWrapper" - } - }, - "400": { - "description": "Internal error" - } - } - }, - "put": { - "description": "List of IPv4 static routing entries.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates or updates ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute", - "parameters": [ - { - "type": "string", - "description": "Id of ipv4-static-route", - "name": "destination", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute to be added or updated", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRouteWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "204": { - "description": "Object modified" - }, - "400": { - "description": "Internal error" - } - } - }, - "delete": { - "description": "List of IPv4 static routing entries.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "removes ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute", - "parameters": [ - { - "type": "string", - "description": "Id of ipv4-static-route", - "name": "destination", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "Object deleted" - }, - "400": { - "description": "Internal error" - } - } - } - }, - "/data/waveserver-interfaces/routes/ipv4-static-route={destination}/next-hop/": { - "post": { - "description": "A list of next-hop entries associated with the static route.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop", - "parameters": [ - { - "type": "string", - "description": "Id of ipv4-static-route", - "name": "destination", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop to be added to list", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHopWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "400": { - "description": "Internal error" - }, - "409": { - "description": "Object already exists" - } - } - } - }, - "/data/waveserver-interfaces/routes/ipv4-static-route={destination}/next-hop={index}/": { - "get": { - "description": "A list of next-hop entries associated with the static route.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "returns ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop", - "parameters": [ - { - "type": "string", - "description": "Id of ipv4-static-route", - "name": "destination", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "Id of next-hop", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHopWrapper" - } - }, - "400": { - "description": "Internal error" - } - } - }, - "put": { - "description": "A list of next-hop entries associated with the static route.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "creates or updates ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop", - "parameters": [ - { - "type": "string", - "description": "Id of ipv4-static-route", - "name": "destination", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "Id of next-hop", - "name": "index", - "in": "path", - "required": true - }, - { - "description": "ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop to be added or updated", - "name": "ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop.body-param", - "in": "body", - "schema": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHopWrapper" - } - } - ], - "responses": { - "201": { - "description": "Object created" - }, - "204": { - "description": "Object modified" - }, - "400": { - "description": "Internal error" - } - } - }, - "delete": { - "description": "A list of next-hop entries associated with the static route.", - "tags": [ - "ciena-waveserver-interfaces" - ], - "summary": "removes ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop", - "parameters": [ - { - "type": "string", - "description": "Id of ipv4-static-route", - "name": "destination", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "description": "Id of next-hop", - "name": "index", - "in": "path", - "required": true - } - ], - "responses": { - "204": { - "description": "Object deleted" - }, - "400": { - "description": "Internal error" - } - } - } - } - }, - "definitions": { - "ciena.waveserver.interfaces.DuplexEnumeration": { - "type": "string", - "enum": [ - "Unknown", - "full", - "half" - ] - }, - "ciena.waveserver.interfaces.EthernetIfPropertiesGroup": { - "type": "object", - "properties": { - "auto-negotiation": { - "description": "Specifies whether the interface should negotiate common transmission\n parameters, such as speed, duplex, and flow control with its peer. REF:IEEE 802.3-2012 auto-negotiation transmission parameters", - "type": "boolean", - "default": false - }, - "duplex": { - "description": "Ethernet interface duplex mode. For ports with auto-negotiation enabled,\n this represents the negotiated duplex mode.", - "$ref": "#/definitions/ciena.waveserver.interfaces.DuplexEnumeration" - }, - "flow-control": { - "description": "Specifies whether this interface will participate in Ethernet flow\n control, via pause frames.", - "type": "boolean", - "default": false - }, - "mac-address": { - "description": "The system-assigned MAC address of the Ethernet interface.", - "type": "string" - }, - "speed": { - "description": "Ethernet port speed. For ports with auto-negotiation enabled, this\n represents the negotiated port speed.", - "$ref": "#/definitions/ciena.waveserver.interfaces.SpeedEnumeration" - } - } - }, - "ciena.waveserver.interfaces.EthernetIfPropertiesGroupWrapper": { - "properties": { - "ethernet": { - "$ref": "#/definitions/ciena.waveserver.interfaces.EthernetIfPropertiesGroup" - } - } - }, - "ciena.waveserver.interfaces.ManagementIfPropertiesGroup": { - "type": "object", - "properties": { - "mode": { - "description": "Management port mode. Specifies whether the port is configured as a\n local management interface or wayside communications channel (carry\n through).", - "$ref": "#/definitions/ciena.waveserver.interfaces.ModeEnumeration" - } - } - }, - "ciena.waveserver.interfaces.ManagementIfPropertiesGroupWrapper": { - "properties": { - "management": { - "$ref": "#/definitions/ciena.waveserver.interfaces.ManagementIfPropertiesGroup" - } - } - }, - "ciena.waveserver.interfaces.ModeEnumeration": { - "type": "string", - "enum": [ - "management", - "wayside-channel" - ] - }, - "ciena.waveserver.interfaces.RouteNextHopGroup": { - "type": "object", - "properties": { - "active": { - "description": "Specifies whether the route is active (present in the kernel IP\n routing table).", - "type": "boolean", - "default": false - }, - "associated-interface": { - "description": "Reference to the associated logical-interface name of the route entry.\n Defaults to the 'local' interface for routes within the subnet\n associated with the active IP address configured on the local\n management interface.", - "type": "string" - }, - "metric": { - "description": "Routing metric cost.", - "type": "integer", - "format": "int64", - "default": 0 - }, - "static": { - "description": "Specifies whether the route entry is user-created (static) or\n dynamically created by a routing protocol.", - "type": "boolean", - "default": false - } - } - }, - "ciena.waveserver.interfaces.SpeedEnumeration": { - "type": "string", - "enum": [ - "Unknown", - "10M", - "100M", - "1G", - "10G" - ] - }, - "ciena.waveserver.interfaces.TypeEnumeration": { - "type": "string", - "enum": [ - "ethernet", - "serial" - ] - }, - "ciena.waveserver.interfaces.WaveserverInterfaces": { - "type": "object", - "properties": { - "logical-interface": { - "description": "List of logical IP management interfaces (e.g. 'local').", - "type": "array", - "items": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface" - } - }, - "physical-interface": { - "description": "List of physical Ethernet management interfaces.", - "type": "array", - "items": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface" - } - }, - "routes": { - "description": "Top-level container for IP route configuration and operational data.", - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.Routes" - } - } - }, - "ciena.waveserver.interfaces.WaveserverInterfacesWrapper": { - "properties": { - "waveserver-interfaces": { - "$ref": "#/definitions/ciena.waveserver.interfaces.WaveserverInterfaces" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface": { - "type": "object", - "properties": { - "id": { - "description": "Identification information of this logical management interface.", - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id" - }, - "index": { - "description": "References the system-assigned index of the logical interface.", - "type": "integer", - "format": "int64", - "x-path": "../id/index" - }, - "properties": { - "description": "All the configuration data of the logical management interface.", - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties" - }, - "state": { - "description": "Logical interface state information.", - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterfaceWrapper": { - "properties": { - "logical-interface": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface": { - "type": "object", - "properties": { - "id": { - "description": "Identification information of this management interface.", - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id" - }, - "name": { - "description": "References the system-assigned name of the interface.", - "type": "string", - "x-path": "../id/name" - }, - "properties": { - "description": "All the configuration data of the physical management interface.", - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties" - }, - "state": { - "description": "Physical management interface state information.", - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterfaceWrapper": { - "properties": { - "physical-interface": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.Routes": { - "type": "object", - "properties": { - "ipv4-static-route": { - "description": "List of IPv4 static routing entries.", - "type": "array", - "items": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute" - } - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.RoutesWrapper": { - "properties": { - "routes": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.Routes" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id": { - "type": "object", - "properties": { - "ifindex": { - "description": "The system-assigned interface index number, corresponding to the\n ifIndex in SNMP IF-MIB. REF:RFC 2863 - The Interfaces Group MIB", - "type": "integer", - "format": "int64" - }, - "index": { - "description": "The index of the logical management interface. Waveserver supports\n a single logical interface 'local' that is automatically created by\n the system. The default index is 1 for the 'local' interface.", - "type": "integer", - "format": "int64" - }, - "name": { - "description": "The name of the logical management interface, e.g. 'local'.", - "type": "string" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.IdWrapper": { - "properties": { - "id": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties": { - "type": "object", - "properties": { - "ipv4": { - "description": "IPv4 configuration and operational data.", - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.PropertiesWrapper": { - "properties": { - "properties": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State": { - "type": "object", - "properties": { - "admin-state": { - "description": "Whether Admin State is enabled or disabled for this management interface.", - "$ref": "#/definitions/ciena.waveserver.typedefs.EnabledDisabledEnum" - }, - "operational-state": { - "description": "Operational state of this management interface.", - "$ref": "#/definitions/ciena.waveserver.typedefs.UpDownEnum" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.StateWrapper": { - "properties": { - "state": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4": { - "type": "object", - "properties": { - "admin-state": { - "description": "Whether IPv4 stack is enabled or disabled on this interface.\n Always enabled for the local management interface.", - "$ref": "#/definitions/ciena.waveserver.typedefs.EnabledDisabledEnum" - }, - "apipa-ip-address": { - "description": "The Automatic Private IP Addressing (APIPA) assigned IPv4 address\n and prefix on the interface.", - "type": "string" - }, - "backup-gateway": { - "description": "The user-configured backup IPv4 gateway on the interface.", - "type": "string" - }, - "dhcp-gateway": { - "description": "The DHCP-assigned IPv4 gateway on the interface.", - "type": "string" - }, - "dhcp-ip-address": { - "description": "The DHCP-assigned IPv4 address and prefix on the interface.", - "type": "string" - }, - "oper-gateway": { - "description": "The operational IPv4 gateway on the interface.", - "type": "string" - }, - "oper-ip-address": { - "description": "The operational IPv4 address and prefix on the interface.", - "type": "string" - }, - "user-gateway": { - "description": "The user-configured primary IPv4 gateway on the interface.", - "type": "string" - }, - "user-ip-address": { - "description": "The user-configured IPv4 address and prefix on the interface.", - "type": "string" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4Wrapper": { - "properties": { - "ipv4": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id": { - "type": "object", - "properties": { - "description": { - "description": "Physical interface description, e.g. 'Management'.", - "type": "string" - }, - "ifindex": { - "description": "The system-assigned interface index number, corresponding to the\n ifIndex in SNMP IF-MIB. REF:RFC 2863 - The Interfaces Group MIB", - "type": "integer", - "format": "int64" - }, - "name": { - "description": "The system-assigned name of the physical interface (e.g. DCN,\n ILAN-1, ILAN-2). The names are predefined.", - "type": "string" - }, - "type": { - "description": "Management port type. If the port is DCN, ILAN-1, or ILAN-2, the\n port type will be 'ethernet'. If the port is Console, the port\n type will be 'serial'. REF:RFC 2863 - The Interfaces Group MIB", - "$ref": "#/definitions/ciena.waveserver.interfaces.TypeEnumeration" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.IdWrapper": { - "properties": { - "id": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties": { - "type": "object", - "properties": { - "ethernet": { - "description": "Ethernet interface attributes.", - "$ref": "#/definitions/ciena.waveserver.interfaces.EthernetIfPropertiesGroup" - }, - "management": { - "description": "Management interface attributes.", - "$ref": "#/definitions/ciena.waveserver.interfaces.ManagementIfPropertiesGroup" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.PropertiesWrapper": { - "properties": { - "properties": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State": { - "type": "object", - "properties": { - "admin-state": { - "description": "Whether Admin State is enabled or disabled for this management interface.", - "$ref": "#/definitions/ciena.waveserver.typedefs.EnabledDisabledEnum" - }, - "operational-state": { - "description": "Operational state of this management interface.", - "$ref": "#/definitions/ciena.waveserver.typedefs.UpDownEnum" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.StateWrapper": { - "properties": { - "state": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute": { - "type": "object", - "properties": { - "destination": { - "description": "IPv4 route destination prefix for the static route. Only one static\n routing entry per unique destination ip/prefix can be configured.", - "type": "string" - }, - "next-hop": { - "description": "A list of next-hop entries associated with the static route.", - "type": "array", - "items": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop" - } - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRouteWrapper": { - "properties": { - "ipv4-static-route": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute" - } - } - }, - "ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop": { - "allOf": [ - { - "$ref": "#/definitions/ciena.waveserver.interfaces.RouteNextHopGroup" - }, - { - "$ref": "#/definitions/cienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHopAllOf1" - } - ] - }, - "ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHopWrapper": { - "properties": { - "next-hop": { - "$ref": "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop" - } - } - }, - "ciena.waveserver.typedefs.EnabledDisabledEnum": { - "type": "string", - "enum": [ - "disabled", - "enabled" - ] - }, - "ciena.waveserver.typedefs.UpDownEnum": { - "type": "string", - "enum": [ - "down", - "up" - ] - }, - "cienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHopAllOf1": { - "description": "A list of next-hop entries associated with the static route.", - "type": "object", - "properties": { - "index": { - "description": "The index key of the entry in the next-hop list. Currently only\n one static entry is supported per destination prefix, so the\n index should always be 1.", - "type": "integer", - "format": "int64" - }, - "ip-address": { - "description": "IPv4 route next-hop or gateway address associated with the route. If\n not specified, the default gateway value for the local management\n interface will be used.", - "type": "string" - } - }, - "x-go-gen-location": "models" - } - } -}`)) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces.go deleted file mode 100644 index 3d2ef05f0d35f4f478404495b844010030ee990a..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces.go +++ /dev/null @@ -1,61 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DeleteDataWaveserverInterfacesHandlerFunc turns a function with the right signature into a delete data waveserver interfaces handler -type DeleteDataWaveserverInterfacesHandlerFunc func(DeleteDataWaveserverInterfacesParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn DeleteDataWaveserverInterfacesHandlerFunc) Handle(params DeleteDataWaveserverInterfacesParams) middleware.Responder { - return fn(params) -} - -// DeleteDataWaveserverInterfacesHandler interface for that can handle valid delete data waveserver interfaces params -type DeleteDataWaveserverInterfacesHandler interface { - Handle(DeleteDataWaveserverInterfacesParams) middleware.Responder -} - -// NewDeleteDataWaveserverInterfaces creates a new http.Handler for the delete data waveserver interfaces operation -func NewDeleteDataWaveserverInterfaces(ctx *middleware.Context, handler DeleteDataWaveserverInterfacesHandler) *DeleteDataWaveserverInterfaces { - return &DeleteDataWaveserverInterfaces{Context: ctx, Handler: handler} -} - -/*DeleteDataWaveserverInterfaces swagger:route DELETE /data/waveserver-interfaces/ ciena-waveserver-interfaces deleteDataWaveserverInterfaces - -removes ciena.waveserver.interfaces.WaveserverInterfaces - -Top level container for configuration and operational data for physical - and logical network interfaces. - -*/ -type DeleteDataWaveserverInterfaces struct { - Context *middleware.Context - Handler DeleteDataWaveserverInterfacesHandler -} - -func (o *DeleteDataWaveserverInterfaces) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDeleteDataWaveserverInterfacesParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index.go deleted file mode 100644 index 49a509e93b07382a5b58c23267b313be196b2c4f..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DeleteDataWaveserverInterfacesLogicalInterfaceIndexHandlerFunc turns a function with the right signature into a delete data waveserver interfaces logical interface index handler -type DeleteDataWaveserverInterfacesLogicalInterfaceIndexHandlerFunc func(DeleteDataWaveserverInterfacesLogicalInterfaceIndexParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn DeleteDataWaveserverInterfacesLogicalInterfaceIndexHandlerFunc) Handle(params DeleteDataWaveserverInterfacesLogicalInterfaceIndexParams) middleware.Responder { - return fn(params) -} - -// DeleteDataWaveserverInterfacesLogicalInterfaceIndexHandler interface for that can handle valid delete data waveserver interfaces logical interface index params -type DeleteDataWaveserverInterfacesLogicalInterfaceIndexHandler interface { - Handle(DeleteDataWaveserverInterfacesLogicalInterfaceIndexParams) middleware.Responder -} - -// NewDeleteDataWaveserverInterfacesLogicalInterfaceIndex creates a new http.Handler for the delete data waveserver interfaces logical interface index operation -func NewDeleteDataWaveserverInterfacesLogicalInterfaceIndex(ctx *middleware.Context, handler DeleteDataWaveserverInterfacesLogicalInterfaceIndexHandler) *DeleteDataWaveserverInterfacesLogicalInterfaceIndex { - return &DeleteDataWaveserverInterfacesLogicalInterfaceIndex{Context: ctx, Handler: handler} -} - -/*DeleteDataWaveserverInterfacesLogicalInterfaceIndex swagger:route DELETE /data/waveserver-interfaces/logical-interface={index}/ ciena-waveserver-interfaces deleteDataWaveserverInterfacesLogicalInterfaceIndex - -removes ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface - -List of logical IP management interfaces (e.g. 'local'). - -*/ -type DeleteDataWaveserverInterfacesLogicalInterfaceIndex struct { - Context *middleware.Context - Handler DeleteDataWaveserverInterfacesLogicalInterfaceIndexHandler -} - -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndex) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_id.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_id.go deleted file mode 100644 index fe7e5610f4e58c7da1e6cd20f074a4d04aa0d931..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_id.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDHandlerFunc turns a function with the right signature into a delete data waveserver interfaces logical interface index ID handler -type DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDHandlerFunc func(DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDHandlerFunc) Handle(params DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDParams) middleware.Responder { - return fn(params) -} - -// DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDHandler interface for that can handle valid delete data waveserver interfaces logical interface index ID params -type DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDHandler interface { - Handle(DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDParams) middleware.Responder -} - -// NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexID creates a new http.Handler for the delete data waveserver interfaces logical interface index ID operation -func NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexID(ctx *middleware.Context, handler DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDHandler) *DeleteDataWaveserverInterfacesLogicalInterfaceIndexID { - return &DeleteDataWaveserverInterfacesLogicalInterfaceIndexID{Context: ctx, Handler: handler} -} - -/*DeleteDataWaveserverInterfacesLogicalInterfaceIndexID swagger:route DELETE /data/waveserver-interfaces/logical-interface={index}/id/ ciena-waveserver-interfaces deleteDataWaveserverInterfacesLogicalInterfaceIndexId - -removes ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id - -Identification information of this logical management interface. - -*/ -type DeleteDataWaveserverInterfacesLogicalInterfaceIndexID struct { - Context *middleware.Context - Handler DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDHandler -} - -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexID) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexIDParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_id_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_id_parameters.go deleted file mode 100644 index 74045109105610fc359e658df44a86cd612d972a..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_id_parameters.go +++ /dev/null @@ -1,77 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexIDParams creates a new DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDParams object -// no default values defined in spec. -func NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexIDParams() DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDParams { - - return DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDParams{} -} - -// DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDParams contains all the bound params for the delete data waveserver interfaces logical interface index ID operation -// typically these are obtained from a http.Request -// -// swagger:parameters DeleteDataWaveserverInterfacesLogicalInterfaceIndexID -type DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Id of logical-interface - Required: true - In: path - */ - Index int64 -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexIDParams() beforehand. -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rIndex, rhkIndex, _ := route.Params.GetOK("index") - if err := o.bindIndex(rIndex, rhkIndex, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindIndex binds and validates parameter Index from path. -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDParams) bindIndex(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - value, err := swag.ConvertInt64(raw) - if err != nil { - return errors.InvalidType("index", "path", "int64", raw) - } - o.Index = value - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_id_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_id_responses.go deleted file mode 100644 index 88941a4d623c0a7e33bd322e4f4fa85d45c7cf12..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_id_responses.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDNoContentCode is the HTTP code returned for type DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDNoContent -const DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDNoContentCode int = 204 - -/*DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDNoContent Object deleted - -swagger:response deleteDataWaveserverInterfacesLogicalInterfaceIndexIdNoContent -*/ -type DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDNoContent struct { -} - -// NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexIDNoContent creates DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDNoContent with default headers values -func NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexIDNoContent() *DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDNoContent { - - return &DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDNoContent{} -} - -// WriteResponse to the client -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequestCode is the HTTP code returned for type DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequest -const DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequestCode int = 400 - -/*DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequest Internal error - -swagger:response deleteDataWaveserverInterfacesLogicalInterfaceIndexIdBadRequest -*/ -type DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequest struct { -} - -// NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequest creates DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequest with default headers values -func NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequest() *DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequest { - - return &DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequest{} -} - -// WriteResponse to the client -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_id_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_id_urlbuilder.go deleted file mode 100644 index 385515657ac522beb04d638b63c203de2afa3aed..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_id_urlbuilder.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" - - "github.com/go-openapi/swag" -) - -// DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDURL generates an URL for the delete data waveserver interfaces logical interface index ID operation -type DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDURL struct { - Index int64 - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDURL) WithBasePath(bp string) *DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/logical-interface={index}/id/" - - index := swag.FormatInt64(o.Index) - if index != "" { - _path = strings.Replace(_path, "{index}", index, -1) - } else { - return nil, errors.New("index is required on DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDURL") - } - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_parameters.go deleted file mode 100644 index 0ac73aa924989432e7f75d929dea7bd24d6d9888..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_parameters.go +++ /dev/null @@ -1,77 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexParams creates a new DeleteDataWaveserverInterfacesLogicalInterfaceIndexParams object -// no default values defined in spec. -func NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexParams() DeleteDataWaveserverInterfacesLogicalInterfaceIndexParams { - - return DeleteDataWaveserverInterfacesLogicalInterfaceIndexParams{} -} - -// DeleteDataWaveserverInterfacesLogicalInterfaceIndexParams contains all the bound params for the delete data waveserver interfaces logical interface index operation -// typically these are obtained from a http.Request -// -// swagger:parameters DeleteDataWaveserverInterfacesLogicalInterfaceIndex -type DeleteDataWaveserverInterfacesLogicalInterfaceIndexParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Id of logical-interface - Required: true - In: path - */ - Index int64 -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexParams() beforehand. -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rIndex, rhkIndex, _ := route.Params.GetOK("index") - if err := o.bindIndex(rIndex, rhkIndex, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindIndex binds and validates parameter Index from path. -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexParams) bindIndex(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - value, err := swag.ConvertInt64(raw) - if err != nil { - return errors.InvalidType("index", "path", "int64", raw) - } - o.Index = value - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_properties.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_properties.go deleted file mode 100644 index 7a54d104a6f30af9e52faddb7303a2c256f6a3af..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_properties.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandlerFunc turns a function with the right signature into a delete data waveserver interfaces logical interface index properties handler -type DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandlerFunc func(DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandlerFunc) Handle(params DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams) middleware.Responder { - return fn(params) -} - -// DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler interface for that can handle valid delete data waveserver interfaces logical interface index properties params -type DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler interface { - Handle(DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams) middleware.Responder -} - -// NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexProperties creates a new http.Handler for the delete data waveserver interfaces logical interface index properties operation -func NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexProperties(ctx *middleware.Context, handler DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler) *DeleteDataWaveserverInterfacesLogicalInterfaceIndexProperties { - return &DeleteDataWaveserverInterfacesLogicalInterfaceIndexProperties{Context: ctx, Handler: handler} -} - -/*DeleteDataWaveserverInterfacesLogicalInterfaceIndexProperties swagger:route DELETE /data/waveserver-interfaces/logical-interface={index}/properties/ ciena-waveserver-interfaces deleteDataWaveserverInterfacesLogicalInterfaceIndexProperties - -removes ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties - -All the configuration data of the logical management interface. - -*/ -type DeleteDataWaveserverInterfacesLogicalInterfaceIndexProperties struct { - Context *middleware.Context - Handler DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler -} - -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexProperties) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_properties_ip_v4.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_properties_ip_v4.go deleted file mode 100644 index 81dd23953001f4b5a68e2d4057fa19faf6353a2d..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_properties_ip_v4.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4HandlerFunc turns a function with the right signature into a delete data waveserver interfaces logical interface index properties IP v4 handler -type DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4HandlerFunc func(DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params) middleware.Responder - -// Handle executing the request and returning a response -func (fn DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4HandlerFunc) Handle(params DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params) middleware.Responder { - return fn(params) -} - -// DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler interface for that can handle valid delete data waveserver interfaces logical interface index properties IP v4 params -type DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler interface { - Handle(DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params) middleware.Responder -} - -// NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4 creates a new http.Handler for the delete data waveserver interfaces logical interface index properties IP v4 operation -func NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4(ctx *middleware.Context, handler DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler) *DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4 { - return &DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4{Context: ctx, Handler: handler} -} - -/*DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4 swagger:route DELETE /data/waveserver-interfaces/logical-interface={index}/properties/ipv4/ ciena-waveserver-interfaces deleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIpV4 - -removes ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4 - -IPv4 configuration and operational data. - -*/ -type DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4 struct { - Context *middleware.Context - Handler DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler -} - -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_properties_ip_v4_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_properties_ip_v4_parameters.go deleted file mode 100644 index 81c0f12660debe951cc9237bb44fb98b16462752..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_properties_ip_v4_parameters.go +++ /dev/null @@ -1,77 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params creates a new DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params object -// no default values defined in spec. -func NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params() DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params { - - return DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params{} -} - -// DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params contains all the bound params for the delete data waveserver interfaces logical interface index properties IP v4 operation -// typically these are obtained from a http.Request -// -// swagger:parameters DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4 -type DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Id of logical-interface - Required: true - In: path - */ - Index int64 -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params() beforehand. -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rIndex, rhkIndex, _ := route.Params.GetOK("index") - if err := o.bindIndex(rIndex, rhkIndex, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindIndex binds and validates parameter Index from path. -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params) bindIndex(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - value, err := swag.ConvertInt64(raw) - if err != nil { - return errors.InvalidType("index", "path", "int64", raw) - } - o.Index = value - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_properties_ip_v4_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_properties_ip_v4_responses.go deleted file mode 100644 index e54c5117cf40a151d4965a25cbd244bc71caac6b..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_properties_ip_v4_responses.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4NoContentCode is the HTTP code returned for type DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4NoContent -const DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4NoContentCode int = 204 - -/*DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4NoContent Object deleted - -swagger:response deleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIpV4NoContent -*/ -type DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4NoContent struct { -} - -// NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4NoContent creates DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4NoContent with default headers values -func NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4NoContent() *DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4NoContent { - - return &DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4NoContent{} -} - -// WriteResponse to the client -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4NoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequestCode is the HTTP code returned for type DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequest -const DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequestCode int = 400 - -/*DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequest Internal error - -swagger:response deleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIpV4BadRequest -*/ -type DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequest struct { -} - -// NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequest creates DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequest with default headers values -func NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequest() *DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequest { - - return &DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequest{} -} - -// WriteResponse to the client -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_properties_ip_v4_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_properties_ip_v4_urlbuilder.go deleted file mode 100644 index 1eced62fbb2eedb562013fff5b701c8670f39c56..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_properties_ip_v4_urlbuilder.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" - - "github.com/go-openapi/swag" -) - -// DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL generates an URL for the delete data waveserver interfaces logical interface index properties IP v4 operation -type DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL struct { - Index int64 - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL) WithBasePath(bp string) *DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/logical-interface={index}/properties/ipv4/" - - index := swag.FormatInt64(o.Index) - if index != "" { - _path = strings.Replace(_path, "{index}", index, -1) - } else { - return nil, errors.New("index is required on DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL") - } - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_properties_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_properties_parameters.go deleted file mode 100644 index 040a2f1aeda74bd92c8ec1efa361e8a79c2bb1f9..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_properties_parameters.go +++ /dev/null @@ -1,77 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams creates a new DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams object -// no default values defined in spec. -func NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams() DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams { - - return DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams{} -} - -// DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams contains all the bound params for the delete data waveserver interfaces logical interface index properties operation -// typically these are obtained from a http.Request -// -// swagger:parameters DeleteDataWaveserverInterfacesLogicalInterfaceIndexProperties -type DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Id of logical-interface - Required: true - In: path - */ - Index int64 -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams() beforehand. -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rIndex, rhkIndex, _ := route.Params.GetOK("index") - if err := o.bindIndex(rIndex, rhkIndex, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindIndex binds and validates parameter Index from path. -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams) bindIndex(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - value, err := swag.ConvertInt64(raw) - if err != nil { - return errors.InvalidType("index", "path", "int64", raw) - } - o.Index = value - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_properties_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_properties_responses.go deleted file mode 100644 index 0d1b812c4bf858a6ecd9492d18960e0c749039a8..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_properties_responses.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesNoContentCode is the HTTP code returned for type DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesNoContent -const DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesNoContentCode int = 204 - -/*DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesNoContent Object deleted - -swagger:response deleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesNoContent -*/ -type DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesNoContent struct { -} - -// NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesNoContent creates DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesNoContent with default headers values -func NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesNoContent() *DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesNoContent { - - return &DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesNoContent{} -} - -// WriteResponse to the client -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequestCode is the HTTP code returned for type DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest -const DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequestCode int = 400 - -/*DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest Internal error - -swagger:response deleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest -*/ -type DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest struct { -} - -// NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest creates DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest with default headers values -func NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest() *DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest { - - return &DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest{} -} - -// WriteResponse to the client -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_properties_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_properties_urlbuilder.go deleted file mode 100644 index 2e13a5a0bf4ae83d0aee0caeac9ced9bf810d20c..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_properties_urlbuilder.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" - - "github.com/go-openapi/swag" -) - -// DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL generates an URL for the delete data waveserver interfaces logical interface index properties operation -type DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL struct { - Index int64 - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL) WithBasePath(bp string) *DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/logical-interface={index}/properties/" - - index := swag.FormatInt64(o.Index) - if index != "" { - _path = strings.Replace(_path, "{index}", index, -1) - } else { - return nil, errors.New("index is required on DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL") - } - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_responses.go deleted file mode 100644 index 7b5e1b874cefd6c199b7ff918143cb7403190694..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_responses.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DeleteDataWaveserverInterfacesLogicalInterfaceIndexNoContentCode is the HTTP code returned for type DeleteDataWaveserverInterfacesLogicalInterfaceIndexNoContent -const DeleteDataWaveserverInterfacesLogicalInterfaceIndexNoContentCode int = 204 - -/*DeleteDataWaveserverInterfacesLogicalInterfaceIndexNoContent Object deleted - -swagger:response deleteDataWaveserverInterfacesLogicalInterfaceIndexNoContent -*/ -type DeleteDataWaveserverInterfacesLogicalInterfaceIndexNoContent struct { -} - -// NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexNoContent creates DeleteDataWaveserverInterfacesLogicalInterfaceIndexNoContent with default headers values -func NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexNoContent() *DeleteDataWaveserverInterfacesLogicalInterfaceIndexNoContent { - - return &DeleteDataWaveserverInterfacesLogicalInterfaceIndexNoContent{} -} - -// WriteResponse to the client -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DeleteDataWaveserverInterfacesLogicalInterfaceIndexBadRequestCode is the HTTP code returned for type DeleteDataWaveserverInterfacesLogicalInterfaceIndexBadRequest -const DeleteDataWaveserverInterfacesLogicalInterfaceIndexBadRequestCode int = 400 - -/*DeleteDataWaveserverInterfacesLogicalInterfaceIndexBadRequest Internal error - -swagger:response deleteDataWaveserverInterfacesLogicalInterfaceIndexBadRequest -*/ -type DeleteDataWaveserverInterfacesLogicalInterfaceIndexBadRequest struct { -} - -// NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexBadRequest creates DeleteDataWaveserverInterfacesLogicalInterfaceIndexBadRequest with default headers values -func NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexBadRequest() *DeleteDataWaveserverInterfacesLogicalInterfaceIndexBadRequest { - - return &DeleteDataWaveserverInterfacesLogicalInterfaceIndexBadRequest{} -} - -// WriteResponse to the client -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_state.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_state.go deleted file mode 100644 index 24a148bc7d4c55ef03435b203901f89301ff7c5e..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_state.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateHandlerFunc turns a function with the right signature into a delete data waveserver interfaces logical interface index state handler -type DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateHandlerFunc func(DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateHandlerFunc) Handle(params DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateParams) middleware.Responder { - return fn(params) -} - -// DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateHandler interface for that can handle valid delete data waveserver interfaces logical interface index state params -type DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateHandler interface { - Handle(DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateParams) middleware.Responder -} - -// NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexState creates a new http.Handler for the delete data waveserver interfaces logical interface index state operation -func NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexState(ctx *middleware.Context, handler DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateHandler) *DeleteDataWaveserverInterfacesLogicalInterfaceIndexState { - return &DeleteDataWaveserverInterfacesLogicalInterfaceIndexState{Context: ctx, Handler: handler} -} - -/*DeleteDataWaveserverInterfacesLogicalInterfaceIndexState swagger:route DELETE /data/waveserver-interfaces/logical-interface={index}/state/ ciena-waveserver-interfaces deleteDataWaveserverInterfacesLogicalInterfaceIndexState - -removes ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State - -Logical interface state information. - -*/ -type DeleteDataWaveserverInterfacesLogicalInterfaceIndexState struct { - Context *middleware.Context - Handler DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateHandler -} - -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexState) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexStateParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_state_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_state_parameters.go deleted file mode 100644 index 44eb357ea749c8721d47ceb2efb3f586963e8733..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_state_parameters.go +++ /dev/null @@ -1,77 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexStateParams creates a new DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateParams object -// no default values defined in spec. -func NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexStateParams() DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateParams { - - return DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateParams{} -} - -// DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateParams contains all the bound params for the delete data waveserver interfaces logical interface index state operation -// typically these are obtained from a http.Request -// -// swagger:parameters DeleteDataWaveserverInterfacesLogicalInterfaceIndexState -type DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Id of logical-interface - Required: true - In: path - */ - Index int64 -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexStateParams() beforehand. -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rIndex, rhkIndex, _ := route.Params.GetOK("index") - if err := o.bindIndex(rIndex, rhkIndex, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindIndex binds and validates parameter Index from path. -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateParams) bindIndex(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - value, err := swag.ConvertInt64(raw) - if err != nil { - return errors.InvalidType("index", "path", "int64", raw) - } - o.Index = value - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_state_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_state_responses.go deleted file mode 100644 index d9d7e7d328e54e22f673eabff1c3646dde9068c3..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_state_responses.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateNoContentCode is the HTTP code returned for type DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateNoContent -const DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateNoContentCode int = 204 - -/*DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateNoContent Object deleted - -swagger:response deleteDataWaveserverInterfacesLogicalInterfaceIndexStateNoContent -*/ -type DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateNoContent struct { -} - -// NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexStateNoContent creates DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateNoContent with default headers values -func NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexStateNoContent() *DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateNoContent { - - return &DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateNoContent{} -} - -// WriteResponse to the client -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequestCode is the HTTP code returned for type DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest -const DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequestCode int = 400 - -/*DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest Internal error - -swagger:response deleteDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest -*/ -type DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest struct { -} - -// NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest creates DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest with default headers values -func NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest() *DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest { - - return &DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest{} -} - -// WriteResponse to the client -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_state_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_state_urlbuilder.go deleted file mode 100644 index ff5ccdfd378be696ab2bbd8f02ccdfa36ff05bd3..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_logical_interface_index_state_urlbuilder.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" - - "github.com/go-openapi/swag" -) - -// DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateURL generates an URL for the delete data waveserver interfaces logical interface index state operation -type DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateURL struct { - Index int64 - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateURL) WithBasePath(bp string) *DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/logical-interface={index}/state/" - - index := swag.FormatInt64(o.Index) - if index != "" { - _path = strings.Replace(_path, "{index}", index, -1) - } else { - return nil, errors.New("index is required on DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateURL") - } - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_parameters.go deleted file mode 100644 index 565c813a2782e92e29eaef77318c093862d65d56..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_parameters.go +++ /dev/null @@ -1,45 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" -) - -// NewDeleteDataWaveserverInterfacesParams creates a new DeleteDataWaveserverInterfacesParams object -// no default values defined in spec. -func NewDeleteDataWaveserverInterfacesParams() DeleteDataWaveserverInterfacesParams { - - return DeleteDataWaveserverInterfacesParams{} -} - -// DeleteDataWaveserverInterfacesParams contains all the bound params for the delete data waveserver interfaces operation -// typically these are obtained from a http.Request -// -// swagger:parameters DeleteDataWaveserverInterfaces -type DeleteDataWaveserverInterfacesParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDeleteDataWaveserverInterfacesParams() beforehand. -func (o *DeleteDataWaveserverInterfacesParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name.go deleted file mode 100644 index 7292165fe4e53bc2483c500a553c246af1e83a1a..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DeleteDataWaveserverInterfacesPhysicalInterfaceNameHandlerFunc turns a function with the right signature into a delete data waveserver interfaces physical interface name handler -type DeleteDataWaveserverInterfacesPhysicalInterfaceNameHandlerFunc func(DeleteDataWaveserverInterfacesPhysicalInterfaceNameParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn DeleteDataWaveserverInterfacesPhysicalInterfaceNameHandlerFunc) Handle(params DeleteDataWaveserverInterfacesPhysicalInterfaceNameParams) middleware.Responder { - return fn(params) -} - -// DeleteDataWaveserverInterfacesPhysicalInterfaceNameHandler interface for that can handle valid delete data waveserver interfaces physical interface name params -type DeleteDataWaveserverInterfacesPhysicalInterfaceNameHandler interface { - Handle(DeleteDataWaveserverInterfacesPhysicalInterfaceNameParams) middleware.Responder -} - -// NewDeleteDataWaveserverInterfacesPhysicalInterfaceName creates a new http.Handler for the delete data waveserver interfaces physical interface name operation -func NewDeleteDataWaveserverInterfacesPhysicalInterfaceName(ctx *middleware.Context, handler DeleteDataWaveserverInterfacesPhysicalInterfaceNameHandler) *DeleteDataWaveserverInterfacesPhysicalInterfaceName { - return &DeleteDataWaveserverInterfacesPhysicalInterfaceName{Context: ctx, Handler: handler} -} - -/*DeleteDataWaveserverInterfacesPhysicalInterfaceName swagger:route DELETE /data/waveserver-interfaces/physical-interface={name}/ ciena-waveserver-interfaces deleteDataWaveserverInterfacesPhysicalInterfaceName - -removes ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface - -List of physical Ethernet management interfaces. - -*/ -type DeleteDataWaveserverInterfacesPhysicalInterfaceName struct { - Context *middleware.Context - Handler DeleteDataWaveserverInterfacesPhysicalInterfaceNameHandler -} - -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceName) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDeleteDataWaveserverInterfacesPhysicalInterfaceNameParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_id.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_id.go deleted file mode 100644 index 2096b9e1bb5fbcd2eff21dcde520408f673b9fdc..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_id.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDHandlerFunc turns a function with the right signature into a delete data waveserver interfaces physical interface name ID handler -type DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDHandlerFunc func(DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDHandlerFunc) Handle(params DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDParams) middleware.Responder { - return fn(params) -} - -// DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDHandler interface for that can handle valid delete data waveserver interfaces physical interface name ID params -type DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDHandler interface { - Handle(DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDParams) middleware.Responder -} - -// NewDeleteDataWaveserverInterfacesPhysicalInterfaceNameID creates a new http.Handler for the delete data waveserver interfaces physical interface name ID operation -func NewDeleteDataWaveserverInterfacesPhysicalInterfaceNameID(ctx *middleware.Context, handler DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDHandler) *DeleteDataWaveserverInterfacesPhysicalInterfaceNameID { - return &DeleteDataWaveserverInterfacesPhysicalInterfaceNameID{Context: ctx, Handler: handler} -} - -/*DeleteDataWaveserverInterfacesPhysicalInterfaceNameID swagger:route DELETE /data/waveserver-interfaces/physical-interface={name}/id/ ciena-waveserver-interfaces deleteDataWaveserverInterfacesPhysicalInterfaceNameId - -removes ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id - -Identification information of this management interface. - -*/ -type DeleteDataWaveserverInterfacesPhysicalInterfaceNameID struct { - Context *middleware.Context - Handler DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDHandler -} - -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameID) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDeleteDataWaveserverInterfacesPhysicalInterfaceNameIDParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_id_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_id_parameters.go deleted file mode 100644 index ac1f18ce5d7959b9f497d7e9cfa54e95d3b43d9c..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_id_parameters.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" -) - -// NewDeleteDataWaveserverInterfacesPhysicalInterfaceNameIDParams creates a new DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDParams object -// no default values defined in spec. -func NewDeleteDataWaveserverInterfacesPhysicalInterfaceNameIDParams() DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDParams { - - return DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDParams{} -} - -// DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDParams contains all the bound params for the delete data waveserver interfaces physical interface name ID operation -// typically these are obtained from a http.Request -// -// swagger:parameters DeleteDataWaveserverInterfacesPhysicalInterfaceNameID -type DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Id of physical-interface - Required: true - In: path - */ - Name string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDeleteDataWaveserverInterfacesPhysicalInterfaceNameIDParams() beforehand. -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rName, rhkName, _ := route.Params.GetOK("name") - if err := o.bindName(rName, rhkName, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindName binds and validates parameter Name from path. -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.Name = raw - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_id_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_id_responses.go deleted file mode 100644 index 448c69efb5d827b38b6f14d1a74c1027d64fdf88..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_id_responses.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDNoContentCode is the HTTP code returned for type DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDNoContent -const DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDNoContentCode int = 204 - -/*DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDNoContent Object deleted - -swagger:response deleteDataWaveserverInterfacesPhysicalInterfaceNameIdNoContent -*/ -type DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDNoContent struct { -} - -// NewDeleteDataWaveserverInterfacesPhysicalInterfaceNameIDNoContent creates DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDNoContent with default headers values -func NewDeleteDataWaveserverInterfacesPhysicalInterfaceNameIDNoContent() *DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDNoContent { - - return &DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDNoContent{} -} - -// WriteResponse to the client -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequestCode is the HTTP code returned for type DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequest -const DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequestCode int = 400 - -/*DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequest Internal error - -swagger:response deleteDataWaveserverInterfacesPhysicalInterfaceNameIdBadRequest -*/ -type DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequest struct { -} - -// NewDeleteDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequest creates DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequest with default headers values -func NewDeleteDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequest() *DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequest { - - return &DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequest{} -} - -// WriteResponse to the client -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_parameters.go deleted file mode 100644 index 1db334cf5ffec7e4c068533fc5848fee9dbe6e0b..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_parameters.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" -) - -// NewDeleteDataWaveserverInterfacesPhysicalInterfaceNameParams creates a new DeleteDataWaveserverInterfacesPhysicalInterfaceNameParams object -// no default values defined in spec. -func NewDeleteDataWaveserverInterfacesPhysicalInterfaceNameParams() DeleteDataWaveserverInterfacesPhysicalInterfaceNameParams { - - return DeleteDataWaveserverInterfacesPhysicalInterfaceNameParams{} -} - -// DeleteDataWaveserverInterfacesPhysicalInterfaceNameParams contains all the bound params for the delete data waveserver interfaces physical interface name operation -// typically these are obtained from a http.Request -// -// swagger:parameters DeleteDataWaveserverInterfacesPhysicalInterfaceName -type DeleteDataWaveserverInterfacesPhysicalInterfaceNameParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Id of physical-interface - Required: true - In: path - */ - Name string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDeleteDataWaveserverInterfacesPhysicalInterfaceNameParams() beforehand. -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rName, rhkName, _ := route.Params.GetOK("name") - if err := o.bindName(rName, rhkName, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindName binds and validates parameter Name from path. -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.Name = raw - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_properties.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_properties.go deleted file mode 100644 index 2b85e58afba52f1fd7b2bdf448087f956e0a6bdf..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_properties.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandlerFunc turns a function with the right signature into a delete data waveserver interfaces physical interface name properties handler -type DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandlerFunc func(DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandlerFunc) Handle(params DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams) middleware.Responder { - return fn(params) -} - -// DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler interface for that can handle valid delete data waveserver interfaces physical interface name properties params -type DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler interface { - Handle(DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams) middleware.Responder -} - -// NewDeleteDataWaveserverInterfacesPhysicalInterfaceNameProperties creates a new http.Handler for the delete data waveserver interfaces physical interface name properties operation -func NewDeleteDataWaveserverInterfacesPhysicalInterfaceNameProperties(ctx *middleware.Context, handler DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler) *DeleteDataWaveserverInterfacesPhysicalInterfaceNameProperties { - return &DeleteDataWaveserverInterfacesPhysicalInterfaceNameProperties{Context: ctx, Handler: handler} -} - -/*DeleteDataWaveserverInterfacesPhysicalInterfaceNameProperties swagger:route DELETE /data/waveserver-interfaces/physical-interface={name}/properties/ ciena-waveserver-interfaces deleteDataWaveserverInterfacesPhysicalInterfaceNameProperties - -removes ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties - -All the configuration data of the physical management interface. - -*/ -type DeleteDataWaveserverInterfacesPhysicalInterfaceNameProperties struct { - Context *middleware.Context - Handler DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler -} - -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameProperties) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_properties_ethernet.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_properties_ethernet.go deleted file mode 100644 index 47d944255c916c8319b15d28ae97510e1373f61c..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_properties_ethernet.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandlerFunc turns a function with the right signature into a delete data waveserver interfaces physical interface name properties ethernet handler -type DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandlerFunc func(DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandlerFunc) Handle(params DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams) middleware.Responder { - return fn(params) -} - -// DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler interface for that can handle valid delete data waveserver interfaces physical interface name properties ethernet params -type DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler interface { - Handle(DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams) middleware.Responder -} - -// NewDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet creates a new http.Handler for the delete data waveserver interfaces physical interface name properties ethernet operation -func NewDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet(ctx *middleware.Context, handler DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler) *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet { - return &DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet{Context: ctx, Handler: handler} -} - -/*DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet swagger:route DELETE /data/waveserver-interfaces/physical-interface={name}/properties/ethernet/ ciena-waveserver-interfaces deleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet - -removes ciena.waveserver.interfaces.EthernetIfPropertiesGroup - -Ethernet interface attributes. - -*/ -type DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet struct { - Context *middleware.Context - Handler DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler -} - -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_properties_ethernet_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_properties_ethernet_parameters.go deleted file mode 100644 index dc8724195f70b3ea0c66051abaab63755473e481..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_properties_ethernet_parameters.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" -) - -// NewDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams creates a new DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams object -// no default values defined in spec. -func NewDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams() DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams { - - return DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams{} -} - -// DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams contains all the bound params for the delete data waveserver interfaces physical interface name properties ethernet operation -// typically these are obtained from a http.Request -// -// swagger:parameters DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet -type DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Id of physical-interface - Required: true - In: path - */ - Name string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams() beforehand. -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rName, rhkName, _ := route.Params.GetOK("name") - if err := o.bindName(rName, rhkName, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindName binds and validates parameter Name from path. -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.Name = raw - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_properties_ethernet_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_properties_ethernet_responses.go deleted file mode 100644 index 1ea3cf85b72cee2b9dc640758cd104eac1fe4377..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_properties_ethernet_responses.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetNoContentCode is the HTTP code returned for type DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetNoContent -const DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetNoContentCode int = 204 - -/*DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetNoContent Object deleted - -swagger:response deleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetNoContent -*/ -type DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetNoContent struct { -} - -// NewDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetNoContent creates DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetNoContent with default headers values -func NewDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetNoContent() *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetNoContent { - - return &DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetNoContent{} -} - -// WriteResponse to the client -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequestCode is the HTTP code returned for type DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest -const DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequestCode int = 400 - -/*DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest Internal error - -swagger:response deleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest -*/ -type DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest struct { -} - -// NewDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest creates DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest with default headers values -func NewDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest() *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest { - - return &DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest{} -} - -// WriteResponse to the client -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_properties_ethernet_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_properties_ethernet_urlbuilder.go deleted file mode 100644 index a93ae6aa3620ff3cca5a84003753411df18a6f6e..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_properties_ethernet_urlbuilder.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL generates an URL for the delete data waveserver interfaces physical interface name properties ethernet operation -type DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL struct { - Name string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL) WithBasePath(bp string) *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/physical-interface={name}/properties/ethernet/" - - name := o.Name - if name != "" { - _path = strings.Replace(_path, "{name}", name, -1) - } else { - return nil, errors.New("name is required on DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL") - } - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_properties_management.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_properties_management.go deleted file mode 100644 index dac171fe76310d7af3d0bf49ea59503e92b0694c..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_properties_management.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandlerFunc turns a function with the right signature into a delete data waveserver interfaces physical interface name properties management handler -type DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandlerFunc func(DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandlerFunc) Handle(params DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams) middleware.Responder { - return fn(params) -} - -// DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler interface for that can handle valid delete data waveserver interfaces physical interface name properties management params -type DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler interface { - Handle(DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams) middleware.Responder -} - -// NewDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement creates a new http.Handler for the delete data waveserver interfaces physical interface name properties management operation -func NewDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement(ctx *middleware.Context, handler DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler) *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement { - return &DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement{Context: ctx, Handler: handler} -} - -/*DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement swagger:route DELETE /data/waveserver-interfaces/physical-interface={name}/properties/management/ ciena-waveserver-interfaces deleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement - -removes ciena.waveserver.interfaces.ManagementIfPropertiesGroup - -Management interface attributes. - -*/ -type DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement struct { - Context *middleware.Context - Handler DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler -} - -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_properties_management_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_properties_management_parameters.go deleted file mode 100644 index 3b3ab41eefda86189303d7b072bdc106be435de7..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_properties_management_parameters.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" -) - -// NewDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams creates a new DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams object -// no default values defined in spec. -func NewDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams() DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams { - - return DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams{} -} - -// DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams contains all the bound params for the delete data waveserver interfaces physical interface name properties management operation -// typically these are obtained from a http.Request -// -// swagger:parameters DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement -type DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Id of physical-interface - Required: true - In: path - */ - Name string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams() beforehand. -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rName, rhkName, _ := route.Params.GetOK("name") - if err := o.bindName(rName, rhkName, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindName binds and validates parameter Name from path. -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.Name = raw - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_properties_management_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_properties_management_responses.go deleted file mode 100644 index ed70bfbc50cd16e50a888823d76fe53436050e47..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_properties_management_responses.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementNoContentCode is the HTTP code returned for type DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementNoContent -const DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementNoContentCode int = 204 - -/*DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementNoContent Object deleted - -swagger:response deleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementNoContent -*/ -type DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementNoContent struct { -} - -// NewDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementNoContent creates DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementNoContent with default headers values -func NewDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementNoContent() *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementNoContent { - - return &DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementNoContent{} -} - -// WriteResponse to the client -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequestCode is the HTTP code returned for type DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest -const DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequestCode int = 400 - -/*DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest Internal error - -swagger:response deleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest -*/ -type DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest struct { -} - -// NewDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest creates DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest with default headers values -func NewDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest() *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest { - - return &DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest{} -} - -// WriteResponse to the client -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_properties_management_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_properties_management_urlbuilder.go deleted file mode 100644 index 5293d352b6f3f92a49aa497f19b810c7b7fe967b..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_properties_management_urlbuilder.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL generates an URL for the delete data waveserver interfaces physical interface name properties management operation -type DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL struct { - Name string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL) WithBasePath(bp string) *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/physical-interface={name}/properties/management/" - - name := o.Name - if name != "" { - _path = strings.Replace(_path, "{name}", name, -1) - } else { - return nil, errors.New("name is required on DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL") - } - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_properties_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_properties_parameters.go deleted file mode 100644 index e7d02f137d622433d692b0aff10ecc00682a9711..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_properties_parameters.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" -) - -// NewDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams creates a new DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams object -// no default values defined in spec. -func NewDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams() DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams { - - return DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams{} -} - -// DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams contains all the bound params for the delete data waveserver interfaces physical interface name properties operation -// typically these are obtained from a http.Request -// -// swagger:parameters DeleteDataWaveserverInterfacesPhysicalInterfaceNameProperties -type DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Id of physical-interface - Required: true - In: path - */ - Name string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams() beforehand. -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rName, rhkName, _ := route.Params.GetOK("name") - if err := o.bindName(rName, rhkName, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindName binds and validates parameter Name from path. -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.Name = raw - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_properties_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_properties_responses.go deleted file mode 100644 index 8dec9acd6d0317ddd67b082a9186b09270ab5491..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_properties_responses.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesNoContentCode is the HTTP code returned for type DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesNoContent -const DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesNoContentCode int = 204 - -/*DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesNoContent Object deleted - -swagger:response deleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesNoContent -*/ -type DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesNoContent struct { -} - -// NewDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesNoContent creates DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesNoContent with default headers values -func NewDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesNoContent() *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesNoContent { - - return &DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesNoContent{} -} - -// WriteResponse to the client -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequestCode is the HTTP code returned for type DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest -const DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequestCode int = 400 - -/*DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest Internal error - -swagger:response deleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest -*/ -type DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest struct { -} - -// NewDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest creates DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest with default headers values -func NewDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest() *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest { - - return &DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest{} -} - -// WriteResponse to the client -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_properties_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_properties_urlbuilder.go deleted file mode 100644 index 200f07c8f8d65bd94ea5692eda6f3868dbb37045..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_properties_urlbuilder.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL generates an URL for the delete data waveserver interfaces physical interface name properties operation -type DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL struct { - Name string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL) WithBasePath(bp string) *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/physical-interface={name}/properties/" - - name := o.Name - if name != "" { - _path = strings.Replace(_path, "{name}", name, -1) - } else { - return nil, errors.New("name is required on DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL") - } - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_responses.go deleted file mode 100644 index b1e8d8f8134752e73cc8992e57d80a04e8f2215f..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_responses.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DeleteDataWaveserverInterfacesPhysicalInterfaceNameNoContentCode is the HTTP code returned for type DeleteDataWaveserverInterfacesPhysicalInterfaceNameNoContent -const DeleteDataWaveserverInterfacesPhysicalInterfaceNameNoContentCode int = 204 - -/*DeleteDataWaveserverInterfacesPhysicalInterfaceNameNoContent Object deleted - -swagger:response deleteDataWaveserverInterfacesPhysicalInterfaceNameNoContent -*/ -type DeleteDataWaveserverInterfacesPhysicalInterfaceNameNoContent struct { -} - -// NewDeleteDataWaveserverInterfacesPhysicalInterfaceNameNoContent creates DeleteDataWaveserverInterfacesPhysicalInterfaceNameNoContent with default headers values -func NewDeleteDataWaveserverInterfacesPhysicalInterfaceNameNoContent() *DeleteDataWaveserverInterfacesPhysicalInterfaceNameNoContent { - - return &DeleteDataWaveserverInterfacesPhysicalInterfaceNameNoContent{} -} - -// WriteResponse to the client -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DeleteDataWaveserverInterfacesPhysicalInterfaceNameBadRequestCode is the HTTP code returned for type DeleteDataWaveserverInterfacesPhysicalInterfaceNameBadRequest -const DeleteDataWaveserverInterfacesPhysicalInterfaceNameBadRequestCode int = 400 - -/*DeleteDataWaveserverInterfacesPhysicalInterfaceNameBadRequest Internal error - -swagger:response deleteDataWaveserverInterfacesPhysicalInterfaceNameBadRequest -*/ -type DeleteDataWaveserverInterfacesPhysicalInterfaceNameBadRequest struct { -} - -// NewDeleteDataWaveserverInterfacesPhysicalInterfaceNameBadRequest creates DeleteDataWaveserverInterfacesPhysicalInterfaceNameBadRequest with default headers values -func NewDeleteDataWaveserverInterfacesPhysicalInterfaceNameBadRequest() *DeleteDataWaveserverInterfacesPhysicalInterfaceNameBadRequest { - - return &DeleteDataWaveserverInterfacesPhysicalInterfaceNameBadRequest{} -} - -// WriteResponse to the client -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_state.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_state.go deleted file mode 100644 index b0d694324cecd8ac0e501c5b6773ffacd66e214b..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_state.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateHandlerFunc turns a function with the right signature into a delete data waveserver interfaces physical interface name state handler -type DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateHandlerFunc func(DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateHandlerFunc) Handle(params DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateParams) middleware.Responder { - return fn(params) -} - -// DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateHandler interface for that can handle valid delete data waveserver interfaces physical interface name state params -type DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateHandler interface { - Handle(DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateParams) middleware.Responder -} - -// NewDeleteDataWaveserverInterfacesPhysicalInterfaceNameState creates a new http.Handler for the delete data waveserver interfaces physical interface name state operation -func NewDeleteDataWaveserverInterfacesPhysicalInterfaceNameState(ctx *middleware.Context, handler DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateHandler) *DeleteDataWaveserverInterfacesPhysicalInterfaceNameState { - return &DeleteDataWaveserverInterfacesPhysicalInterfaceNameState{Context: ctx, Handler: handler} -} - -/*DeleteDataWaveserverInterfacesPhysicalInterfaceNameState swagger:route DELETE /data/waveserver-interfaces/physical-interface={name}/state/ ciena-waveserver-interfaces deleteDataWaveserverInterfacesPhysicalInterfaceNameState - -removes ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State - -Physical management interface state information. - -*/ -type DeleteDataWaveserverInterfacesPhysicalInterfaceNameState struct { - Context *middleware.Context - Handler DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateHandler -} - -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameState) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDeleteDataWaveserverInterfacesPhysicalInterfaceNameStateParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_state_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_state_parameters.go deleted file mode 100644 index 24cc6fa04f755a6049142b93df17e9f5cafb46d5..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_state_parameters.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" -) - -// NewDeleteDataWaveserverInterfacesPhysicalInterfaceNameStateParams creates a new DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateParams object -// no default values defined in spec. -func NewDeleteDataWaveserverInterfacesPhysicalInterfaceNameStateParams() DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateParams { - - return DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateParams{} -} - -// DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateParams contains all the bound params for the delete data waveserver interfaces physical interface name state operation -// typically these are obtained from a http.Request -// -// swagger:parameters DeleteDataWaveserverInterfacesPhysicalInterfaceNameState -type DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Id of physical-interface - Required: true - In: path - */ - Name string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDeleteDataWaveserverInterfacesPhysicalInterfaceNameStateParams() beforehand. -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rName, rhkName, _ := route.Params.GetOK("name") - if err := o.bindName(rName, rhkName, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindName binds and validates parameter Name from path. -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.Name = raw - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_state_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_state_responses.go deleted file mode 100644 index 9b23740e00e8167bbc38c7248e0560342f9479c9..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_state_responses.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateNoContentCode is the HTTP code returned for type DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateNoContent -const DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateNoContentCode int = 204 - -/*DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateNoContent Object deleted - -swagger:response deleteDataWaveserverInterfacesPhysicalInterfaceNameStateNoContent -*/ -type DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateNoContent struct { -} - -// NewDeleteDataWaveserverInterfacesPhysicalInterfaceNameStateNoContent creates DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateNoContent with default headers values -func NewDeleteDataWaveserverInterfacesPhysicalInterfaceNameStateNoContent() *DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateNoContent { - - return &DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateNoContent{} -} - -// WriteResponse to the client -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequestCode is the HTTP code returned for type DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest -const DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequestCode int = 400 - -/*DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest Internal error - -swagger:response deleteDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest -*/ -type DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest struct { -} - -// NewDeleteDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest creates DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest with default headers values -func NewDeleteDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest() *DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest { - - return &DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest{} -} - -// WriteResponse to the client -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_state_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_state_urlbuilder.go deleted file mode 100644 index e16e48fc53c23003be9ccffb1737e1bb5cab1820..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_physical_interface_name_state_urlbuilder.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateURL generates an URL for the delete data waveserver interfaces physical interface name state operation -type DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateURL struct { - Name string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateURL) WithBasePath(bp string) *DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/physical-interface={name}/state/" - - name := o.Name - if name != "" { - _path = strings.Replace(_path, "{name}", name, -1) - } else { - return nil, errors.New("name is required on DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateURL") - } - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_responses.go deleted file mode 100644 index 60fde80fe1c65fcbceed8ce2e8cebd3173161163..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_responses.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DeleteDataWaveserverInterfacesNoContentCode is the HTTP code returned for type DeleteDataWaveserverInterfacesNoContent -const DeleteDataWaveserverInterfacesNoContentCode int = 204 - -/*DeleteDataWaveserverInterfacesNoContent Object deleted - -swagger:response deleteDataWaveserverInterfacesNoContent -*/ -type DeleteDataWaveserverInterfacesNoContent struct { -} - -// NewDeleteDataWaveserverInterfacesNoContent creates DeleteDataWaveserverInterfacesNoContent with default headers values -func NewDeleteDataWaveserverInterfacesNoContent() *DeleteDataWaveserverInterfacesNoContent { - - return &DeleteDataWaveserverInterfacesNoContent{} -} - -// WriteResponse to the client -func (o *DeleteDataWaveserverInterfacesNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DeleteDataWaveserverInterfacesBadRequestCode is the HTTP code returned for type DeleteDataWaveserverInterfacesBadRequest -const DeleteDataWaveserverInterfacesBadRequestCode int = 400 - -/*DeleteDataWaveserverInterfacesBadRequest Internal error - -swagger:response deleteDataWaveserverInterfacesBadRequest -*/ -type DeleteDataWaveserverInterfacesBadRequest struct { -} - -// NewDeleteDataWaveserverInterfacesBadRequest creates DeleteDataWaveserverInterfacesBadRequest with default headers values -func NewDeleteDataWaveserverInterfacesBadRequest() *DeleteDataWaveserverInterfacesBadRequest { - - return &DeleteDataWaveserverInterfacesBadRequest{} -} - -// WriteResponse to the client -func (o *DeleteDataWaveserverInterfacesBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_routes.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_routes.go deleted file mode 100644 index 35aed68eac8fdfcadce50b8eb3e0a51aadcbcfc0..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_routes.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DeleteDataWaveserverInterfacesRoutesHandlerFunc turns a function with the right signature into a delete data waveserver interfaces routes handler -type DeleteDataWaveserverInterfacesRoutesHandlerFunc func(DeleteDataWaveserverInterfacesRoutesParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn DeleteDataWaveserverInterfacesRoutesHandlerFunc) Handle(params DeleteDataWaveserverInterfacesRoutesParams) middleware.Responder { - return fn(params) -} - -// DeleteDataWaveserverInterfacesRoutesHandler interface for that can handle valid delete data waveserver interfaces routes params -type DeleteDataWaveserverInterfacesRoutesHandler interface { - Handle(DeleteDataWaveserverInterfacesRoutesParams) middleware.Responder -} - -// NewDeleteDataWaveserverInterfacesRoutes creates a new http.Handler for the delete data waveserver interfaces routes operation -func NewDeleteDataWaveserverInterfacesRoutes(ctx *middleware.Context, handler DeleteDataWaveserverInterfacesRoutesHandler) *DeleteDataWaveserverInterfacesRoutes { - return &DeleteDataWaveserverInterfacesRoutes{Context: ctx, Handler: handler} -} - -/*DeleteDataWaveserverInterfacesRoutes swagger:route DELETE /data/waveserver-interfaces/routes/ ciena-waveserver-interfaces deleteDataWaveserverInterfacesRoutes - -removes ciena.waveserver.interfaces.waveserverinterfaces.Routes - -Top-level container for IP route configuration and operational data. - -*/ -type DeleteDataWaveserverInterfacesRoutes struct { - Context *middleware.Context - Handler DeleteDataWaveserverInterfacesRoutesHandler -} - -func (o *DeleteDataWaveserverInterfacesRoutes) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDeleteDataWaveserverInterfacesRoutesParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_routes_ip_v4_static_route_destination.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_routes_ip_v4_static_route_destination.go deleted file mode 100644 index 0730133d0a91d7d34c8fb12b40c7a9ab6a8512f7..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_routes_ip_v4_static_route_destination.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandlerFunc turns a function with the right signature into a delete data waveserver interfaces routes IP v4 static route destination handler -type DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandlerFunc func(DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandlerFunc) Handle(params DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams) middleware.Responder { - return fn(params) -} - -// DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler interface for that can handle valid delete data waveserver interfaces routes IP v4 static route destination params -type DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler interface { - Handle(DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams) middleware.Responder -} - -// NewDeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestination creates a new http.Handler for the delete data waveserver interfaces routes IP v4 static route destination operation -func NewDeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestination(ctx *middleware.Context, handler DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler) *DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestination { - return &DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestination{Context: ctx, Handler: handler} -} - -/*DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestination swagger:route DELETE /data/waveserver-interfaces/routes/ipv4-static-route={destination}/ ciena-waveserver-interfaces deleteDataWaveserverInterfacesRoutesIpV4StaticRouteDestination - -removes ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute - -List of IPv4 static routing entries. - -*/ -type DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestination struct { - Context *middleware.Context - Handler DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler -} - -func (o *DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestination) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_index.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_index.go deleted file mode 100644 index 1900f2aec74cb009352538bb462fd6f769acae7c..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_index.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandlerFunc turns a function with the right signature into a delete data waveserver interfaces routes IP v4 static route destination next hop index handler -type DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandlerFunc func(DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandlerFunc) Handle(params DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams) middleware.Responder { - return fn(params) -} - -// DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler interface for that can handle valid delete data waveserver interfaces routes IP v4 static route destination next hop index params -type DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler interface { - Handle(DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams) middleware.Responder -} - -// NewDeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndex creates a new http.Handler for the delete data waveserver interfaces routes IP v4 static route destination next hop index operation -func NewDeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndex(ctx *middleware.Context, handler DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler) *DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndex { - return &DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndex{Context: ctx, Handler: handler} -} - -/*DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndex swagger:route DELETE /data/waveserver-interfaces/routes/ipv4-static-route={destination}/next-hop={index}/ ciena-waveserver-interfaces deleteDataWaveserverInterfacesRoutesIpV4StaticRouteDestinationNextHopIndex - -removes ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop - -A list of next-hop entries associated with the static route. - -*/ -type DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndex struct { - Context *middleware.Context - Handler DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler -} - -func (o *DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndex) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewDeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_index_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_index_parameters.go deleted file mode 100644 index 3f38e95fcce0b3ef69fb982e015db8c387ae8dde..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_index_parameters.go +++ /dev/null @@ -1,102 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewDeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams creates a new DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams object -// no default values defined in spec. -func NewDeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams() DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams { - - return DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams{} -} - -// DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams contains all the bound params for the delete data waveserver interfaces routes IP v4 static route destination next hop index operation -// typically these are obtained from a http.Request -// -// swagger:parameters DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndex -type DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Id of ipv4-static-route - Required: true - In: path - */ - Destination string - /*Id of next-hop - Required: true - In: path - */ - Index int64 -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams() beforehand. -func (o *DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rDestination, rhkDestination, _ := route.Params.GetOK("destination") - if err := o.bindDestination(rDestination, rhkDestination, route.Formats); err != nil { - res = append(res, err) - } - - rIndex, rhkIndex, _ := route.Params.GetOK("index") - if err := o.bindIndex(rIndex, rhkIndex, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindDestination binds and validates parameter Destination from path. -func (o *DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams) bindDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.Destination = raw - - return nil -} - -// bindIndex binds and validates parameter Index from path. -func (o *DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams) bindIndex(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - value, err := swag.ConvertInt64(raw) - if err != nil { - return errors.InvalidType("index", "path", "int64", raw) - } - o.Index = value - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_index_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_index_responses.go deleted file mode 100644 index f86ba4e59bd60163a7b6c421edc6b9f4ad8a82ce..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_index_responses.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexNoContentCode is the HTTP code returned for type DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexNoContent -const DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexNoContentCode int = 204 - -/*DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexNoContent Object deleted - -swagger:response deleteDataWaveserverInterfacesRoutesIpV4StaticRouteDestinationNextHopIndexNoContent -*/ -type DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexNoContent struct { -} - -// NewDeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexNoContent creates DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexNoContent with default headers values -func NewDeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexNoContent() *DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexNoContent { - - return &DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexNoContent{} -} - -// WriteResponse to the client -func (o *DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexBadRequestCode is the HTTP code returned for type DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexBadRequest -const DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexBadRequestCode int = 400 - -/*DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexBadRequest Internal error - -swagger:response deleteDataWaveserverInterfacesRoutesIpV4StaticRouteDestinationNextHopIndexBadRequest -*/ -type DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexBadRequest struct { -} - -// NewDeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexBadRequest creates DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexBadRequest with default headers values -func NewDeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexBadRequest() *DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexBadRequest { - - return &DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexBadRequest{} -} - -// WriteResponse to the client -func (o *DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_index_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_index_urlbuilder.go deleted file mode 100644 index de36efdc63431737b826c7c6174a7aa22c663c40..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_index_urlbuilder.go +++ /dev/null @@ -1,106 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" - - "github.com/go-openapi/swag" -) - -// DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL generates an URL for the delete data waveserver interfaces routes IP v4 static route destination next hop index operation -type DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL struct { - Destination string - Index int64 - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL) WithBasePath(bp string) *DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/routes/ipv4-static-route={destination}/next-hop={index}/" - - destination := o.Destination - if destination != "" { - _path = strings.Replace(_path, "{destination}", destination, -1) - } else { - return nil, errors.New("destination is required on DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL") - } - - index := swag.FormatInt64(o.Index) - if index != "" { - _path = strings.Replace(_path, "{index}", index, -1) - } else { - return nil, errors.New("index is required on DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL") - } - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_routes_ip_v4_static_route_destination_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_routes_ip_v4_static_route_destination_parameters.go deleted file mode 100644 index 3248ab3805266671f1a21e0781e1a7ce67c1368a..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_routes_ip_v4_static_route_destination_parameters.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" -) - -// NewDeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams creates a new DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams object -// no default values defined in spec. -func NewDeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams() DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams { - - return DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams{} -} - -// DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams contains all the bound params for the delete data waveserver interfaces routes IP v4 static route destination operation -// typically these are obtained from a http.Request -// -// swagger:parameters DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestination -type DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Id of ipv4-static-route - Required: true - In: path - */ - Destination string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams() beforehand. -func (o *DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rDestination, rhkDestination, _ := route.Params.GetOK("destination") - if err := o.bindDestination(rDestination, rhkDestination, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindDestination binds and validates parameter Destination from path. -func (o *DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams) bindDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.Destination = raw - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_routes_ip_v4_static_route_destination_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_routes_ip_v4_static_route_destination_responses.go deleted file mode 100644 index 39540b5fcfe2d0e458bb8900f4ac26c08f4ce26c..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_routes_ip_v4_static_route_destination_responses.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNoContentCode is the HTTP code returned for type DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNoContent -const DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNoContentCode int = 204 - -/*DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNoContent Object deleted - -swagger:response deleteDataWaveserverInterfacesRoutesIpV4StaticRouteDestinationNoContent -*/ -type DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNoContent struct { -} - -// NewDeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNoContent creates DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNoContent with default headers values -func NewDeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNoContent() *DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNoContent { - - return &DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNoContent{} -} - -// WriteResponse to the client -func (o *DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationBadRequestCode is the HTTP code returned for type DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationBadRequest -const DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationBadRequestCode int = 400 - -/*DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationBadRequest Internal error - -swagger:response deleteDataWaveserverInterfacesRoutesIpV4StaticRouteDestinationBadRequest -*/ -type DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationBadRequest struct { -} - -// NewDeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationBadRequest creates DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationBadRequest with default headers values -func NewDeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationBadRequest() *DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationBadRequest { - - return &DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationBadRequest{} -} - -// WriteResponse to the client -func (o *DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_routes_ip_v4_static_route_destination_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_routes_ip_v4_static_route_destination_urlbuilder.go deleted file mode 100644 index 90a83b0ff61ddee9f2af8a8471de9674371241ef..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_routes_ip_v4_static_route_destination_urlbuilder.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL generates an URL for the delete data waveserver interfaces routes IP v4 static route destination operation -type DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL struct { - Destination string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL) WithBasePath(bp string) *DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/routes/ipv4-static-route={destination}/" - - destination := o.Destination - if destination != "" { - _path = strings.Replace(_path, "{destination}", destination, -1) - } else { - return nil, errors.New("destination is required on DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL") - } - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_routes_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_routes_parameters.go deleted file mode 100644 index dc9a372ba410e5d91fd9d6585aa4d8ef3e1e6d8c..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_routes_parameters.go +++ /dev/null @@ -1,45 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" -) - -// NewDeleteDataWaveserverInterfacesRoutesParams creates a new DeleteDataWaveserverInterfacesRoutesParams object -// no default values defined in spec. -func NewDeleteDataWaveserverInterfacesRoutesParams() DeleteDataWaveserverInterfacesRoutesParams { - - return DeleteDataWaveserverInterfacesRoutesParams{} -} - -// DeleteDataWaveserverInterfacesRoutesParams contains all the bound params for the delete data waveserver interfaces routes operation -// typically these are obtained from a http.Request -// -// swagger:parameters DeleteDataWaveserverInterfacesRoutes -type DeleteDataWaveserverInterfacesRoutesParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewDeleteDataWaveserverInterfacesRoutesParams() beforehand. -func (o *DeleteDataWaveserverInterfacesRoutesParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_routes_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_routes_responses.go deleted file mode 100644 index 0da3a1ccb6a9a54268d27fb85151854075554c53..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_routes_responses.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// DeleteDataWaveserverInterfacesRoutesNoContentCode is the HTTP code returned for type DeleteDataWaveserverInterfacesRoutesNoContent -const DeleteDataWaveserverInterfacesRoutesNoContentCode int = 204 - -/*DeleteDataWaveserverInterfacesRoutesNoContent Object deleted - -swagger:response deleteDataWaveserverInterfacesRoutesNoContent -*/ -type DeleteDataWaveserverInterfacesRoutesNoContent struct { -} - -// NewDeleteDataWaveserverInterfacesRoutesNoContent creates DeleteDataWaveserverInterfacesRoutesNoContent with default headers values -func NewDeleteDataWaveserverInterfacesRoutesNoContent() *DeleteDataWaveserverInterfacesRoutesNoContent { - - return &DeleteDataWaveserverInterfacesRoutesNoContent{} -} - -// WriteResponse to the client -func (o *DeleteDataWaveserverInterfacesRoutesNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// DeleteDataWaveserverInterfacesRoutesBadRequestCode is the HTTP code returned for type DeleteDataWaveserverInterfacesRoutesBadRequest -const DeleteDataWaveserverInterfacesRoutesBadRequestCode int = 400 - -/*DeleteDataWaveserverInterfacesRoutesBadRequest Internal error - -swagger:response deleteDataWaveserverInterfacesRoutesBadRequest -*/ -type DeleteDataWaveserverInterfacesRoutesBadRequest struct { -} - -// NewDeleteDataWaveserverInterfacesRoutesBadRequest creates DeleteDataWaveserverInterfacesRoutesBadRequest with default headers values -func NewDeleteDataWaveserverInterfacesRoutesBadRequest() *DeleteDataWaveserverInterfacesRoutesBadRequest { - - return &DeleteDataWaveserverInterfacesRoutesBadRequest{} -} - -// WriteResponse to the client -func (o *DeleteDataWaveserverInterfacesRoutesBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_routes_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_routes_urlbuilder.go deleted file mode 100644 index 92e095d314d9eab229fddcd5135119e51fc8c414..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_routes_urlbuilder.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" -) - -// DeleteDataWaveserverInterfacesRoutesURL generates an URL for the delete data waveserver interfaces routes operation -type DeleteDataWaveserverInterfacesRoutesURL struct { - _basePath string -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DeleteDataWaveserverInterfacesRoutesURL) WithBasePath(bp string) *DeleteDataWaveserverInterfacesRoutesURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DeleteDataWaveserverInterfacesRoutesURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DeleteDataWaveserverInterfacesRoutesURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/routes/" - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DeleteDataWaveserverInterfacesRoutesURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DeleteDataWaveserverInterfacesRoutesURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DeleteDataWaveserverInterfacesRoutesURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DeleteDataWaveserverInterfacesRoutesURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DeleteDataWaveserverInterfacesRoutesURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DeleteDataWaveserverInterfacesRoutesURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_urlbuilder.go deleted file mode 100644 index 133b995a1fa3a2a98f0c8d31f46a7d7a1493dc8e..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/delete_data_waveserver_interfaces_urlbuilder.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" -) - -// DeleteDataWaveserverInterfacesURL generates an URL for the delete data waveserver interfaces operation -type DeleteDataWaveserverInterfacesURL struct { - _basePath string -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DeleteDataWaveserverInterfacesURL) WithBasePath(bp string) *DeleteDataWaveserverInterfacesURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *DeleteDataWaveserverInterfacesURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *DeleteDataWaveserverInterfacesURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/" - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *DeleteDataWaveserverInterfacesURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *DeleteDataWaveserverInterfacesURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *DeleteDataWaveserverInterfacesURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on DeleteDataWaveserverInterfacesURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on DeleteDataWaveserverInterfacesURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *DeleteDataWaveserverInterfacesURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces.go deleted file mode 100644 index 516ba66240f3df25feaffd3c736ea9e998acb386..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces.go +++ /dev/null @@ -1,61 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// GetDataWaveserverInterfacesHandlerFunc turns a function with the right signature into a get data waveserver interfaces handler -type GetDataWaveserverInterfacesHandlerFunc func(GetDataWaveserverInterfacesParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn GetDataWaveserverInterfacesHandlerFunc) Handle(params GetDataWaveserverInterfacesParams) middleware.Responder { - return fn(params) -} - -// GetDataWaveserverInterfacesHandler interface for that can handle valid get data waveserver interfaces params -type GetDataWaveserverInterfacesHandler interface { - Handle(GetDataWaveserverInterfacesParams) middleware.Responder -} - -// NewGetDataWaveserverInterfaces creates a new http.Handler for the get data waveserver interfaces operation -func NewGetDataWaveserverInterfaces(ctx *middleware.Context, handler GetDataWaveserverInterfacesHandler) *GetDataWaveserverInterfaces { - return &GetDataWaveserverInterfaces{Context: ctx, Handler: handler} -} - -/*GetDataWaveserverInterfaces swagger:route GET /data/waveserver-interfaces/ ciena-waveserver-interfaces getDataWaveserverInterfaces - -returns ciena.waveserver.interfaces.WaveserverInterfaces - -Top level container for configuration and operational data for physical - and logical network interfaces. - -*/ -type GetDataWaveserverInterfaces struct { - Context *middleware.Context - Handler GetDataWaveserverInterfacesHandler -} - -func (o *GetDataWaveserverInterfaces) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewGetDataWaveserverInterfacesParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index.go deleted file mode 100644 index f5e1ff7235a984e7e1e7b4baae896ea87a22874b..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// GetDataWaveserverInterfacesLogicalInterfaceIndexHandlerFunc turns a function with the right signature into a get data waveserver interfaces logical interface index handler -type GetDataWaveserverInterfacesLogicalInterfaceIndexHandlerFunc func(GetDataWaveserverInterfacesLogicalInterfaceIndexParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn GetDataWaveserverInterfacesLogicalInterfaceIndexHandlerFunc) Handle(params GetDataWaveserverInterfacesLogicalInterfaceIndexParams) middleware.Responder { - return fn(params) -} - -// GetDataWaveserverInterfacesLogicalInterfaceIndexHandler interface for that can handle valid get data waveserver interfaces logical interface index params -type GetDataWaveserverInterfacesLogicalInterfaceIndexHandler interface { - Handle(GetDataWaveserverInterfacesLogicalInterfaceIndexParams) middleware.Responder -} - -// NewGetDataWaveserverInterfacesLogicalInterfaceIndex creates a new http.Handler for the get data waveserver interfaces logical interface index operation -func NewGetDataWaveserverInterfacesLogicalInterfaceIndex(ctx *middleware.Context, handler GetDataWaveserverInterfacesLogicalInterfaceIndexHandler) *GetDataWaveserverInterfacesLogicalInterfaceIndex { - return &GetDataWaveserverInterfacesLogicalInterfaceIndex{Context: ctx, Handler: handler} -} - -/*GetDataWaveserverInterfacesLogicalInterfaceIndex swagger:route GET /data/waveserver-interfaces/logical-interface={index}/ ciena-waveserver-interfaces getDataWaveserverInterfacesLogicalInterfaceIndex - -returns ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface - -List of logical IP management interfaces (e.g. 'local'). - -*/ -type GetDataWaveserverInterfacesLogicalInterfaceIndex struct { - Context *middleware.Context - Handler GetDataWaveserverInterfacesLogicalInterfaceIndexHandler -} - -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndex) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewGetDataWaveserverInterfacesLogicalInterfaceIndexParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_id.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_id.go deleted file mode 100644 index c001d922252fb9265c281cd05f703c40e41cc2f6..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_id.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// GetDataWaveserverInterfacesLogicalInterfaceIndexIDHandlerFunc turns a function with the right signature into a get data waveserver interfaces logical interface index ID handler -type GetDataWaveserverInterfacesLogicalInterfaceIndexIDHandlerFunc func(GetDataWaveserverInterfacesLogicalInterfaceIndexIDParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn GetDataWaveserverInterfacesLogicalInterfaceIndexIDHandlerFunc) Handle(params GetDataWaveserverInterfacesLogicalInterfaceIndexIDParams) middleware.Responder { - return fn(params) -} - -// GetDataWaveserverInterfacesLogicalInterfaceIndexIDHandler interface for that can handle valid get data waveserver interfaces logical interface index ID params -type GetDataWaveserverInterfacesLogicalInterfaceIndexIDHandler interface { - Handle(GetDataWaveserverInterfacesLogicalInterfaceIndexIDParams) middleware.Responder -} - -// NewGetDataWaveserverInterfacesLogicalInterfaceIndexID creates a new http.Handler for the get data waveserver interfaces logical interface index ID operation -func NewGetDataWaveserverInterfacesLogicalInterfaceIndexID(ctx *middleware.Context, handler GetDataWaveserverInterfacesLogicalInterfaceIndexIDHandler) *GetDataWaveserverInterfacesLogicalInterfaceIndexID { - return &GetDataWaveserverInterfacesLogicalInterfaceIndexID{Context: ctx, Handler: handler} -} - -/*GetDataWaveserverInterfacesLogicalInterfaceIndexID swagger:route GET /data/waveserver-interfaces/logical-interface={index}/id/ ciena-waveserver-interfaces getDataWaveserverInterfacesLogicalInterfaceIndexId - -returns ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id - -Identification information of this logical management interface. - -*/ -type GetDataWaveserverInterfacesLogicalInterfaceIndexID struct { - Context *middleware.Context - Handler GetDataWaveserverInterfacesLogicalInterfaceIndexIDHandler -} - -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexID) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewGetDataWaveserverInterfacesLogicalInterfaceIndexIDParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_id_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_id_parameters.go deleted file mode 100644 index 6bcf7abd2e84d8dc9ad5c3a2e285f55f91c9b7fa..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_id_parameters.go +++ /dev/null @@ -1,77 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewGetDataWaveserverInterfacesLogicalInterfaceIndexIDParams creates a new GetDataWaveserverInterfacesLogicalInterfaceIndexIDParams object -// no default values defined in spec. -func NewGetDataWaveserverInterfacesLogicalInterfaceIndexIDParams() GetDataWaveserverInterfacesLogicalInterfaceIndexIDParams { - - return GetDataWaveserverInterfacesLogicalInterfaceIndexIDParams{} -} - -// GetDataWaveserverInterfacesLogicalInterfaceIndexIDParams contains all the bound params for the get data waveserver interfaces logical interface index ID operation -// typically these are obtained from a http.Request -// -// swagger:parameters GetDataWaveserverInterfacesLogicalInterfaceIndexID -type GetDataWaveserverInterfacesLogicalInterfaceIndexIDParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Id of logical-interface - Required: true - In: path - */ - Index int64 -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewGetDataWaveserverInterfacesLogicalInterfaceIndexIDParams() beforehand. -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexIDParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rIndex, rhkIndex, _ := route.Params.GetOK("index") - if err := o.bindIndex(rIndex, rhkIndex, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindIndex binds and validates parameter Index from path. -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexIDParams) bindIndex(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - value, err := swag.ConvertInt64(raw) - if err != nil { - return errors.InvalidType("index", "path", "int64", raw) - } - o.Index = value - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_id_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_id_responses.go deleted file mode 100644 index 72ec05c69a964e69dd1410b03ff25a816ee94aa3..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_id_responses.go +++ /dev/null @@ -1,82 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// GetDataWaveserverInterfacesLogicalInterfaceIndexIDOKCode is the HTTP code returned for type GetDataWaveserverInterfacesLogicalInterfaceIndexIDOK -const GetDataWaveserverInterfacesLogicalInterfaceIndexIDOKCode int = 200 - -/*GetDataWaveserverInterfacesLogicalInterfaceIndexIDOK ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id - -swagger:response getDataWaveserverInterfacesLogicalInterfaceIndexIdOK -*/ -type GetDataWaveserverInterfacesLogicalInterfaceIndexIDOK struct { - - /* - In: Body - */ - Payload *models.CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceIDWrapper `json:"body,omitempty"` -} - -// NewGetDataWaveserverInterfacesLogicalInterfaceIndexIDOK creates GetDataWaveserverInterfacesLogicalInterfaceIndexIDOK with default headers values -func NewGetDataWaveserverInterfacesLogicalInterfaceIndexIDOK() *GetDataWaveserverInterfacesLogicalInterfaceIndexIDOK { - - return &GetDataWaveserverInterfacesLogicalInterfaceIndexIDOK{} -} - -// WithPayload adds the payload to the get data waveserver interfaces logical interface index Id o k response -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexIDOK) WithPayload(payload *models.CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceIDWrapper) *GetDataWaveserverInterfacesLogicalInterfaceIndexIDOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the get data waveserver interfaces logical interface index Id o k response -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexIDOK) SetPayload(payload *models.CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceIDWrapper) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexIDOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// GetDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequestCode is the HTTP code returned for type GetDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequest -const GetDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequestCode int = 400 - -/*GetDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequest Internal error - -swagger:response getDataWaveserverInterfacesLogicalInterfaceIndexIdBadRequest -*/ -type GetDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequest struct { -} - -// NewGetDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequest creates GetDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequest with default headers values -func NewGetDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequest() *GetDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequest { - - return &GetDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequest{} -} - -// WriteResponse to the client -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_parameters.go deleted file mode 100644 index f685ccd4d0533dc41a8e35753d7b99e6ec3007d5..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_parameters.go +++ /dev/null @@ -1,77 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewGetDataWaveserverInterfacesLogicalInterfaceIndexParams creates a new GetDataWaveserverInterfacesLogicalInterfaceIndexParams object -// no default values defined in spec. -func NewGetDataWaveserverInterfacesLogicalInterfaceIndexParams() GetDataWaveserverInterfacesLogicalInterfaceIndexParams { - - return GetDataWaveserverInterfacesLogicalInterfaceIndexParams{} -} - -// GetDataWaveserverInterfacesLogicalInterfaceIndexParams contains all the bound params for the get data waveserver interfaces logical interface index operation -// typically these are obtained from a http.Request -// -// swagger:parameters GetDataWaveserverInterfacesLogicalInterfaceIndex -type GetDataWaveserverInterfacesLogicalInterfaceIndexParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Id of logical-interface - Required: true - In: path - */ - Index int64 -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewGetDataWaveserverInterfacesLogicalInterfaceIndexParams() beforehand. -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rIndex, rhkIndex, _ := route.Params.GetOK("index") - if err := o.bindIndex(rIndex, rhkIndex, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindIndex binds and validates parameter Index from path. -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexParams) bindIndex(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - value, err := swag.ConvertInt64(raw) - if err != nil { - return errors.InvalidType("index", "path", "int64", raw) - } - o.Index = value - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_properties.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_properties.go deleted file mode 100644 index eebf1c8f9c084b4f2f26076f5da452be06d9f371..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_properties.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandlerFunc turns a function with the right signature into a get data waveserver interfaces logical interface index properties handler -type GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandlerFunc func(GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandlerFunc) Handle(params GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams) middleware.Responder { - return fn(params) -} - -// GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler interface for that can handle valid get data waveserver interfaces logical interface index properties params -type GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler interface { - Handle(GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams) middleware.Responder -} - -// NewGetDataWaveserverInterfacesLogicalInterfaceIndexProperties creates a new http.Handler for the get data waveserver interfaces logical interface index properties operation -func NewGetDataWaveserverInterfacesLogicalInterfaceIndexProperties(ctx *middleware.Context, handler GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler) *GetDataWaveserverInterfacesLogicalInterfaceIndexProperties { - return &GetDataWaveserverInterfacesLogicalInterfaceIndexProperties{Context: ctx, Handler: handler} -} - -/*GetDataWaveserverInterfacesLogicalInterfaceIndexProperties swagger:route GET /data/waveserver-interfaces/logical-interface={index}/properties/ ciena-waveserver-interfaces getDataWaveserverInterfacesLogicalInterfaceIndexProperties - -returns ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties - -All the configuration data of the logical management interface. - -*/ -type GetDataWaveserverInterfacesLogicalInterfaceIndexProperties struct { - Context *middleware.Context - Handler GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler -} - -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexProperties) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewGetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_properties_ip_v4.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_properties_ip_v4.go deleted file mode 100644 index eaae12babb2387692283e179e7e189afcd933e16..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_properties_ip_v4.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4HandlerFunc turns a function with the right signature into a get data waveserver interfaces logical interface index properties IP v4 handler -type GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4HandlerFunc func(GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params) middleware.Responder - -// Handle executing the request and returning a response -func (fn GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4HandlerFunc) Handle(params GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params) middleware.Responder { - return fn(params) -} - -// GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler interface for that can handle valid get data waveserver interfaces logical interface index properties IP v4 params -type GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler interface { - Handle(GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params) middleware.Responder -} - -// NewGetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4 creates a new http.Handler for the get data waveserver interfaces logical interface index properties IP v4 operation -func NewGetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4(ctx *middleware.Context, handler GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler) *GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4 { - return &GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4{Context: ctx, Handler: handler} -} - -/*GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4 swagger:route GET /data/waveserver-interfaces/logical-interface={index}/properties/ipv4/ ciena-waveserver-interfaces getDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIpV4 - -returns ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4 - -IPv4 configuration and operational data. - -*/ -type GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4 struct { - Context *middleware.Context - Handler GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler -} - -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewGetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_properties_ip_v4_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_properties_ip_v4_parameters.go deleted file mode 100644 index d0cbbde54e057181b031be17177ddf1c50b1b1d4..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_properties_ip_v4_parameters.go +++ /dev/null @@ -1,77 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewGetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params creates a new GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params object -// no default values defined in spec. -func NewGetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params() GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params { - - return GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params{} -} - -// GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params contains all the bound params for the get data waveserver interfaces logical interface index properties IP v4 operation -// typically these are obtained from a http.Request -// -// swagger:parameters GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4 -type GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Id of logical-interface - Required: true - In: path - */ - Index int64 -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewGetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params() beforehand. -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rIndex, rhkIndex, _ := route.Params.GetOK("index") - if err := o.bindIndex(rIndex, rhkIndex, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindIndex binds and validates parameter Index from path. -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params) bindIndex(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - value, err := swag.ConvertInt64(raw) - if err != nil { - return errors.InvalidType("index", "path", "int64", raw) - } - o.Index = value - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_properties_ip_v4_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_properties_ip_v4_responses.go deleted file mode 100644 index 986543fcb23b15bb7eb192ae4c1adb66eb4105f9..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_properties_ip_v4_responses.go +++ /dev/null @@ -1,82 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4OKCode is the HTTP code returned for type GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4OK -const GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4OKCode int = 200 - -/*GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4OK ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4 - -swagger:response getDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIpV4OK -*/ -type GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4OK struct { - - /* - In: Body - */ - Payload *models.CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesIPV4Wrapper `json:"body,omitempty"` -} - -// NewGetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4OK creates GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4OK with default headers values -func NewGetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4OK() *GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4OK { - - return &GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4OK{} -} - -// WithPayload adds the payload to the get data waveserver interfaces logical interface index properties Ip v4 o k response -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4OK) WithPayload(payload *models.CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesIPV4Wrapper) *GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4OK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the get data waveserver interfaces logical interface index properties Ip v4 o k response -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4OK) SetPayload(payload *models.CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesIPV4Wrapper) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4OK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequestCode is the HTTP code returned for type GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequest -const GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequestCode int = 400 - -/*GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequest Internal error - -swagger:response getDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIpV4BadRequest -*/ -type GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequest struct { -} - -// NewGetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequest creates GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequest with default headers values -func NewGetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequest() *GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequest { - - return &GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequest{} -} - -// WriteResponse to the client -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_properties_ip_v4_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_properties_ip_v4_urlbuilder.go deleted file mode 100644 index 6740e1fb1e75ef7f48a4b65c23e2cddb3d326f04..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_properties_ip_v4_urlbuilder.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" - - "github.com/go-openapi/swag" -) - -// GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL generates an URL for the get data waveserver interfaces logical interface index properties IP v4 operation -type GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL struct { - Index int64 - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL) WithBasePath(bp string) *GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/logical-interface={index}/properties/ipv4/" - - index := swag.FormatInt64(o.Index) - if index != "" { - _path = strings.Replace(_path, "{index}", index, -1) - } else { - return nil, errors.New("index is required on GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL") - } - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL") - } - if host == "" { - return nil, errors.New("host is required for a full url on GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_properties_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_properties_parameters.go deleted file mode 100644 index 282709d9da4cf00b0efb4ec234670055fac9596f..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_properties_parameters.go +++ /dev/null @@ -1,77 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewGetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams creates a new GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams object -// no default values defined in spec. -func NewGetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams() GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams { - - return GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams{} -} - -// GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams contains all the bound params for the get data waveserver interfaces logical interface index properties operation -// typically these are obtained from a http.Request -// -// swagger:parameters GetDataWaveserverInterfacesLogicalInterfaceIndexProperties -type GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Id of logical-interface - Required: true - In: path - */ - Index int64 -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewGetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams() beforehand. -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rIndex, rhkIndex, _ := route.Params.GetOK("index") - if err := o.bindIndex(rIndex, rhkIndex, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindIndex binds and validates parameter Index from path. -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams) bindIndex(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - value, err := swag.ConvertInt64(raw) - if err != nil { - return errors.InvalidType("index", "path", "int64", raw) - } - o.Index = value - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_properties_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_properties_responses.go deleted file mode 100644 index 488c89c4205311bfdde5bd14a557baa6e1e0f300..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_properties_responses.go +++ /dev/null @@ -1,82 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesOKCode is the HTTP code returned for type GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesOK -const GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesOKCode int = 200 - -/*GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesOK ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties - -swagger:response getDataWaveserverInterfacesLogicalInterfaceIndexPropertiesOK -*/ -type GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesOK struct { - - /* - In: Body - */ - Payload *models.CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesWrapper `json:"body,omitempty"` -} - -// NewGetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesOK creates GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesOK with default headers values -func NewGetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesOK() *GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesOK { - - return &GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesOK{} -} - -// WithPayload adds the payload to the get data waveserver interfaces logical interface index properties o k response -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesOK) WithPayload(payload *models.CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesWrapper) *GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the get data waveserver interfaces logical interface index properties o k response -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesOK) SetPayload(payload *models.CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesWrapper) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequestCode is the HTTP code returned for type GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest -const GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequestCode int = 400 - -/*GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest Internal error - -swagger:response getDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest -*/ -type GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest struct { -} - -// NewGetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest creates GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest with default headers values -func NewGetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest() *GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest { - - return &GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest{} -} - -// WriteResponse to the client -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_properties_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_properties_urlbuilder.go deleted file mode 100644 index 137e9b1278504573919b646d16078a08ae465a8d..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_properties_urlbuilder.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" - - "github.com/go-openapi/swag" -) - -// GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL generates an URL for the get data waveserver interfaces logical interface index properties operation -type GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL struct { - Index int64 - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL) WithBasePath(bp string) *GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/logical-interface={index}/properties/" - - index := swag.FormatInt64(o.Index) - if index != "" { - _path = strings.Replace(_path, "{index}", index, -1) - } else { - return nil, errors.New("index is required on GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL") - } - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_responses.go deleted file mode 100644 index 5d848c14c80d7afe64cb167fbca9038d1c46ddd3..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_responses.go +++ /dev/null @@ -1,82 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// GetDataWaveserverInterfacesLogicalInterfaceIndexOKCode is the HTTP code returned for type GetDataWaveserverInterfacesLogicalInterfaceIndexOK -const GetDataWaveserverInterfacesLogicalInterfaceIndexOKCode int = 200 - -/*GetDataWaveserverInterfacesLogicalInterfaceIndexOK ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface - -swagger:response getDataWaveserverInterfacesLogicalInterfaceIndexOK -*/ -type GetDataWaveserverInterfacesLogicalInterfaceIndexOK struct { - - /* - In: Body - */ - Payload *models.CienaWaveserverInterfacesWaveserverinterfacesLogicalInterfaceWrapper `json:"body,omitempty"` -} - -// NewGetDataWaveserverInterfacesLogicalInterfaceIndexOK creates GetDataWaveserverInterfacesLogicalInterfaceIndexOK with default headers values -func NewGetDataWaveserverInterfacesLogicalInterfaceIndexOK() *GetDataWaveserverInterfacesLogicalInterfaceIndexOK { - - return &GetDataWaveserverInterfacesLogicalInterfaceIndexOK{} -} - -// WithPayload adds the payload to the get data waveserver interfaces logical interface index o k response -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexOK) WithPayload(payload *models.CienaWaveserverInterfacesWaveserverinterfacesLogicalInterfaceWrapper) *GetDataWaveserverInterfacesLogicalInterfaceIndexOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the get data waveserver interfaces logical interface index o k response -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexOK) SetPayload(payload *models.CienaWaveserverInterfacesWaveserverinterfacesLogicalInterfaceWrapper) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// GetDataWaveserverInterfacesLogicalInterfaceIndexBadRequestCode is the HTTP code returned for type GetDataWaveserverInterfacesLogicalInterfaceIndexBadRequest -const GetDataWaveserverInterfacesLogicalInterfaceIndexBadRequestCode int = 400 - -/*GetDataWaveserverInterfacesLogicalInterfaceIndexBadRequest Internal error - -swagger:response getDataWaveserverInterfacesLogicalInterfaceIndexBadRequest -*/ -type GetDataWaveserverInterfacesLogicalInterfaceIndexBadRequest struct { -} - -// NewGetDataWaveserverInterfacesLogicalInterfaceIndexBadRequest creates GetDataWaveserverInterfacesLogicalInterfaceIndexBadRequest with default headers values -func NewGetDataWaveserverInterfacesLogicalInterfaceIndexBadRequest() *GetDataWaveserverInterfacesLogicalInterfaceIndexBadRequest { - - return &GetDataWaveserverInterfacesLogicalInterfaceIndexBadRequest{} -} - -// WriteResponse to the client -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_state.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_state.go deleted file mode 100644 index 168d467907b12937c6da3ad545f70b2e5291117f..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_state.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// GetDataWaveserverInterfacesLogicalInterfaceIndexStateHandlerFunc turns a function with the right signature into a get data waveserver interfaces logical interface index state handler -type GetDataWaveserverInterfacesLogicalInterfaceIndexStateHandlerFunc func(GetDataWaveserverInterfacesLogicalInterfaceIndexStateParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn GetDataWaveserverInterfacesLogicalInterfaceIndexStateHandlerFunc) Handle(params GetDataWaveserverInterfacesLogicalInterfaceIndexStateParams) middleware.Responder { - return fn(params) -} - -// GetDataWaveserverInterfacesLogicalInterfaceIndexStateHandler interface for that can handle valid get data waveserver interfaces logical interface index state params -type GetDataWaveserverInterfacesLogicalInterfaceIndexStateHandler interface { - Handle(GetDataWaveserverInterfacesLogicalInterfaceIndexStateParams) middleware.Responder -} - -// NewGetDataWaveserverInterfacesLogicalInterfaceIndexState creates a new http.Handler for the get data waveserver interfaces logical interface index state operation -func NewGetDataWaveserverInterfacesLogicalInterfaceIndexState(ctx *middleware.Context, handler GetDataWaveserverInterfacesLogicalInterfaceIndexStateHandler) *GetDataWaveserverInterfacesLogicalInterfaceIndexState { - return &GetDataWaveserverInterfacesLogicalInterfaceIndexState{Context: ctx, Handler: handler} -} - -/*GetDataWaveserverInterfacesLogicalInterfaceIndexState swagger:route GET /data/waveserver-interfaces/logical-interface={index}/state/ ciena-waveserver-interfaces getDataWaveserverInterfacesLogicalInterfaceIndexState - -returns ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State - -Logical interface state information. - -*/ -type GetDataWaveserverInterfacesLogicalInterfaceIndexState struct { - Context *middleware.Context - Handler GetDataWaveserverInterfacesLogicalInterfaceIndexStateHandler -} - -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexState) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewGetDataWaveserverInterfacesLogicalInterfaceIndexStateParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_state_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_state_parameters.go deleted file mode 100644 index 5b71f28c9ae640a79827645f5d9a250e4ff821b7..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_state_parameters.go +++ /dev/null @@ -1,77 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewGetDataWaveserverInterfacesLogicalInterfaceIndexStateParams creates a new GetDataWaveserverInterfacesLogicalInterfaceIndexStateParams object -// no default values defined in spec. -func NewGetDataWaveserverInterfacesLogicalInterfaceIndexStateParams() GetDataWaveserverInterfacesLogicalInterfaceIndexStateParams { - - return GetDataWaveserverInterfacesLogicalInterfaceIndexStateParams{} -} - -// GetDataWaveserverInterfacesLogicalInterfaceIndexStateParams contains all the bound params for the get data waveserver interfaces logical interface index state operation -// typically these are obtained from a http.Request -// -// swagger:parameters GetDataWaveserverInterfacesLogicalInterfaceIndexState -type GetDataWaveserverInterfacesLogicalInterfaceIndexStateParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Id of logical-interface - Required: true - In: path - */ - Index int64 -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewGetDataWaveserverInterfacesLogicalInterfaceIndexStateParams() beforehand. -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexStateParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rIndex, rhkIndex, _ := route.Params.GetOK("index") - if err := o.bindIndex(rIndex, rhkIndex, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindIndex binds and validates parameter Index from path. -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexStateParams) bindIndex(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - value, err := swag.ConvertInt64(raw) - if err != nil { - return errors.InvalidType("index", "path", "int64", raw) - } - o.Index = value - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_state_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_state_responses.go deleted file mode 100644 index 366158ba4fe445cd15506a1231dab3d93c847f0b..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_state_responses.go +++ /dev/null @@ -1,82 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// GetDataWaveserverInterfacesLogicalInterfaceIndexStateOKCode is the HTTP code returned for type GetDataWaveserverInterfacesLogicalInterfaceIndexStateOK -const GetDataWaveserverInterfacesLogicalInterfaceIndexStateOKCode int = 200 - -/*GetDataWaveserverInterfacesLogicalInterfaceIndexStateOK ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State - -swagger:response getDataWaveserverInterfacesLogicalInterfaceIndexStateOK -*/ -type GetDataWaveserverInterfacesLogicalInterfaceIndexStateOK struct { - - /* - In: Body - */ - Payload *models.CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceStateWrapper `json:"body,omitempty"` -} - -// NewGetDataWaveserverInterfacesLogicalInterfaceIndexStateOK creates GetDataWaveserverInterfacesLogicalInterfaceIndexStateOK with default headers values -func NewGetDataWaveserverInterfacesLogicalInterfaceIndexStateOK() *GetDataWaveserverInterfacesLogicalInterfaceIndexStateOK { - - return &GetDataWaveserverInterfacesLogicalInterfaceIndexStateOK{} -} - -// WithPayload adds the payload to the get data waveserver interfaces logical interface index state o k response -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexStateOK) WithPayload(payload *models.CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceStateWrapper) *GetDataWaveserverInterfacesLogicalInterfaceIndexStateOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the get data waveserver interfaces logical interface index state o k response -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexStateOK) SetPayload(payload *models.CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceStateWrapper) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexStateOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// GetDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequestCode is the HTTP code returned for type GetDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest -const GetDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequestCode int = 400 - -/*GetDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest Internal error - -swagger:response getDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest -*/ -type GetDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest struct { -} - -// NewGetDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest creates GetDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest with default headers values -func NewGetDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest() *GetDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest { - - return &GetDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest{} -} - -// WriteResponse to the client -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_state_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_state_urlbuilder.go deleted file mode 100644 index b06e3518c6e02257bed39c8c1de1c0486f0280c3..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_logical_interface_index_state_urlbuilder.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" - - "github.com/go-openapi/swag" -) - -// GetDataWaveserverInterfacesLogicalInterfaceIndexStateURL generates an URL for the get data waveserver interfaces logical interface index state operation -type GetDataWaveserverInterfacesLogicalInterfaceIndexStateURL struct { - Index int64 - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexStateURL) WithBasePath(bp string) *GetDataWaveserverInterfacesLogicalInterfaceIndexStateURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexStateURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexStateURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/logical-interface={index}/state/" - - index := swag.FormatInt64(o.Index) - if index != "" { - _path = strings.Replace(_path, "{index}", index, -1) - } else { - return nil, errors.New("index is required on GetDataWaveserverInterfacesLogicalInterfaceIndexStateURL") - } - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexStateURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexStateURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexStateURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on GetDataWaveserverInterfacesLogicalInterfaceIndexStateURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on GetDataWaveserverInterfacesLogicalInterfaceIndexStateURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *GetDataWaveserverInterfacesLogicalInterfaceIndexStateURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_parameters.go deleted file mode 100644 index 9068d4771da26a7fc3e8b4b94ae4427a3affeb41..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_parameters.go +++ /dev/null @@ -1,45 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" -) - -// NewGetDataWaveserverInterfacesParams creates a new GetDataWaveserverInterfacesParams object -// no default values defined in spec. -func NewGetDataWaveserverInterfacesParams() GetDataWaveserverInterfacesParams { - - return GetDataWaveserverInterfacesParams{} -} - -// GetDataWaveserverInterfacesParams contains all the bound params for the get data waveserver interfaces operation -// typically these are obtained from a http.Request -// -// swagger:parameters GetDataWaveserverInterfaces -type GetDataWaveserverInterfacesParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewGetDataWaveserverInterfacesParams() beforehand. -func (o *GetDataWaveserverInterfacesParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name.go deleted file mode 100644 index 3b9bb2afab51338da3ec671d65aa8ab21df7095a..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// GetDataWaveserverInterfacesPhysicalInterfaceNameHandlerFunc turns a function with the right signature into a get data waveserver interfaces physical interface name handler -type GetDataWaveserverInterfacesPhysicalInterfaceNameHandlerFunc func(GetDataWaveserverInterfacesPhysicalInterfaceNameParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn GetDataWaveserverInterfacesPhysicalInterfaceNameHandlerFunc) Handle(params GetDataWaveserverInterfacesPhysicalInterfaceNameParams) middleware.Responder { - return fn(params) -} - -// GetDataWaveserverInterfacesPhysicalInterfaceNameHandler interface for that can handle valid get data waveserver interfaces physical interface name params -type GetDataWaveserverInterfacesPhysicalInterfaceNameHandler interface { - Handle(GetDataWaveserverInterfacesPhysicalInterfaceNameParams) middleware.Responder -} - -// NewGetDataWaveserverInterfacesPhysicalInterfaceName creates a new http.Handler for the get data waveserver interfaces physical interface name operation -func NewGetDataWaveserverInterfacesPhysicalInterfaceName(ctx *middleware.Context, handler GetDataWaveserverInterfacesPhysicalInterfaceNameHandler) *GetDataWaveserverInterfacesPhysicalInterfaceName { - return &GetDataWaveserverInterfacesPhysicalInterfaceName{Context: ctx, Handler: handler} -} - -/*GetDataWaveserverInterfacesPhysicalInterfaceName swagger:route GET /data/waveserver-interfaces/physical-interface={name}/ ciena-waveserver-interfaces getDataWaveserverInterfacesPhysicalInterfaceName - -returns ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface - -List of physical Ethernet management interfaces. - -*/ -type GetDataWaveserverInterfacesPhysicalInterfaceName struct { - Context *middleware.Context - Handler GetDataWaveserverInterfacesPhysicalInterfaceNameHandler -} - -func (o *GetDataWaveserverInterfacesPhysicalInterfaceName) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewGetDataWaveserverInterfacesPhysicalInterfaceNameParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_id.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_id.go deleted file mode 100644 index 18f7eeb992aa69bfae074e04cdd9d174c9e02146..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_id.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// GetDataWaveserverInterfacesPhysicalInterfaceNameIDHandlerFunc turns a function with the right signature into a get data waveserver interfaces physical interface name ID handler -type GetDataWaveserverInterfacesPhysicalInterfaceNameIDHandlerFunc func(GetDataWaveserverInterfacesPhysicalInterfaceNameIDParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn GetDataWaveserverInterfacesPhysicalInterfaceNameIDHandlerFunc) Handle(params GetDataWaveserverInterfacesPhysicalInterfaceNameIDParams) middleware.Responder { - return fn(params) -} - -// GetDataWaveserverInterfacesPhysicalInterfaceNameIDHandler interface for that can handle valid get data waveserver interfaces physical interface name ID params -type GetDataWaveserverInterfacesPhysicalInterfaceNameIDHandler interface { - Handle(GetDataWaveserverInterfacesPhysicalInterfaceNameIDParams) middleware.Responder -} - -// NewGetDataWaveserverInterfacesPhysicalInterfaceNameID creates a new http.Handler for the get data waveserver interfaces physical interface name ID operation -func NewGetDataWaveserverInterfacesPhysicalInterfaceNameID(ctx *middleware.Context, handler GetDataWaveserverInterfacesPhysicalInterfaceNameIDHandler) *GetDataWaveserverInterfacesPhysicalInterfaceNameID { - return &GetDataWaveserverInterfacesPhysicalInterfaceNameID{Context: ctx, Handler: handler} -} - -/*GetDataWaveserverInterfacesPhysicalInterfaceNameID swagger:route GET /data/waveserver-interfaces/physical-interface={name}/id/ ciena-waveserver-interfaces getDataWaveserverInterfacesPhysicalInterfaceNameId - -returns ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id - -Identification information of this management interface. - -*/ -type GetDataWaveserverInterfacesPhysicalInterfaceNameID struct { - Context *middleware.Context - Handler GetDataWaveserverInterfacesPhysicalInterfaceNameIDHandler -} - -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameID) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewGetDataWaveserverInterfacesPhysicalInterfaceNameIDParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_id_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_id_parameters.go deleted file mode 100644 index d0817e73ca1a618461081c1122fcdf94f964bcf0..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_id_parameters.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" -) - -// NewGetDataWaveserverInterfacesPhysicalInterfaceNameIDParams creates a new GetDataWaveserverInterfacesPhysicalInterfaceNameIDParams object -// no default values defined in spec. -func NewGetDataWaveserverInterfacesPhysicalInterfaceNameIDParams() GetDataWaveserverInterfacesPhysicalInterfaceNameIDParams { - - return GetDataWaveserverInterfacesPhysicalInterfaceNameIDParams{} -} - -// GetDataWaveserverInterfacesPhysicalInterfaceNameIDParams contains all the bound params for the get data waveserver interfaces physical interface name ID operation -// typically these are obtained from a http.Request -// -// swagger:parameters GetDataWaveserverInterfacesPhysicalInterfaceNameID -type GetDataWaveserverInterfacesPhysicalInterfaceNameIDParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Id of physical-interface - Required: true - In: path - */ - Name string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewGetDataWaveserverInterfacesPhysicalInterfaceNameIDParams() beforehand. -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameIDParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rName, rhkName, _ := route.Params.GetOK("name") - if err := o.bindName(rName, rhkName, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindName binds and validates parameter Name from path. -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameIDParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.Name = raw - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_id_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_id_responses.go deleted file mode 100644 index 9bf620b021251e69aaf9bf35658d5ce58822e95c..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_id_responses.go +++ /dev/null @@ -1,82 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// GetDataWaveserverInterfacesPhysicalInterfaceNameIDOKCode is the HTTP code returned for type GetDataWaveserverInterfacesPhysicalInterfaceNameIDOK -const GetDataWaveserverInterfacesPhysicalInterfaceNameIDOKCode int = 200 - -/*GetDataWaveserverInterfacesPhysicalInterfaceNameIDOK ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id - -swagger:response getDataWaveserverInterfacesPhysicalInterfaceNameIdOK -*/ -type GetDataWaveserverInterfacesPhysicalInterfaceNameIDOK struct { - - /* - In: Body - */ - Payload *models.CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceIDWrapper `json:"body,omitempty"` -} - -// NewGetDataWaveserverInterfacesPhysicalInterfaceNameIDOK creates GetDataWaveserverInterfacesPhysicalInterfaceNameIDOK with default headers values -func NewGetDataWaveserverInterfacesPhysicalInterfaceNameIDOK() *GetDataWaveserverInterfacesPhysicalInterfaceNameIDOK { - - return &GetDataWaveserverInterfacesPhysicalInterfaceNameIDOK{} -} - -// WithPayload adds the payload to the get data waveserver interfaces physical interface name Id o k response -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameIDOK) WithPayload(payload *models.CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceIDWrapper) *GetDataWaveserverInterfacesPhysicalInterfaceNameIDOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the get data waveserver interfaces physical interface name Id o k response -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameIDOK) SetPayload(payload *models.CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceIDWrapper) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameIDOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// GetDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequestCode is the HTTP code returned for type GetDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequest -const GetDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequestCode int = 400 - -/*GetDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequest Internal error - -swagger:response getDataWaveserverInterfacesPhysicalInterfaceNameIdBadRequest -*/ -type GetDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequest struct { -} - -// NewGetDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequest creates GetDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequest with default headers values -func NewGetDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequest() *GetDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequest { - - return &GetDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequest{} -} - -// WriteResponse to the client -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_parameters.go deleted file mode 100644 index 1f35f5a0ea8fef1d8c5434a839546d880a907843..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_parameters.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" -) - -// NewGetDataWaveserverInterfacesPhysicalInterfaceNameParams creates a new GetDataWaveserverInterfacesPhysicalInterfaceNameParams object -// no default values defined in spec. -func NewGetDataWaveserverInterfacesPhysicalInterfaceNameParams() GetDataWaveserverInterfacesPhysicalInterfaceNameParams { - - return GetDataWaveserverInterfacesPhysicalInterfaceNameParams{} -} - -// GetDataWaveserverInterfacesPhysicalInterfaceNameParams contains all the bound params for the get data waveserver interfaces physical interface name operation -// typically these are obtained from a http.Request -// -// swagger:parameters GetDataWaveserverInterfacesPhysicalInterfaceName -type GetDataWaveserverInterfacesPhysicalInterfaceNameParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Id of physical-interface - Required: true - In: path - */ - Name string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewGetDataWaveserverInterfacesPhysicalInterfaceNameParams() beforehand. -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rName, rhkName, _ := route.Params.GetOK("name") - if err := o.bindName(rName, rhkName, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindName binds and validates parameter Name from path. -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.Name = raw - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_properties.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_properties.go deleted file mode 100644 index 9008263ca3793b3e00fd19cc6bde770aaa295f27..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_properties.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandlerFunc turns a function with the right signature into a get data waveserver interfaces physical interface name properties handler -type GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandlerFunc func(GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandlerFunc) Handle(params GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams) middleware.Responder { - return fn(params) -} - -// GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler interface for that can handle valid get data waveserver interfaces physical interface name properties params -type GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler interface { - Handle(GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams) middleware.Responder -} - -// NewGetDataWaveserverInterfacesPhysicalInterfaceNameProperties creates a new http.Handler for the get data waveserver interfaces physical interface name properties operation -func NewGetDataWaveserverInterfacesPhysicalInterfaceNameProperties(ctx *middleware.Context, handler GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler) *GetDataWaveserverInterfacesPhysicalInterfaceNameProperties { - return &GetDataWaveserverInterfacesPhysicalInterfaceNameProperties{Context: ctx, Handler: handler} -} - -/*GetDataWaveserverInterfacesPhysicalInterfaceNameProperties swagger:route GET /data/waveserver-interfaces/physical-interface={name}/properties/ ciena-waveserver-interfaces getDataWaveserverInterfacesPhysicalInterfaceNameProperties - -returns ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties - -All the configuration data of the physical management interface. - -*/ -type GetDataWaveserverInterfacesPhysicalInterfaceNameProperties struct { - Context *middleware.Context - Handler GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler -} - -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameProperties) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_properties_ethernet.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_properties_ethernet.go deleted file mode 100644 index b6f89f6dce0f7ecdb96d1004bd942f2ad045d2f8..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_properties_ethernet.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandlerFunc turns a function with the right signature into a get data waveserver interfaces physical interface name properties ethernet handler -type GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandlerFunc func(GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandlerFunc) Handle(params GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams) middleware.Responder { - return fn(params) -} - -// GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler interface for that can handle valid get data waveserver interfaces physical interface name properties ethernet params -type GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler interface { - Handle(GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams) middleware.Responder -} - -// NewGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet creates a new http.Handler for the get data waveserver interfaces physical interface name properties ethernet operation -func NewGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet(ctx *middleware.Context, handler GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler) *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet { - return &GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet{Context: ctx, Handler: handler} -} - -/*GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet swagger:route GET /data/waveserver-interfaces/physical-interface={name}/properties/ethernet/ ciena-waveserver-interfaces getDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet - -returns ciena.waveserver.interfaces.EthernetIfPropertiesGroup - -Ethernet interface attributes. - -*/ -type GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet struct { - Context *middleware.Context - Handler GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler -} - -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_properties_ethernet_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_properties_ethernet_parameters.go deleted file mode 100644 index a7292515923fd0ef5b1ce93293add5a8953c00dd..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_properties_ethernet_parameters.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" -) - -// NewGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams creates a new GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams object -// no default values defined in spec. -func NewGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams() GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams { - - return GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams{} -} - -// GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams contains all the bound params for the get data waveserver interfaces physical interface name properties ethernet operation -// typically these are obtained from a http.Request -// -// swagger:parameters GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet -type GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Id of physical-interface - Required: true - In: path - */ - Name string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams() beforehand. -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rName, rhkName, _ := route.Params.GetOK("name") - if err := o.bindName(rName, rhkName, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindName binds and validates parameter Name from path. -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.Name = raw - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_properties_ethernet_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_properties_ethernet_responses.go deleted file mode 100644 index 75a2e720bfcda145d5cf14c9f0d37cac2e6b7d7d..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_properties_ethernet_responses.go +++ /dev/null @@ -1,82 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetOKCode is the HTTP code returned for type GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetOK -const GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetOKCode int = 200 - -/*GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetOK ciena.waveserver.interfaces.EthernetIfPropertiesGroup - -swagger:response getDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetOK -*/ -type GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetOK struct { - - /* - In: Body - */ - Payload *models.CienaWaveserverInterfacesEthernetIfPropertiesGroupWrapper `json:"body,omitempty"` -} - -// NewGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetOK creates GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetOK with default headers values -func NewGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetOK() *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetOK { - - return &GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetOK{} -} - -// WithPayload adds the payload to the get data waveserver interfaces physical interface name properties ethernet o k response -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetOK) WithPayload(payload *models.CienaWaveserverInterfacesEthernetIfPropertiesGroupWrapper) *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the get data waveserver interfaces physical interface name properties ethernet o k response -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetOK) SetPayload(payload *models.CienaWaveserverInterfacesEthernetIfPropertiesGroupWrapper) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequestCode is the HTTP code returned for type GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest -const GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequestCode int = 400 - -/*GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest Internal error - -swagger:response getDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest -*/ -type GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest struct { -} - -// NewGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest creates GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest with default headers values -func NewGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest() *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest { - - return &GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest{} -} - -// WriteResponse to the client -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_properties_ethernet_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_properties_ethernet_urlbuilder.go deleted file mode 100644 index 3337a42b19f3e07f135087a3d4cd7e0b160f1083..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_properties_ethernet_urlbuilder.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL generates an URL for the get data waveserver interfaces physical interface name properties ethernet operation -type GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL struct { - Name string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL) WithBasePath(bp string) *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/physical-interface={name}/properties/ethernet/" - - name := o.Name - if name != "" { - _path = strings.Replace(_path, "{name}", name, -1) - } else { - return nil, errors.New("name is required on GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL") - } - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_properties_management.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_properties_management.go deleted file mode 100644 index 0536a918cd3428b04ab67ce2707597a8fb33f607..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_properties_management.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandlerFunc turns a function with the right signature into a get data waveserver interfaces physical interface name properties management handler -type GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandlerFunc func(GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandlerFunc) Handle(params GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams) middleware.Responder { - return fn(params) -} - -// GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler interface for that can handle valid get data waveserver interfaces physical interface name properties management params -type GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler interface { - Handle(GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams) middleware.Responder -} - -// NewGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement creates a new http.Handler for the get data waveserver interfaces physical interface name properties management operation -func NewGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement(ctx *middleware.Context, handler GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler) *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement { - return &GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement{Context: ctx, Handler: handler} -} - -/*GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement swagger:route GET /data/waveserver-interfaces/physical-interface={name}/properties/management/ ciena-waveserver-interfaces getDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement - -returns ciena.waveserver.interfaces.ManagementIfPropertiesGroup - -Management interface attributes. - -*/ -type GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement struct { - Context *middleware.Context - Handler GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler -} - -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_properties_management_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_properties_management_parameters.go deleted file mode 100644 index f94c0bc2ad8d0eeba6bdec8342baf8cad89ee2f1..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_properties_management_parameters.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" -) - -// NewGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams creates a new GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams object -// no default values defined in spec. -func NewGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams() GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams { - - return GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams{} -} - -// GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams contains all the bound params for the get data waveserver interfaces physical interface name properties management operation -// typically these are obtained from a http.Request -// -// swagger:parameters GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement -type GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Id of physical-interface - Required: true - In: path - */ - Name string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams() beforehand. -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rName, rhkName, _ := route.Params.GetOK("name") - if err := o.bindName(rName, rhkName, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindName binds and validates parameter Name from path. -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.Name = raw - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_properties_management_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_properties_management_responses.go deleted file mode 100644 index 94208807a66263a131874411b12030ebd5c44422..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_properties_management_responses.go +++ /dev/null @@ -1,82 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementOKCode is the HTTP code returned for type GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementOK -const GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementOKCode int = 200 - -/*GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementOK ciena.waveserver.interfaces.ManagementIfPropertiesGroup - -swagger:response getDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementOK -*/ -type GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementOK struct { - - /* - In: Body - */ - Payload *models.CienaWaveserverInterfacesManagementIfPropertiesGroupWrapper `json:"body,omitempty"` -} - -// NewGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementOK creates GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementOK with default headers values -func NewGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementOK() *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementOK { - - return &GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementOK{} -} - -// WithPayload adds the payload to the get data waveserver interfaces physical interface name properties management o k response -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementOK) WithPayload(payload *models.CienaWaveserverInterfacesManagementIfPropertiesGroupWrapper) *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the get data waveserver interfaces physical interface name properties management o k response -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementOK) SetPayload(payload *models.CienaWaveserverInterfacesManagementIfPropertiesGroupWrapper) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequestCode is the HTTP code returned for type GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest -const GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequestCode int = 400 - -/*GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest Internal error - -swagger:response getDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest -*/ -type GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest struct { -} - -// NewGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest creates GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest with default headers values -func NewGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest() *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest { - - return &GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest{} -} - -// WriteResponse to the client -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_properties_management_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_properties_management_urlbuilder.go deleted file mode 100644 index c3a8914a31d8a3628342db40f37304d0cb0f28fa..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_properties_management_urlbuilder.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL generates an URL for the get data waveserver interfaces physical interface name properties management operation -type GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL struct { - Name string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL) WithBasePath(bp string) *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/physical-interface={name}/properties/management/" - - name := o.Name - if name != "" { - _path = strings.Replace(_path, "{name}", name, -1) - } else { - return nil, errors.New("name is required on GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL") - } - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_properties_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_properties_parameters.go deleted file mode 100644 index 4700cb7931187dc9a76d1d8ccddb576767a9c27f..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_properties_parameters.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" -) - -// NewGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams creates a new GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams object -// no default values defined in spec. -func NewGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams() GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams { - - return GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams{} -} - -// GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams contains all the bound params for the get data waveserver interfaces physical interface name properties operation -// typically these are obtained from a http.Request -// -// swagger:parameters GetDataWaveserverInterfacesPhysicalInterfaceNameProperties -type GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Id of physical-interface - Required: true - In: path - */ - Name string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams() beforehand. -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rName, rhkName, _ := route.Params.GetOK("name") - if err := o.bindName(rName, rhkName, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindName binds and validates parameter Name from path. -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.Name = raw - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_properties_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_properties_responses.go deleted file mode 100644 index 80a423cd248e46f3509a71dcdda23fbfa3ffc5ec..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_properties_responses.go +++ /dev/null @@ -1,82 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesOKCode is the HTTP code returned for type GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesOK -const GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesOKCode int = 200 - -/*GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesOK ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties - -swagger:response getDataWaveserverInterfacesPhysicalInterfaceNamePropertiesOK -*/ -type GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesOK struct { - - /* - In: Body - */ - Payload *models.CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfacePropertiesWrapper `json:"body,omitempty"` -} - -// NewGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesOK creates GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesOK with default headers values -func NewGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesOK() *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesOK { - - return &GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesOK{} -} - -// WithPayload adds the payload to the get data waveserver interfaces physical interface name properties o k response -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesOK) WithPayload(payload *models.CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfacePropertiesWrapper) *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the get data waveserver interfaces physical interface name properties o k response -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesOK) SetPayload(payload *models.CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfacePropertiesWrapper) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequestCode is the HTTP code returned for type GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest -const GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequestCode int = 400 - -/*GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest Internal error - -swagger:response getDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest -*/ -type GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest struct { -} - -// NewGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest creates GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest with default headers values -func NewGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest() *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest { - - return &GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest{} -} - -// WriteResponse to the client -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_properties_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_properties_urlbuilder.go deleted file mode 100644 index cdffcb5b878e411f6b1fab6997677a117b72d400..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_properties_urlbuilder.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL generates an URL for the get data waveserver interfaces physical interface name properties operation -type GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL struct { - Name string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL) WithBasePath(bp string) *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/physical-interface={name}/properties/" - - name := o.Name - if name != "" { - _path = strings.Replace(_path, "{name}", name, -1) - } else { - return nil, errors.New("name is required on GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL") - } - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_responses.go deleted file mode 100644 index 51d92424348e8f7cc9eade4e42864d819558565d..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_responses.go +++ /dev/null @@ -1,82 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// GetDataWaveserverInterfacesPhysicalInterfaceNameOKCode is the HTTP code returned for type GetDataWaveserverInterfacesPhysicalInterfaceNameOK -const GetDataWaveserverInterfacesPhysicalInterfaceNameOKCode int = 200 - -/*GetDataWaveserverInterfacesPhysicalInterfaceNameOK ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface - -swagger:response getDataWaveserverInterfacesPhysicalInterfaceNameOK -*/ -type GetDataWaveserverInterfacesPhysicalInterfaceNameOK struct { - - /* - In: Body - */ - Payload *models.CienaWaveserverInterfacesWaveserverinterfacesPhysicalInterfaceWrapper `json:"body,omitempty"` -} - -// NewGetDataWaveserverInterfacesPhysicalInterfaceNameOK creates GetDataWaveserverInterfacesPhysicalInterfaceNameOK with default headers values -func NewGetDataWaveserverInterfacesPhysicalInterfaceNameOK() *GetDataWaveserverInterfacesPhysicalInterfaceNameOK { - - return &GetDataWaveserverInterfacesPhysicalInterfaceNameOK{} -} - -// WithPayload adds the payload to the get data waveserver interfaces physical interface name o k response -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameOK) WithPayload(payload *models.CienaWaveserverInterfacesWaveserverinterfacesPhysicalInterfaceWrapper) *GetDataWaveserverInterfacesPhysicalInterfaceNameOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the get data waveserver interfaces physical interface name o k response -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameOK) SetPayload(payload *models.CienaWaveserverInterfacesWaveserverinterfacesPhysicalInterfaceWrapper) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// GetDataWaveserverInterfacesPhysicalInterfaceNameBadRequestCode is the HTTP code returned for type GetDataWaveserverInterfacesPhysicalInterfaceNameBadRequest -const GetDataWaveserverInterfacesPhysicalInterfaceNameBadRequestCode int = 400 - -/*GetDataWaveserverInterfacesPhysicalInterfaceNameBadRequest Internal error - -swagger:response getDataWaveserverInterfacesPhysicalInterfaceNameBadRequest -*/ -type GetDataWaveserverInterfacesPhysicalInterfaceNameBadRequest struct { -} - -// NewGetDataWaveserverInterfacesPhysicalInterfaceNameBadRequest creates GetDataWaveserverInterfacesPhysicalInterfaceNameBadRequest with default headers values -func NewGetDataWaveserverInterfacesPhysicalInterfaceNameBadRequest() *GetDataWaveserverInterfacesPhysicalInterfaceNameBadRequest { - - return &GetDataWaveserverInterfacesPhysicalInterfaceNameBadRequest{} -} - -// WriteResponse to the client -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_state.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_state.go deleted file mode 100644 index 128d8cf4d42f21eb8a8e24789b6b63c925a8597d..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_state.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// GetDataWaveserverInterfacesPhysicalInterfaceNameStateHandlerFunc turns a function with the right signature into a get data waveserver interfaces physical interface name state handler -type GetDataWaveserverInterfacesPhysicalInterfaceNameStateHandlerFunc func(GetDataWaveserverInterfacesPhysicalInterfaceNameStateParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn GetDataWaveserverInterfacesPhysicalInterfaceNameStateHandlerFunc) Handle(params GetDataWaveserverInterfacesPhysicalInterfaceNameStateParams) middleware.Responder { - return fn(params) -} - -// GetDataWaveserverInterfacesPhysicalInterfaceNameStateHandler interface for that can handle valid get data waveserver interfaces physical interface name state params -type GetDataWaveserverInterfacesPhysicalInterfaceNameStateHandler interface { - Handle(GetDataWaveserverInterfacesPhysicalInterfaceNameStateParams) middleware.Responder -} - -// NewGetDataWaveserverInterfacesPhysicalInterfaceNameState creates a new http.Handler for the get data waveserver interfaces physical interface name state operation -func NewGetDataWaveserverInterfacesPhysicalInterfaceNameState(ctx *middleware.Context, handler GetDataWaveserverInterfacesPhysicalInterfaceNameStateHandler) *GetDataWaveserverInterfacesPhysicalInterfaceNameState { - return &GetDataWaveserverInterfacesPhysicalInterfaceNameState{Context: ctx, Handler: handler} -} - -/*GetDataWaveserverInterfacesPhysicalInterfaceNameState swagger:route GET /data/waveserver-interfaces/physical-interface={name}/state/ ciena-waveserver-interfaces getDataWaveserverInterfacesPhysicalInterfaceNameState - -returns ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State - -Physical management interface state information. - -*/ -type GetDataWaveserverInterfacesPhysicalInterfaceNameState struct { - Context *middleware.Context - Handler GetDataWaveserverInterfacesPhysicalInterfaceNameStateHandler -} - -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameState) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewGetDataWaveserverInterfacesPhysicalInterfaceNameStateParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_state_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_state_parameters.go deleted file mode 100644 index 59b66f364003868997712c8094cc2a4b5a3c1839..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_state_parameters.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" -) - -// NewGetDataWaveserverInterfacesPhysicalInterfaceNameStateParams creates a new GetDataWaveserverInterfacesPhysicalInterfaceNameStateParams object -// no default values defined in spec. -func NewGetDataWaveserverInterfacesPhysicalInterfaceNameStateParams() GetDataWaveserverInterfacesPhysicalInterfaceNameStateParams { - - return GetDataWaveserverInterfacesPhysicalInterfaceNameStateParams{} -} - -// GetDataWaveserverInterfacesPhysicalInterfaceNameStateParams contains all the bound params for the get data waveserver interfaces physical interface name state operation -// typically these are obtained from a http.Request -// -// swagger:parameters GetDataWaveserverInterfacesPhysicalInterfaceNameState -type GetDataWaveserverInterfacesPhysicalInterfaceNameStateParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Id of physical-interface - Required: true - In: path - */ - Name string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewGetDataWaveserverInterfacesPhysicalInterfaceNameStateParams() beforehand. -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameStateParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rName, rhkName, _ := route.Params.GetOK("name") - if err := o.bindName(rName, rhkName, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindName binds and validates parameter Name from path. -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameStateParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.Name = raw - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_state_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_state_responses.go deleted file mode 100644 index 5f142a37d2217ad47396b90f111a76a97f382e32..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_state_responses.go +++ /dev/null @@ -1,82 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// GetDataWaveserverInterfacesPhysicalInterfaceNameStateOKCode is the HTTP code returned for type GetDataWaveserverInterfacesPhysicalInterfaceNameStateOK -const GetDataWaveserverInterfacesPhysicalInterfaceNameStateOKCode int = 200 - -/*GetDataWaveserverInterfacesPhysicalInterfaceNameStateOK ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State - -swagger:response getDataWaveserverInterfacesPhysicalInterfaceNameStateOK -*/ -type GetDataWaveserverInterfacesPhysicalInterfaceNameStateOK struct { - - /* - In: Body - */ - Payload *models.CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceStateWrapper `json:"body,omitempty"` -} - -// NewGetDataWaveserverInterfacesPhysicalInterfaceNameStateOK creates GetDataWaveserverInterfacesPhysicalInterfaceNameStateOK with default headers values -func NewGetDataWaveserverInterfacesPhysicalInterfaceNameStateOK() *GetDataWaveserverInterfacesPhysicalInterfaceNameStateOK { - - return &GetDataWaveserverInterfacesPhysicalInterfaceNameStateOK{} -} - -// WithPayload adds the payload to the get data waveserver interfaces physical interface name state o k response -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameStateOK) WithPayload(payload *models.CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceStateWrapper) *GetDataWaveserverInterfacesPhysicalInterfaceNameStateOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the get data waveserver interfaces physical interface name state o k response -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameStateOK) SetPayload(payload *models.CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceStateWrapper) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameStateOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// GetDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequestCode is the HTTP code returned for type GetDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest -const GetDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequestCode int = 400 - -/*GetDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest Internal error - -swagger:response getDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest -*/ -type GetDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest struct { -} - -// NewGetDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest creates GetDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest with default headers values -func NewGetDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest() *GetDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest { - - return &GetDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest{} -} - -// WriteResponse to the client -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_state_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_state_urlbuilder.go deleted file mode 100644 index 14e9c972fbab6403553c5a9a664fa952f6419d1f..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_physical_interface_name_state_urlbuilder.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// GetDataWaveserverInterfacesPhysicalInterfaceNameStateURL generates an URL for the get data waveserver interfaces physical interface name state operation -type GetDataWaveserverInterfacesPhysicalInterfaceNameStateURL struct { - Name string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameStateURL) WithBasePath(bp string) *GetDataWaveserverInterfacesPhysicalInterfaceNameStateURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameStateURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameStateURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/physical-interface={name}/state/" - - name := o.Name - if name != "" { - _path = strings.Replace(_path, "{name}", name, -1) - } else { - return nil, errors.New("name is required on GetDataWaveserverInterfacesPhysicalInterfaceNameStateURL") - } - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameStateURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameStateURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameStateURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on GetDataWaveserverInterfacesPhysicalInterfaceNameStateURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on GetDataWaveserverInterfacesPhysicalInterfaceNameStateURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *GetDataWaveserverInterfacesPhysicalInterfaceNameStateURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_responses.go deleted file mode 100644 index 3dd563f40bb42a20d100c23e8cd3e5ae49e0a3a2..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_responses.go +++ /dev/null @@ -1,82 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// GetDataWaveserverInterfacesOKCode is the HTTP code returned for type GetDataWaveserverInterfacesOK -const GetDataWaveserverInterfacesOKCode int = 200 - -/*GetDataWaveserverInterfacesOK ciena.waveserver.interfaces.WaveserverInterfaces - -swagger:response getDataWaveserverInterfacesOK -*/ -type GetDataWaveserverInterfacesOK struct { - - /* - In: Body - */ - Payload *models.CienaWaveserverInterfacesWaveserverInterfacesWrapper `json:"body,omitempty"` -} - -// NewGetDataWaveserverInterfacesOK creates GetDataWaveserverInterfacesOK with default headers values -func NewGetDataWaveserverInterfacesOK() *GetDataWaveserverInterfacesOK { - - return &GetDataWaveserverInterfacesOK{} -} - -// WithPayload adds the payload to the get data waveserver interfaces o k response -func (o *GetDataWaveserverInterfacesOK) WithPayload(payload *models.CienaWaveserverInterfacesWaveserverInterfacesWrapper) *GetDataWaveserverInterfacesOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the get data waveserver interfaces o k response -func (o *GetDataWaveserverInterfacesOK) SetPayload(payload *models.CienaWaveserverInterfacesWaveserverInterfacesWrapper) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *GetDataWaveserverInterfacesOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// GetDataWaveserverInterfacesBadRequestCode is the HTTP code returned for type GetDataWaveserverInterfacesBadRequest -const GetDataWaveserverInterfacesBadRequestCode int = 400 - -/*GetDataWaveserverInterfacesBadRequest Internal error - -swagger:response getDataWaveserverInterfacesBadRequest -*/ -type GetDataWaveserverInterfacesBadRequest struct { -} - -// NewGetDataWaveserverInterfacesBadRequest creates GetDataWaveserverInterfacesBadRequest with default headers values -func NewGetDataWaveserverInterfacesBadRequest() *GetDataWaveserverInterfacesBadRequest { - - return &GetDataWaveserverInterfacesBadRequest{} -} - -// WriteResponse to the client -func (o *GetDataWaveserverInterfacesBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_routes.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_routes.go deleted file mode 100644 index c83bce9e12f7aaa4591ff18dacd69499a4999e81..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_routes.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// GetDataWaveserverInterfacesRoutesHandlerFunc turns a function with the right signature into a get data waveserver interfaces routes handler -type GetDataWaveserverInterfacesRoutesHandlerFunc func(GetDataWaveserverInterfacesRoutesParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn GetDataWaveserverInterfacesRoutesHandlerFunc) Handle(params GetDataWaveserverInterfacesRoutesParams) middleware.Responder { - return fn(params) -} - -// GetDataWaveserverInterfacesRoutesHandler interface for that can handle valid get data waveserver interfaces routes params -type GetDataWaveserverInterfacesRoutesHandler interface { - Handle(GetDataWaveserverInterfacesRoutesParams) middleware.Responder -} - -// NewGetDataWaveserverInterfacesRoutes creates a new http.Handler for the get data waveserver interfaces routes operation -func NewGetDataWaveserverInterfacesRoutes(ctx *middleware.Context, handler GetDataWaveserverInterfacesRoutesHandler) *GetDataWaveserverInterfacesRoutes { - return &GetDataWaveserverInterfacesRoutes{Context: ctx, Handler: handler} -} - -/*GetDataWaveserverInterfacesRoutes swagger:route GET /data/waveserver-interfaces/routes/ ciena-waveserver-interfaces getDataWaveserverInterfacesRoutes - -returns ciena.waveserver.interfaces.waveserverinterfaces.Routes - -Top-level container for IP route configuration and operational data. - -*/ -type GetDataWaveserverInterfacesRoutes struct { - Context *middleware.Context - Handler GetDataWaveserverInterfacesRoutesHandler -} - -func (o *GetDataWaveserverInterfacesRoutes) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewGetDataWaveserverInterfacesRoutesParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_routes_ip_v4_static_route_destination.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_routes_ip_v4_static_route_destination.go deleted file mode 100644 index 05ebf005728dd047d3a9011e321906cefdcb14c5..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_routes_ip_v4_static_route_destination.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandlerFunc turns a function with the right signature into a get data waveserver interfaces routes IP v4 static route destination handler -type GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandlerFunc func(GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandlerFunc) Handle(params GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams) middleware.Responder { - return fn(params) -} - -// GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler interface for that can handle valid get data waveserver interfaces routes IP v4 static route destination params -type GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler interface { - Handle(GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams) middleware.Responder -} - -// NewGetDataWaveserverInterfacesRoutesIPV4StaticRouteDestination creates a new http.Handler for the get data waveserver interfaces routes IP v4 static route destination operation -func NewGetDataWaveserverInterfacesRoutesIPV4StaticRouteDestination(ctx *middleware.Context, handler GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler) *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestination { - return &GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestination{Context: ctx, Handler: handler} -} - -/*GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestination swagger:route GET /data/waveserver-interfaces/routes/ipv4-static-route={destination}/ ciena-waveserver-interfaces getDataWaveserverInterfacesRoutesIpV4StaticRouteDestination - -returns ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute - -List of IPv4 static routing entries. - -*/ -type GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestination struct { - Context *middleware.Context - Handler GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler -} - -func (o *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestination) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewGetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_index.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_index.go deleted file mode 100644 index 880e62db86d9b3368c555ed71b4b2089c0636baa..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_index.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandlerFunc turns a function with the right signature into a get data waveserver interfaces routes IP v4 static route destination next hop index handler -type GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandlerFunc func(GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandlerFunc) Handle(params GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams) middleware.Responder { - return fn(params) -} - -// GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler interface for that can handle valid get data waveserver interfaces routes IP v4 static route destination next hop index params -type GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler interface { - Handle(GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams) middleware.Responder -} - -// NewGetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndex creates a new http.Handler for the get data waveserver interfaces routes IP v4 static route destination next hop index operation -func NewGetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndex(ctx *middleware.Context, handler GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler) *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndex { - return &GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndex{Context: ctx, Handler: handler} -} - -/*GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndex swagger:route GET /data/waveserver-interfaces/routes/ipv4-static-route={destination}/next-hop={index}/ ciena-waveserver-interfaces getDataWaveserverInterfacesRoutesIpV4StaticRouteDestinationNextHopIndex - -returns ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop - -A list of next-hop entries associated with the static route. - -*/ -type GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndex struct { - Context *middleware.Context - Handler GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler -} - -func (o *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndex) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewGetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_index_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_index_parameters.go deleted file mode 100644 index 5cf2042604f02bdc7dd746e16540c4b2d10d5191..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_index_parameters.go +++ /dev/null @@ -1,102 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" -) - -// NewGetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams creates a new GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams object -// no default values defined in spec. -func NewGetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams() GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams { - - return GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams{} -} - -// GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams contains all the bound params for the get data waveserver interfaces routes IP v4 static route destination next hop index operation -// typically these are obtained from a http.Request -// -// swagger:parameters GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndex -type GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Id of ipv4-static-route - Required: true - In: path - */ - Destination string - /*Id of next-hop - Required: true - In: path - */ - Index int64 -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewGetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams() beforehand. -func (o *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rDestination, rhkDestination, _ := route.Params.GetOK("destination") - if err := o.bindDestination(rDestination, rhkDestination, route.Formats); err != nil { - res = append(res, err) - } - - rIndex, rhkIndex, _ := route.Params.GetOK("index") - if err := o.bindIndex(rIndex, rhkIndex, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindDestination binds and validates parameter Destination from path. -func (o *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams) bindDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.Destination = raw - - return nil -} - -// bindIndex binds and validates parameter Index from path. -func (o *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams) bindIndex(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - value, err := swag.ConvertInt64(raw) - if err != nil { - return errors.InvalidType("index", "path", "int64", raw) - } - o.Index = value - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_index_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_index_responses.go deleted file mode 100644 index 3eead84bc47d2a7e4e5701f6c032cafbece8a719..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_index_responses.go +++ /dev/null @@ -1,82 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexOKCode is the HTTP code returned for type GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexOK -const GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexOKCode int = 200 - -/*GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexOK ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop - -swagger:response getDataWaveserverInterfacesRoutesIpV4StaticRouteDestinationNextHopIndexOK -*/ -type GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexOK struct { - - /* - In: Body - */ - Payload *models.CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHopWrapper `json:"body,omitempty"` -} - -// NewGetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexOK creates GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexOK with default headers values -func NewGetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexOK() *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexOK { - - return &GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexOK{} -} - -// WithPayload adds the payload to the get data waveserver interfaces routes Ip v4 static route destination next hop index o k response -func (o *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexOK) WithPayload(payload *models.CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHopWrapper) *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the get data waveserver interfaces routes Ip v4 static route destination next hop index o k response -func (o *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexOK) SetPayload(payload *models.CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHopWrapper) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexBadRequestCode is the HTTP code returned for type GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexBadRequest -const GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexBadRequestCode int = 400 - -/*GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexBadRequest Internal error - -swagger:response getDataWaveserverInterfacesRoutesIpV4StaticRouteDestinationNextHopIndexBadRequest -*/ -type GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexBadRequest struct { -} - -// NewGetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexBadRequest creates GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexBadRequest with default headers values -func NewGetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexBadRequest() *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexBadRequest { - - return &GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexBadRequest{} -} - -// WriteResponse to the client -func (o *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_index_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_index_urlbuilder.go deleted file mode 100644 index f21c3486c3a016bba11966db57bb576831316c6c..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_index_urlbuilder.go +++ /dev/null @@ -1,106 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" - - "github.com/go-openapi/swag" -) - -// GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL generates an URL for the get data waveserver interfaces routes IP v4 static route destination next hop index operation -type GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL struct { - Destination string - Index int64 - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL) WithBasePath(bp string) *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/routes/ipv4-static-route={destination}/next-hop={index}/" - - destination := o.Destination - if destination != "" { - _path = strings.Replace(_path, "{destination}", destination, -1) - } else { - return nil, errors.New("destination is required on GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL") - } - - index := swag.FormatInt64(o.Index) - if index != "" { - _path = strings.Replace(_path, "{index}", index, -1) - } else { - return nil, errors.New("index is required on GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL") - } - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_routes_ip_v4_static_route_destination_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_routes_ip_v4_static_route_destination_parameters.go deleted file mode 100644 index 791d7c6606feb6bcfa33f6410b7c8db744694887..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_routes_ip_v4_static_route_destination_parameters.go +++ /dev/null @@ -1,72 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" -) - -// NewGetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams creates a new GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams object -// no default values defined in spec. -func NewGetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams() GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams { - - return GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams{} -} - -// GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams contains all the bound params for the get data waveserver interfaces routes IP v4 static route destination operation -// typically these are obtained from a http.Request -// -// swagger:parameters GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestination -type GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*Id of ipv4-static-route - Required: true - In: path - */ - Destination string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewGetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams() beforehand. -func (o *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - rDestination, rhkDestination, _ := route.Params.GetOK("destination") - if err := o.bindDestination(rDestination, rhkDestination, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindDestination binds and validates parameter Destination from path. -func (o *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams) bindDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.Destination = raw - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_routes_ip_v4_static_route_destination_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_routes_ip_v4_static_route_destination_responses.go deleted file mode 100644 index 44e61cf4fdbb8fca3a7991e834fc80188442ce29..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_routes_ip_v4_static_route_destination_responses.go +++ /dev/null @@ -1,82 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationOKCode is the HTTP code returned for type GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationOK -const GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationOKCode int = 200 - -/*GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationOK ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute - -swagger:response getDataWaveserverInterfacesRoutesIpV4StaticRouteDestinationOK -*/ -type GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationOK struct { - - /* - In: Body - */ - Payload *models.CienaWaveserverInterfacesWaveserverinterfacesRoutesIPV4StaticRouteWrapper `json:"body,omitempty"` -} - -// NewGetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationOK creates GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationOK with default headers values -func NewGetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationOK() *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationOK { - - return &GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationOK{} -} - -// WithPayload adds the payload to the get data waveserver interfaces routes Ip v4 static route destination o k response -func (o *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationOK) WithPayload(payload *models.CienaWaveserverInterfacesWaveserverinterfacesRoutesIPV4StaticRouteWrapper) *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the get data waveserver interfaces routes Ip v4 static route destination o k response -func (o *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationOK) SetPayload(payload *models.CienaWaveserverInterfacesWaveserverinterfacesRoutesIPV4StaticRouteWrapper) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationBadRequestCode is the HTTP code returned for type GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationBadRequest -const GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationBadRequestCode int = 400 - -/*GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationBadRequest Internal error - -swagger:response getDataWaveserverInterfacesRoutesIpV4StaticRouteDestinationBadRequest -*/ -type GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationBadRequest struct { -} - -// NewGetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationBadRequest creates GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationBadRequest with default headers values -func NewGetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationBadRequest() *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationBadRequest { - - return &GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationBadRequest{} -} - -// WriteResponse to the client -func (o *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_routes_ip_v4_static_route_destination_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_routes_ip_v4_static_route_destination_urlbuilder.go deleted file mode 100644 index 1e6acd426d2f8299ebe22ffb41356f3b720008d2..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_routes_ip_v4_static_route_destination_urlbuilder.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL generates an URL for the get data waveserver interfaces routes IP v4 static route destination operation -type GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL struct { - Destination string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL) WithBasePath(bp string) *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/routes/ipv4-static-route={destination}/" - - destination := o.Destination - if destination != "" { - _path = strings.Replace(_path, "{destination}", destination, -1) - } else { - return nil, errors.New("destination is required on GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL") - } - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_routes_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_routes_parameters.go deleted file mode 100644 index 9d54415f3418fc205b89ca108e28720732dd7d9d..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_routes_parameters.go +++ /dev/null @@ -1,45 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime/middleware" -) - -// NewGetDataWaveserverInterfacesRoutesParams creates a new GetDataWaveserverInterfacesRoutesParams object -// no default values defined in spec. -func NewGetDataWaveserverInterfacesRoutesParams() GetDataWaveserverInterfacesRoutesParams { - - return GetDataWaveserverInterfacesRoutesParams{} -} - -// GetDataWaveserverInterfacesRoutesParams contains all the bound params for the get data waveserver interfaces routes operation -// typically these are obtained from a http.Request -// -// swagger:parameters GetDataWaveserverInterfacesRoutes -type GetDataWaveserverInterfacesRoutesParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewGetDataWaveserverInterfacesRoutesParams() beforehand. -func (o *GetDataWaveserverInterfacesRoutesParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_routes_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_routes_responses.go deleted file mode 100644 index 2dbd56a6c2f3c8d00ac8e23aa01d2e1f40fefd9a..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_routes_responses.go +++ /dev/null @@ -1,82 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// GetDataWaveserverInterfacesRoutesOKCode is the HTTP code returned for type GetDataWaveserverInterfacesRoutesOK -const GetDataWaveserverInterfacesRoutesOKCode int = 200 - -/*GetDataWaveserverInterfacesRoutesOK ciena.waveserver.interfaces.waveserverinterfaces.Routes - -swagger:response getDataWaveserverInterfacesRoutesOK -*/ -type GetDataWaveserverInterfacesRoutesOK struct { - - /* - In: Body - */ - Payload *models.CienaWaveserverInterfacesWaveserverinterfacesRoutesWrapper `json:"body,omitempty"` -} - -// NewGetDataWaveserverInterfacesRoutesOK creates GetDataWaveserverInterfacesRoutesOK with default headers values -func NewGetDataWaveserverInterfacesRoutesOK() *GetDataWaveserverInterfacesRoutesOK { - - return &GetDataWaveserverInterfacesRoutesOK{} -} - -// WithPayload adds the payload to the get data waveserver interfaces routes o k response -func (o *GetDataWaveserverInterfacesRoutesOK) WithPayload(payload *models.CienaWaveserverInterfacesWaveserverinterfacesRoutesWrapper) *GetDataWaveserverInterfacesRoutesOK { - o.Payload = payload - return o -} - -// SetPayload sets the payload to the get data waveserver interfaces routes o k response -func (o *GetDataWaveserverInterfacesRoutesOK) SetPayload(payload *models.CienaWaveserverInterfacesWaveserverinterfacesRoutesWrapper) { - o.Payload = payload -} - -// WriteResponse to the client -func (o *GetDataWaveserverInterfacesRoutesOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.WriteHeader(200) - if o.Payload != nil { - payload := o.Payload - if err := producer.Produce(rw, payload); err != nil { - panic(err) // let the recovery middleware deal with this - } - } -} - -// GetDataWaveserverInterfacesRoutesBadRequestCode is the HTTP code returned for type GetDataWaveserverInterfacesRoutesBadRequest -const GetDataWaveserverInterfacesRoutesBadRequestCode int = 400 - -/*GetDataWaveserverInterfacesRoutesBadRequest Internal error - -swagger:response getDataWaveserverInterfacesRoutesBadRequest -*/ -type GetDataWaveserverInterfacesRoutesBadRequest struct { -} - -// NewGetDataWaveserverInterfacesRoutesBadRequest creates GetDataWaveserverInterfacesRoutesBadRequest with default headers values -func NewGetDataWaveserverInterfacesRoutesBadRequest() *GetDataWaveserverInterfacesRoutesBadRequest { - - return &GetDataWaveserverInterfacesRoutesBadRequest{} -} - -// WriteResponse to the client -func (o *GetDataWaveserverInterfacesRoutesBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_routes_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_routes_urlbuilder.go deleted file mode 100644 index 2f66842042fe97d8526a1b65ebbc5ae592a5d537..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_routes_urlbuilder.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" -) - -// GetDataWaveserverInterfacesRoutesURL generates an URL for the get data waveserver interfaces routes operation -type GetDataWaveserverInterfacesRoutesURL struct { - _basePath string -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *GetDataWaveserverInterfacesRoutesURL) WithBasePath(bp string) *GetDataWaveserverInterfacesRoutesURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *GetDataWaveserverInterfacesRoutesURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *GetDataWaveserverInterfacesRoutesURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/routes/" - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *GetDataWaveserverInterfacesRoutesURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *GetDataWaveserverInterfacesRoutesURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *GetDataWaveserverInterfacesRoutesURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on GetDataWaveserverInterfacesRoutesURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on GetDataWaveserverInterfacesRoutesURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *GetDataWaveserverInterfacesRoutesURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_urlbuilder.go deleted file mode 100644 index 4774e577765caa336a21c2b26065f11d46342573..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/get_data_waveserver_interfaces_urlbuilder.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" -) - -// GetDataWaveserverInterfacesURL generates an URL for the get data waveserver interfaces operation -type GetDataWaveserverInterfacesURL struct { - _basePath string -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *GetDataWaveserverInterfacesURL) WithBasePath(bp string) *GetDataWaveserverInterfacesURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *GetDataWaveserverInterfacesURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *GetDataWaveserverInterfacesURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/" - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *GetDataWaveserverInterfacesURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *GetDataWaveserverInterfacesURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *GetDataWaveserverInterfacesURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on GetDataWaveserverInterfacesURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on GetDataWaveserverInterfacesURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *GetDataWaveserverInterfacesURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces.go deleted file mode 100644 index a0b58bf8b46d3dda4410df0e6533e187f1b93bfd..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces.go +++ /dev/null @@ -1,61 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// PostDataWaveserverInterfacesHandlerFunc turns a function with the right signature into a post data waveserver interfaces handler -type PostDataWaveserverInterfacesHandlerFunc func(PostDataWaveserverInterfacesParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn PostDataWaveserverInterfacesHandlerFunc) Handle(params PostDataWaveserverInterfacesParams) middleware.Responder { - return fn(params) -} - -// PostDataWaveserverInterfacesHandler interface for that can handle valid post data waveserver interfaces params -type PostDataWaveserverInterfacesHandler interface { - Handle(PostDataWaveserverInterfacesParams) middleware.Responder -} - -// NewPostDataWaveserverInterfaces creates a new http.Handler for the post data waveserver interfaces operation -func NewPostDataWaveserverInterfaces(ctx *middleware.Context, handler PostDataWaveserverInterfacesHandler) *PostDataWaveserverInterfaces { - return &PostDataWaveserverInterfaces{Context: ctx, Handler: handler} -} - -/*PostDataWaveserverInterfaces swagger:route POST /data/waveserver-interfaces/ ciena-waveserver-interfaces postDataWaveserverInterfaces - -creates ciena.waveserver.interfaces.WaveserverInterfaces - -Top level container for configuration and operational data for physical - and logical network interfaces. - -*/ -type PostDataWaveserverInterfaces struct { - Context *middleware.Context - Handler PostDataWaveserverInterfacesHandler -} - -func (o *PostDataWaveserverInterfaces) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewPostDataWaveserverInterfacesParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface.go deleted file mode 100644 index 616594623fcbfe0b6b78116303c0ff80cd909365..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// PostDataWaveserverInterfacesLogicalInterfaceHandlerFunc turns a function with the right signature into a post data waveserver interfaces logical interface handler -type PostDataWaveserverInterfacesLogicalInterfaceHandlerFunc func(PostDataWaveserverInterfacesLogicalInterfaceParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn PostDataWaveserverInterfacesLogicalInterfaceHandlerFunc) Handle(params PostDataWaveserverInterfacesLogicalInterfaceParams) middleware.Responder { - return fn(params) -} - -// PostDataWaveserverInterfacesLogicalInterfaceHandler interface for that can handle valid post data waveserver interfaces logical interface params -type PostDataWaveserverInterfacesLogicalInterfaceHandler interface { - Handle(PostDataWaveserverInterfacesLogicalInterfaceParams) middleware.Responder -} - -// NewPostDataWaveserverInterfacesLogicalInterface creates a new http.Handler for the post data waveserver interfaces logical interface operation -func NewPostDataWaveserverInterfacesLogicalInterface(ctx *middleware.Context, handler PostDataWaveserverInterfacesLogicalInterfaceHandler) *PostDataWaveserverInterfacesLogicalInterface { - return &PostDataWaveserverInterfacesLogicalInterface{Context: ctx, Handler: handler} -} - -/*PostDataWaveserverInterfacesLogicalInterface swagger:route POST /data/waveserver-interfaces/logical-interface/ ciena-waveserver-interfaces postDataWaveserverInterfacesLogicalInterface - -creates ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface - -List of logical IP management interfaces (e.g. 'local'). - -*/ -type PostDataWaveserverInterfacesLogicalInterface struct { - Context *middleware.Context - Handler PostDataWaveserverInterfacesLogicalInterfaceHandler -} - -func (o *PostDataWaveserverInterfacesLogicalInterface) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewPostDataWaveserverInterfacesLogicalInterfaceParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_id.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_id.go deleted file mode 100644 index 25bf907081f8377be8916108f1386b3aed0b47bd..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_id.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// PostDataWaveserverInterfacesLogicalInterfaceIndexIDHandlerFunc turns a function with the right signature into a post data waveserver interfaces logical interface index ID handler -type PostDataWaveserverInterfacesLogicalInterfaceIndexIDHandlerFunc func(PostDataWaveserverInterfacesLogicalInterfaceIndexIDParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn PostDataWaveserverInterfacesLogicalInterfaceIndexIDHandlerFunc) Handle(params PostDataWaveserverInterfacesLogicalInterfaceIndexIDParams) middleware.Responder { - return fn(params) -} - -// PostDataWaveserverInterfacesLogicalInterfaceIndexIDHandler interface for that can handle valid post data waveserver interfaces logical interface index ID params -type PostDataWaveserverInterfacesLogicalInterfaceIndexIDHandler interface { - Handle(PostDataWaveserverInterfacesLogicalInterfaceIndexIDParams) middleware.Responder -} - -// NewPostDataWaveserverInterfacesLogicalInterfaceIndexID creates a new http.Handler for the post data waveserver interfaces logical interface index ID operation -func NewPostDataWaveserverInterfacesLogicalInterfaceIndexID(ctx *middleware.Context, handler PostDataWaveserverInterfacesLogicalInterfaceIndexIDHandler) *PostDataWaveserverInterfacesLogicalInterfaceIndexID { - return &PostDataWaveserverInterfacesLogicalInterfaceIndexID{Context: ctx, Handler: handler} -} - -/*PostDataWaveserverInterfacesLogicalInterfaceIndexID swagger:route POST /data/waveserver-interfaces/logical-interface={index}/id/ ciena-waveserver-interfaces postDataWaveserverInterfacesLogicalInterfaceIndexId - -creates ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id - -Identification information of this logical management interface. - -*/ -type PostDataWaveserverInterfacesLogicalInterfaceIndexID struct { - Context *middleware.Context - Handler PostDataWaveserverInterfacesLogicalInterfaceIndexIDHandler -} - -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexID) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewPostDataWaveserverInterfacesLogicalInterfaceIndexIDParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_id_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_id_parameters.go deleted file mode 100644 index 47d955c40e1795f93e543f62c6bf36ffa1b1325e..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_id_parameters.go +++ /dev/null @@ -1,100 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// NewPostDataWaveserverInterfacesLogicalInterfaceIndexIDParams creates a new PostDataWaveserverInterfacesLogicalInterfaceIndexIDParams object -// no default values defined in spec. -func NewPostDataWaveserverInterfacesLogicalInterfaceIndexIDParams() PostDataWaveserverInterfacesLogicalInterfaceIndexIDParams { - - return PostDataWaveserverInterfacesLogicalInterfaceIndexIDParams{} -} - -// PostDataWaveserverInterfacesLogicalInterfaceIndexIDParams contains all the bound params for the post data waveserver interfaces logical interface index ID operation -// typically these are obtained from a http.Request -// -// swagger:parameters PostDataWaveserverInterfacesLogicalInterfaceIndexID -type PostDataWaveserverInterfacesLogicalInterfaceIndexIDParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id to be added to list - In: body - */ - CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceIDBodyParam *models.CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceIDWrapper - /*Id of logical-interface - Required: true - In: path - */ - Index int64 -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewPostDataWaveserverInterfacesLogicalInterfaceIndexIDParams() beforehand. -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexIDParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceIDWrapper - if err := route.Consumer.Consume(r.Body, &body); err != nil { - res = append(res, errors.NewParseError("cienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceIdBodyParam", "body", "", err)) - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceIDBodyParam = &body - } - } - } - rIndex, rhkIndex, _ := route.Params.GetOK("index") - if err := o.bindIndex(rIndex, rhkIndex, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindIndex binds and validates parameter Index from path. -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexIDParams) bindIndex(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - value, err := swag.ConvertInt64(raw) - if err != nil { - return errors.InvalidType("index", "path", "int64", raw) - } - o.Index = value - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_id_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_id_responses.go deleted file mode 100644 index 1275d937b704bb359df1967fbf4b614d8d5d3382..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_id_responses.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// PostDataWaveserverInterfacesLogicalInterfaceIndexIDCreatedCode is the HTTP code returned for type PostDataWaveserverInterfacesLogicalInterfaceIndexIDCreated -const PostDataWaveserverInterfacesLogicalInterfaceIndexIDCreatedCode int = 201 - -/*PostDataWaveserverInterfacesLogicalInterfaceIndexIDCreated Object created - -swagger:response postDataWaveserverInterfacesLogicalInterfaceIndexIdCreated -*/ -type PostDataWaveserverInterfacesLogicalInterfaceIndexIDCreated struct { -} - -// NewPostDataWaveserverInterfacesLogicalInterfaceIndexIDCreated creates PostDataWaveserverInterfacesLogicalInterfaceIndexIDCreated with default headers values -func NewPostDataWaveserverInterfacesLogicalInterfaceIndexIDCreated() *PostDataWaveserverInterfacesLogicalInterfaceIndexIDCreated { - - return &PostDataWaveserverInterfacesLogicalInterfaceIndexIDCreated{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexIDCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// PostDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequestCode is the HTTP code returned for type PostDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequest -const PostDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequestCode int = 400 - -/*PostDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequest Internal error - -swagger:response postDataWaveserverInterfacesLogicalInterfaceIndexIdBadRequest -*/ -type PostDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequest struct { -} - -// NewPostDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequest creates PostDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequest with default headers values -func NewPostDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequest() *PostDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequest { - - return &PostDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequest{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// PostDataWaveserverInterfacesLogicalInterfaceIndexIDConflictCode is the HTTP code returned for type PostDataWaveserverInterfacesLogicalInterfaceIndexIDConflict -const PostDataWaveserverInterfacesLogicalInterfaceIndexIDConflictCode int = 409 - -/*PostDataWaveserverInterfacesLogicalInterfaceIndexIDConflict Object already exists - -swagger:response postDataWaveserverInterfacesLogicalInterfaceIndexIdConflict -*/ -type PostDataWaveserverInterfacesLogicalInterfaceIndexIDConflict struct { -} - -// NewPostDataWaveserverInterfacesLogicalInterfaceIndexIDConflict creates PostDataWaveserverInterfacesLogicalInterfaceIndexIDConflict with default headers values -func NewPostDataWaveserverInterfacesLogicalInterfaceIndexIDConflict() *PostDataWaveserverInterfacesLogicalInterfaceIndexIDConflict { - - return &PostDataWaveserverInterfacesLogicalInterfaceIndexIDConflict{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexIDConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_id_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_id_urlbuilder.go deleted file mode 100644 index cce5359b9ddbcf68ba7d4db2be9afc30e00eb90c..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_id_urlbuilder.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" - - "github.com/go-openapi/swag" -) - -// PostDataWaveserverInterfacesLogicalInterfaceIndexIDURL generates an URL for the post data waveserver interfaces logical interface index ID operation -type PostDataWaveserverInterfacesLogicalInterfaceIndexIDURL struct { - Index int64 - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexIDURL) WithBasePath(bp string) *PostDataWaveserverInterfacesLogicalInterfaceIndexIDURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexIDURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexIDURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/logical-interface={index}/id/" - - index := swag.FormatInt64(o.Index) - if index != "" { - _path = strings.Replace(_path, "{index}", index, -1) - } else { - return nil, errors.New("index is required on PostDataWaveserverInterfacesLogicalInterfaceIndexIDURL") - } - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexIDURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexIDURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexIDURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on PostDataWaveserverInterfacesLogicalInterfaceIndexIDURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on PostDataWaveserverInterfacesLogicalInterfaceIndexIDURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexIDURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_properties.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_properties.go deleted file mode 100644 index 763b46daff0db8551cae5a2251089562bfea7d10..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_properties.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandlerFunc turns a function with the right signature into a post data waveserver interfaces logical interface index properties handler -type PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandlerFunc func(PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandlerFunc) Handle(params PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams) middleware.Responder { - return fn(params) -} - -// PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler interface for that can handle valid post data waveserver interfaces logical interface index properties params -type PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler interface { - Handle(PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams) middleware.Responder -} - -// NewPostDataWaveserverInterfacesLogicalInterfaceIndexProperties creates a new http.Handler for the post data waveserver interfaces logical interface index properties operation -func NewPostDataWaveserverInterfacesLogicalInterfaceIndexProperties(ctx *middleware.Context, handler PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler) *PostDataWaveserverInterfacesLogicalInterfaceIndexProperties { - return &PostDataWaveserverInterfacesLogicalInterfaceIndexProperties{Context: ctx, Handler: handler} -} - -/*PostDataWaveserverInterfacesLogicalInterfaceIndexProperties swagger:route POST /data/waveserver-interfaces/logical-interface={index}/properties/ ciena-waveserver-interfaces postDataWaveserverInterfacesLogicalInterfaceIndexProperties - -creates ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties - -All the configuration data of the logical management interface. - -*/ -type PostDataWaveserverInterfacesLogicalInterfaceIndexProperties struct { - Context *middleware.Context - Handler PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler -} - -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexProperties) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_properties_ip_v4.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_properties_ip_v4.go deleted file mode 100644 index 5835039aa852cfa8c1a478ec1327d72dd110f9b1..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_properties_ip_v4.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4HandlerFunc turns a function with the right signature into a post data waveserver interfaces logical interface index properties IP v4 handler -type PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4HandlerFunc func(PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params) middleware.Responder - -// Handle executing the request and returning a response -func (fn PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4HandlerFunc) Handle(params PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params) middleware.Responder { - return fn(params) -} - -// PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler interface for that can handle valid post data waveserver interfaces logical interface index properties IP v4 params -type PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler interface { - Handle(PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params) middleware.Responder -} - -// NewPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4 creates a new http.Handler for the post data waveserver interfaces logical interface index properties IP v4 operation -func NewPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4(ctx *middleware.Context, handler PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler) *PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4 { - return &PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4{Context: ctx, Handler: handler} -} - -/*PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4 swagger:route POST /data/waveserver-interfaces/logical-interface={index}/properties/ipv4/ ciena-waveserver-interfaces postDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIpV4 - -creates ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4 - -IPv4 configuration and operational data. - -*/ -type PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4 struct { - Context *middleware.Context - Handler PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler -} - -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_properties_ip_v4_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_properties_ip_v4_parameters.go deleted file mode 100644 index 854c392818b553797a653c67ef96a5962582e415..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_properties_ip_v4_parameters.go +++ /dev/null @@ -1,100 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// NewPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params creates a new PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params object -// no default values defined in spec. -func NewPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params() PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params { - - return PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params{} -} - -// PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params contains all the bound params for the post data waveserver interfaces logical interface index properties IP v4 operation -// typically these are obtained from a http.Request -// -// swagger:parameters PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4 -type PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4 to be added to list - In: body - */ - CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesIPV4BodyParam *models.CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesIPV4Wrapper - /*Id of logical-interface - Required: true - In: path - */ - Index int64 -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params() beforehand. -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesIPV4Wrapper - if err := route.Consumer.Consume(r.Body, &body); err != nil { - res = append(res, errors.NewParseError("cienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesIpv4BodyParam", "body", "", err)) - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesIPV4BodyParam = &body - } - } - } - rIndex, rhkIndex, _ := route.Params.GetOK("index") - if err := o.bindIndex(rIndex, rhkIndex, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindIndex binds and validates parameter Index from path. -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params) bindIndex(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - value, err := swag.ConvertInt64(raw) - if err != nil { - return errors.InvalidType("index", "path", "int64", raw) - } - o.Index = value - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_properties_ip_v4_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_properties_ip_v4_responses.go deleted file mode 100644 index 2fbf86669711d0f0b10103cd055c5708572efc38..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_properties_ip_v4_responses.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4CreatedCode is the HTTP code returned for type PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Created -const PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4CreatedCode int = 201 - -/*PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Created Object created - -swagger:response postDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIpV4Created -*/ -type PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Created struct { -} - -// NewPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Created creates PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Created with default headers values -func NewPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Created() *PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Created { - - return &PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Created{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Created) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequestCode is the HTTP code returned for type PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequest -const PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequestCode int = 400 - -/*PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequest Internal error - -swagger:response postDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIpV4BadRequest -*/ -type PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequest struct { -} - -// NewPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequest creates PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequest with default headers values -func NewPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequest() *PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequest { - - return &PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequest{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4ConflictCode is the HTTP code returned for type PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Conflict -const PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4ConflictCode int = 409 - -/*PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Conflict Object already exists - -swagger:response postDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIpV4Conflict -*/ -type PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Conflict struct { -} - -// NewPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Conflict creates PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Conflict with default headers values -func NewPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Conflict() *PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Conflict { - - return &PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Conflict{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Conflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_properties_ip_v4_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_properties_ip_v4_urlbuilder.go deleted file mode 100644 index 0a1707528ec88113f710081cd35c6c5404ec6a27..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_properties_ip_v4_urlbuilder.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" - - "github.com/go-openapi/swag" -) - -// PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL generates an URL for the post data waveserver interfaces logical interface index properties IP v4 operation -type PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL struct { - Index int64 - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL) WithBasePath(bp string) *PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/logical-interface={index}/properties/ipv4/" - - index := swag.FormatInt64(o.Index) - if index != "" { - _path = strings.Replace(_path, "{index}", index, -1) - } else { - return nil, errors.New("index is required on PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL") - } - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL") - } - if host == "" { - return nil, errors.New("host is required for a full url on PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_properties_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_properties_parameters.go deleted file mode 100644 index 7500864f6d60ac26ba19c3d4c21692600e36f5e3..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_properties_parameters.go +++ /dev/null @@ -1,100 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// NewPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams creates a new PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams object -// no default values defined in spec. -func NewPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams() PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams { - - return PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams{} -} - -// PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams contains all the bound params for the post data waveserver interfaces logical interface index properties operation -// typically these are obtained from a http.Request -// -// swagger:parameters PostDataWaveserverInterfacesLogicalInterfaceIndexProperties -type PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties to be added to list - In: body - */ - CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesBodyParam *models.CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesWrapper - /*Id of logical-interface - Required: true - In: path - */ - Index int64 -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams() beforehand. -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesWrapper - if err := route.Consumer.Consume(r.Body, &body); err != nil { - res = append(res, errors.NewParseError("cienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesBodyParam", "body", "", err)) - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesBodyParam = &body - } - } - } - rIndex, rhkIndex, _ := route.Params.GetOK("index") - if err := o.bindIndex(rIndex, rhkIndex, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindIndex binds and validates parameter Index from path. -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams) bindIndex(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - value, err := swag.ConvertInt64(raw) - if err != nil { - return errors.InvalidType("index", "path", "int64", raw) - } - o.Index = value - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_properties_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_properties_responses.go deleted file mode 100644 index 8ce929f600fdb3763c7a6bb3df0f7e6f2a689730..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_properties_responses.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesCreatedCode is the HTTP code returned for type PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesCreated -const PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesCreatedCode int = 201 - -/*PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesCreated Object created - -swagger:response postDataWaveserverInterfacesLogicalInterfaceIndexPropertiesCreated -*/ -type PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesCreated struct { -} - -// NewPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesCreated creates PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesCreated with default headers values -func NewPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesCreated() *PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesCreated { - - return &PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesCreated{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequestCode is the HTTP code returned for type PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest -const PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequestCode int = 400 - -/*PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest Internal error - -swagger:response postDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest -*/ -type PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest struct { -} - -// NewPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest creates PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest with default headers values -func NewPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest() *PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest { - - return &PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesConflictCode is the HTTP code returned for type PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesConflict -const PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesConflictCode int = 409 - -/*PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesConflict Object already exists - -swagger:response postDataWaveserverInterfacesLogicalInterfaceIndexPropertiesConflict -*/ -type PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesConflict struct { -} - -// NewPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesConflict creates PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesConflict with default headers values -func NewPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesConflict() *PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesConflict { - - return &PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesConflict{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_properties_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_properties_urlbuilder.go deleted file mode 100644 index e4f169ba81c583d27840b0ba4e4704f8c43c9752..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_properties_urlbuilder.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" - - "github.com/go-openapi/swag" -) - -// PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL generates an URL for the post data waveserver interfaces logical interface index properties operation -type PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL struct { - Index int64 - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL) WithBasePath(bp string) *PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/logical-interface={index}/properties/" - - index := swag.FormatInt64(o.Index) - if index != "" { - _path = strings.Replace(_path, "{index}", index, -1) - } else { - return nil, errors.New("index is required on PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL") - } - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_state.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_state.go deleted file mode 100644 index 1243434280790ef1eeac14e7fe033d473c0f728d..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_state.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// PostDataWaveserverInterfacesLogicalInterfaceIndexStateHandlerFunc turns a function with the right signature into a post data waveserver interfaces logical interface index state handler -type PostDataWaveserverInterfacesLogicalInterfaceIndexStateHandlerFunc func(PostDataWaveserverInterfacesLogicalInterfaceIndexStateParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn PostDataWaveserverInterfacesLogicalInterfaceIndexStateHandlerFunc) Handle(params PostDataWaveserverInterfacesLogicalInterfaceIndexStateParams) middleware.Responder { - return fn(params) -} - -// PostDataWaveserverInterfacesLogicalInterfaceIndexStateHandler interface for that can handle valid post data waveserver interfaces logical interface index state params -type PostDataWaveserverInterfacesLogicalInterfaceIndexStateHandler interface { - Handle(PostDataWaveserverInterfacesLogicalInterfaceIndexStateParams) middleware.Responder -} - -// NewPostDataWaveserverInterfacesLogicalInterfaceIndexState creates a new http.Handler for the post data waveserver interfaces logical interface index state operation -func NewPostDataWaveserverInterfacesLogicalInterfaceIndexState(ctx *middleware.Context, handler PostDataWaveserverInterfacesLogicalInterfaceIndexStateHandler) *PostDataWaveserverInterfacesLogicalInterfaceIndexState { - return &PostDataWaveserverInterfacesLogicalInterfaceIndexState{Context: ctx, Handler: handler} -} - -/*PostDataWaveserverInterfacesLogicalInterfaceIndexState swagger:route POST /data/waveserver-interfaces/logical-interface={index}/state/ ciena-waveserver-interfaces postDataWaveserverInterfacesLogicalInterfaceIndexState - -creates ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State - -Logical interface state information. - -*/ -type PostDataWaveserverInterfacesLogicalInterfaceIndexState struct { - Context *middleware.Context - Handler PostDataWaveserverInterfacesLogicalInterfaceIndexStateHandler -} - -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexState) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewPostDataWaveserverInterfacesLogicalInterfaceIndexStateParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_state_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_state_parameters.go deleted file mode 100644 index 009ad6e84a696d4cc264ada409e93b55026b6f5b..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_state_parameters.go +++ /dev/null @@ -1,100 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// NewPostDataWaveserverInterfacesLogicalInterfaceIndexStateParams creates a new PostDataWaveserverInterfacesLogicalInterfaceIndexStateParams object -// no default values defined in spec. -func NewPostDataWaveserverInterfacesLogicalInterfaceIndexStateParams() PostDataWaveserverInterfacesLogicalInterfaceIndexStateParams { - - return PostDataWaveserverInterfacesLogicalInterfaceIndexStateParams{} -} - -// PostDataWaveserverInterfacesLogicalInterfaceIndexStateParams contains all the bound params for the post data waveserver interfaces logical interface index state operation -// typically these are obtained from a http.Request -// -// swagger:parameters PostDataWaveserverInterfacesLogicalInterfaceIndexState -type PostDataWaveserverInterfacesLogicalInterfaceIndexStateParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State to be added to list - In: body - */ - CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceStateBodyParam *models.CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceStateWrapper - /*Id of logical-interface - Required: true - In: path - */ - Index int64 -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewPostDataWaveserverInterfacesLogicalInterfaceIndexStateParams() beforehand. -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexStateParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceStateWrapper - if err := route.Consumer.Consume(r.Body, &body); err != nil { - res = append(res, errors.NewParseError("cienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceStateBodyParam", "body", "", err)) - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceStateBodyParam = &body - } - } - } - rIndex, rhkIndex, _ := route.Params.GetOK("index") - if err := o.bindIndex(rIndex, rhkIndex, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindIndex binds and validates parameter Index from path. -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexStateParams) bindIndex(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - value, err := swag.ConvertInt64(raw) - if err != nil { - return errors.InvalidType("index", "path", "int64", raw) - } - o.Index = value - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_state_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_state_responses.go deleted file mode 100644 index 247a7e83d7e13f13c572c3f4a6dace9af06e844e..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_index_state_responses.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// PostDataWaveserverInterfacesLogicalInterfaceIndexStateCreatedCode is the HTTP code returned for type PostDataWaveserverInterfacesLogicalInterfaceIndexStateCreated -const PostDataWaveserverInterfacesLogicalInterfaceIndexStateCreatedCode int = 201 - -/*PostDataWaveserverInterfacesLogicalInterfaceIndexStateCreated Object created - -swagger:response postDataWaveserverInterfacesLogicalInterfaceIndexStateCreated -*/ -type PostDataWaveserverInterfacesLogicalInterfaceIndexStateCreated struct { -} - -// NewPostDataWaveserverInterfacesLogicalInterfaceIndexStateCreated creates PostDataWaveserverInterfacesLogicalInterfaceIndexStateCreated with default headers values -func NewPostDataWaveserverInterfacesLogicalInterfaceIndexStateCreated() *PostDataWaveserverInterfacesLogicalInterfaceIndexStateCreated { - - return &PostDataWaveserverInterfacesLogicalInterfaceIndexStateCreated{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexStateCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// PostDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequestCode is the HTTP code returned for type PostDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest -const PostDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequestCode int = 400 - -/*PostDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest Internal error - -swagger:response postDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest -*/ -type PostDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest struct { -} - -// NewPostDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest creates PostDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest with default headers values -func NewPostDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest() *PostDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest { - - return &PostDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// PostDataWaveserverInterfacesLogicalInterfaceIndexStateConflictCode is the HTTP code returned for type PostDataWaveserverInterfacesLogicalInterfaceIndexStateConflict -const PostDataWaveserverInterfacesLogicalInterfaceIndexStateConflictCode int = 409 - -/*PostDataWaveserverInterfacesLogicalInterfaceIndexStateConflict Object already exists - -swagger:response postDataWaveserverInterfacesLogicalInterfaceIndexStateConflict -*/ -type PostDataWaveserverInterfacesLogicalInterfaceIndexStateConflict struct { -} - -// NewPostDataWaveserverInterfacesLogicalInterfaceIndexStateConflict creates PostDataWaveserverInterfacesLogicalInterfaceIndexStateConflict with default headers values -func NewPostDataWaveserverInterfacesLogicalInterfaceIndexStateConflict() *PostDataWaveserverInterfacesLogicalInterfaceIndexStateConflict { - - return &PostDataWaveserverInterfacesLogicalInterfaceIndexStateConflict{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesLogicalInterfaceIndexStateConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_parameters.go deleted file mode 100644 index c2930334e30e915ae2f7a831d65ebf9e5df6c435..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_parameters.go +++ /dev/null @@ -1,69 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// NewPostDataWaveserverInterfacesLogicalInterfaceParams creates a new PostDataWaveserverInterfacesLogicalInterfaceParams object -// no default values defined in spec. -func NewPostDataWaveserverInterfacesLogicalInterfaceParams() PostDataWaveserverInterfacesLogicalInterfaceParams { - - return PostDataWaveserverInterfacesLogicalInterfaceParams{} -} - -// PostDataWaveserverInterfacesLogicalInterfaceParams contains all the bound params for the post data waveserver interfaces logical interface operation -// typically these are obtained from a http.Request -// -// swagger:parameters PostDataWaveserverInterfacesLogicalInterface -type PostDataWaveserverInterfacesLogicalInterfaceParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface to be added to list - In: body - */ - CienaWaveserverInterfacesWaveserverinterfacesLogicalInterfaceBodyParam *models.CienaWaveserverInterfacesWaveserverinterfacesLogicalInterfaceWrapper -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewPostDataWaveserverInterfacesLogicalInterfaceParams() beforehand. -func (o *PostDataWaveserverInterfacesLogicalInterfaceParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.CienaWaveserverInterfacesWaveserverinterfacesLogicalInterfaceWrapper - if err := route.Consumer.Consume(r.Body, &body); err != nil { - res = append(res, errors.NewParseError("cienaWaveserverInterfacesWaveserverinterfacesLogicalInterfaceBodyParam", "body", "", err)) - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.CienaWaveserverInterfacesWaveserverinterfacesLogicalInterfaceBodyParam = &body - } - } - } - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_responses.go deleted file mode 100644 index 7af9539dda16197ce6f84749f33439c80ddd321c..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_responses.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// PostDataWaveserverInterfacesLogicalInterfaceCreatedCode is the HTTP code returned for type PostDataWaveserverInterfacesLogicalInterfaceCreated -const PostDataWaveserverInterfacesLogicalInterfaceCreatedCode int = 201 - -/*PostDataWaveserverInterfacesLogicalInterfaceCreated Object created - -swagger:response postDataWaveserverInterfacesLogicalInterfaceCreated -*/ -type PostDataWaveserverInterfacesLogicalInterfaceCreated struct { -} - -// NewPostDataWaveserverInterfacesLogicalInterfaceCreated creates PostDataWaveserverInterfacesLogicalInterfaceCreated with default headers values -func NewPostDataWaveserverInterfacesLogicalInterfaceCreated() *PostDataWaveserverInterfacesLogicalInterfaceCreated { - - return &PostDataWaveserverInterfacesLogicalInterfaceCreated{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesLogicalInterfaceCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// PostDataWaveserverInterfacesLogicalInterfaceBadRequestCode is the HTTP code returned for type PostDataWaveserverInterfacesLogicalInterfaceBadRequest -const PostDataWaveserverInterfacesLogicalInterfaceBadRequestCode int = 400 - -/*PostDataWaveserverInterfacesLogicalInterfaceBadRequest Internal error - -swagger:response postDataWaveserverInterfacesLogicalInterfaceBadRequest -*/ -type PostDataWaveserverInterfacesLogicalInterfaceBadRequest struct { -} - -// NewPostDataWaveserverInterfacesLogicalInterfaceBadRequest creates PostDataWaveserverInterfacesLogicalInterfaceBadRequest with default headers values -func NewPostDataWaveserverInterfacesLogicalInterfaceBadRequest() *PostDataWaveserverInterfacesLogicalInterfaceBadRequest { - - return &PostDataWaveserverInterfacesLogicalInterfaceBadRequest{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesLogicalInterfaceBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// PostDataWaveserverInterfacesLogicalInterfaceConflictCode is the HTTP code returned for type PostDataWaveserverInterfacesLogicalInterfaceConflict -const PostDataWaveserverInterfacesLogicalInterfaceConflictCode int = 409 - -/*PostDataWaveserverInterfacesLogicalInterfaceConflict Object already exists - -swagger:response postDataWaveserverInterfacesLogicalInterfaceConflict -*/ -type PostDataWaveserverInterfacesLogicalInterfaceConflict struct { -} - -// NewPostDataWaveserverInterfacesLogicalInterfaceConflict creates PostDataWaveserverInterfacesLogicalInterfaceConflict with default headers values -func NewPostDataWaveserverInterfacesLogicalInterfaceConflict() *PostDataWaveserverInterfacesLogicalInterfaceConflict { - - return &PostDataWaveserverInterfacesLogicalInterfaceConflict{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesLogicalInterfaceConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_urlbuilder.go deleted file mode 100644 index 254124974e3983554612bfc657f10a3a9434c9d0..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_logical_interface_urlbuilder.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" -) - -// PostDataWaveserverInterfacesLogicalInterfaceURL generates an URL for the post data waveserver interfaces logical interface operation -type PostDataWaveserverInterfacesLogicalInterfaceURL struct { - _basePath string -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PostDataWaveserverInterfacesLogicalInterfaceURL) WithBasePath(bp string) *PostDataWaveserverInterfacesLogicalInterfaceURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PostDataWaveserverInterfacesLogicalInterfaceURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *PostDataWaveserverInterfacesLogicalInterfaceURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/logical-interface/" - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *PostDataWaveserverInterfacesLogicalInterfaceURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *PostDataWaveserverInterfacesLogicalInterfaceURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *PostDataWaveserverInterfacesLogicalInterfaceURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on PostDataWaveserverInterfacesLogicalInterfaceURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on PostDataWaveserverInterfacesLogicalInterfaceURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *PostDataWaveserverInterfacesLogicalInterfaceURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_parameters.go deleted file mode 100644 index 32bd73be2c357973a2faad3a0178de9858290df2..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_parameters.go +++ /dev/null @@ -1,69 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// NewPostDataWaveserverInterfacesParams creates a new PostDataWaveserverInterfacesParams object -// no default values defined in spec. -func NewPostDataWaveserverInterfacesParams() PostDataWaveserverInterfacesParams { - - return PostDataWaveserverInterfacesParams{} -} - -// PostDataWaveserverInterfacesParams contains all the bound params for the post data waveserver interfaces operation -// typically these are obtained from a http.Request -// -// swagger:parameters PostDataWaveserverInterfaces -type PostDataWaveserverInterfacesParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*ciena.waveserver.interfaces.WaveserverInterfaces to be added to list - In: body - */ - CienaWaveserverInterfacesWaveserverInterfacesBodyParam *models.CienaWaveserverInterfacesWaveserverInterfacesWrapper -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewPostDataWaveserverInterfacesParams() beforehand. -func (o *PostDataWaveserverInterfacesParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.CienaWaveserverInterfacesWaveserverInterfacesWrapper - if err := route.Consumer.Consume(r.Body, &body); err != nil { - res = append(res, errors.NewParseError("cienaWaveserverInterfacesWaveserverInterfacesBodyParam", "body", "", err)) - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.CienaWaveserverInterfacesWaveserverInterfacesBodyParam = &body - } - } - } - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface.go deleted file mode 100644 index c0bc9555f8fc3342eb6b8e0d17a39d4e654b996a..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// PostDataWaveserverInterfacesPhysicalInterfaceHandlerFunc turns a function with the right signature into a post data waveserver interfaces physical interface handler -type PostDataWaveserverInterfacesPhysicalInterfaceHandlerFunc func(PostDataWaveserverInterfacesPhysicalInterfaceParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn PostDataWaveserverInterfacesPhysicalInterfaceHandlerFunc) Handle(params PostDataWaveserverInterfacesPhysicalInterfaceParams) middleware.Responder { - return fn(params) -} - -// PostDataWaveserverInterfacesPhysicalInterfaceHandler interface for that can handle valid post data waveserver interfaces physical interface params -type PostDataWaveserverInterfacesPhysicalInterfaceHandler interface { - Handle(PostDataWaveserverInterfacesPhysicalInterfaceParams) middleware.Responder -} - -// NewPostDataWaveserverInterfacesPhysicalInterface creates a new http.Handler for the post data waveserver interfaces physical interface operation -func NewPostDataWaveserverInterfacesPhysicalInterface(ctx *middleware.Context, handler PostDataWaveserverInterfacesPhysicalInterfaceHandler) *PostDataWaveserverInterfacesPhysicalInterface { - return &PostDataWaveserverInterfacesPhysicalInterface{Context: ctx, Handler: handler} -} - -/*PostDataWaveserverInterfacesPhysicalInterface swagger:route POST /data/waveserver-interfaces/physical-interface/ ciena-waveserver-interfaces postDataWaveserverInterfacesPhysicalInterface - -creates ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface - -List of physical Ethernet management interfaces. - -*/ -type PostDataWaveserverInterfacesPhysicalInterface struct { - Context *middleware.Context - Handler PostDataWaveserverInterfacesPhysicalInterfaceHandler -} - -func (o *PostDataWaveserverInterfacesPhysicalInterface) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewPostDataWaveserverInterfacesPhysicalInterfaceParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_id.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_id.go deleted file mode 100644 index f9b40d96d8a2bf870a7c6c28a741cd347fdba767..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_id.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// PostDataWaveserverInterfacesPhysicalInterfaceNameIDHandlerFunc turns a function with the right signature into a post data waveserver interfaces physical interface name ID handler -type PostDataWaveserverInterfacesPhysicalInterfaceNameIDHandlerFunc func(PostDataWaveserverInterfacesPhysicalInterfaceNameIDParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn PostDataWaveserverInterfacesPhysicalInterfaceNameIDHandlerFunc) Handle(params PostDataWaveserverInterfacesPhysicalInterfaceNameIDParams) middleware.Responder { - return fn(params) -} - -// PostDataWaveserverInterfacesPhysicalInterfaceNameIDHandler interface for that can handle valid post data waveserver interfaces physical interface name ID params -type PostDataWaveserverInterfacesPhysicalInterfaceNameIDHandler interface { - Handle(PostDataWaveserverInterfacesPhysicalInterfaceNameIDParams) middleware.Responder -} - -// NewPostDataWaveserverInterfacesPhysicalInterfaceNameID creates a new http.Handler for the post data waveserver interfaces physical interface name ID operation -func NewPostDataWaveserverInterfacesPhysicalInterfaceNameID(ctx *middleware.Context, handler PostDataWaveserverInterfacesPhysicalInterfaceNameIDHandler) *PostDataWaveserverInterfacesPhysicalInterfaceNameID { - return &PostDataWaveserverInterfacesPhysicalInterfaceNameID{Context: ctx, Handler: handler} -} - -/*PostDataWaveserverInterfacesPhysicalInterfaceNameID swagger:route POST /data/waveserver-interfaces/physical-interface={name}/id/ ciena-waveserver-interfaces postDataWaveserverInterfacesPhysicalInterfaceNameId - -creates ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id - -Identification information of this management interface. - -*/ -type PostDataWaveserverInterfacesPhysicalInterfaceNameID struct { - Context *middleware.Context - Handler PostDataWaveserverInterfacesPhysicalInterfaceNameIDHandler -} - -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNameID) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewPostDataWaveserverInterfacesPhysicalInterfaceNameIDParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_id_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_id_parameters.go deleted file mode 100644 index 0bf5494e7e845e531498be40b5918f02919cd430..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_id_parameters.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// NewPostDataWaveserverInterfacesPhysicalInterfaceNameIDParams creates a new PostDataWaveserverInterfacesPhysicalInterfaceNameIDParams object -// no default values defined in spec. -func NewPostDataWaveserverInterfacesPhysicalInterfaceNameIDParams() PostDataWaveserverInterfacesPhysicalInterfaceNameIDParams { - - return PostDataWaveserverInterfacesPhysicalInterfaceNameIDParams{} -} - -// PostDataWaveserverInterfacesPhysicalInterfaceNameIDParams contains all the bound params for the post data waveserver interfaces physical interface name ID operation -// typically these are obtained from a http.Request -// -// swagger:parameters PostDataWaveserverInterfacesPhysicalInterfaceNameID -type PostDataWaveserverInterfacesPhysicalInterfaceNameIDParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id to be added to list - In: body - */ - CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceIDBodyParam *models.CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceIDWrapper - /*Id of physical-interface - Required: true - In: path - */ - Name string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewPostDataWaveserverInterfacesPhysicalInterfaceNameIDParams() beforehand. -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNameIDParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceIDWrapper - if err := route.Consumer.Consume(r.Body, &body); err != nil { - res = append(res, errors.NewParseError("cienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceIdBodyParam", "body", "", err)) - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceIDBodyParam = &body - } - } - } - rName, rhkName, _ := route.Params.GetOK("name") - if err := o.bindName(rName, rhkName, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindName binds and validates parameter Name from path. -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNameIDParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.Name = raw - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_id_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_id_responses.go deleted file mode 100644 index ab9f7f87a7f36e59d84cffafb0e6fcf05c068de9..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_id_responses.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// PostDataWaveserverInterfacesPhysicalInterfaceNameIDCreatedCode is the HTTP code returned for type PostDataWaveserverInterfacesPhysicalInterfaceNameIDCreated -const PostDataWaveserverInterfacesPhysicalInterfaceNameIDCreatedCode int = 201 - -/*PostDataWaveserverInterfacesPhysicalInterfaceNameIDCreated Object created - -swagger:response postDataWaveserverInterfacesPhysicalInterfaceNameIdCreated -*/ -type PostDataWaveserverInterfacesPhysicalInterfaceNameIDCreated struct { -} - -// NewPostDataWaveserverInterfacesPhysicalInterfaceNameIDCreated creates PostDataWaveserverInterfacesPhysicalInterfaceNameIDCreated with default headers values -func NewPostDataWaveserverInterfacesPhysicalInterfaceNameIDCreated() *PostDataWaveserverInterfacesPhysicalInterfaceNameIDCreated { - - return &PostDataWaveserverInterfacesPhysicalInterfaceNameIDCreated{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNameIDCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// PostDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequestCode is the HTTP code returned for type PostDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequest -const PostDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequestCode int = 400 - -/*PostDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequest Internal error - -swagger:response postDataWaveserverInterfacesPhysicalInterfaceNameIdBadRequest -*/ -type PostDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequest struct { -} - -// NewPostDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequest creates PostDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequest with default headers values -func NewPostDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequest() *PostDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequest { - - return &PostDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequest{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// PostDataWaveserverInterfacesPhysicalInterfaceNameIDConflictCode is the HTTP code returned for type PostDataWaveserverInterfacesPhysicalInterfaceNameIDConflict -const PostDataWaveserverInterfacesPhysicalInterfaceNameIDConflictCode int = 409 - -/*PostDataWaveserverInterfacesPhysicalInterfaceNameIDConflict Object already exists - -swagger:response postDataWaveserverInterfacesPhysicalInterfaceNameIdConflict -*/ -type PostDataWaveserverInterfacesPhysicalInterfaceNameIDConflict struct { -} - -// NewPostDataWaveserverInterfacesPhysicalInterfaceNameIDConflict creates PostDataWaveserverInterfacesPhysicalInterfaceNameIDConflict with default headers values -func NewPostDataWaveserverInterfacesPhysicalInterfaceNameIDConflict() *PostDataWaveserverInterfacesPhysicalInterfaceNameIDConflict { - - return &PostDataWaveserverInterfacesPhysicalInterfaceNameIDConflict{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNameIDConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_properties.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_properties.go deleted file mode 100644 index 4cf60f503ecff895b25ce44babf9b32aa7d57176..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_properties.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandlerFunc turns a function with the right signature into a post data waveserver interfaces physical interface name properties handler -type PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandlerFunc func(PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandlerFunc) Handle(params PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams) middleware.Responder { - return fn(params) -} - -// PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler interface for that can handle valid post data waveserver interfaces physical interface name properties params -type PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler interface { - Handle(PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams) middleware.Responder -} - -// NewPostDataWaveserverInterfacesPhysicalInterfaceNameProperties creates a new http.Handler for the post data waveserver interfaces physical interface name properties operation -func NewPostDataWaveserverInterfacesPhysicalInterfaceNameProperties(ctx *middleware.Context, handler PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler) *PostDataWaveserverInterfacesPhysicalInterfaceNameProperties { - return &PostDataWaveserverInterfacesPhysicalInterfaceNameProperties{Context: ctx, Handler: handler} -} - -/*PostDataWaveserverInterfacesPhysicalInterfaceNameProperties swagger:route POST /data/waveserver-interfaces/physical-interface={name}/properties/ ciena-waveserver-interfaces postDataWaveserverInterfacesPhysicalInterfaceNameProperties - -creates ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties - -All the configuration data of the physical management interface. - -*/ -type PostDataWaveserverInterfacesPhysicalInterfaceNameProperties struct { - Context *middleware.Context - Handler PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler -} - -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNameProperties) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_properties_ethernet.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_properties_ethernet.go deleted file mode 100644 index e39eeda9da02ea6d191a58349dab346dfc0b575f..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_properties_ethernet.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandlerFunc turns a function with the right signature into a post data waveserver interfaces physical interface name properties ethernet handler -type PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandlerFunc func(PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandlerFunc) Handle(params PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams) middleware.Responder { - return fn(params) -} - -// PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler interface for that can handle valid post data waveserver interfaces physical interface name properties ethernet params -type PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler interface { - Handle(PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams) middleware.Responder -} - -// NewPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet creates a new http.Handler for the post data waveserver interfaces physical interface name properties ethernet operation -func NewPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet(ctx *middleware.Context, handler PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler) *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet { - return &PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet{Context: ctx, Handler: handler} -} - -/*PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet swagger:route POST /data/waveserver-interfaces/physical-interface={name}/properties/ethernet/ ciena-waveserver-interfaces postDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet - -creates ciena.waveserver.interfaces.EthernetIfPropertiesGroup - -Ethernet interface attributes. - -*/ -type PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet struct { - Context *middleware.Context - Handler PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler -} - -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_properties_ethernet_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_properties_ethernet_parameters.go deleted file mode 100644 index 46d66f7e948b77f3295a3d235169ea579125fd28..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_properties_ethernet_parameters.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// NewPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams creates a new PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams object -// no default values defined in spec. -func NewPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams() PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams { - - return PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams{} -} - -// PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams contains all the bound params for the post data waveserver interfaces physical interface name properties ethernet operation -// typically these are obtained from a http.Request -// -// swagger:parameters PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet -type PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*ciena.waveserver.interfaces.EthernetIfPropertiesGroup to be added to list - In: body - */ - CienaWaveserverInterfacesEthernetIfPropertiesGroupBodyParam *models.CienaWaveserverInterfacesEthernetIfPropertiesGroupWrapper - /*Id of physical-interface - Required: true - In: path - */ - Name string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams() beforehand. -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.CienaWaveserverInterfacesEthernetIfPropertiesGroupWrapper - if err := route.Consumer.Consume(r.Body, &body); err != nil { - res = append(res, errors.NewParseError("cienaWaveserverInterfacesEthernetIfPropertiesGroupBodyParam", "body", "", err)) - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.CienaWaveserverInterfacesEthernetIfPropertiesGroupBodyParam = &body - } - } - } - rName, rhkName, _ := route.Params.GetOK("name") - if err := o.bindName(rName, rhkName, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindName binds and validates parameter Name from path. -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.Name = raw - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_properties_ethernet_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_properties_ethernet_responses.go deleted file mode 100644 index a82eac0e6c7d405eef07e1ac83a26ca9e4c8c8b8..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_properties_ethernet_responses.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetCreatedCode is the HTTP code returned for type PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetCreated -const PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetCreatedCode int = 201 - -/*PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetCreated Object created - -swagger:response postDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetCreated -*/ -type PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetCreated struct { -} - -// NewPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetCreated creates PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetCreated with default headers values -func NewPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetCreated() *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetCreated { - - return &PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetCreated{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequestCode is the HTTP code returned for type PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest -const PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequestCode int = 400 - -/*PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest Internal error - -swagger:response postDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest -*/ -type PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest struct { -} - -// NewPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest creates PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest with default headers values -func NewPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest() *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest { - - return &PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetConflictCode is the HTTP code returned for type PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetConflict -const PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetConflictCode int = 409 - -/*PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetConflict Object already exists - -swagger:response postDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetConflict -*/ -type PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetConflict struct { -} - -// NewPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetConflict creates PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetConflict with default headers values -func NewPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetConflict() *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetConflict { - - return &PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetConflict{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_properties_ethernet_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_properties_ethernet_urlbuilder.go deleted file mode 100644 index 612eabe24defba3db59da14ce7f91df2d5ff3fbc..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_properties_ethernet_urlbuilder.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL generates an URL for the post data waveserver interfaces physical interface name properties ethernet operation -type PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL struct { - Name string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL) WithBasePath(bp string) *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/physical-interface={name}/properties/ethernet/" - - name := o.Name - if name != "" { - _path = strings.Replace(_path, "{name}", name, -1) - } else { - return nil, errors.New("name is required on PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL") - } - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_properties_management.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_properties_management.go deleted file mode 100644 index b60feaed337d381be8859824f6c83bdec5c027c3..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_properties_management.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandlerFunc turns a function with the right signature into a post data waveserver interfaces physical interface name properties management handler -type PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandlerFunc func(PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandlerFunc) Handle(params PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams) middleware.Responder { - return fn(params) -} - -// PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler interface for that can handle valid post data waveserver interfaces physical interface name properties management params -type PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler interface { - Handle(PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams) middleware.Responder -} - -// NewPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement creates a new http.Handler for the post data waveserver interfaces physical interface name properties management operation -func NewPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement(ctx *middleware.Context, handler PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler) *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement { - return &PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement{Context: ctx, Handler: handler} -} - -/*PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement swagger:route POST /data/waveserver-interfaces/physical-interface={name}/properties/management/ ciena-waveserver-interfaces postDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement - -creates ciena.waveserver.interfaces.ManagementIfPropertiesGroup - -Management interface attributes. - -*/ -type PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement struct { - Context *middleware.Context - Handler PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler -} - -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_properties_management_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_properties_management_parameters.go deleted file mode 100644 index 6370fc79ebe97d2749178632219a110ee9c4af6b..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_properties_management_parameters.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// NewPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams creates a new PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams object -// no default values defined in spec. -func NewPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams() PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams { - - return PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams{} -} - -// PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams contains all the bound params for the post data waveserver interfaces physical interface name properties management operation -// typically these are obtained from a http.Request -// -// swagger:parameters PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement -type PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*ciena.waveserver.interfaces.ManagementIfPropertiesGroup to be added to list - In: body - */ - CienaWaveserverInterfacesManagementIfPropertiesGroupBodyParam *models.CienaWaveserverInterfacesManagementIfPropertiesGroupWrapper - /*Id of physical-interface - Required: true - In: path - */ - Name string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams() beforehand. -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.CienaWaveserverInterfacesManagementIfPropertiesGroupWrapper - if err := route.Consumer.Consume(r.Body, &body); err != nil { - res = append(res, errors.NewParseError("cienaWaveserverInterfacesManagementIfPropertiesGroupBodyParam", "body", "", err)) - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.CienaWaveserverInterfacesManagementIfPropertiesGroupBodyParam = &body - } - } - } - rName, rhkName, _ := route.Params.GetOK("name") - if err := o.bindName(rName, rhkName, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindName binds and validates parameter Name from path. -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.Name = raw - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_properties_management_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_properties_management_responses.go deleted file mode 100644 index ef509d67b129baef905024e88d958b310eaa457a..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_properties_management_responses.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementCreatedCode is the HTTP code returned for type PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementCreated -const PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementCreatedCode int = 201 - -/*PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementCreated Object created - -swagger:response postDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementCreated -*/ -type PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementCreated struct { -} - -// NewPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementCreated creates PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementCreated with default headers values -func NewPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementCreated() *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementCreated { - - return &PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementCreated{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequestCode is the HTTP code returned for type PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest -const PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequestCode int = 400 - -/*PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest Internal error - -swagger:response postDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest -*/ -type PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest struct { -} - -// NewPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest creates PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest with default headers values -func NewPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest() *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest { - - return &PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementConflictCode is the HTTP code returned for type PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementConflict -const PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementConflictCode int = 409 - -/*PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementConflict Object already exists - -swagger:response postDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementConflict -*/ -type PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementConflict struct { -} - -// NewPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementConflict creates PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementConflict with default headers values -func NewPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementConflict() *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementConflict { - - return &PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementConflict{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_properties_management_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_properties_management_urlbuilder.go deleted file mode 100644 index 83d01fba860b3fd6c41f2f04a8c4521ad1df3e56..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_properties_management_urlbuilder.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL generates an URL for the post data waveserver interfaces physical interface name properties management operation -type PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL struct { - Name string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL) WithBasePath(bp string) *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/physical-interface={name}/properties/management/" - - name := o.Name - if name != "" { - _path = strings.Replace(_path, "{name}", name, -1) - } else { - return nil, errors.New("name is required on PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL") - } - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_properties_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_properties_parameters.go deleted file mode 100644 index 8bc6eb441489a8abb60435e111e18e344e7bb7d5..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_properties_parameters.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// NewPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams creates a new PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams object -// no default values defined in spec. -func NewPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams() PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams { - - return PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams{} -} - -// PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams contains all the bound params for the post data waveserver interfaces physical interface name properties operation -// typically these are obtained from a http.Request -// -// swagger:parameters PostDataWaveserverInterfacesPhysicalInterfaceNameProperties -type PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties to be added to list - In: body - */ - CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfacePropertiesBodyParam *models.CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfacePropertiesWrapper - /*Id of physical-interface - Required: true - In: path - */ - Name string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams() beforehand. -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfacePropertiesWrapper - if err := route.Consumer.Consume(r.Body, &body); err != nil { - res = append(res, errors.NewParseError("cienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfacePropertiesBodyParam", "body", "", err)) - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfacePropertiesBodyParam = &body - } - } - } - rName, rhkName, _ := route.Params.GetOK("name") - if err := o.bindName(rName, rhkName, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindName binds and validates parameter Name from path. -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.Name = raw - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_properties_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_properties_responses.go deleted file mode 100644 index d1983fcf028e72292efc0425045510c61fa660c1..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_properties_responses.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesCreatedCode is the HTTP code returned for type PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesCreated -const PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesCreatedCode int = 201 - -/*PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesCreated Object created - -swagger:response postDataWaveserverInterfacesPhysicalInterfaceNamePropertiesCreated -*/ -type PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesCreated struct { -} - -// NewPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesCreated creates PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesCreated with default headers values -func NewPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesCreated() *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesCreated { - - return &PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesCreated{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequestCode is the HTTP code returned for type PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest -const PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequestCode int = 400 - -/*PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest Internal error - -swagger:response postDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest -*/ -type PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest struct { -} - -// NewPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest creates PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest with default headers values -func NewPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest() *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest { - - return &PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesConflictCode is the HTTP code returned for type PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesConflict -const PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesConflictCode int = 409 - -/*PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesConflict Object already exists - -swagger:response postDataWaveserverInterfacesPhysicalInterfaceNamePropertiesConflict -*/ -type PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesConflict struct { -} - -// NewPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesConflict creates PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesConflict with default headers values -func NewPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesConflict() *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesConflict { - - return &PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesConflict{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_properties_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_properties_urlbuilder.go deleted file mode 100644 index 5a5e002a8cd453698d5da7f4f00d10bce59b77de..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_properties_urlbuilder.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL generates an URL for the post data waveserver interfaces physical interface name properties operation -type PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL struct { - Name string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL) WithBasePath(bp string) *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/physical-interface={name}/properties/" - - name := o.Name - if name != "" { - _path = strings.Replace(_path, "{name}", name, -1) - } else { - return nil, errors.New("name is required on PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL") - } - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_state.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_state.go deleted file mode 100644 index 385203268f5335d9292203817d53b6554428fb49..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_state.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// PostDataWaveserverInterfacesPhysicalInterfaceNameStateHandlerFunc turns a function with the right signature into a post data waveserver interfaces physical interface name state handler -type PostDataWaveserverInterfacesPhysicalInterfaceNameStateHandlerFunc func(PostDataWaveserverInterfacesPhysicalInterfaceNameStateParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn PostDataWaveserverInterfacesPhysicalInterfaceNameStateHandlerFunc) Handle(params PostDataWaveserverInterfacesPhysicalInterfaceNameStateParams) middleware.Responder { - return fn(params) -} - -// PostDataWaveserverInterfacesPhysicalInterfaceNameStateHandler interface for that can handle valid post data waveserver interfaces physical interface name state params -type PostDataWaveserverInterfacesPhysicalInterfaceNameStateHandler interface { - Handle(PostDataWaveserverInterfacesPhysicalInterfaceNameStateParams) middleware.Responder -} - -// NewPostDataWaveserverInterfacesPhysicalInterfaceNameState creates a new http.Handler for the post data waveserver interfaces physical interface name state operation -func NewPostDataWaveserverInterfacesPhysicalInterfaceNameState(ctx *middleware.Context, handler PostDataWaveserverInterfacesPhysicalInterfaceNameStateHandler) *PostDataWaveserverInterfacesPhysicalInterfaceNameState { - return &PostDataWaveserverInterfacesPhysicalInterfaceNameState{Context: ctx, Handler: handler} -} - -/*PostDataWaveserverInterfacesPhysicalInterfaceNameState swagger:route POST /data/waveserver-interfaces/physical-interface={name}/state/ ciena-waveserver-interfaces postDataWaveserverInterfacesPhysicalInterfaceNameState - -creates ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State - -Physical management interface state information. - -*/ -type PostDataWaveserverInterfacesPhysicalInterfaceNameState struct { - Context *middleware.Context - Handler PostDataWaveserverInterfacesPhysicalInterfaceNameStateHandler -} - -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNameState) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewPostDataWaveserverInterfacesPhysicalInterfaceNameStateParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_state_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_state_parameters.go deleted file mode 100644 index b04f2ef2e7658332a1c6cd05b37a44f67a51847f..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_state_parameters.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// NewPostDataWaveserverInterfacesPhysicalInterfaceNameStateParams creates a new PostDataWaveserverInterfacesPhysicalInterfaceNameStateParams object -// no default values defined in spec. -func NewPostDataWaveserverInterfacesPhysicalInterfaceNameStateParams() PostDataWaveserverInterfacesPhysicalInterfaceNameStateParams { - - return PostDataWaveserverInterfacesPhysicalInterfaceNameStateParams{} -} - -// PostDataWaveserverInterfacesPhysicalInterfaceNameStateParams contains all the bound params for the post data waveserver interfaces physical interface name state operation -// typically these are obtained from a http.Request -// -// swagger:parameters PostDataWaveserverInterfacesPhysicalInterfaceNameState -type PostDataWaveserverInterfacesPhysicalInterfaceNameStateParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State to be added to list - In: body - */ - CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceStateBodyParam *models.CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceStateWrapper - /*Id of physical-interface - Required: true - In: path - */ - Name string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewPostDataWaveserverInterfacesPhysicalInterfaceNameStateParams() beforehand. -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNameStateParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceStateWrapper - if err := route.Consumer.Consume(r.Body, &body); err != nil { - res = append(res, errors.NewParseError("cienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceStateBodyParam", "body", "", err)) - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceStateBodyParam = &body - } - } - } - rName, rhkName, _ := route.Params.GetOK("name") - if err := o.bindName(rName, rhkName, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindName binds and validates parameter Name from path. -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNameStateParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.Name = raw - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_state_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_state_responses.go deleted file mode 100644 index 55356d146781f86a62fdf133cfd55be937149388..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_name_state_responses.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// PostDataWaveserverInterfacesPhysicalInterfaceNameStateCreatedCode is the HTTP code returned for type PostDataWaveserverInterfacesPhysicalInterfaceNameStateCreated -const PostDataWaveserverInterfacesPhysicalInterfaceNameStateCreatedCode int = 201 - -/*PostDataWaveserverInterfacesPhysicalInterfaceNameStateCreated Object created - -swagger:response postDataWaveserverInterfacesPhysicalInterfaceNameStateCreated -*/ -type PostDataWaveserverInterfacesPhysicalInterfaceNameStateCreated struct { -} - -// NewPostDataWaveserverInterfacesPhysicalInterfaceNameStateCreated creates PostDataWaveserverInterfacesPhysicalInterfaceNameStateCreated with default headers values -func NewPostDataWaveserverInterfacesPhysicalInterfaceNameStateCreated() *PostDataWaveserverInterfacesPhysicalInterfaceNameStateCreated { - - return &PostDataWaveserverInterfacesPhysicalInterfaceNameStateCreated{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNameStateCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// PostDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequestCode is the HTTP code returned for type PostDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest -const PostDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequestCode int = 400 - -/*PostDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest Internal error - -swagger:response postDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest -*/ -type PostDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest struct { -} - -// NewPostDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest creates PostDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest with default headers values -func NewPostDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest() *PostDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest { - - return &PostDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// PostDataWaveserverInterfacesPhysicalInterfaceNameStateConflictCode is the HTTP code returned for type PostDataWaveserverInterfacesPhysicalInterfaceNameStateConflict -const PostDataWaveserverInterfacesPhysicalInterfaceNameStateConflictCode int = 409 - -/*PostDataWaveserverInterfacesPhysicalInterfaceNameStateConflict Object already exists - -swagger:response postDataWaveserverInterfacesPhysicalInterfaceNameStateConflict -*/ -type PostDataWaveserverInterfacesPhysicalInterfaceNameStateConflict struct { -} - -// NewPostDataWaveserverInterfacesPhysicalInterfaceNameStateConflict creates PostDataWaveserverInterfacesPhysicalInterfaceNameStateConflict with default headers values -func NewPostDataWaveserverInterfacesPhysicalInterfaceNameStateConflict() *PostDataWaveserverInterfacesPhysicalInterfaceNameStateConflict { - - return &PostDataWaveserverInterfacesPhysicalInterfaceNameStateConflict{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesPhysicalInterfaceNameStateConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_parameters.go deleted file mode 100644 index 9a44f1d0a90b52203dc14d10e883945337a834e9..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_parameters.go +++ /dev/null @@ -1,69 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// NewPostDataWaveserverInterfacesPhysicalInterfaceParams creates a new PostDataWaveserverInterfacesPhysicalInterfaceParams object -// no default values defined in spec. -func NewPostDataWaveserverInterfacesPhysicalInterfaceParams() PostDataWaveserverInterfacesPhysicalInterfaceParams { - - return PostDataWaveserverInterfacesPhysicalInterfaceParams{} -} - -// PostDataWaveserverInterfacesPhysicalInterfaceParams contains all the bound params for the post data waveserver interfaces physical interface operation -// typically these are obtained from a http.Request -// -// swagger:parameters PostDataWaveserverInterfacesPhysicalInterface -type PostDataWaveserverInterfacesPhysicalInterfaceParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface to be added to list - In: body - */ - CienaWaveserverInterfacesWaveserverinterfacesPhysicalInterfaceBodyParam *models.CienaWaveserverInterfacesWaveserverinterfacesPhysicalInterfaceWrapper -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewPostDataWaveserverInterfacesPhysicalInterfaceParams() beforehand. -func (o *PostDataWaveserverInterfacesPhysicalInterfaceParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.CienaWaveserverInterfacesWaveserverinterfacesPhysicalInterfaceWrapper - if err := route.Consumer.Consume(r.Body, &body); err != nil { - res = append(res, errors.NewParseError("cienaWaveserverInterfacesWaveserverinterfacesPhysicalInterfaceBodyParam", "body", "", err)) - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.CienaWaveserverInterfacesWaveserverinterfacesPhysicalInterfaceBodyParam = &body - } - } - } - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_responses.go deleted file mode 100644 index fa731415238cd13b98257b3fa530e19b907f4348..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_responses.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// PostDataWaveserverInterfacesPhysicalInterfaceCreatedCode is the HTTP code returned for type PostDataWaveserverInterfacesPhysicalInterfaceCreated -const PostDataWaveserverInterfacesPhysicalInterfaceCreatedCode int = 201 - -/*PostDataWaveserverInterfacesPhysicalInterfaceCreated Object created - -swagger:response postDataWaveserverInterfacesPhysicalInterfaceCreated -*/ -type PostDataWaveserverInterfacesPhysicalInterfaceCreated struct { -} - -// NewPostDataWaveserverInterfacesPhysicalInterfaceCreated creates PostDataWaveserverInterfacesPhysicalInterfaceCreated with default headers values -func NewPostDataWaveserverInterfacesPhysicalInterfaceCreated() *PostDataWaveserverInterfacesPhysicalInterfaceCreated { - - return &PostDataWaveserverInterfacesPhysicalInterfaceCreated{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesPhysicalInterfaceCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// PostDataWaveserverInterfacesPhysicalInterfaceBadRequestCode is the HTTP code returned for type PostDataWaveserverInterfacesPhysicalInterfaceBadRequest -const PostDataWaveserverInterfacesPhysicalInterfaceBadRequestCode int = 400 - -/*PostDataWaveserverInterfacesPhysicalInterfaceBadRequest Internal error - -swagger:response postDataWaveserverInterfacesPhysicalInterfaceBadRequest -*/ -type PostDataWaveserverInterfacesPhysicalInterfaceBadRequest struct { -} - -// NewPostDataWaveserverInterfacesPhysicalInterfaceBadRequest creates PostDataWaveserverInterfacesPhysicalInterfaceBadRequest with default headers values -func NewPostDataWaveserverInterfacesPhysicalInterfaceBadRequest() *PostDataWaveserverInterfacesPhysicalInterfaceBadRequest { - - return &PostDataWaveserverInterfacesPhysicalInterfaceBadRequest{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesPhysicalInterfaceBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// PostDataWaveserverInterfacesPhysicalInterfaceConflictCode is the HTTP code returned for type PostDataWaveserverInterfacesPhysicalInterfaceConflict -const PostDataWaveserverInterfacesPhysicalInterfaceConflictCode int = 409 - -/*PostDataWaveserverInterfacesPhysicalInterfaceConflict Object already exists - -swagger:response postDataWaveserverInterfacesPhysicalInterfaceConflict -*/ -type PostDataWaveserverInterfacesPhysicalInterfaceConflict struct { -} - -// NewPostDataWaveserverInterfacesPhysicalInterfaceConflict creates PostDataWaveserverInterfacesPhysicalInterfaceConflict with default headers values -func NewPostDataWaveserverInterfacesPhysicalInterfaceConflict() *PostDataWaveserverInterfacesPhysicalInterfaceConflict { - - return &PostDataWaveserverInterfacesPhysicalInterfaceConflict{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesPhysicalInterfaceConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_urlbuilder.go deleted file mode 100644 index 0708e5481e92ab6a69a60e998b038642f5f9e276..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_physical_interface_urlbuilder.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" -) - -// PostDataWaveserverInterfacesPhysicalInterfaceURL generates an URL for the post data waveserver interfaces physical interface operation -type PostDataWaveserverInterfacesPhysicalInterfaceURL struct { - _basePath string -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PostDataWaveserverInterfacesPhysicalInterfaceURL) WithBasePath(bp string) *PostDataWaveserverInterfacesPhysicalInterfaceURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PostDataWaveserverInterfacesPhysicalInterfaceURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *PostDataWaveserverInterfacesPhysicalInterfaceURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/physical-interface/" - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *PostDataWaveserverInterfacesPhysicalInterfaceURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *PostDataWaveserverInterfacesPhysicalInterfaceURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *PostDataWaveserverInterfacesPhysicalInterfaceURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on PostDataWaveserverInterfacesPhysicalInterfaceURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on PostDataWaveserverInterfacesPhysicalInterfaceURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *PostDataWaveserverInterfacesPhysicalInterfaceURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_responses.go deleted file mode 100644 index 64298aa3221fa29183d39554f43d2225d41e5270..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_responses.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// PostDataWaveserverInterfacesCreatedCode is the HTTP code returned for type PostDataWaveserverInterfacesCreated -const PostDataWaveserverInterfacesCreatedCode int = 201 - -/*PostDataWaveserverInterfacesCreated Object created - -swagger:response postDataWaveserverInterfacesCreated -*/ -type PostDataWaveserverInterfacesCreated struct { -} - -// NewPostDataWaveserverInterfacesCreated creates PostDataWaveserverInterfacesCreated with default headers values -func NewPostDataWaveserverInterfacesCreated() *PostDataWaveserverInterfacesCreated { - - return &PostDataWaveserverInterfacesCreated{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// PostDataWaveserverInterfacesBadRequestCode is the HTTP code returned for type PostDataWaveserverInterfacesBadRequest -const PostDataWaveserverInterfacesBadRequestCode int = 400 - -/*PostDataWaveserverInterfacesBadRequest Internal error - -swagger:response postDataWaveserverInterfacesBadRequest -*/ -type PostDataWaveserverInterfacesBadRequest struct { -} - -// NewPostDataWaveserverInterfacesBadRequest creates PostDataWaveserverInterfacesBadRequest with default headers values -func NewPostDataWaveserverInterfacesBadRequest() *PostDataWaveserverInterfacesBadRequest { - - return &PostDataWaveserverInterfacesBadRequest{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// PostDataWaveserverInterfacesConflictCode is the HTTP code returned for type PostDataWaveserverInterfacesConflict -const PostDataWaveserverInterfacesConflictCode int = 409 - -/*PostDataWaveserverInterfacesConflict Object already exists - -swagger:response postDataWaveserverInterfacesConflict -*/ -type PostDataWaveserverInterfacesConflict struct { -} - -// NewPostDataWaveserverInterfacesConflict creates PostDataWaveserverInterfacesConflict with default headers values -func NewPostDataWaveserverInterfacesConflict() *PostDataWaveserverInterfacesConflict { - - return &PostDataWaveserverInterfacesConflict{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_routes.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_routes.go deleted file mode 100644 index 1a9f606ac030704add85a79d0afe4eb93dc4ba23..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_routes.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// PostDataWaveserverInterfacesRoutesHandlerFunc turns a function with the right signature into a post data waveserver interfaces routes handler -type PostDataWaveserverInterfacesRoutesHandlerFunc func(PostDataWaveserverInterfacesRoutesParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn PostDataWaveserverInterfacesRoutesHandlerFunc) Handle(params PostDataWaveserverInterfacesRoutesParams) middleware.Responder { - return fn(params) -} - -// PostDataWaveserverInterfacesRoutesHandler interface for that can handle valid post data waveserver interfaces routes params -type PostDataWaveserverInterfacesRoutesHandler interface { - Handle(PostDataWaveserverInterfacesRoutesParams) middleware.Responder -} - -// NewPostDataWaveserverInterfacesRoutes creates a new http.Handler for the post data waveserver interfaces routes operation -func NewPostDataWaveserverInterfacesRoutes(ctx *middleware.Context, handler PostDataWaveserverInterfacesRoutesHandler) *PostDataWaveserverInterfacesRoutes { - return &PostDataWaveserverInterfacesRoutes{Context: ctx, Handler: handler} -} - -/*PostDataWaveserverInterfacesRoutes swagger:route POST /data/waveserver-interfaces/routes/ ciena-waveserver-interfaces postDataWaveserverInterfacesRoutes - -creates ciena.waveserver.interfaces.waveserverinterfaces.Routes - -Top-level container for IP route configuration and operational data. - -*/ -type PostDataWaveserverInterfacesRoutes struct { - Context *middleware.Context - Handler PostDataWaveserverInterfacesRoutesHandler -} - -func (o *PostDataWaveserverInterfacesRoutes) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewPostDataWaveserverInterfacesRoutesParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_routes_ip_v4_static_route.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_routes_ip_v4_static_route.go deleted file mode 100644 index b3a546d54cf0921127c2f057992eade0ab0da951..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_routes_ip_v4_static_route.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// PostDataWaveserverInterfacesRoutesIPV4StaticRouteHandlerFunc turns a function with the right signature into a post data waveserver interfaces routes IP v4 static route handler -type PostDataWaveserverInterfacesRoutesIPV4StaticRouteHandlerFunc func(PostDataWaveserverInterfacesRoutesIPV4StaticRouteParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn PostDataWaveserverInterfacesRoutesIPV4StaticRouteHandlerFunc) Handle(params PostDataWaveserverInterfacesRoutesIPV4StaticRouteParams) middleware.Responder { - return fn(params) -} - -// PostDataWaveserverInterfacesRoutesIPV4StaticRouteHandler interface for that can handle valid post data waveserver interfaces routes IP v4 static route params -type PostDataWaveserverInterfacesRoutesIPV4StaticRouteHandler interface { - Handle(PostDataWaveserverInterfacesRoutesIPV4StaticRouteParams) middleware.Responder -} - -// NewPostDataWaveserverInterfacesRoutesIPV4StaticRoute creates a new http.Handler for the post data waveserver interfaces routes IP v4 static route operation -func NewPostDataWaveserverInterfacesRoutesIPV4StaticRoute(ctx *middleware.Context, handler PostDataWaveserverInterfacesRoutesIPV4StaticRouteHandler) *PostDataWaveserverInterfacesRoutesIPV4StaticRoute { - return &PostDataWaveserverInterfacesRoutesIPV4StaticRoute{Context: ctx, Handler: handler} -} - -/*PostDataWaveserverInterfacesRoutesIPV4StaticRoute swagger:route POST /data/waveserver-interfaces/routes/ipv4-static-route/ ciena-waveserver-interfaces postDataWaveserverInterfacesRoutesIpV4StaticRoute - -creates ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute - -List of IPv4 static routing entries. - -*/ -type PostDataWaveserverInterfacesRoutesIPV4StaticRoute struct { - Context *middleware.Context - Handler PostDataWaveserverInterfacesRoutesIPV4StaticRouteHandler -} - -func (o *PostDataWaveserverInterfacesRoutesIPV4StaticRoute) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewPostDataWaveserverInterfacesRoutesIPV4StaticRouteParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop.go deleted file mode 100644 index 23ff39837a892b77a10255d14ce7a2831c2f70b4..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopHandlerFunc turns a function with the right signature into a post data waveserver interfaces routes IP v4 static route destination next hop handler -type PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopHandlerFunc func(PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopHandlerFunc) Handle(params PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopParams) middleware.Responder { - return fn(params) -} - -// PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopHandler interface for that can handle valid post data waveserver interfaces routes IP v4 static route destination next hop params -type PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopHandler interface { - Handle(PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopParams) middleware.Responder -} - -// NewPostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHop creates a new http.Handler for the post data waveserver interfaces routes IP v4 static route destination next hop operation -func NewPostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHop(ctx *middleware.Context, handler PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopHandler) *PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHop { - return &PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHop{Context: ctx, Handler: handler} -} - -/*PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHop swagger:route POST /data/waveserver-interfaces/routes/ipv4-static-route={destination}/next-hop/ ciena-waveserver-interfaces postDataWaveserverInterfacesRoutesIpV4StaticRouteDestinationNextHop - -creates ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop - -A list of next-hop entries associated with the static route. - -*/ -type PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHop struct { - Context *middleware.Context - Handler PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopHandler -} - -func (o *PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHop) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewPostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_parameters.go deleted file mode 100644 index ce50eaa3aa3ace272753af24a909f515ee692c03..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_parameters.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// NewPostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopParams creates a new PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopParams object -// no default values defined in spec. -func NewPostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopParams() PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopParams { - - return PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopParams{} -} - -// PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopParams contains all the bound params for the post data waveserver interfaces routes IP v4 static route destination next hop operation -// typically these are obtained from a http.Request -// -// swagger:parameters PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHop -type PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop to be added to list - In: body - */ - CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHopBodyParam *models.CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHopWrapper - /*Id of ipv4-static-route - Required: true - In: path - */ - Destination string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewPostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopParams() beforehand. -func (o *PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHopWrapper - if err := route.Consumer.Consume(r.Body, &body); err != nil { - res = append(res, errors.NewParseError("cienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHopBodyParam", "body", "", err)) - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHopBodyParam = &body - } - } - } - rDestination, rhkDestination, _ := route.Params.GetOK("destination") - if err := o.bindDestination(rDestination, rhkDestination, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindDestination binds and validates parameter Destination from path. -func (o *PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopParams) bindDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.Destination = raw - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_responses.go deleted file mode 100644 index 94d5059bacffcb2cc4a982ba64b1cc1501cac3c7..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_responses.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopCreatedCode is the HTTP code returned for type PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopCreated -const PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopCreatedCode int = 201 - -/*PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopCreated Object created - -swagger:response postDataWaveserverInterfacesRoutesIpV4StaticRouteDestinationNextHopCreated -*/ -type PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopCreated struct { -} - -// NewPostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopCreated creates PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopCreated with default headers values -func NewPostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopCreated() *PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopCreated { - - return &PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopCreated{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopBadRequestCode is the HTTP code returned for type PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopBadRequest -const PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopBadRequestCode int = 400 - -/*PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopBadRequest Internal error - -swagger:response postDataWaveserverInterfacesRoutesIpV4StaticRouteDestinationNextHopBadRequest -*/ -type PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopBadRequest struct { -} - -// NewPostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopBadRequest creates PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopBadRequest with default headers values -func NewPostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopBadRequest() *PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopBadRequest { - - return &PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopBadRequest{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopConflictCode is the HTTP code returned for type PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopConflict -const PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopConflictCode int = 409 - -/*PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopConflict Object already exists - -swagger:response postDataWaveserverInterfacesRoutesIpV4StaticRouteDestinationNextHopConflict -*/ -type PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopConflict struct { -} - -// NewPostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopConflict creates PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopConflict with default headers values -func NewPostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopConflict() *PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopConflict { - - return &PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopConflict{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_urlbuilder.go deleted file mode 100644 index 9194a0d873f4a58f169df7718c5ebe44f6f1ec54..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_urlbuilder.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopURL generates an URL for the post data waveserver interfaces routes IP v4 static route destination next hop operation -type PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopURL struct { - Destination string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopURL) WithBasePath(bp string) *PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/routes/ipv4-static-route={destination}/next-hop/" - - destination := o.Destination - if destination != "" { - _path = strings.Replace(_path, "{destination}", destination, -1) - } else { - return nil, errors.New("destination is required on PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopURL") - } - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_routes_ip_v4_static_route_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_routes_ip_v4_static_route_parameters.go deleted file mode 100644 index 8f46301d1658e8b7a8ba091a302db401b22de2c3..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_routes_ip_v4_static_route_parameters.go +++ /dev/null @@ -1,69 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// NewPostDataWaveserverInterfacesRoutesIPV4StaticRouteParams creates a new PostDataWaveserverInterfacesRoutesIPV4StaticRouteParams object -// no default values defined in spec. -func NewPostDataWaveserverInterfacesRoutesIPV4StaticRouteParams() PostDataWaveserverInterfacesRoutesIPV4StaticRouteParams { - - return PostDataWaveserverInterfacesRoutesIPV4StaticRouteParams{} -} - -// PostDataWaveserverInterfacesRoutesIPV4StaticRouteParams contains all the bound params for the post data waveserver interfaces routes IP v4 static route operation -// typically these are obtained from a http.Request -// -// swagger:parameters PostDataWaveserverInterfacesRoutesIPV4StaticRoute -type PostDataWaveserverInterfacesRoutesIPV4StaticRouteParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute to be added to list - In: body - */ - CienaWaveserverInterfacesWaveserverinterfacesRoutesIPV4StaticRouteBodyParam *models.CienaWaveserverInterfacesWaveserverinterfacesRoutesIPV4StaticRouteWrapper -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewPostDataWaveserverInterfacesRoutesIPV4StaticRouteParams() beforehand. -func (o *PostDataWaveserverInterfacesRoutesIPV4StaticRouteParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.CienaWaveserverInterfacesWaveserverinterfacesRoutesIPV4StaticRouteWrapper - if err := route.Consumer.Consume(r.Body, &body); err != nil { - res = append(res, errors.NewParseError("cienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4StaticRouteBodyParam", "body", "", err)) - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.CienaWaveserverInterfacesWaveserverinterfacesRoutesIPV4StaticRouteBodyParam = &body - } - } - } - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_routes_ip_v4_static_route_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_routes_ip_v4_static_route_responses.go deleted file mode 100644 index 83c081a7b6fc9c261819e506affdd2fb732cdf21..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_routes_ip_v4_static_route_responses.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// PostDataWaveserverInterfacesRoutesIPV4StaticRouteCreatedCode is the HTTP code returned for type PostDataWaveserverInterfacesRoutesIPV4StaticRouteCreated -const PostDataWaveserverInterfacesRoutesIPV4StaticRouteCreatedCode int = 201 - -/*PostDataWaveserverInterfacesRoutesIPV4StaticRouteCreated Object created - -swagger:response postDataWaveserverInterfacesRoutesIpV4StaticRouteCreated -*/ -type PostDataWaveserverInterfacesRoutesIPV4StaticRouteCreated struct { -} - -// NewPostDataWaveserverInterfacesRoutesIPV4StaticRouteCreated creates PostDataWaveserverInterfacesRoutesIPV4StaticRouteCreated with default headers values -func NewPostDataWaveserverInterfacesRoutesIPV4StaticRouteCreated() *PostDataWaveserverInterfacesRoutesIPV4StaticRouteCreated { - - return &PostDataWaveserverInterfacesRoutesIPV4StaticRouteCreated{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesRoutesIPV4StaticRouteCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// PostDataWaveserverInterfacesRoutesIPV4StaticRouteBadRequestCode is the HTTP code returned for type PostDataWaveserverInterfacesRoutesIPV4StaticRouteBadRequest -const PostDataWaveserverInterfacesRoutesIPV4StaticRouteBadRequestCode int = 400 - -/*PostDataWaveserverInterfacesRoutesIPV4StaticRouteBadRequest Internal error - -swagger:response postDataWaveserverInterfacesRoutesIpV4StaticRouteBadRequest -*/ -type PostDataWaveserverInterfacesRoutesIPV4StaticRouteBadRequest struct { -} - -// NewPostDataWaveserverInterfacesRoutesIPV4StaticRouteBadRequest creates PostDataWaveserverInterfacesRoutesIPV4StaticRouteBadRequest with default headers values -func NewPostDataWaveserverInterfacesRoutesIPV4StaticRouteBadRequest() *PostDataWaveserverInterfacesRoutesIPV4StaticRouteBadRequest { - - return &PostDataWaveserverInterfacesRoutesIPV4StaticRouteBadRequest{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesRoutesIPV4StaticRouteBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// PostDataWaveserverInterfacesRoutesIPV4StaticRouteConflictCode is the HTTP code returned for type PostDataWaveserverInterfacesRoutesIPV4StaticRouteConflict -const PostDataWaveserverInterfacesRoutesIPV4StaticRouteConflictCode int = 409 - -/*PostDataWaveserverInterfacesRoutesIPV4StaticRouteConflict Object already exists - -swagger:response postDataWaveserverInterfacesRoutesIpV4StaticRouteConflict -*/ -type PostDataWaveserverInterfacesRoutesIPV4StaticRouteConflict struct { -} - -// NewPostDataWaveserverInterfacesRoutesIPV4StaticRouteConflict creates PostDataWaveserverInterfacesRoutesIPV4StaticRouteConflict with default headers values -func NewPostDataWaveserverInterfacesRoutesIPV4StaticRouteConflict() *PostDataWaveserverInterfacesRoutesIPV4StaticRouteConflict { - - return &PostDataWaveserverInterfacesRoutesIPV4StaticRouteConflict{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesRoutesIPV4StaticRouteConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_routes_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_routes_parameters.go deleted file mode 100644 index 5009c779fd15cbcf56ddd3efd8788c50058169c8..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_routes_parameters.go +++ /dev/null @@ -1,69 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// NewPostDataWaveserverInterfacesRoutesParams creates a new PostDataWaveserverInterfacesRoutesParams object -// no default values defined in spec. -func NewPostDataWaveserverInterfacesRoutesParams() PostDataWaveserverInterfacesRoutesParams { - - return PostDataWaveserverInterfacesRoutesParams{} -} - -// PostDataWaveserverInterfacesRoutesParams contains all the bound params for the post data waveserver interfaces routes operation -// typically these are obtained from a http.Request -// -// swagger:parameters PostDataWaveserverInterfacesRoutes -type PostDataWaveserverInterfacesRoutesParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*ciena.waveserver.interfaces.waveserverinterfaces.Routes to be added to list - In: body - */ - CienaWaveserverInterfacesWaveserverinterfacesRoutesBodyParam *models.CienaWaveserverInterfacesWaveserverinterfacesRoutesWrapper -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewPostDataWaveserverInterfacesRoutesParams() beforehand. -func (o *PostDataWaveserverInterfacesRoutesParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.CienaWaveserverInterfacesWaveserverinterfacesRoutesWrapper - if err := route.Consumer.Consume(r.Body, &body); err != nil { - res = append(res, errors.NewParseError("cienaWaveserverInterfacesWaveserverinterfacesRoutesBodyParam", "body", "", err)) - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.CienaWaveserverInterfacesWaveserverinterfacesRoutesBodyParam = &body - } - } - } - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_routes_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_routes_responses.go deleted file mode 100644 index f19da9ededf48514a8febb7e2c9ba3b8bae8302e..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_routes_responses.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// PostDataWaveserverInterfacesRoutesCreatedCode is the HTTP code returned for type PostDataWaveserverInterfacesRoutesCreated -const PostDataWaveserverInterfacesRoutesCreatedCode int = 201 - -/*PostDataWaveserverInterfacesRoutesCreated Object created - -swagger:response postDataWaveserverInterfacesRoutesCreated -*/ -type PostDataWaveserverInterfacesRoutesCreated struct { -} - -// NewPostDataWaveserverInterfacesRoutesCreated creates PostDataWaveserverInterfacesRoutesCreated with default headers values -func NewPostDataWaveserverInterfacesRoutesCreated() *PostDataWaveserverInterfacesRoutesCreated { - - return &PostDataWaveserverInterfacesRoutesCreated{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesRoutesCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// PostDataWaveserverInterfacesRoutesBadRequestCode is the HTTP code returned for type PostDataWaveserverInterfacesRoutesBadRequest -const PostDataWaveserverInterfacesRoutesBadRequestCode int = 400 - -/*PostDataWaveserverInterfacesRoutesBadRequest Internal error - -swagger:response postDataWaveserverInterfacesRoutesBadRequest -*/ -type PostDataWaveserverInterfacesRoutesBadRequest struct { -} - -// NewPostDataWaveserverInterfacesRoutesBadRequest creates PostDataWaveserverInterfacesRoutesBadRequest with default headers values -func NewPostDataWaveserverInterfacesRoutesBadRequest() *PostDataWaveserverInterfacesRoutesBadRequest { - - return &PostDataWaveserverInterfacesRoutesBadRequest{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesRoutesBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} - -// PostDataWaveserverInterfacesRoutesConflictCode is the HTTP code returned for type PostDataWaveserverInterfacesRoutesConflict -const PostDataWaveserverInterfacesRoutesConflictCode int = 409 - -/*PostDataWaveserverInterfacesRoutesConflict Object already exists - -swagger:response postDataWaveserverInterfacesRoutesConflict -*/ -type PostDataWaveserverInterfacesRoutesConflict struct { -} - -// NewPostDataWaveserverInterfacesRoutesConflict creates PostDataWaveserverInterfacesRoutesConflict with default headers values -func NewPostDataWaveserverInterfacesRoutesConflict() *PostDataWaveserverInterfacesRoutesConflict { - - return &PostDataWaveserverInterfacesRoutesConflict{} -} - -// WriteResponse to the client -func (o *PostDataWaveserverInterfacesRoutesConflict) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(409) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_routes_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_routes_urlbuilder.go deleted file mode 100644 index 5dc985130f5c2dbe54469661eea25b25d7ec901f..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_routes_urlbuilder.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" -) - -// PostDataWaveserverInterfacesRoutesURL generates an URL for the post data waveserver interfaces routes operation -type PostDataWaveserverInterfacesRoutesURL struct { - _basePath string -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PostDataWaveserverInterfacesRoutesURL) WithBasePath(bp string) *PostDataWaveserverInterfacesRoutesURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PostDataWaveserverInterfacesRoutesURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *PostDataWaveserverInterfacesRoutesURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/routes/" - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *PostDataWaveserverInterfacesRoutesURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *PostDataWaveserverInterfacesRoutesURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *PostDataWaveserverInterfacesRoutesURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on PostDataWaveserverInterfacesRoutesURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on PostDataWaveserverInterfacesRoutesURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *PostDataWaveserverInterfacesRoutesURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_urlbuilder.go deleted file mode 100644 index 18a50ba019a85e66940e186cc246685972ef3db8..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/post_data_waveserver_interfaces_urlbuilder.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" -) - -// PostDataWaveserverInterfacesURL generates an URL for the post data waveserver interfaces operation -type PostDataWaveserverInterfacesURL struct { - _basePath string -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PostDataWaveserverInterfacesURL) WithBasePath(bp string) *PostDataWaveserverInterfacesURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PostDataWaveserverInterfacesURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *PostDataWaveserverInterfacesURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/" - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *PostDataWaveserverInterfacesURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *PostDataWaveserverInterfacesURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *PostDataWaveserverInterfacesURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on PostDataWaveserverInterfacesURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on PostDataWaveserverInterfacesURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *PostDataWaveserverInterfacesURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces.go deleted file mode 100644 index 1f56973be28c087863d9cc09406d24368ad6f476..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces.go +++ /dev/null @@ -1,61 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// PutDataWaveserverInterfacesHandlerFunc turns a function with the right signature into a put data waveserver interfaces handler -type PutDataWaveserverInterfacesHandlerFunc func(PutDataWaveserverInterfacesParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn PutDataWaveserverInterfacesHandlerFunc) Handle(params PutDataWaveserverInterfacesParams) middleware.Responder { - return fn(params) -} - -// PutDataWaveserverInterfacesHandler interface for that can handle valid put data waveserver interfaces params -type PutDataWaveserverInterfacesHandler interface { - Handle(PutDataWaveserverInterfacesParams) middleware.Responder -} - -// NewPutDataWaveserverInterfaces creates a new http.Handler for the put data waveserver interfaces operation -func NewPutDataWaveserverInterfaces(ctx *middleware.Context, handler PutDataWaveserverInterfacesHandler) *PutDataWaveserverInterfaces { - return &PutDataWaveserverInterfaces{Context: ctx, Handler: handler} -} - -/*PutDataWaveserverInterfaces swagger:route PUT /data/waveserver-interfaces/ ciena-waveserver-interfaces putDataWaveserverInterfaces - -creates or updates ciena.waveserver.interfaces.WaveserverInterfaces - -Top level container for configuration and operational data for physical - and logical network interfaces. - -*/ -type PutDataWaveserverInterfaces struct { - Context *middleware.Context - Handler PutDataWaveserverInterfacesHandler -} - -func (o *PutDataWaveserverInterfaces) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewPutDataWaveserverInterfacesParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index.go deleted file mode 100644 index 69802fbc3d2f3975f7693f0b30d39b0e4ade162e..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// PutDataWaveserverInterfacesLogicalInterfaceIndexHandlerFunc turns a function with the right signature into a put data waveserver interfaces logical interface index handler -type PutDataWaveserverInterfacesLogicalInterfaceIndexHandlerFunc func(PutDataWaveserverInterfacesLogicalInterfaceIndexParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn PutDataWaveserverInterfacesLogicalInterfaceIndexHandlerFunc) Handle(params PutDataWaveserverInterfacesLogicalInterfaceIndexParams) middleware.Responder { - return fn(params) -} - -// PutDataWaveserverInterfacesLogicalInterfaceIndexHandler interface for that can handle valid put data waveserver interfaces logical interface index params -type PutDataWaveserverInterfacesLogicalInterfaceIndexHandler interface { - Handle(PutDataWaveserverInterfacesLogicalInterfaceIndexParams) middleware.Responder -} - -// NewPutDataWaveserverInterfacesLogicalInterfaceIndex creates a new http.Handler for the put data waveserver interfaces logical interface index operation -func NewPutDataWaveserverInterfacesLogicalInterfaceIndex(ctx *middleware.Context, handler PutDataWaveserverInterfacesLogicalInterfaceIndexHandler) *PutDataWaveserverInterfacesLogicalInterfaceIndex { - return &PutDataWaveserverInterfacesLogicalInterfaceIndex{Context: ctx, Handler: handler} -} - -/*PutDataWaveserverInterfacesLogicalInterfaceIndex swagger:route PUT /data/waveserver-interfaces/logical-interface={index}/ ciena-waveserver-interfaces putDataWaveserverInterfacesLogicalInterfaceIndex - -creates or updates ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface - -List of logical IP management interfaces (e.g. 'local'). - -*/ -type PutDataWaveserverInterfacesLogicalInterfaceIndex struct { - Context *middleware.Context - Handler PutDataWaveserverInterfacesLogicalInterfaceIndexHandler -} - -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndex) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewPutDataWaveserverInterfacesLogicalInterfaceIndexParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_id.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_id.go deleted file mode 100644 index b98bd64fabf8e49c2c3e2d05c28806f4c798853f..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_id.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// PutDataWaveserverInterfacesLogicalInterfaceIndexIDHandlerFunc turns a function with the right signature into a put data waveserver interfaces logical interface index ID handler -type PutDataWaveserverInterfacesLogicalInterfaceIndexIDHandlerFunc func(PutDataWaveserverInterfacesLogicalInterfaceIndexIDParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn PutDataWaveserverInterfacesLogicalInterfaceIndexIDHandlerFunc) Handle(params PutDataWaveserverInterfacesLogicalInterfaceIndexIDParams) middleware.Responder { - return fn(params) -} - -// PutDataWaveserverInterfacesLogicalInterfaceIndexIDHandler interface for that can handle valid put data waveserver interfaces logical interface index ID params -type PutDataWaveserverInterfacesLogicalInterfaceIndexIDHandler interface { - Handle(PutDataWaveserverInterfacesLogicalInterfaceIndexIDParams) middleware.Responder -} - -// NewPutDataWaveserverInterfacesLogicalInterfaceIndexID creates a new http.Handler for the put data waveserver interfaces logical interface index ID operation -func NewPutDataWaveserverInterfacesLogicalInterfaceIndexID(ctx *middleware.Context, handler PutDataWaveserverInterfacesLogicalInterfaceIndexIDHandler) *PutDataWaveserverInterfacesLogicalInterfaceIndexID { - return &PutDataWaveserverInterfacesLogicalInterfaceIndexID{Context: ctx, Handler: handler} -} - -/*PutDataWaveserverInterfacesLogicalInterfaceIndexID swagger:route PUT /data/waveserver-interfaces/logical-interface={index}/id/ ciena-waveserver-interfaces putDataWaveserverInterfacesLogicalInterfaceIndexId - -creates or updates ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id - -Identification information of this logical management interface. - -*/ -type PutDataWaveserverInterfacesLogicalInterfaceIndexID struct { - Context *middleware.Context - Handler PutDataWaveserverInterfacesLogicalInterfaceIndexIDHandler -} - -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexID) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewPutDataWaveserverInterfacesLogicalInterfaceIndexIDParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_id_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_id_parameters.go deleted file mode 100644 index e12216c1014eda78d249d15adcc2b9f3e306592d..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_id_parameters.go +++ /dev/null @@ -1,100 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// NewPutDataWaveserverInterfacesLogicalInterfaceIndexIDParams creates a new PutDataWaveserverInterfacesLogicalInterfaceIndexIDParams object -// no default values defined in spec. -func NewPutDataWaveserverInterfacesLogicalInterfaceIndexIDParams() PutDataWaveserverInterfacesLogicalInterfaceIndexIDParams { - - return PutDataWaveserverInterfacesLogicalInterfaceIndexIDParams{} -} - -// PutDataWaveserverInterfacesLogicalInterfaceIndexIDParams contains all the bound params for the put data waveserver interfaces logical interface index ID operation -// typically these are obtained from a http.Request -// -// swagger:parameters PutDataWaveserverInterfacesLogicalInterfaceIndexID -type PutDataWaveserverInterfacesLogicalInterfaceIndexIDParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id to be added or updated - In: body - */ - CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceIDBodyParam *models.CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceIDWrapper - /*Id of logical-interface - Required: true - In: path - */ - Index int64 -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewPutDataWaveserverInterfacesLogicalInterfaceIndexIDParams() beforehand. -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexIDParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceIDWrapper - if err := route.Consumer.Consume(r.Body, &body); err != nil { - res = append(res, errors.NewParseError("cienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceIdBodyParam", "body", "", err)) - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceIDBodyParam = &body - } - } - } - rIndex, rhkIndex, _ := route.Params.GetOK("index") - if err := o.bindIndex(rIndex, rhkIndex, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindIndex binds and validates parameter Index from path. -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexIDParams) bindIndex(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - value, err := swag.ConvertInt64(raw) - if err != nil { - return errors.InvalidType("index", "path", "int64", raw) - } - o.Index = value - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_id_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_id_responses.go deleted file mode 100644 index 0c969c52ed2ecd64f54863db3070cc2dd92442b9..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_id_responses.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// PutDataWaveserverInterfacesLogicalInterfaceIndexIDCreatedCode is the HTTP code returned for type PutDataWaveserverInterfacesLogicalInterfaceIndexIDCreated -const PutDataWaveserverInterfacesLogicalInterfaceIndexIDCreatedCode int = 201 - -/*PutDataWaveserverInterfacesLogicalInterfaceIndexIDCreated Object created - -swagger:response putDataWaveserverInterfacesLogicalInterfaceIndexIdCreated -*/ -type PutDataWaveserverInterfacesLogicalInterfaceIndexIDCreated struct { -} - -// NewPutDataWaveserverInterfacesLogicalInterfaceIndexIDCreated creates PutDataWaveserverInterfacesLogicalInterfaceIndexIDCreated with default headers values -func NewPutDataWaveserverInterfacesLogicalInterfaceIndexIDCreated() *PutDataWaveserverInterfacesLogicalInterfaceIndexIDCreated { - - return &PutDataWaveserverInterfacesLogicalInterfaceIndexIDCreated{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexIDCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// PutDataWaveserverInterfacesLogicalInterfaceIndexIDNoContentCode is the HTTP code returned for type PutDataWaveserverInterfacesLogicalInterfaceIndexIDNoContent -const PutDataWaveserverInterfacesLogicalInterfaceIndexIDNoContentCode int = 204 - -/*PutDataWaveserverInterfacesLogicalInterfaceIndexIDNoContent Object modified - -swagger:response putDataWaveserverInterfacesLogicalInterfaceIndexIdNoContent -*/ -type PutDataWaveserverInterfacesLogicalInterfaceIndexIDNoContent struct { -} - -// NewPutDataWaveserverInterfacesLogicalInterfaceIndexIDNoContent creates PutDataWaveserverInterfacesLogicalInterfaceIndexIDNoContent with default headers values -func NewPutDataWaveserverInterfacesLogicalInterfaceIndexIDNoContent() *PutDataWaveserverInterfacesLogicalInterfaceIndexIDNoContent { - - return &PutDataWaveserverInterfacesLogicalInterfaceIndexIDNoContent{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexIDNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// PutDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequestCode is the HTTP code returned for type PutDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequest -const PutDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequestCode int = 400 - -/*PutDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequest Internal error - -swagger:response putDataWaveserverInterfacesLogicalInterfaceIndexIdBadRequest -*/ -type PutDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequest struct { -} - -// NewPutDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequest creates PutDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequest with default headers values -func NewPutDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequest() *PutDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequest { - - return &PutDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequest{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexIDBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_id_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_id_urlbuilder.go deleted file mode 100644 index 4dbb6b0ecd188404318d325559741181ca1a6ea3..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_id_urlbuilder.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" - - "github.com/go-openapi/swag" -) - -// PutDataWaveserverInterfacesLogicalInterfaceIndexIDURL generates an URL for the put data waveserver interfaces logical interface index ID operation -type PutDataWaveserverInterfacesLogicalInterfaceIndexIDURL struct { - Index int64 - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexIDURL) WithBasePath(bp string) *PutDataWaveserverInterfacesLogicalInterfaceIndexIDURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexIDURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexIDURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/logical-interface={index}/id/" - - index := swag.FormatInt64(o.Index) - if index != "" { - _path = strings.Replace(_path, "{index}", index, -1) - } else { - return nil, errors.New("index is required on PutDataWaveserverInterfacesLogicalInterfaceIndexIDURL") - } - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexIDURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexIDURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexIDURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on PutDataWaveserverInterfacesLogicalInterfaceIndexIDURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on PutDataWaveserverInterfacesLogicalInterfaceIndexIDURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexIDURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_parameters.go deleted file mode 100644 index 384ec95e3d4f69b8db6c681dd535ca56640c1bba..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_parameters.go +++ /dev/null @@ -1,100 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// NewPutDataWaveserverInterfacesLogicalInterfaceIndexParams creates a new PutDataWaveserverInterfacesLogicalInterfaceIndexParams object -// no default values defined in spec. -func NewPutDataWaveserverInterfacesLogicalInterfaceIndexParams() PutDataWaveserverInterfacesLogicalInterfaceIndexParams { - - return PutDataWaveserverInterfacesLogicalInterfaceIndexParams{} -} - -// PutDataWaveserverInterfacesLogicalInterfaceIndexParams contains all the bound params for the put data waveserver interfaces logical interface index operation -// typically these are obtained from a http.Request -// -// swagger:parameters PutDataWaveserverInterfacesLogicalInterfaceIndex -type PutDataWaveserverInterfacesLogicalInterfaceIndexParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface to be added or updated - In: body - */ - CienaWaveserverInterfacesWaveserverinterfacesLogicalInterfaceBodyParam *models.CienaWaveserverInterfacesWaveserverinterfacesLogicalInterfaceWrapper - /*Id of logical-interface - Required: true - In: path - */ - Index int64 -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewPutDataWaveserverInterfacesLogicalInterfaceIndexParams() beforehand. -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.CienaWaveserverInterfacesWaveserverinterfacesLogicalInterfaceWrapper - if err := route.Consumer.Consume(r.Body, &body); err != nil { - res = append(res, errors.NewParseError("cienaWaveserverInterfacesWaveserverinterfacesLogicalInterfaceBodyParam", "body", "", err)) - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.CienaWaveserverInterfacesWaveserverinterfacesLogicalInterfaceBodyParam = &body - } - } - } - rIndex, rhkIndex, _ := route.Params.GetOK("index") - if err := o.bindIndex(rIndex, rhkIndex, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindIndex binds and validates parameter Index from path. -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexParams) bindIndex(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - value, err := swag.ConvertInt64(raw) - if err != nil { - return errors.InvalidType("index", "path", "int64", raw) - } - o.Index = value - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_properties.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_properties.go deleted file mode 100644 index 9255b80f22d2dc7d721d2c11bcd648506920c5d2..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_properties.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandlerFunc turns a function with the right signature into a put data waveserver interfaces logical interface index properties handler -type PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandlerFunc func(PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandlerFunc) Handle(params PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams) middleware.Responder { - return fn(params) -} - -// PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler interface for that can handle valid put data waveserver interfaces logical interface index properties params -type PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler interface { - Handle(PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams) middleware.Responder -} - -// NewPutDataWaveserverInterfacesLogicalInterfaceIndexProperties creates a new http.Handler for the put data waveserver interfaces logical interface index properties operation -func NewPutDataWaveserverInterfacesLogicalInterfaceIndexProperties(ctx *middleware.Context, handler PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler) *PutDataWaveserverInterfacesLogicalInterfaceIndexProperties { - return &PutDataWaveserverInterfacesLogicalInterfaceIndexProperties{Context: ctx, Handler: handler} -} - -/*PutDataWaveserverInterfacesLogicalInterfaceIndexProperties swagger:route PUT /data/waveserver-interfaces/logical-interface={index}/properties/ ciena-waveserver-interfaces putDataWaveserverInterfacesLogicalInterfaceIndexProperties - -creates or updates ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties - -All the configuration data of the logical management interface. - -*/ -type PutDataWaveserverInterfacesLogicalInterfaceIndexProperties struct { - Context *middleware.Context - Handler PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler -} - -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexProperties) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_properties_ip_v4.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_properties_ip_v4.go deleted file mode 100644 index 90ccab244ddbfb4835f2d448a18466d5ddc053a1..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_properties_ip_v4.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4HandlerFunc turns a function with the right signature into a put data waveserver interfaces logical interface index properties IP v4 handler -type PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4HandlerFunc func(PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params) middleware.Responder - -// Handle executing the request and returning a response -func (fn PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4HandlerFunc) Handle(params PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params) middleware.Responder { - return fn(params) -} - -// PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler interface for that can handle valid put data waveserver interfaces logical interface index properties IP v4 params -type PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler interface { - Handle(PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params) middleware.Responder -} - -// NewPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4 creates a new http.Handler for the put data waveserver interfaces logical interface index properties IP v4 operation -func NewPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4(ctx *middleware.Context, handler PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler) *PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4 { - return &PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4{Context: ctx, Handler: handler} -} - -/*PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4 swagger:route PUT /data/waveserver-interfaces/logical-interface={index}/properties/ipv4/ ciena-waveserver-interfaces putDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIpV4 - -creates or updates ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4 - -IPv4 configuration and operational data. - -*/ -type PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4 struct { - Context *middleware.Context - Handler PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler -} - -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_properties_ip_v4_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_properties_ip_v4_parameters.go deleted file mode 100644 index 0d8894e8583105a787eaf4f264cd367c76b68dd3..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_properties_ip_v4_parameters.go +++ /dev/null @@ -1,100 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// NewPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params creates a new PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params object -// no default values defined in spec. -func NewPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params() PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params { - - return PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params{} -} - -// PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params contains all the bound params for the put data waveserver interfaces logical interface index properties IP v4 operation -// typically these are obtained from a http.Request -// -// swagger:parameters PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4 -type PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4 to be added or updated - In: body - */ - CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesIPV4BodyParam *models.CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesIPV4Wrapper - /*Id of logical-interface - Required: true - In: path - */ - Index int64 -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params() beforehand. -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesIPV4Wrapper - if err := route.Consumer.Consume(r.Body, &body); err != nil { - res = append(res, errors.NewParseError("cienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesIpv4BodyParam", "body", "", err)) - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesIPV4BodyParam = &body - } - } - } - rIndex, rhkIndex, _ := route.Params.GetOK("index") - if err := o.bindIndex(rIndex, rhkIndex, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindIndex binds and validates parameter Index from path. -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params) bindIndex(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - value, err := swag.ConvertInt64(raw) - if err != nil { - return errors.InvalidType("index", "path", "int64", raw) - } - o.Index = value - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_properties_ip_v4_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_properties_ip_v4_responses.go deleted file mode 100644 index 110248d29c44b7db106e0d0c1ef723e6f394aa22..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_properties_ip_v4_responses.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4CreatedCode is the HTTP code returned for type PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Created -const PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4CreatedCode int = 201 - -/*PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Created Object created - -swagger:response putDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIpV4Created -*/ -type PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Created struct { -} - -// NewPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Created creates PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Created with default headers values -func NewPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Created() *PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Created { - - return &PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Created{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Created) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4NoContentCode is the HTTP code returned for type PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4NoContent -const PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4NoContentCode int = 204 - -/*PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4NoContent Object modified - -swagger:response putDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIpV4NoContent -*/ -type PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4NoContent struct { -} - -// NewPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4NoContent creates PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4NoContent with default headers values -func NewPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4NoContent() *PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4NoContent { - - return &PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4NoContent{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4NoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequestCode is the HTTP code returned for type PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequest -const PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequestCode int = 400 - -/*PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequest Internal error - -swagger:response putDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIpV4BadRequest -*/ -type PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequest struct { -} - -// NewPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequest creates PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequest with default headers values -func NewPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequest() *PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequest { - - return &PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequest{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4BadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_properties_ip_v4_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_properties_ip_v4_urlbuilder.go deleted file mode 100644 index 6fc9a5c900fb0bd52a0154150cdb75614d45bc24..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_properties_ip_v4_urlbuilder.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" - - "github.com/go-openapi/swag" -) - -// PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL generates an URL for the put data waveserver interfaces logical interface index properties IP v4 operation -type PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL struct { - Index int64 - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL) WithBasePath(bp string) *PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/logical-interface={index}/properties/ipv4/" - - index := swag.FormatInt64(o.Index) - if index != "" { - _path = strings.Replace(_path, "{index}", index, -1) - } else { - return nil, errors.New("index is required on PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL") - } - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL") - } - if host == "" { - return nil, errors.New("host is required for a full url on PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4URL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_properties_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_properties_parameters.go deleted file mode 100644 index 85a0eed4fda0f8fdaea6285ca54dfe1432db0ad7..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_properties_parameters.go +++ /dev/null @@ -1,100 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// NewPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams creates a new PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams object -// no default values defined in spec. -func NewPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams() PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams { - - return PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams{} -} - -// PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams contains all the bound params for the put data waveserver interfaces logical interface index properties operation -// typically these are obtained from a http.Request -// -// swagger:parameters PutDataWaveserverInterfacesLogicalInterfaceIndexProperties -type PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties to be added or updated - In: body - */ - CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesBodyParam *models.CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesWrapper - /*Id of logical-interface - Required: true - In: path - */ - Index int64 -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams() beforehand. -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesWrapper - if err := route.Consumer.Consume(r.Body, &body); err != nil { - res = append(res, errors.NewParseError("cienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesBodyParam", "body", "", err)) - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfacePropertiesBodyParam = &body - } - } - } - rIndex, rhkIndex, _ := route.Params.GetOK("index") - if err := o.bindIndex(rIndex, rhkIndex, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindIndex binds and validates parameter Index from path. -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams) bindIndex(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - value, err := swag.ConvertInt64(raw) - if err != nil { - return errors.InvalidType("index", "path", "int64", raw) - } - o.Index = value - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_properties_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_properties_responses.go deleted file mode 100644 index d95953554900c8f13410b118063e1ed68280fcd8..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_properties_responses.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesCreatedCode is the HTTP code returned for type PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesCreated -const PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesCreatedCode int = 201 - -/*PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesCreated Object created - -swagger:response putDataWaveserverInterfacesLogicalInterfaceIndexPropertiesCreated -*/ -type PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesCreated struct { -} - -// NewPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesCreated creates PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesCreated with default headers values -func NewPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesCreated() *PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesCreated { - - return &PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesCreated{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesNoContentCode is the HTTP code returned for type PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesNoContent -const PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesNoContentCode int = 204 - -/*PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesNoContent Object modified - -swagger:response putDataWaveserverInterfacesLogicalInterfaceIndexPropertiesNoContent -*/ -type PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesNoContent struct { -} - -// NewPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesNoContent creates PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesNoContent with default headers values -func NewPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesNoContent() *PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesNoContent { - - return &PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesNoContent{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequestCode is the HTTP code returned for type PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest -const PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequestCode int = 400 - -/*PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest Internal error - -swagger:response putDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest -*/ -type PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest struct { -} - -// NewPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest creates PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest with default headers values -func NewPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest() *PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest { - - return &PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_properties_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_properties_urlbuilder.go deleted file mode 100644 index 7297b5e89faec0429124ff49744ff40bd5184b97..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_properties_urlbuilder.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" - - "github.com/go-openapi/swag" -) - -// PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL generates an URL for the put data waveserver interfaces logical interface index properties operation -type PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL struct { - Index int64 - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL) WithBasePath(bp string) *PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/logical-interface={index}/properties/" - - index := swag.FormatInt64(o.Index) - if index != "" { - _path = strings.Replace(_path, "{index}", index, -1) - } else { - return nil, errors.New("index is required on PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL") - } - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_responses.go deleted file mode 100644 index e1292fca1f3be5c4cc4675a719e43fe6eb291fb0..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_responses.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// PutDataWaveserverInterfacesLogicalInterfaceIndexCreatedCode is the HTTP code returned for type PutDataWaveserverInterfacesLogicalInterfaceIndexCreated -const PutDataWaveserverInterfacesLogicalInterfaceIndexCreatedCode int = 201 - -/*PutDataWaveserverInterfacesLogicalInterfaceIndexCreated Object created - -swagger:response putDataWaveserverInterfacesLogicalInterfaceIndexCreated -*/ -type PutDataWaveserverInterfacesLogicalInterfaceIndexCreated struct { -} - -// NewPutDataWaveserverInterfacesLogicalInterfaceIndexCreated creates PutDataWaveserverInterfacesLogicalInterfaceIndexCreated with default headers values -func NewPutDataWaveserverInterfacesLogicalInterfaceIndexCreated() *PutDataWaveserverInterfacesLogicalInterfaceIndexCreated { - - return &PutDataWaveserverInterfacesLogicalInterfaceIndexCreated{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// PutDataWaveserverInterfacesLogicalInterfaceIndexNoContentCode is the HTTP code returned for type PutDataWaveserverInterfacesLogicalInterfaceIndexNoContent -const PutDataWaveserverInterfacesLogicalInterfaceIndexNoContentCode int = 204 - -/*PutDataWaveserverInterfacesLogicalInterfaceIndexNoContent Object modified - -swagger:response putDataWaveserverInterfacesLogicalInterfaceIndexNoContent -*/ -type PutDataWaveserverInterfacesLogicalInterfaceIndexNoContent struct { -} - -// NewPutDataWaveserverInterfacesLogicalInterfaceIndexNoContent creates PutDataWaveserverInterfacesLogicalInterfaceIndexNoContent with default headers values -func NewPutDataWaveserverInterfacesLogicalInterfaceIndexNoContent() *PutDataWaveserverInterfacesLogicalInterfaceIndexNoContent { - - return &PutDataWaveserverInterfacesLogicalInterfaceIndexNoContent{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// PutDataWaveserverInterfacesLogicalInterfaceIndexBadRequestCode is the HTTP code returned for type PutDataWaveserverInterfacesLogicalInterfaceIndexBadRequest -const PutDataWaveserverInterfacesLogicalInterfaceIndexBadRequestCode int = 400 - -/*PutDataWaveserverInterfacesLogicalInterfaceIndexBadRequest Internal error - -swagger:response putDataWaveserverInterfacesLogicalInterfaceIndexBadRequest -*/ -type PutDataWaveserverInterfacesLogicalInterfaceIndexBadRequest struct { -} - -// NewPutDataWaveserverInterfacesLogicalInterfaceIndexBadRequest creates PutDataWaveserverInterfacesLogicalInterfaceIndexBadRequest with default headers values -func NewPutDataWaveserverInterfacesLogicalInterfaceIndexBadRequest() *PutDataWaveserverInterfacesLogicalInterfaceIndexBadRequest { - - return &PutDataWaveserverInterfacesLogicalInterfaceIndexBadRequest{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_state.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_state.go deleted file mode 100644 index a93c43457fe628ebc387bbc511ad1c5c97cea260..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_state.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// PutDataWaveserverInterfacesLogicalInterfaceIndexStateHandlerFunc turns a function with the right signature into a put data waveserver interfaces logical interface index state handler -type PutDataWaveserverInterfacesLogicalInterfaceIndexStateHandlerFunc func(PutDataWaveserverInterfacesLogicalInterfaceIndexStateParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn PutDataWaveserverInterfacesLogicalInterfaceIndexStateHandlerFunc) Handle(params PutDataWaveserverInterfacesLogicalInterfaceIndexStateParams) middleware.Responder { - return fn(params) -} - -// PutDataWaveserverInterfacesLogicalInterfaceIndexStateHandler interface for that can handle valid put data waveserver interfaces logical interface index state params -type PutDataWaveserverInterfacesLogicalInterfaceIndexStateHandler interface { - Handle(PutDataWaveserverInterfacesLogicalInterfaceIndexStateParams) middleware.Responder -} - -// NewPutDataWaveserverInterfacesLogicalInterfaceIndexState creates a new http.Handler for the put data waveserver interfaces logical interface index state operation -func NewPutDataWaveserverInterfacesLogicalInterfaceIndexState(ctx *middleware.Context, handler PutDataWaveserverInterfacesLogicalInterfaceIndexStateHandler) *PutDataWaveserverInterfacesLogicalInterfaceIndexState { - return &PutDataWaveserverInterfacesLogicalInterfaceIndexState{Context: ctx, Handler: handler} -} - -/*PutDataWaveserverInterfacesLogicalInterfaceIndexState swagger:route PUT /data/waveserver-interfaces/logical-interface={index}/state/ ciena-waveserver-interfaces putDataWaveserverInterfacesLogicalInterfaceIndexState - -creates or updates ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State - -Logical interface state information. - -*/ -type PutDataWaveserverInterfacesLogicalInterfaceIndexState struct { - Context *middleware.Context - Handler PutDataWaveserverInterfacesLogicalInterfaceIndexStateHandler -} - -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexState) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewPutDataWaveserverInterfacesLogicalInterfaceIndexStateParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_state_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_state_parameters.go deleted file mode 100644 index cb65d5af6dc9a7ab77003cc59465a9bbcaf974c3..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_state_parameters.go +++ /dev/null @@ -1,100 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// NewPutDataWaveserverInterfacesLogicalInterfaceIndexStateParams creates a new PutDataWaveserverInterfacesLogicalInterfaceIndexStateParams object -// no default values defined in spec. -func NewPutDataWaveserverInterfacesLogicalInterfaceIndexStateParams() PutDataWaveserverInterfacesLogicalInterfaceIndexStateParams { - - return PutDataWaveserverInterfacesLogicalInterfaceIndexStateParams{} -} - -// PutDataWaveserverInterfacesLogicalInterfaceIndexStateParams contains all the bound params for the put data waveserver interfaces logical interface index state operation -// typically these are obtained from a http.Request -// -// swagger:parameters PutDataWaveserverInterfacesLogicalInterfaceIndexState -type PutDataWaveserverInterfacesLogicalInterfaceIndexStateParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State to be added or updated - In: body - */ - CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceStateBodyParam *models.CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceStateWrapper - /*Id of logical-interface - Required: true - In: path - */ - Index int64 -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewPutDataWaveserverInterfacesLogicalInterfaceIndexStateParams() beforehand. -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexStateParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceStateWrapper - if err := route.Consumer.Consume(r.Body, &body); err != nil { - res = append(res, errors.NewParseError("cienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceStateBodyParam", "body", "", err)) - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.CienaWaveserverInterfacesWaveserverinterfacesLogicalinterfaceStateBodyParam = &body - } - } - } - rIndex, rhkIndex, _ := route.Params.GetOK("index") - if err := o.bindIndex(rIndex, rhkIndex, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindIndex binds and validates parameter Index from path. -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexStateParams) bindIndex(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - value, err := swag.ConvertInt64(raw) - if err != nil { - return errors.InvalidType("index", "path", "int64", raw) - } - o.Index = value - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_state_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_state_responses.go deleted file mode 100644 index b6afaa3b5720662c5e26b341b5a6aed12d02769a..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_state_responses.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// PutDataWaveserverInterfacesLogicalInterfaceIndexStateCreatedCode is the HTTP code returned for type PutDataWaveserverInterfacesLogicalInterfaceIndexStateCreated -const PutDataWaveserverInterfacesLogicalInterfaceIndexStateCreatedCode int = 201 - -/*PutDataWaveserverInterfacesLogicalInterfaceIndexStateCreated Object created - -swagger:response putDataWaveserverInterfacesLogicalInterfaceIndexStateCreated -*/ -type PutDataWaveserverInterfacesLogicalInterfaceIndexStateCreated struct { -} - -// NewPutDataWaveserverInterfacesLogicalInterfaceIndexStateCreated creates PutDataWaveserverInterfacesLogicalInterfaceIndexStateCreated with default headers values -func NewPutDataWaveserverInterfacesLogicalInterfaceIndexStateCreated() *PutDataWaveserverInterfacesLogicalInterfaceIndexStateCreated { - - return &PutDataWaveserverInterfacesLogicalInterfaceIndexStateCreated{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexStateCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// PutDataWaveserverInterfacesLogicalInterfaceIndexStateNoContentCode is the HTTP code returned for type PutDataWaveserverInterfacesLogicalInterfaceIndexStateNoContent -const PutDataWaveserverInterfacesLogicalInterfaceIndexStateNoContentCode int = 204 - -/*PutDataWaveserverInterfacesLogicalInterfaceIndexStateNoContent Object modified - -swagger:response putDataWaveserverInterfacesLogicalInterfaceIndexStateNoContent -*/ -type PutDataWaveserverInterfacesLogicalInterfaceIndexStateNoContent struct { -} - -// NewPutDataWaveserverInterfacesLogicalInterfaceIndexStateNoContent creates PutDataWaveserverInterfacesLogicalInterfaceIndexStateNoContent with default headers values -func NewPutDataWaveserverInterfacesLogicalInterfaceIndexStateNoContent() *PutDataWaveserverInterfacesLogicalInterfaceIndexStateNoContent { - - return &PutDataWaveserverInterfacesLogicalInterfaceIndexStateNoContent{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexStateNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// PutDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequestCode is the HTTP code returned for type PutDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest -const PutDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequestCode int = 400 - -/*PutDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest Internal error - -swagger:response putDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest -*/ -type PutDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest struct { -} - -// NewPutDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest creates PutDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest with default headers values -func NewPutDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest() *PutDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest { - - return &PutDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexStateBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_state_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_state_urlbuilder.go deleted file mode 100644 index deccad35eda99273f21d40adb1b2f91b08f5f072..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_logical_interface_index_state_urlbuilder.go +++ /dev/null @@ -1,98 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" - - "github.com/go-openapi/swag" -) - -// PutDataWaveserverInterfacesLogicalInterfaceIndexStateURL generates an URL for the put data waveserver interfaces logical interface index state operation -type PutDataWaveserverInterfacesLogicalInterfaceIndexStateURL struct { - Index int64 - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexStateURL) WithBasePath(bp string) *PutDataWaveserverInterfacesLogicalInterfaceIndexStateURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexStateURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexStateURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/logical-interface={index}/state/" - - index := swag.FormatInt64(o.Index) - if index != "" { - _path = strings.Replace(_path, "{index}", index, -1) - } else { - return nil, errors.New("index is required on PutDataWaveserverInterfacesLogicalInterfaceIndexStateURL") - } - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexStateURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexStateURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexStateURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on PutDataWaveserverInterfacesLogicalInterfaceIndexStateURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on PutDataWaveserverInterfacesLogicalInterfaceIndexStateURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *PutDataWaveserverInterfacesLogicalInterfaceIndexStateURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_parameters.go deleted file mode 100644 index 15d2a8fe668989ac476d74a2825d7de0c4a31710..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_parameters.go +++ /dev/null @@ -1,69 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// NewPutDataWaveserverInterfacesParams creates a new PutDataWaveserverInterfacesParams object -// no default values defined in spec. -func NewPutDataWaveserverInterfacesParams() PutDataWaveserverInterfacesParams { - - return PutDataWaveserverInterfacesParams{} -} - -// PutDataWaveserverInterfacesParams contains all the bound params for the put data waveserver interfaces operation -// typically these are obtained from a http.Request -// -// swagger:parameters PutDataWaveserverInterfaces -type PutDataWaveserverInterfacesParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*ciena.waveserver.interfaces.WaveserverInterfaces to be added or updated - In: body - */ - CienaWaveserverInterfacesWaveserverInterfacesBodyParam *models.CienaWaveserverInterfacesWaveserverInterfacesWrapper -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewPutDataWaveserverInterfacesParams() beforehand. -func (o *PutDataWaveserverInterfacesParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.CienaWaveserverInterfacesWaveserverInterfacesWrapper - if err := route.Consumer.Consume(r.Body, &body); err != nil { - res = append(res, errors.NewParseError("cienaWaveserverInterfacesWaveserverInterfacesBodyParam", "body", "", err)) - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.CienaWaveserverInterfacesWaveserverInterfacesBodyParam = &body - } - } - } - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name.go deleted file mode 100644 index 4db5d058eec65a009aa7fa5defa52bed93136382..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// PutDataWaveserverInterfacesPhysicalInterfaceNameHandlerFunc turns a function with the right signature into a put data waveserver interfaces physical interface name handler -type PutDataWaveserverInterfacesPhysicalInterfaceNameHandlerFunc func(PutDataWaveserverInterfacesPhysicalInterfaceNameParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn PutDataWaveserverInterfacesPhysicalInterfaceNameHandlerFunc) Handle(params PutDataWaveserverInterfacesPhysicalInterfaceNameParams) middleware.Responder { - return fn(params) -} - -// PutDataWaveserverInterfacesPhysicalInterfaceNameHandler interface for that can handle valid put data waveserver interfaces physical interface name params -type PutDataWaveserverInterfacesPhysicalInterfaceNameHandler interface { - Handle(PutDataWaveserverInterfacesPhysicalInterfaceNameParams) middleware.Responder -} - -// NewPutDataWaveserverInterfacesPhysicalInterfaceName creates a new http.Handler for the put data waveserver interfaces physical interface name operation -func NewPutDataWaveserverInterfacesPhysicalInterfaceName(ctx *middleware.Context, handler PutDataWaveserverInterfacesPhysicalInterfaceNameHandler) *PutDataWaveserverInterfacesPhysicalInterfaceName { - return &PutDataWaveserverInterfacesPhysicalInterfaceName{Context: ctx, Handler: handler} -} - -/*PutDataWaveserverInterfacesPhysicalInterfaceName swagger:route PUT /data/waveserver-interfaces/physical-interface={name}/ ciena-waveserver-interfaces putDataWaveserverInterfacesPhysicalInterfaceName - -creates or updates ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface - -List of physical Ethernet management interfaces. - -*/ -type PutDataWaveserverInterfacesPhysicalInterfaceName struct { - Context *middleware.Context - Handler PutDataWaveserverInterfacesPhysicalInterfaceNameHandler -} - -func (o *PutDataWaveserverInterfacesPhysicalInterfaceName) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewPutDataWaveserverInterfacesPhysicalInterfaceNameParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_id.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_id.go deleted file mode 100644 index d57be0563cd7b42defc3ed72f94d4b28869aeb04..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_id.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// PutDataWaveserverInterfacesPhysicalInterfaceNameIDHandlerFunc turns a function with the right signature into a put data waveserver interfaces physical interface name ID handler -type PutDataWaveserverInterfacesPhysicalInterfaceNameIDHandlerFunc func(PutDataWaveserverInterfacesPhysicalInterfaceNameIDParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn PutDataWaveserverInterfacesPhysicalInterfaceNameIDHandlerFunc) Handle(params PutDataWaveserverInterfacesPhysicalInterfaceNameIDParams) middleware.Responder { - return fn(params) -} - -// PutDataWaveserverInterfacesPhysicalInterfaceNameIDHandler interface for that can handle valid put data waveserver interfaces physical interface name ID params -type PutDataWaveserverInterfacesPhysicalInterfaceNameIDHandler interface { - Handle(PutDataWaveserverInterfacesPhysicalInterfaceNameIDParams) middleware.Responder -} - -// NewPutDataWaveserverInterfacesPhysicalInterfaceNameID creates a new http.Handler for the put data waveserver interfaces physical interface name ID operation -func NewPutDataWaveserverInterfacesPhysicalInterfaceNameID(ctx *middleware.Context, handler PutDataWaveserverInterfacesPhysicalInterfaceNameIDHandler) *PutDataWaveserverInterfacesPhysicalInterfaceNameID { - return &PutDataWaveserverInterfacesPhysicalInterfaceNameID{Context: ctx, Handler: handler} -} - -/*PutDataWaveserverInterfacesPhysicalInterfaceNameID swagger:route PUT /data/waveserver-interfaces/physical-interface={name}/id/ ciena-waveserver-interfaces putDataWaveserverInterfacesPhysicalInterfaceNameId - -creates or updates ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id - -Identification information of this management interface. - -*/ -type PutDataWaveserverInterfacesPhysicalInterfaceNameID struct { - Context *middleware.Context - Handler PutDataWaveserverInterfacesPhysicalInterfaceNameIDHandler -} - -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameID) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewPutDataWaveserverInterfacesPhysicalInterfaceNameIDParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_id_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_id_parameters.go deleted file mode 100644 index 467442075d8c15a868feba1e6849dd8d5b59997c..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_id_parameters.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// NewPutDataWaveserverInterfacesPhysicalInterfaceNameIDParams creates a new PutDataWaveserverInterfacesPhysicalInterfaceNameIDParams object -// no default values defined in spec. -func NewPutDataWaveserverInterfacesPhysicalInterfaceNameIDParams() PutDataWaveserverInterfacesPhysicalInterfaceNameIDParams { - - return PutDataWaveserverInterfacesPhysicalInterfaceNameIDParams{} -} - -// PutDataWaveserverInterfacesPhysicalInterfaceNameIDParams contains all the bound params for the put data waveserver interfaces physical interface name ID operation -// typically these are obtained from a http.Request -// -// swagger:parameters PutDataWaveserverInterfacesPhysicalInterfaceNameID -type PutDataWaveserverInterfacesPhysicalInterfaceNameIDParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id to be added or updated - In: body - */ - CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceIDBodyParam *models.CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceIDWrapper - /*Id of physical-interface - Required: true - In: path - */ - Name string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewPutDataWaveserverInterfacesPhysicalInterfaceNameIDParams() beforehand. -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameIDParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceIDWrapper - if err := route.Consumer.Consume(r.Body, &body); err != nil { - res = append(res, errors.NewParseError("cienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceIdBodyParam", "body", "", err)) - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceIDBodyParam = &body - } - } - } - rName, rhkName, _ := route.Params.GetOK("name") - if err := o.bindName(rName, rhkName, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindName binds and validates parameter Name from path. -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameIDParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.Name = raw - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_id_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_id_responses.go deleted file mode 100644 index b995d3310990e415f5f41a325ecd1cbe604eae2b..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_id_responses.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// PutDataWaveserverInterfacesPhysicalInterfaceNameIDCreatedCode is the HTTP code returned for type PutDataWaveserverInterfacesPhysicalInterfaceNameIDCreated -const PutDataWaveserverInterfacesPhysicalInterfaceNameIDCreatedCode int = 201 - -/*PutDataWaveserverInterfacesPhysicalInterfaceNameIDCreated Object created - -swagger:response putDataWaveserverInterfacesPhysicalInterfaceNameIdCreated -*/ -type PutDataWaveserverInterfacesPhysicalInterfaceNameIDCreated struct { -} - -// NewPutDataWaveserverInterfacesPhysicalInterfaceNameIDCreated creates PutDataWaveserverInterfacesPhysicalInterfaceNameIDCreated with default headers values -func NewPutDataWaveserverInterfacesPhysicalInterfaceNameIDCreated() *PutDataWaveserverInterfacesPhysicalInterfaceNameIDCreated { - - return &PutDataWaveserverInterfacesPhysicalInterfaceNameIDCreated{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameIDCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// PutDataWaveserverInterfacesPhysicalInterfaceNameIDNoContentCode is the HTTP code returned for type PutDataWaveserverInterfacesPhysicalInterfaceNameIDNoContent -const PutDataWaveserverInterfacesPhysicalInterfaceNameIDNoContentCode int = 204 - -/*PutDataWaveserverInterfacesPhysicalInterfaceNameIDNoContent Object modified - -swagger:response putDataWaveserverInterfacesPhysicalInterfaceNameIdNoContent -*/ -type PutDataWaveserverInterfacesPhysicalInterfaceNameIDNoContent struct { -} - -// NewPutDataWaveserverInterfacesPhysicalInterfaceNameIDNoContent creates PutDataWaveserverInterfacesPhysicalInterfaceNameIDNoContent with default headers values -func NewPutDataWaveserverInterfacesPhysicalInterfaceNameIDNoContent() *PutDataWaveserverInterfacesPhysicalInterfaceNameIDNoContent { - - return &PutDataWaveserverInterfacesPhysicalInterfaceNameIDNoContent{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameIDNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// PutDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequestCode is the HTTP code returned for type PutDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequest -const PutDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequestCode int = 400 - -/*PutDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequest Internal error - -swagger:response putDataWaveserverInterfacesPhysicalInterfaceNameIdBadRequest -*/ -type PutDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequest struct { -} - -// NewPutDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequest creates PutDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequest with default headers values -func NewPutDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequest() *PutDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequest { - - return &PutDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequest{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameIDBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_parameters.go deleted file mode 100644 index 84912aafd597e43d088f4caf7063a38d90296907..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_parameters.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// NewPutDataWaveserverInterfacesPhysicalInterfaceNameParams creates a new PutDataWaveserverInterfacesPhysicalInterfaceNameParams object -// no default values defined in spec. -func NewPutDataWaveserverInterfacesPhysicalInterfaceNameParams() PutDataWaveserverInterfacesPhysicalInterfaceNameParams { - - return PutDataWaveserverInterfacesPhysicalInterfaceNameParams{} -} - -// PutDataWaveserverInterfacesPhysicalInterfaceNameParams contains all the bound params for the put data waveserver interfaces physical interface name operation -// typically these are obtained from a http.Request -// -// swagger:parameters PutDataWaveserverInterfacesPhysicalInterfaceName -type PutDataWaveserverInterfacesPhysicalInterfaceNameParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface to be added or updated - In: body - */ - CienaWaveserverInterfacesWaveserverinterfacesPhysicalInterfaceBodyParam *models.CienaWaveserverInterfacesWaveserverinterfacesPhysicalInterfaceWrapper - /*Id of physical-interface - Required: true - In: path - */ - Name string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewPutDataWaveserverInterfacesPhysicalInterfaceNameParams() beforehand. -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.CienaWaveserverInterfacesWaveserverinterfacesPhysicalInterfaceWrapper - if err := route.Consumer.Consume(r.Body, &body); err != nil { - res = append(res, errors.NewParseError("cienaWaveserverInterfacesWaveserverinterfacesPhysicalInterfaceBodyParam", "body", "", err)) - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.CienaWaveserverInterfacesWaveserverinterfacesPhysicalInterfaceBodyParam = &body - } - } - } - rName, rhkName, _ := route.Params.GetOK("name") - if err := o.bindName(rName, rhkName, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindName binds and validates parameter Name from path. -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.Name = raw - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_properties.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_properties.go deleted file mode 100644 index 45bcca7608552f11b36a1d1d3e7ada8eefe470c7..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_properties.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandlerFunc turns a function with the right signature into a put data waveserver interfaces physical interface name properties handler -type PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandlerFunc func(PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandlerFunc) Handle(params PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams) middleware.Responder { - return fn(params) -} - -// PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler interface for that can handle valid put data waveserver interfaces physical interface name properties params -type PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler interface { - Handle(PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams) middleware.Responder -} - -// NewPutDataWaveserverInterfacesPhysicalInterfaceNameProperties creates a new http.Handler for the put data waveserver interfaces physical interface name properties operation -func NewPutDataWaveserverInterfacesPhysicalInterfaceNameProperties(ctx *middleware.Context, handler PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler) *PutDataWaveserverInterfacesPhysicalInterfaceNameProperties { - return &PutDataWaveserverInterfacesPhysicalInterfaceNameProperties{Context: ctx, Handler: handler} -} - -/*PutDataWaveserverInterfacesPhysicalInterfaceNameProperties swagger:route PUT /data/waveserver-interfaces/physical-interface={name}/properties/ ciena-waveserver-interfaces putDataWaveserverInterfacesPhysicalInterfaceNameProperties - -creates or updates ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties - -All the configuration data of the physical management interface. - -*/ -type PutDataWaveserverInterfacesPhysicalInterfaceNameProperties struct { - Context *middleware.Context - Handler PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler -} - -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameProperties) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_properties_ethernet.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_properties_ethernet.go deleted file mode 100644 index d6655b363374771da2067588ec71c43928491d63..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_properties_ethernet.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandlerFunc turns a function with the right signature into a put data waveserver interfaces physical interface name properties ethernet handler -type PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandlerFunc func(PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandlerFunc) Handle(params PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams) middleware.Responder { - return fn(params) -} - -// PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler interface for that can handle valid put data waveserver interfaces physical interface name properties ethernet params -type PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler interface { - Handle(PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams) middleware.Responder -} - -// NewPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet creates a new http.Handler for the put data waveserver interfaces physical interface name properties ethernet operation -func NewPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet(ctx *middleware.Context, handler PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler) *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet { - return &PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet{Context: ctx, Handler: handler} -} - -/*PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet swagger:route PUT /data/waveserver-interfaces/physical-interface={name}/properties/ethernet/ ciena-waveserver-interfaces putDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet - -creates or updates ciena.waveserver.interfaces.EthernetIfPropertiesGroup - -Ethernet interface attributes. - -*/ -type PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet struct { - Context *middleware.Context - Handler PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler -} - -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_properties_ethernet_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_properties_ethernet_parameters.go deleted file mode 100644 index d0c82932cc0452d62c887a4a05f7c759fc3e16a3..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_properties_ethernet_parameters.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// NewPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams creates a new PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams object -// no default values defined in spec. -func NewPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams() PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams { - - return PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams{} -} - -// PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams contains all the bound params for the put data waveserver interfaces physical interface name properties ethernet operation -// typically these are obtained from a http.Request -// -// swagger:parameters PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet -type PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*ciena.waveserver.interfaces.EthernetIfPropertiesGroup to be added or updated - In: body - */ - CienaWaveserverInterfacesEthernetIfPropertiesGroupBodyParam *models.CienaWaveserverInterfacesEthernetIfPropertiesGroupWrapper - /*Id of physical-interface - Required: true - In: path - */ - Name string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams() beforehand. -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.CienaWaveserverInterfacesEthernetIfPropertiesGroupWrapper - if err := route.Consumer.Consume(r.Body, &body); err != nil { - res = append(res, errors.NewParseError("cienaWaveserverInterfacesEthernetIfPropertiesGroupBodyParam", "body", "", err)) - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.CienaWaveserverInterfacesEthernetIfPropertiesGroupBodyParam = &body - } - } - } - rName, rhkName, _ := route.Params.GetOK("name") - if err := o.bindName(rName, rhkName, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindName binds and validates parameter Name from path. -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.Name = raw - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_properties_ethernet_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_properties_ethernet_responses.go deleted file mode 100644 index 6c227af1ce722afb013c9abf42de88c080babf2f..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_properties_ethernet_responses.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetCreatedCode is the HTTP code returned for type PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetCreated -const PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetCreatedCode int = 201 - -/*PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetCreated Object created - -swagger:response putDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetCreated -*/ -type PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetCreated struct { -} - -// NewPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetCreated creates PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetCreated with default headers values -func NewPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetCreated() *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetCreated { - - return &PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetCreated{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetNoContentCode is the HTTP code returned for type PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetNoContent -const PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetNoContentCode int = 204 - -/*PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetNoContent Object modified - -swagger:response putDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetNoContent -*/ -type PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetNoContent struct { -} - -// NewPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetNoContent creates PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetNoContent with default headers values -func NewPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetNoContent() *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetNoContent { - - return &PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetNoContent{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequestCode is the HTTP code returned for type PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest -const PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequestCode int = 400 - -/*PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest Internal error - -swagger:response putDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest -*/ -type PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest struct { -} - -// NewPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest creates PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest with default headers values -func NewPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest() *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest { - - return &PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_properties_ethernet_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_properties_ethernet_urlbuilder.go deleted file mode 100644 index 0e060d443a8c48c545c08781b3c20ff2bd4ae9a0..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_properties_ethernet_urlbuilder.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL generates an URL for the put data waveserver interfaces physical interface name properties ethernet operation -type PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL struct { - Name string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL) WithBasePath(bp string) *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/physical-interface={name}/properties/ethernet/" - - name := o.Name - if name != "" { - _path = strings.Replace(_path, "{name}", name, -1) - } else { - return nil, errors.New("name is required on PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL") - } - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_properties_management.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_properties_management.go deleted file mode 100644 index 130e739d9d0b28f1f3633e83b328b2ba873963ff..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_properties_management.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandlerFunc turns a function with the right signature into a put data waveserver interfaces physical interface name properties management handler -type PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandlerFunc func(PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandlerFunc) Handle(params PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams) middleware.Responder { - return fn(params) -} - -// PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler interface for that can handle valid put data waveserver interfaces physical interface name properties management params -type PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler interface { - Handle(PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams) middleware.Responder -} - -// NewPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement creates a new http.Handler for the put data waveserver interfaces physical interface name properties management operation -func NewPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement(ctx *middleware.Context, handler PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler) *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement { - return &PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement{Context: ctx, Handler: handler} -} - -/*PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement swagger:route PUT /data/waveserver-interfaces/physical-interface={name}/properties/management/ ciena-waveserver-interfaces putDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement - -creates or updates ciena.waveserver.interfaces.ManagementIfPropertiesGroup - -Management interface attributes. - -*/ -type PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement struct { - Context *middleware.Context - Handler PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler -} - -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_properties_management_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_properties_management_parameters.go deleted file mode 100644 index c96d91f78172c1e9d1bbd742df7ea6851f577e88..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_properties_management_parameters.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// NewPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams creates a new PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams object -// no default values defined in spec. -func NewPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams() PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams { - - return PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams{} -} - -// PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams contains all the bound params for the put data waveserver interfaces physical interface name properties management operation -// typically these are obtained from a http.Request -// -// swagger:parameters PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement -type PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*ciena.waveserver.interfaces.ManagementIfPropertiesGroup to be added or updated - In: body - */ - CienaWaveserverInterfacesManagementIfPropertiesGroupBodyParam *models.CienaWaveserverInterfacesManagementIfPropertiesGroupWrapper - /*Id of physical-interface - Required: true - In: path - */ - Name string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams() beforehand. -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.CienaWaveserverInterfacesManagementIfPropertiesGroupWrapper - if err := route.Consumer.Consume(r.Body, &body); err != nil { - res = append(res, errors.NewParseError("cienaWaveserverInterfacesManagementIfPropertiesGroupBodyParam", "body", "", err)) - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.CienaWaveserverInterfacesManagementIfPropertiesGroupBodyParam = &body - } - } - } - rName, rhkName, _ := route.Params.GetOK("name") - if err := o.bindName(rName, rhkName, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindName binds and validates parameter Name from path. -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.Name = raw - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_properties_management_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_properties_management_responses.go deleted file mode 100644 index 623c38fdc4dcc28bd37712abbf17ab3a6b560307..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_properties_management_responses.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementCreatedCode is the HTTP code returned for type PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementCreated -const PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementCreatedCode int = 201 - -/*PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementCreated Object created - -swagger:response putDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementCreated -*/ -type PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementCreated struct { -} - -// NewPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementCreated creates PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementCreated with default headers values -func NewPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementCreated() *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementCreated { - - return &PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementCreated{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementNoContentCode is the HTTP code returned for type PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementNoContent -const PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementNoContentCode int = 204 - -/*PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementNoContent Object modified - -swagger:response putDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementNoContent -*/ -type PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementNoContent struct { -} - -// NewPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementNoContent creates PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementNoContent with default headers values -func NewPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementNoContent() *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementNoContent { - - return &PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementNoContent{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequestCode is the HTTP code returned for type PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest -const PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequestCode int = 400 - -/*PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest Internal error - -swagger:response putDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest -*/ -type PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest struct { -} - -// NewPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest creates PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest with default headers values -func NewPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest() *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest { - - return &PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_properties_management_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_properties_management_urlbuilder.go deleted file mode 100644 index 69d3b4e5c4ffa19d475182b5c24a008d02a51a62..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_properties_management_urlbuilder.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL generates an URL for the put data waveserver interfaces physical interface name properties management operation -type PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL struct { - Name string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL) WithBasePath(bp string) *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/physical-interface={name}/properties/management/" - - name := o.Name - if name != "" { - _path = strings.Replace(_path, "{name}", name, -1) - } else { - return nil, errors.New("name is required on PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL") - } - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_properties_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_properties_parameters.go deleted file mode 100644 index f33a4c289c8a8736ffef84f58604013c016400e9..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_properties_parameters.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// NewPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams creates a new PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams object -// no default values defined in spec. -func NewPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams() PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams { - - return PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams{} -} - -// PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams contains all the bound params for the put data waveserver interfaces physical interface name properties operation -// typically these are obtained from a http.Request -// -// swagger:parameters PutDataWaveserverInterfacesPhysicalInterfaceNameProperties -type PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties to be added or updated - In: body - */ - CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfacePropertiesBodyParam *models.CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfacePropertiesWrapper - /*Id of physical-interface - Required: true - In: path - */ - Name string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams() beforehand. -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfacePropertiesWrapper - if err := route.Consumer.Consume(r.Body, &body); err != nil { - res = append(res, errors.NewParseError("cienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfacePropertiesBodyParam", "body", "", err)) - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfacePropertiesBodyParam = &body - } - } - } - rName, rhkName, _ := route.Params.GetOK("name") - if err := o.bindName(rName, rhkName, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindName binds and validates parameter Name from path. -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.Name = raw - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_properties_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_properties_responses.go deleted file mode 100644 index fdac91c86fade627fc38907e3e39d60bf9ec1413..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_properties_responses.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesCreatedCode is the HTTP code returned for type PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesCreated -const PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesCreatedCode int = 201 - -/*PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesCreated Object created - -swagger:response putDataWaveserverInterfacesPhysicalInterfaceNamePropertiesCreated -*/ -type PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesCreated struct { -} - -// NewPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesCreated creates PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesCreated with default headers values -func NewPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesCreated() *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesCreated { - - return &PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesCreated{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesNoContentCode is the HTTP code returned for type PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesNoContent -const PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesNoContentCode int = 204 - -/*PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesNoContent Object modified - -swagger:response putDataWaveserverInterfacesPhysicalInterfaceNamePropertiesNoContent -*/ -type PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesNoContent struct { -} - -// NewPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesNoContent creates PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesNoContent with default headers values -func NewPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesNoContent() *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesNoContent { - - return &PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesNoContent{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequestCode is the HTTP code returned for type PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest -const PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequestCode int = 400 - -/*PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest Internal error - -swagger:response putDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest -*/ -type PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest struct { -} - -// NewPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest creates PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest with default headers values -func NewPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest() *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest { - - return &PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_properties_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_properties_urlbuilder.go deleted file mode 100644 index 6544b1b13d1a418774fae58d5b67967dd5c9035b..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_properties_urlbuilder.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL generates an URL for the put data waveserver interfaces physical interface name properties operation -type PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL struct { - Name string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL) WithBasePath(bp string) *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/physical-interface={name}/properties/" - - name := o.Name - if name != "" { - _path = strings.Replace(_path, "{name}", name, -1) - } else { - return nil, errors.New("name is required on PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL") - } - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_responses.go deleted file mode 100644 index 0947a60a4cc4f24cfdff2ba34fabaff8f40d68fd..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_responses.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// PutDataWaveserverInterfacesPhysicalInterfaceNameCreatedCode is the HTTP code returned for type PutDataWaveserverInterfacesPhysicalInterfaceNameCreated -const PutDataWaveserverInterfacesPhysicalInterfaceNameCreatedCode int = 201 - -/*PutDataWaveserverInterfacesPhysicalInterfaceNameCreated Object created - -swagger:response putDataWaveserverInterfacesPhysicalInterfaceNameCreated -*/ -type PutDataWaveserverInterfacesPhysicalInterfaceNameCreated struct { -} - -// NewPutDataWaveserverInterfacesPhysicalInterfaceNameCreated creates PutDataWaveserverInterfacesPhysicalInterfaceNameCreated with default headers values -func NewPutDataWaveserverInterfacesPhysicalInterfaceNameCreated() *PutDataWaveserverInterfacesPhysicalInterfaceNameCreated { - - return &PutDataWaveserverInterfacesPhysicalInterfaceNameCreated{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// PutDataWaveserverInterfacesPhysicalInterfaceNameNoContentCode is the HTTP code returned for type PutDataWaveserverInterfacesPhysicalInterfaceNameNoContent -const PutDataWaveserverInterfacesPhysicalInterfaceNameNoContentCode int = 204 - -/*PutDataWaveserverInterfacesPhysicalInterfaceNameNoContent Object modified - -swagger:response putDataWaveserverInterfacesPhysicalInterfaceNameNoContent -*/ -type PutDataWaveserverInterfacesPhysicalInterfaceNameNoContent struct { -} - -// NewPutDataWaveserverInterfacesPhysicalInterfaceNameNoContent creates PutDataWaveserverInterfacesPhysicalInterfaceNameNoContent with default headers values -func NewPutDataWaveserverInterfacesPhysicalInterfaceNameNoContent() *PutDataWaveserverInterfacesPhysicalInterfaceNameNoContent { - - return &PutDataWaveserverInterfacesPhysicalInterfaceNameNoContent{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// PutDataWaveserverInterfacesPhysicalInterfaceNameBadRequestCode is the HTTP code returned for type PutDataWaveserverInterfacesPhysicalInterfaceNameBadRequest -const PutDataWaveserverInterfacesPhysicalInterfaceNameBadRequestCode int = 400 - -/*PutDataWaveserverInterfacesPhysicalInterfaceNameBadRequest Internal error - -swagger:response putDataWaveserverInterfacesPhysicalInterfaceNameBadRequest -*/ -type PutDataWaveserverInterfacesPhysicalInterfaceNameBadRequest struct { -} - -// NewPutDataWaveserverInterfacesPhysicalInterfaceNameBadRequest creates PutDataWaveserverInterfacesPhysicalInterfaceNameBadRequest with default headers values -func NewPutDataWaveserverInterfacesPhysicalInterfaceNameBadRequest() *PutDataWaveserverInterfacesPhysicalInterfaceNameBadRequest { - - return &PutDataWaveserverInterfacesPhysicalInterfaceNameBadRequest{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_state.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_state.go deleted file mode 100644 index 11f14e5cc7c5e0aa62154a678b2afa907849cbb6..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_state.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// PutDataWaveserverInterfacesPhysicalInterfaceNameStateHandlerFunc turns a function with the right signature into a put data waveserver interfaces physical interface name state handler -type PutDataWaveserverInterfacesPhysicalInterfaceNameStateHandlerFunc func(PutDataWaveserverInterfacesPhysicalInterfaceNameStateParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn PutDataWaveserverInterfacesPhysicalInterfaceNameStateHandlerFunc) Handle(params PutDataWaveserverInterfacesPhysicalInterfaceNameStateParams) middleware.Responder { - return fn(params) -} - -// PutDataWaveserverInterfacesPhysicalInterfaceNameStateHandler interface for that can handle valid put data waveserver interfaces physical interface name state params -type PutDataWaveserverInterfacesPhysicalInterfaceNameStateHandler interface { - Handle(PutDataWaveserverInterfacesPhysicalInterfaceNameStateParams) middleware.Responder -} - -// NewPutDataWaveserverInterfacesPhysicalInterfaceNameState creates a new http.Handler for the put data waveserver interfaces physical interface name state operation -func NewPutDataWaveserverInterfacesPhysicalInterfaceNameState(ctx *middleware.Context, handler PutDataWaveserverInterfacesPhysicalInterfaceNameStateHandler) *PutDataWaveserverInterfacesPhysicalInterfaceNameState { - return &PutDataWaveserverInterfacesPhysicalInterfaceNameState{Context: ctx, Handler: handler} -} - -/*PutDataWaveserverInterfacesPhysicalInterfaceNameState swagger:route PUT /data/waveserver-interfaces/physical-interface={name}/state/ ciena-waveserver-interfaces putDataWaveserverInterfacesPhysicalInterfaceNameState - -creates or updates ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State - -Physical management interface state information. - -*/ -type PutDataWaveserverInterfacesPhysicalInterfaceNameState struct { - Context *middleware.Context - Handler PutDataWaveserverInterfacesPhysicalInterfaceNameStateHandler -} - -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameState) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewPutDataWaveserverInterfacesPhysicalInterfaceNameStateParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_state_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_state_parameters.go deleted file mode 100644 index f711592b45cfc03004998cba95d597ef752b8dc0..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_state_parameters.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// NewPutDataWaveserverInterfacesPhysicalInterfaceNameStateParams creates a new PutDataWaveserverInterfacesPhysicalInterfaceNameStateParams object -// no default values defined in spec. -func NewPutDataWaveserverInterfacesPhysicalInterfaceNameStateParams() PutDataWaveserverInterfacesPhysicalInterfaceNameStateParams { - - return PutDataWaveserverInterfacesPhysicalInterfaceNameStateParams{} -} - -// PutDataWaveserverInterfacesPhysicalInterfaceNameStateParams contains all the bound params for the put data waveserver interfaces physical interface name state operation -// typically these are obtained from a http.Request -// -// swagger:parameters PutDataWaveserverInterfacesPhysicalInterfaceNameState -type PutDataWaveserverInterfacesPhysicalInterfaceNameStateParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State to be added or updated - In: body - */ - CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceStateBodyParam *models.CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceStateWrapper - /*Id of physical-interface - Required: true - In: path - */ - Name string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewPutDataWaveserverInterfacesPhysicalInterfaceNameStateParams() beforehand. -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameStateParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceStateWrapper - if err := route.Consumer.Consume(r.Body, &body); err != nil { - res = append(res, errors.NewParseError("cienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceStateBodyParam", "body", "", err)) - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.CienaWaveserverInterfacesWaveserverinterfacesPhysicalinterfaceStateBodyParam = &body - } - } - } - rName, rhkName, _ := route.Params.GetOK("name") - if err := o.bindName(rName, rhkName, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindName binds and validates parameter Name from path. -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameStateParams) bindName(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.Name = raw - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_state_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_state_responses.go deleted file mode 100644 index 436f0f5e2564283de080e93775235f004dfd9bbb..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_state_responses.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// PutDataWaveserverInterfacesPhysicalInterfaceNameStateCreatedCode is the HTTP code returned for type PutDataWaveserverInterfacesPhysicalInterfaceNameStateCreated -const PutDataWaveserverInterfacesPhysicalInterfaceNameStateCreatedCode int = 201 - -/*PutDataWaveserverInterfacesPhysicalInterfaceNameStateCreated Object created - -swagger:response putDataWaveserverInterfacesPhysicalInterfaceNameStateCreated -*/ -type PutDataWaveserverInterfacesPhysicalInterfaceNameStateCreated struct { -} - -// NewPutDataWaveserverInterfacesPhysicalInterfaceNameStateCreated creates PutDataWaveserverInterfacesPhysicalInterfaceNameStateCreated with default headers values -func NewPutDataWaveserverInterfacesPhysicalInterfaceNameStateCreated() *PutDataWaveserverInterfacesPhysicalInterfaceNameStateCreated { - - return &PutDataWaveserverInterfacesPhysicalInterfaceNameStateCreated{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameStateCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// PutDataWaveserverInterfacesPhysicalInterfaceNameStateNoContentCode is the HTTP code returned for type PutDataWaveserverInterfacesPhysicalInterfaceNameStateNoContent -const PutDataWaveserverInterfacesPhysicalInterfaceNameStateNoContentCode int = 204 - -/*PutDataWaveserverInterfacesPhysicalInterfaceNameStateNoContent Object modified - -swagger:response putDataWaveserverInterfacesPhysicalInterfaceNameStateNoContent -*/ -type PutDataWaveserverInterfacesPhysicalInterfaceNameStateNoContent struct { -} - -// NewPutDataWaveserverInterfacesPhysicalInterfaceNameStateNoContent creates PutDataWaveserverInterfacesPhysicalInterfaceNameStateNoContent with default headers values -func NewPutDataWaveserverInterfacesPhysicalInterfaceNameStateNoContent() *PutDataWaveserverInterfacesPhysicalInterfaceNameStateNoContent { - - return &PutDataWaveserverInterfacesPhysicalInterfaceNameStateNoContent{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameStateNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// PutDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequestCode is the HTTP code returned for type PutDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest -const PutDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequestCode int = 400 - -/*PutDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest Internal error - -swagger:response putDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest -*/ -type PutDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest struct { -} - -// NewPutDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest creates PutDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest with default headers values -func NewPutDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest() *PutDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest { - - return &PutDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameStateBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_state_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_state_urlbuilder.go deleted file mode 100644 index 7bf2888c67cc60e88b751b4299f4a3ba8970278b..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_physical_interface_name_state_urlbuilder.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// PutDataWaveserverInterfacesPhysicalInterfaceNameStateURL generates an URL for the put data waveserver interfaces physical interface name state operation -type PutDataWaveserverInterfacesPhysicalInterfaceNameStateURL struct { - Name string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameStateURL) WithBasePath(bp string) *PutDataWaveserverInterfacesPhysicalInterfaceNameStateURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameStateURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameStateURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/physical-interface={name}/state/" - - name := o.Name - if name != "" { - _path = strings.Replace(_path, "{name}", name, -1) - } else { - return nil, errors.New("name is required on PutDataWaveserverInterfacesPhysicalInterfaceNameStateURL") - } - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameStateURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameStateURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameStateURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on PutDataWaveserverInterfacesPhysicalInterfaceNameStateURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on PutDataWaveserverInterfacesPhysicalInterfaceNameStateURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *PutDataWaveserverInterfacesPhysicalInterfaceNameStateURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_responses.go deleted file mode 100644 index 3d4c5e044fbfb709a3b4216b00307b4a79b178f3..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_responses.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// PutDataWaveserverInterfacesCreatedCode is the HTTP code returned for type PutDataWaveserverInterfacesCreated -const PutDataWaveserverInterfacesCreatedCode int = 201 - -/*PutDataWaveserverInterfacesCreated Object created - -swagger:response putDataWaveserverInterfacesCreated -*/ -type PutDataWaveserverInterfacesCreated struct { -} - -// NewPutDataWaveserverInterfacesCreated creates PutDataWaveserverInterfacesCreated with default headers values -func NewPutDataWaveserverInterfacesCreated() *PutDataWaveserverInterfacesCreated { - - return &PutDataWaveserverInterfacesCreated{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// PutDataWaveserverInterfacesNoContentCode is the HTTP code returned for type PutDataWaveserverInterfacesNoContent -const PutDataWaveserverInterfacesNoContentCode int = 204 - -/*PutDataWaveserverInterfacesNoContent Object modified - -swagger:response putDataWaveserverInterfacesNoContent -*/ -type PutDataWaveserverInterfacesNoContent struct { -} - -// NewPutDataWaveserverInterfacesNoContent creates PutDataWaveserverInterfacesNoContent with default headers values -func NewPutDataWaveserverInterfacesNoContent() *PutDataWaveserverInterfacesNoContent { - - return &PutDataWaveserverInterfacesNoContent{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// PutDataWaveserverInterfacesBadRequestCode is the HTTP code returned for type PutDataWaveserverInterfacesBadRequest -const PutDataWaveserverInterfacesBadRequestCode int = 400 - -/*PutDataWaveserverInterfacesBadRequest Internal error - -swagger:response putDataWaveserverInterfacesBadRequest -*/ -type PutDataWaveserverInterfacesBadRequest struct { -} - -// NewPutDataWaveserverInterfacesBadRequest creates PutDataWaveserverInterfacesBadRequest with default headers values -func NewPutDataWaveserverInterfacesBadRequest() *PutDataWaveserverInterfacesBadRequest { - - return &PutDataWaveserverInterfacesBadRequest{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_routes.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_routes.go deleted file mode 100644 index e4badfb919a92bf64a87af247f8891a76026718e..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_routes.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// PutDataWaveserverInterfacesRoutesHandlerFunc turns a function with the right signature into a put data waveserver interfaces routes handler -type PutDataWaveserverInterfacesRoutesHandlerFunc func(PutDataWaveserverInterfacesRoutesParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn PutDataWaveserverInterfacesRoutesHandlerFunc) Handle(params PutDataWaveserverInterfacesRoutesParams) middleware.Responder { - return fn(params) -} - -// PutDataWaveserverInterfacesRoutesHandler interface for that can handle valid put data waveserver interfaces routes params -type PutDataWaveserverInterfacesRoutesHandler interface { - Handle(PutDataWaveserverInterfacesRoutesParams) middleware.Responder -} - -// NewPutDataWaveserverInterfacesRoutes creates a new http.Handler for the put data waveserver interfaces routes operation -func NewPutDataWaveserverInterfacesRoutes(ctx *middleware.Context, handler PutDataWaveserverInterfacesRoutesHandler) *PutDataWaveserverInterfacesRoutes { - return &PutDataWaveserverInterfacesRoutes{Context: ctx, Handler: handler} -} - -/*PutDataWaveserverInterfacesRoutes swagger:route PUT /data/waveserver-interfaces/routes/ ciena-waveserver-interfaces putDataWaveserverInterfacesRoutes - -creates or updates ciena.waveserver.interfaces.waveserverinterfaces.Routes - -Top-level container for IP route configuration and operational data. - -*/ -type PutDataWaveserverInterfacesRoutes struct { - Context *middleware.Context - Handler PutDataWaveserverInterfacesRoutesHandler -} - -func (o *PutDataWaveserverInterfacesRoutes) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewPutDataWaveserverInterfacesRoutesParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_routes_ip_v4_static_route_destination.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_routes_ip_v4_static_route_destination.go deleted file mode 100644 index 4b1e7b536601c556adf941b8ad36ee28696e9bb3..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_routes_ip_v4_static_route_destination.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandlerFunc turns a function with the right signature into a put data waveserver interfaces routes IP v4 static route destination handler -type PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandlerFunc func(PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandlerFunc) Handle(params PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams) middleware.Responder { - return fn(params) -} - -// PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler interface for that can handle valid put data waveserver interfaces routes IP v4 static route destination params -type PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler interface { - Handle(PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams) middleware.Responder -} - -// NewPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestination creates a new http.Handler for the put data waveserver interfaces routes IP v4 static route destination operation -func NewPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestination(ctx *middleware.Context, handler PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler) *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestination { - return &PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestination{Context: ctx, Handler: handler} -} - -/*PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestination swagger:route PUT /data/waveserver-interfaces/routes/ipv4-static-route={destination}/ ciena-waveserver-interfaces putDataWaveserverInterfacesRoutesIpV4StaticRouteDestination - -creates or updates ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute - -List of IPv4 static routing entries. - -*/ -type PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestination struct { - Context *middleware.Context - Handler PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler -} - -func (o *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestination) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_index.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_index.go deleted file mode 100644 index 679567940070a97942d54d459ea25bd98adb7fab..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_index.go +++ /dev/null @@ -1,60 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime/middleware" -) - -// PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandlerFunc turns a function with the right signature into a put data waveserver interfaces routes IP v4 static route destination next hop index handler -type PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandlerFunc func(PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams) middleware.Responder - -// Handle executing the request and returning a response -func (fn PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandlerFunc) Handle(params PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams) middleware.Responder { - return fn(params) -} - -// PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler interface for that can handle valid put data waveserver interfaces routes IP v4 static route destination next hop index params -type PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler interface { - Handle(PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams) middleware.Responder -} - -// NewPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndex creates a new http.Handler for the put data waveserver interfaces routes IP v4 static route destination next hop index operation -func NewPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndex(ctx *middleware.Context, handler PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler) *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndex { - return &PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndex{Context: ctx, Handler: handler} -} - -/*PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndex swagger:route PUT /data/waveserver-interfaces/routes/ipv4-static-route={destination}/next-hop={index}/ ciena-waveserver-interfaces putDataWaveserverInterfacesRoutesIpV4StaticRouteDestinationNextHopIndex - -creates or updates ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop - -A list of next-hop entries associated with the static route. - -*/ -type PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndex struct { - Context *middleware.Context - Handler PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler -} - -func (o *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndex) ServeHTTP(rw http.ResponseWriter, r *http.Request) { - route, rCtx, _ := o.Context.RouteInfo(r) - if rCtx != nil { - r = rCtx - } - var Params = NewPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams() - - if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params - o.Context.Respond(rw, r, route.Produces, route, err) - return - } - - res := o.Handler.Handle(Params) // actually handle the request - - o.Context.Respond(rw, r, route.Produces, route, res) - -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_index_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_index_parameters.go deleted file mode 100644 index b29bff0e4bddb50fc180ee2ec94b2cfdf4b3eb83..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_index_parameters.go +++ /dev/null @@ -1,125 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// NewPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams creates a new PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams object -// no default values defined in spec. -func NewPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams() PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams { - - return PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams{} -} - -// PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams contains all the bound params for the put data waveserver interfaces routes IP v4 static route destination next hop index operation -// typically these are obtained from a http.Request -// -// swagger:parameters PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndex -type PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop to be added or updated - In: body - */ - CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHopBodyParam *models.CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHopWrapper - /*Id of ipv4-static-route - Required: true - In: path - */ - Destination string - /*Id of next-hop - Required: true - In: path - */ - Index int64 -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams() beforehand. -func (o *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHopWrapper - if err := route.Consumer.Consume(r.Body, &body); err != nil { - res = append(res, errors.NewParseError("cienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHopBodyParam", "body", "", err)) - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.CienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4staticrouteNextHopBodyParam = &body - } - } - } - rDestination, rhkDestination, _ := route.Params.GetOK("destination") - if err := o.bindDestination(rDestination, rhkDestination, route.Formats); err != nil { - res = append(res, err) - } - - rIndex, rhkIndex, _ := route.Params.GetOK("index") - if err := o.bindIndex(rIndex, rhkIndex, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindDestination binds and validates parameter Destination from path. -func (o *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams) bindDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.Destination = raw - - return nil -} - -// bindIndex binds and validates parameter Index from path. -func (o *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams) bindIndex(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - value, err := swag.ConvertInt64(raw) - if err != nil { - return errors.InvalidType("index", "path", "int64", raw) - } - o.Index = value - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_index_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_index_responses.go deleted file mode 100644 index b77436acb44b223d6bbdf3403c930c29a5ec07af..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_index_responses.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexCreatedCode is the HTTP code returned for type PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexCreated -const PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexCreatedCode int = 201 - -/*PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexCreated Object created - -swagger:response putDataWaveserverInterfacesRoutesIpV4StaticRouteDestinationNextHopIndexCreated -*/ -type PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexCreated struct { -} - -// NewPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexCreated creates PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexCreated with default headers values -func NewPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexCreated() *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexCreated { - - return &PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexCreated{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexNoContentCode is the HTTP code returned for type PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexNoContent -const PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexNoContentCode int = 204 - -/*PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexNoContent Object modified - -swagger:response putDataWaveserverInterfacesRoutesIpV4StaticRouteDestinationNextHopIndexNoContent -*/ -type PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexNoContent struct { -} - -// NewPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexNoContent creates PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexNoContent with default headers values -func NewPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexNoContent() *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexNoContent { - - return &PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexNoContent{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexBadRequestCode is the HTTP code returned for type PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexBadRequest -const PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexBadRequestCode int = 400 - -/*PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexBadRequest Internal error - -swagger:response putDataWaveserverInterfacesRoutesIpV4StaticRouteDestinationNextHopIndexBadRequest -*/ -type PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexBadRequest struct { -} - -// NewPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexBadRequest creates PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexBadRequest with default headers values -func NewPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexBadRequest() *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexBadRequest { - - return &PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexBadRequest{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_index_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_index_urlbuilder.go deleted file mode 100644 index 8c01974a0b6680f4b64dedda2cf95e590500b955..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_routes_ip_v4_static_route_destination_next_hop_index_urlbuilder.go +++ /dev/null @@ -1,106 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" - - "github.com/go-openapi/swag" -) - -// PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL generates an URL for the put data waveserver interfaces routes IP v4 static route destination next hop index operation -type PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL struct { - Destination string - Index int64 - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL) WithBasePath(bp string) *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/routes/ipv4-static-route={destination}/next-hop={index}/" - - destination := o.Destination - if destination != "" { - _path = strings.Replace(_path, "{destination}", destination, -1) - } else { - return nil, errors.New("destination is required on PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL") - } - - index := swag.FormatInt64(o.Index) - if index != "" { - _path = strings.Replace(_path, "{index}", index, -1) - } else { - return nil, errors.New("index is required on PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL") - } - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_routes_ip_v4_static_route_destination_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_routes_ip_v4_static_route_destination_parameters.go deleted file mode 100644 index 8a5e938fe92fd640018a74e25af2a8f71ae34668..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_routes_ip_v4_static_route_destination_parameters.go +++ /dev/null @@ -1,95 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/strfmt" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// NewPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams creates a new PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams object -// no default values defined in spec. -func NewPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams() PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams { - - return PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams{} -} - -// PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams contains all the bound params for the put data waveserver interfaces routes IP v4 static route destination operation -// typically these are obtained from a http.Request -// -// swagger:parameters PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestination -type PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute to be added or updated - In: body - */ - CienaWaveserverInterfacesWaveserverinterfacesRoutesIPV4StaticRouteBodyParam *models.CienaWaveserverInterfacesWaveserverinterfacesRoutesIPV4StaticRouteWrapper - /*Id of ipv4-static-route - Required: true - In: path - */ - Destination string -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams() beforehand. -func (o *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.CienaWaveserverInterfacesWaveserverinterfacesRoutesIPV4StaticRouteWrapper - if err := route.Consumer.Consume(r.Body, &body); err != nil { - res = append(res, errors.NewParseError("cienaWaveserverInterfacesWaveserverinterfacesRoutesIpv4StaticRouteBodyParam", "body", "", err)) - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.CienaWaveserverInterfacesWaveserverinterfacesRoutesIPV4StaticRouteBodyParam = &body - } - } - } - rDestination, rhkDestination, _ := route.Params.GetOK("destination") - if err := o.bindDestination(rDestination, rhkDestination, route.Formats); err != nil { - res = append(res, err) - } - - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} - -// bindDestination binds and validates parameter Destination from path. -func (o *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams) bindDestination(rawData []string, hasKey bool, formats strfmt.Registry) error { - var raw string - if len(rawData) > 0 { - raw = rawData[len(rawData)-1] - } - - // Required: true - // Parameter is provided by construction from the route - - o.Destination = raw - - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_routes_ip_v4_static_route_destination_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_routes_ip_v4_static_route_destination_responses.go deleted file mode 100644 index 642dbe9c2a566516537578feb8af3667f234e6b3..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_routes_ip_v4_static_route_destination_responses.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationCreatedCode is the HTTP code returned for type PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationCreated -const PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationCreatedCode int = 201 - -/*PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationCreated Object created - -swagger:response putDataWaveserverInterfacesRoutesIpV4StaticRouteDestinationCreated -*/ -type PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationCreated struct { -} - -// NewPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationCreated creates PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationCreated with default headers values -func NewPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationCreated() *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationCreated { - - return &PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationCreated{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNoContentCode is the HTTP code returned for type PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNoContent -const PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNoContentCode int = 204 - -/*PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNoContent Object modified - -swagger:response putDataWaveserverInterfacesRoutesIpV4StaticRouteDestinationNoContent -*/ -type PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNoContent struct { -} - -// NewPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNoContent creates PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNoContent with default headers values -func NewPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNoContent() *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNoContent { - - return &PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNoContent{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationBadRequestCode is the HTTP code returned for type PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationBadRequest -const PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationBadRequestCode int = 400 - -/*PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationBadRequest Internal error - -swagger:response putDataWaveserverInterfacesRoutesIpV4StaticRouteDestinationBadRequest -*/ -type PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationBadRequest struct { -} - -// NewPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationBadRequest creates PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationBadRequest with default headers values -func NewPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationBadRequest() *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationBadRequest { - - return &PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationBadRequest{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_routes_ip_v4_static_route_destination_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_routes_ip_v4_static_route_destination_urlbuilder.go deleted file mode 100644 index baf381bfc43f5ad7a5ba1e6709fe2021a82f56b1..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_routes_ip_v4_static_route_destination_urlbuilder.go +++ /dev/null @@ -1,96 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" - "strings" -) - -// PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL generates an URL for the put data waveserver interfaces routes IP v4 static route destination operation -type PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL struct { - Destination string - - _basePath string - // avoid unkeyed usage - _ struct{} -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL) WithBasePath(bp string) *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/routes/ipv4-static-route={destination}/" - - destination := o.Destination - if destination != "" { - _path = strings.Replace(_path, "{destination}", destination, -1) - } else { - return nil, errors.New("destination is required on PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL") - } - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_routes_parameters.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_routes_parameters.go deleted file mode 100644 index 3ef2c3734d1397e8851265b4f6c73a3048f372a8..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_routes_parameters.go +++ /dev/null @@ -1,69 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/errors" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/models" -) - -// NewPutDataWaveserverInterfacesRoutesParams creates a new PutDataWaveserverInterfacesRoutesParams object -// no default values defined in spec. -func NewPutDataWaveserverInterfacesRoutesParams() PutDataWaveserverInterfacesRoutesParams { - - return PutDataWaveserverInterfacesRoutesParams{} -} - -// PutDataWaveserverInterfacesRoutesParams contains all the bound params for the put data waveserver interfaces routes operation -// typically these are obtained from a http.Request -// -// swagger:parameters PutDataWaveserverInterfacesRoutes -type PutDataWaveserverInterfacesRoutesParams struct { - - // HTTP Request Object - HTTPRequest *http.Request `json:"-"` - - /*ciena.waveserver.interfaces.waveserverinterfaces.Routes to be added or updated - In: body - */ - CienaWaveserverInterfacesWaveserverinterfacesRoutesBodyParam *models.CienaWaveserverInterfacesWaveserverinterfacesRoutesWrapper -} - -// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface -// for simple values it will use straight method calls. -// -// To ensure default values, the struct must have been initialized with NewPutDataWaveserverInterfacesRoutesParams() beforehand. -func (o *PutDataWaveserverInterfacesRoutesParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error { - var res []error - - o.HTTPRequest = r - - if runtime.HasBody(r) { - defer r.Body.Close() - var body models.CienaWaveserverInterfacesWaveserverinterfacesRoutesWrapper - if err := route.Consumer.Consume(r.Body, &body); err != nil { - res = append(res, errors.NewParseError("cienaWaveserverInterfacesWaveserverinterfacesRoutesBodyParam", "body", "", err)) - } else { - // validate body object - if err := body.Validate(route.Formats); err != nil { - res = append(res, err) - } - - if len(res) == 0 { - o.CienaWaveserverInterfacesWaveserverinterfacesRoutesBodyParam = &body - } - } - } - if len(res) > 0 { - return errors.CompositeValidationError(res...) - } - return nil -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_routes_responses.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_routes_responses.go deleted file mode 100644 index 25fa967aeb5996cd3d31b4c689c19ff241fd6388..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_routes_responses.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "net/http" - - "github.com/go-openapi/runtime" -) - -// PutDataWaveserverInterfacesRoutesCreatedCode is the HTTP code returned for type PutDataWaveserverInterfacesRoutesCreated -const PutDataWaveserverInterfacesRoutesCreatedCode int = 201 - -/*PutDataWaveserverInterfacesRoutesCreated Object created - -swagger:response putDataWaveserverInterfacesRoutesCreated -*/ -type PutDataWaveserverInterfacesRoutesCreated struct { -} - -// NewPutDataWaveserverInterfacesRoutesCreated creates PutDataWaveserverInterfacesRoutesCreated with default headers values -func NewPutDataWaveserverInterfacesRoutesCreated() *PutDataWaveserverInterfacesRoutesCreated { - - return &PutDataWaveserverInterfacesRoutesCreated{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesRoutesCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(201) -} - -// PutDataWaveserverInterfacesRoutesNoContentCode is the HTTP code returned for type PutDataWaveserverInterfacesRoutesNoContent -const PutDataWaveserverInterfacesRoutesNoContentCode int = 204 - -/*PutDataWaveserverInterfacesRoutesNoContent Object modified - -swagger:response putDataWaveserverInterfacesRoutesNoContent -*/ -type PutDataWaveserverInterfacesRoutesNoContent struct { -} - -// NewPutDataWaveserverInterfacesRoutesNoContent creates PutDataWaveserverInterfacesRoutesNoContent with default headers values -func NewPutDataWaveserverInterfacesRoutesNoContent() *PutDataWaveserverInterfacesRoutesNoContent { - - return &PutDataWaveserverInterfacesRoutesNoContent{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesRoutesNoContent) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(204) -} - -// PutDataWaveserverInterfacesRoutesBadRequestCode is the HTTP code returned for type PutDataWaveserverInterfacesRoutesBadRequest -const PutDataWaveserverInterfacesRoutesBadRequestCode int = 400 - -/*PutDataWaveserverInterfacesRoutesBadRequest Internal error - -swagger:response putDataWaveserverInterfacesRoutesBadRequest -*/ -type PutDataWaveserverInterfacesRoutesBadRequest struct { -} - -// NewPutDataWaveserverInterfacesRoutesBadRequest creates PutDataWaveserverInterfacesRoutesBadRequest with default headers values -func NewPutDataWaveserverInterfacesRoutesBadRequest() *PutDataWaveserverInterfacesRoutesBadRequest { - - return &PutDataWaveserverInterfacesRoutesBadRequest{} -} - -// WriteResponse to the client -func (o *PutDataWaveserverInterfacesRoutesBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) { - - rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses - - rw.WriteHeader(400) -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_routes_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_routes_urlbuilder.go deleted file mode 100644 index 4674bee4407a753e0596cda32a37e8258989cbba..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_routes_urlbuilder.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" -) - -// PutDataWaveserverInterfacesRoutesURL generates an URL for the put data waveserver interfaces routes operation -type PutDataWaveserverInterfacesRoutesURL struct { - _basePath string -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PutDataWaveserverInterfacesRoutesURL) WithBasePath(bp string) *PutDataWaveserverInterfacesRoutesURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PutDataWaveserverInterfacesRoutesURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *PutDataWaveserverInterfacesRoutesURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/routes/" - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *PutDataWaveserverInterfacesRoutesURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *PutDataWaveserverInterfacesRoutesURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *PutDataWaveserverInterfacesRoutesURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on PutDataWaveserverInterfacesRoutesURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on PutDataWaveserverInterfacesRoutesURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *PutDataWaveserverInterfacesRoutesURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_urlbuilder.go b/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_urlbuilder.go deleted file mode 100644 index ee871760ca1b11bc6111c71484cd8175526905fd..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/ciena_waveserver_interfaces/put_data_waveserver_interfaces_urlbuilder.go +++ /dev/null @@ -1,84 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package ciena_waveserver_interfaces - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the generate command - -import ( - "errors" - "net/url" - golangswaggerpaths "path" -) - -// PutDataWaveserverInterfacesURL generates an URL for the put data waveserver interfaces operation -type PutDataWaveserverInterfacesURL struct { - _basePath string -} - -// WithBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PutDataWaveserverInterfacesURL) WithBasePath(bp string) *PutDataWaveserverInterfacesURL { - o.SetBasePath(bp) - return o -} - -// SetBasePath sets the base path for this url builder, only required when it's different from the -// base path specified in the swagger spec. -// When the value of the base path is an empty string -func (o *PutDataWaveserverInterfacesURL) SetBasePath(bp string) { - o._basePath = bp -} - -// Build a url path and query string -func (o *PutDataWaveserverInterfacesURL) Build() (*url.URL, error) { - var _result url.URL - - var _path = "/data/waveserver-interfaces/" - - _basePath := o._basePath - _result.Path = golangswaggerpaths.Join(_basePath, _path) - - return &_result, nil -} - -// Must is a helper function to panic when the url builder returns an error -func (o *PutDataWaveserverInterfacesURL) Must(u *url.URL, err error) *url.URL { - if err != nil { - panic(err) - } - if u == nil { - panic("url can't be nil") - } - return u -} - -// String returns the string representation of the path with query string -func (o *PutDataWaveserverInterfacesURL) String() string { - return o.Must(o.Build()).String() -} - -// BuildFull builds a full url with scheme, host, path and query string -func (o *PutDataWaveserverInterfacesURL) BuildFull(scheme, host string) (*url.URL, error) { - if scheme == "" { - return nil, errors.New("scheme is required for a full url on PutDataWaveserverInterfacesURL") - } - if host == "" { - return nil, errors.New("host is required for a full url on PutDataWaveserverInterfacesURL") - } - - base, err := o.Build() - if err != nil { - return nil, err - } - - base.Scheme = scheme - base.Host = host - return base, nil -} - -// StringFull returns the string representation of a complete url -func (o *PutDataWaveserverInterfacesURL) StringFull(scheme, host string) string { - return o.Must(o.BuildFull(scheme, host)).String() -} diff --git a/waveserver/restapi/operations/cocsn_api.go b/waveserver/restapi/operations/cocsn_api.go deleted file mode 100644 index 5956c5aac7af9132f801593024318b538277d4ff..0000000000000000000000000000000000000000 --- a/waveserver/restapi/operations/cocsn_api.go +++ /dev/null @@ -1,1009 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package operations - -// This file was generated by the swagger tool. -// Editing this file might prove futile when you re-run the swagger generate command - -import ( - "fmt" - "net/http" - "strings" - - "github.com/go-openapi/errors" - "github.com/go-openapi/loads" - "github.com/go-openapi/runtime" - "github.com/go-openapi/runtime/middleware" - "github.com/go-openapi/runtime/security" - "github.com/go-openapi/spec" - "github.com/go-openapi/strfmt" - "github.com/go-openapi/swag" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/restapi/operations/ciena_waveserver_interfaces" -) - -// NewCocsnAPI creates a new Cocsn instance -func NewCocsnAPI(spec *loads.Document) *CocsnAPI { - return &CocsnAPI{ - handlers: make(map[string]map[string]http.Handler), - formats: strfmt.Default, - defaultConsumes: "application/json", - defaultProduces: "application/json", - customConsumers: make(map[string]runtime.Consumer), - customProducers: make(map[string]runtime.Producer), - PreServerShutdown: func() {}, - ServerShutdown: func() {}, - spec: spec, - useSwaggerUI: false, - ServeError: errors.ServeError, - BasicAuthenticator: security.BasicAuth, - APIKeyAuthenticator: security.APIKeyAuth, - BearerAuthenticator: security.BearerAuth, - - JSONConsumer: runtime.JSONConsumer(), - - JSONProducer: runtime.JSONProducer(), - - CienaWaveserverInterfacesDeleteDataWaveserverInterfacesHandler: ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesHandlerFunc(func(params ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.DeleteDataWaveserverInterfaces has not yet been implemented") - }), - CienaWaveserverInterfacesDeleteDataWaveserverInterfacesLogicalInterfaceIndexHandler: ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexHandlerFunc(func(params ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndex has not yet been implemented") - }), - CienaWaveserverInterfacesDeleteDataWaveserverInterfacesLogicalInterfaceIndexIDHandler: ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDHandlerFunc(func(params ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexID has not yet been implemented") - }), - CienaWaveserverInterfacesDeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler: ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandlerFunc(func(params ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexProperties has not yet been implemented") - }), - CienaWaveserverInterfacesDeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler: ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4HandlerFunc(func(params ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4 has not yet been implemented") - }), - CienaWaveserverInterfacesDeleteDataWaveserverInterfacesLogicalInterfaceIndexStateHandler: ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateHandlerFunc(func(params ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexState has not yet been implemented") - }), - CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNameHandler: ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNameHandlerFunc(func(params ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNameParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceName has not yet been implemented") - }), - CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNameIDHandler: ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDHandlerFunc(func(params ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNameID has not yet been implemented") - }), - CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler: ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandlerFunc(func(params ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNameProperties has not yet been implemented") - }), - CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler: ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandlerFunc(func(params ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet has not yet been implemented") - }), - CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler: ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandlerFunc(func(params ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement has not yet been implemented") - }), - CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNameStateHandler: ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateHandlerFunc(func(params ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNameState has not yet been implemented") - }), - CienaWaveserverInterfacesDeleteDataWaveserverInterfacesRoutesHandler: ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesRoutesHandlerFunc(func(params ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesRoutesParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesRoutes has not yet been implemented") - }), - CienaWaveserverInterfacesDeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler: ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandlerFunc(func(params ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestination has not yet been implemented") - }), - CienaWaveserverInterfacesDeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler: ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandlerFunc(func(params ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndex has not yet been implemented") - }), - CienaWaveserverInterfacesGetDataWaveserverInterfacesHandler: ciena_waveserver_interfaces.GetDataWaveserverInterfacesHandlerFunc(func(params ciena_waveserver_interfaces.GetDataWaveserverInterfacesParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.GetDataWaveserverInterfaces has not yet been implemented") - }), - CienaWaveserverInterfacesGetDataWaveserverInterfacesLogicalInterfaceIndexHandler: ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexHandlerFunc(func(params ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndex has not yet been implemented") - }), - CienaWaveserverInterfacesGetDataWaveserverInterfacesLogicalInterfaceIndexIDHandler: ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexIDHandlerFunc(func(params ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexIDParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexID has not yet been implemented") - }), - CienaWaveserverInterfacesGetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler: ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandlerFunc(func(params ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexProperties has not yet been implemented") - }), - CienaWaveserverInterfacesGetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler: ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4HandlerFunc(func(params ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4 has not yet been implemented") - }), - CienaWaveserverInterfacesGetDataWaveserverInterfacesLogicalInterfaceIndexStateHandler: ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexStateHandlerFunc(func(params ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexStateParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexState has not yet been implemented") - }), - CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNameHandler: ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNameHandlerFunc(func(params ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNameParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceName has not yet been implemented") - }), - CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNameIDHandler: ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNameIDHandlerFunc(func(params ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNameIDParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNameID has not yet been implemented") - }), - CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler: ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandlerFunc(func(params ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNameProperties has not yet been implemented") - }), - CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler: ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandlerFunc(func(params ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet has not yet been implemented") - }), - CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler: ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandlerFunc(func(params ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement has not yet been implemented") - }), - CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNameStateHandler: ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNameStateHandlerFunc(func(params ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNameStateParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNameState has not yet been implemented") - }), - CienaWaveserverInterfacesGetDataWaveserverInterfacesRoutesHandler: ciena_waveserver_interfaces.GetDataWaveserverInterfacesRoutesHandlerFunc(func(params ciena_waveserver_interfaces.GetDataWaveserverInterfacesRoutesParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.GetDataWaveserverInterfacesRoutes has not yet been implemented") - }), - CienaWaveserverInterfacesGetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler: ciena_waveserver_interfaces.GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandlerFunc(func(params ciena_waveserver_interfaces.GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestination has not yet been implemented") - }), - CienaWaveserverInterfacesGetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler: ciena_waveserver_interfaces.GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandlerFunc(func(params ciena_waveserver_interfaces.GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndex has not yet been implemented") - }), - CienaWaveserverInterfacesPostDataWaveserverInterfacesHandler: ciena_waveserver_interfaces.PostDataWaveserverInterfacesHandlerFunc(func(params ciena_waveserver_interfaces.PostDataWaveserverInterfacesParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PostDataWaveserverInterfaces has not yet been implemented") - }), - CienaWaveserverInterfacesPostDataWaveserverInterfacesLogicalInterfaceHandler: ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceHandlerFunc(func(params ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterface has not yet been implemented") - }), - CienaWaveserverInterfacesPostDataWaveserverInterfacesLogicalInterfaceIndexIDHandler: ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceIndexIDHandlerFunc(func(params ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceIndexIDParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceIndexID has not yet been implemented") - }), - CienaWaveserverInterfacesPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler: ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandlerFunc(func(params ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceIndexProperties has not yet been implemented") - }), - CienaWaveserverInterfacesPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler: ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4HandlerFunc(func(params ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4 has not yet been implemented") - }), - CienaWaveserverInterfacesPostDataWaveserverInterfacesLogicalInterfaceIndexStateHandler: ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceIndexStateHandlerFunc(func(params ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceIndexStateParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceIndexState has not yet been implemented") - }), - CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceHandler: ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceHandlerFunc(func(params ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterface has not yet been implemented") - }), - CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceNameIDHandler: ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNameIDHandlerFunc(func(params ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNameIDParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNameID has not yet been implemented") - }), - CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler: ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandlerFunc(func(params ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNameProperties has not yet been implemented") - }), - CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler: ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandlerFunc(func(params ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet has not yet been implemented") - }), - CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler: ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandlerFunc(func(params ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement has not yet been implemented") - }), - CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceNameStateHandler: ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNameStateHandlerFunc(func(params ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNameStateParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNameState has not yet been implemented") - }), - CienaWaveserverInterfacesPostDataWaveserverInterfacesRoutesHandler: ciena_waveserver_interfaces.PostDataWaveserverInterfacesRoutesHandlerFunc(func(params ciena_waveserver_interfaces.PostDataWaveserverInterfacesRoutesParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PostDataWaveserverInterfacesRoutes has not yet been implemented") - }), - CienaWaveserverInterfacesPostDataWaveserverInterfacesRoutesIPV4StaticRouteHandler: ciena_waveserver_interfaces.PostDataWaveserverInterfacesRoutesIPV4StaticRouteHandlerFunc(func(params ciena_waveserver_interfaces.PostDataWaveserverInterfacesRoutesIPV4StaticRouteParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PostDataWaveserverInterfacesRoutesIPV4StaticRoute has not yet been implemented") - }), - CienaWaveserverInterfacesPostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopHandler: ciena_waveserver_interfaces.PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopHandlerFunc(func(params ciena_waveserver_interfaces.PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHop has not yet been implemented") - }), - CienaWaveserverInterfacesPutDataWaveserverInterfacesHandler: ciena_waveserver_interfaces.PutDataWaveserverInterfacesHandlerFunc(func(params ciena_waveserver_interfaces.PutDataWaveserverInterfacesParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PutDataWaveserverInterfaces has not yet been implemented") - }), - CienaWaveserverInterfacesPutDataWaveserverInterfacesLogicalInterfaceIndexHandler: ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexHandlerFunc(func(params ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndex has not yet been implemented") - }), - CienaWaveserverInterfacesPutDataWaveserverInterfacesLogicalInterfaceIndexIDHandler: ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexIDHandlerFunc(func(params ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexIDParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexID has not yet been implemented") - }), - CienaWaveserverInterfacesPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler: ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandlerFunc(func(params ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexProperties has not yet been implemented") - }), - CienaWaveserverInterfacesPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler: ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4HandlerFunc(func(params ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Params) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4 has not yet been implemented") - }), - CienaWaveserverInterfacesPutDataWaveserverInterfacesLogicalInterfaceIndexStateHandler: ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexStateHandlerFunc(func(params ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexStateParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexState has not yet been implemented") - }), - CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNameHandler: ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNameHandlerFunc(func(params ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNameParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceName has not yet been implemented") - }), - CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNameIDHandler: ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNameIDHandlerFunc(func(params ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNameIDParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNameID has not yet been implemented") - }), - CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler: ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandlerFunc(func(params ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNameProperties has not yet been implemented") - }), - CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler: ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandlerFunc(func(params ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet has not yet been implemented") - }), - CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler: ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandlerFunc(func(params ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement has not yet been implemented") - }), - CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNameStateHandler: ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNameStateHandlerFunc(func(params ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNameStateParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNameState has not yet been implemented") - }), - CienaWaveserverInterfacesPutDataWaveserverInterfacesRoutesHandler: ciena_waveserver_interfaces.PutDataWaveserverInterfacesRoutesHandlerFunc(func(params ciena_waveserver_interfaces.PutDataWaveserverInterfacesRoutesParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PutDataWaveserverInterfacesRoutes has not yet been implemented") - }), - CienaWaveserverInterfacesPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler: ciena_waveserver_interfaces.PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandlerFunc(func(params ciena_waveserver_interfaces.PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestination has not yet been implemented") - }), - CienaWaveserverInterfacesPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler: ciena_waveserver_interfaces.PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandlerFunc(func(params ciena_waveserver_interfaces.PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexParams) middleware.Responder { - return middleware.NotImplemented("operation ciena_waveserver_interfaces.PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndex has not yet been implemented") - }), - } -} - -/*CocsnAPI This module defines Ethernet and IP management interfaces support for - Ciena's Waveserver Platform. */ -type CocsnAPI struct { - spec *loads.Document - context *middleware.Context - handlers map[string]map[string]http.Handler - formats strfmt.Registry - customConsumers map[string]runtime.Consumer - customProducers map[string]runtime.Producer - defaultConsumes string - defaultProduces string - Middleware func(middleware.Builder) http.Handler - useSwaggerUI bool - - // BasicAuthenticator generates a runtime.Authenticator from the supplied basic auth function. - // It has a default implementation in the security package, however you can replace it for your particular usage. - BasicAuthenticator func(security.UserPassAuthentication) runtime.Authenticator - // APIKeyAuthenticator generates a runtime.Authenticator from the supplied token auth function. - // It has a default implementation in the security package, however you can replace it for your particular usage. - APIKeyAuthenticator func(string, string, security.TokenAuthentication) runtime.Authenticator - // BearerAuthenticator generates a runtime.Authenticator from the supplied bearer token auth function. - // It has a default implementation in the security package, however you can replace it for your particular usage. - BearerAuthenticator func(string, security.ScopedTokenAuthentication) runtime.Authenticator - - // JSONConsumer registers a consumer for the following mime types: - // - application/yang-data+json - JSONConsumer runtime.Consumer - - // JSONProducer registers a producer for the following mime types: - // - application/yang-data+json - JSONProducer runtime.Producer - - // CienaWaveserverInterfacesDeleteDataWaveserverInterfacesHandler sets the operation handler for the delete data waveserver interfaces operation - CienaWaveserverInterfacesDeleteDataWaveserverInterfacesHandler ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesHandler - // CienaWaveserverInterfacesDeleteDataWaveserverInterfacesLogicalInterfaceIndexHandler sets the operation handler for the delete data waveserver interfaces logical interface index operation - CienaWaveserverInterfacesDeleteDataWaveserverInterfacesLogicalInterfaceIndexHandler ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexHandler - // CienaWaveserverInterfacesDeleteDataWaveserverInterfacesLogicalInterfaceIndexIDHandler sets the operation handler for the delete data waveserver interfaces logical interface index ID operation - CienaWaveserverInterfacesDeleteDataWaveserverInterfacesLogicalInterfaceIndexIDHandler ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDHandler - // CienaWaveserverInterfacesDeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler sets the operation handler for the delete data waveserver interfaces logical interface index properties operation - CienaWaveserverInterfacesDeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler - // CienaWaveserverInterfacesDeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler sets the operation handler for the delete data waveserver interfaces logical interface index properties IP v4 operation - CienaWaveserverInterfacesDeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler - // CienaWaveserverInterfacesDeleteDataWaveserverInterfacesLogicalInterfaceIndexStateHandler sets the operation handler for the delete data waveserver interfaces logical interface index state operation - CienaWaveserverInterfacesDeleteDataWaveserverInterfacesLogicalInterfaceIndexStateHandler ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateHandler - // CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNameHandler sets the operation handler for the delete data waveserver interfaces physical interface name operation - CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNameHandler ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNameHandler - // CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNameIDHandler sets the operation handler for the delete data waveserver interfaces physical interface name ID operation - CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNameIDHandler ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDHandler - // CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler sets the operation handler for the delete data waveserver interfaces physical interface name properties operation - CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler - // CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler sets the operation handler for the delete data waveserver interfaces physical interface name properties ethernet operation - CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler - // CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler sets the operation handler for the delete data waveserver interfaces physical interface name properties management operation - CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler - // CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNameStateHandler sets the operation handler for the delete data waveserver interfaces physical interface name state operation - CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNameStateHandler ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateHandler - // CienaWaveserverInterfacesDeleteDataWaveserverInterfacesRoutesHandler sets the operation handler for the delete data waveserver interfaces routes operation - CienaWaveserverInterfacesDeleteDataWaveserverInterfacesRoutesHandler ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesRoutesHandler - // CienaWaveserverInterfacesDeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler sets the operation handler for the delete data waveserver interfaces routes IP v4 static route destination operation - CienaWaveserverInterfacesDeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler - // CienaWaveserverInterfacesDeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler sets the operation handler for the delete data waveserver interfaces routes IP v4 static route destination next hop index operation - CienaWaveserverInterfacesDeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler - // CienaWaveserverInterfacesGetDataWaveserverInterfacesHandler sets the operation handler for the get data waveserver interfaces operation - CienaWaveserverInterfacesGetDataWaveserverInterfacesHandler ciena_waveserver_interfaces.GetDataWaveserverInterfacesHandler - // CienaWaveserverInterfacesGetDataWaveserverInterfacesLogicalInterfaceIndexHandler sets the operation handler for the get data waveserver interfaces logical interface index operation - CienaWaveserverInterfacesGetDataWaveserverInterfacesLogicalInterfaceIndexHandler ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexHandler - // CienaWaveserverInterfacesGetDataWaveserverInterfacesLogicalInterfaceIndexIDHandler sets the operation handler for the get data waveserver interfaces logical interface index ID operation - CienaWaveserverInterfacesGetDataWaveserverInterfacesLogicalInterfaceIndexIDHandler ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexIDHandler - // CienaWaveserverInterfacesGetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler sets the operation handler for the get data waveserver interfaces logical interface index properties operation - CienaWaveserverInterfacesGetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler - // CienaWaveserverInterfacesGetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler sets the operation handler for the get data waveserver interfaces logical interface index properties IP v4 operation - CienaWaveserverInterfacesGetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler - // CienaWaveserverInterfacesGetDataWaveserverInterfacesLogicalInterfaceIndexStateHandler sets the operation handler for the get data waveserver interfaces logical interface index state operation - CienaWaveserverInterfacesGetDataWaveserverInterfacesLogicalInterfaceIndexStateHandler ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexStateHandler - // CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNameHandler sets the operation handler for the get data waveserver interfaces physical interface name operation - CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNameHandler ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNameHandler - // CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNameIDHandler sets the operation handler for the get data waveserver interfaces physical interface name ID operation - CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNameIDHandler ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNameIDHandler - // CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler sets the operation handler for the get data waveserver interfaces physical interface name properties operation - CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler - // CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler sets the operation handler for the get data waveserver interfaces physical interface name properties ethernet operation - CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler - // CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler sets the operation handler for the get data waveserver interfaces physical interface name properties management operation - CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler - // CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNameStateHandler sets the operation handler for the get data waveserver interfaces physical interface name state operation - CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNameStateHandler ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNameStateHandler - // CienaWaveserverInterfacesGetDataWaveserverInterfacesRoutesHandler sets the operation handler for the get data waveserver interfaces routes operation - CienaWaveserverInterfacesGetDataWaveserverInterfacesRoutesHandler ciena_waveserver_interfaces.GetDataWaveserverInterfacesRoutesHandler - // CienaWaveserverInterfacesGetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler sets the operation handler for the get data waveserver interfaces routes IP v4 static route destination operation - CienaWaveserverInterfacesGetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler ciena_waveserver_interfaces.GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler - // CienaWaveserverInterfacesGetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler sets the operation handler for the get data waveserver interfaces routes IP v4 static route destination next hop index operation - CienaWaveserverInterfacesGetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler ciena_waveserver_interfaces.GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler - // CienaWaveserverInterfacesPostDataWaveserverInterfacesHandler sets the operation handler for the post data waveserver interfaces operation - CienaWaveserverInterfacesPostDataWaveserverInterfacesHandler ciena_waveserver_interfaces.PostDataWaveserverInterfacesHandler - // CienaWaveserverInterfacesPostDataWaveserverInterfacesLogicalInterfaceHandler sets the operation handler for the post data waveserver interfaces logical interface operation - CienaWaveserverInterfacesPostDataWaveserverInterfacesLogicalInterfaceHandler ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceHandler - // CienaWaveserverInterfacesPostDataWaveserverInterfacesLogicalInterfaceIndexIDHandler sets the operation handler for the post data waveserver interfaces logical interface index ID operation - CienaWaveserverInterfacesPostDataWaveserverInterfacesLogicalInterfaceIndexIDHandler ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceIndexIDHandler - // CienaWaveserverInterfacesPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler sets the operation handler for the post data waveserver interfaces logical interface index properties operation - CienaWaveserverInterfacesPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler - // CienaWaveserverInterfacesPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler sets the operation handler for the post data waveserver interfaces logical interface index properties IP v4 operation - CienaWaveserverInterfacesPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler - // CienaWaveserverInterfacesPostDataWaveserverInterfacesLogicalInterfaceIndexStateHandler sets the operation handler for the post data waveserver interfaces logical interface index state operation - CienaWaveserverInterfacesPostDataWaveserverInterfacesLogicalInterfaceIndexStateHandler ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceIndexStateHandler - // CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceHandler sets the operation handler for the post data waveserver interfaces physical interface operation - CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceHandler ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceHandler - // CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceNameIDHandler sets the operation handler for the post data waveserver interfaces physical interface name ID operation - CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceNameIDHandler ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNameIDHandler - // CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler sets the operation handler for the post data waveserver interfaces physical interface name properties operation - CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler - // CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler sets the operation handler for the post data waveserver interfaces physical interface name properties ethernet operation - CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler - // CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler sets the operation handler for the post data waveserver interfaces physical interface name properties management operation - CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler - // CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceNameStateHandler sets the operation handler for the post data waveserver interfaces physical interface name state operation - CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceNameStateHandler ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNameStateHandler - // CienaWaveserverInterfacesPostDataWaveserverInterfacesRoutesHandler sets the operation handler for the post data waveserver interfaces routes operation - CienaWaveserverInterfacesPostDataWaveserverInterfacesRoutesHandler ciena_waveserver_interfaces.PostDataWaveserverInterfacesRoutesHandler - // CienaWaveserverInterfacesPostDataWaveserverInterfacesRoutesIPV4StaticRouteHandler sets the operation handler for the post data waveserver interfaces routes IP v4 static route operation - CienaWaveserverInterfacesPostDataWaveserverInterfacesRoutesIPV4StaticRouteHandler ciena_waveserver_interfaces.PostDataWaveserverInterfacesRoutesIPV4StaticRouteHandler - // CienaWaveserverInterfacesPostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopHandler sets the operation handler for the post data waveserver interfaces routes IP v4 static route destination next hop operation - CienaWaveserverInterfacesPostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopHandler ciena_waveserver_interfaces.PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopHandler - // CienaWaveserverInterfacesPutDataWaveserverInterfacesHandler sets the operation handler for the put data waveserver interfaces operation - CienaWaveserverInterfacesPutDataWaveserverInterfacesHandler ciena_waveserver_interfaces.PutDataWaveserverInterfacesHandler - // CienaWaveserverInterfacesPutDataWaveserverInterfacesLogicalInterfaceIndexHandler sets the operation handler for the put data waveserver interfaces logical interface index operation - CienaWaveserverInterfacesPutDataWaveserverInterfacesLogicalInterfaceIndexHandler ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexHandler - // CienaWaveserverInterfacesPutDataWaveserverInterfacesLogicalInterfaceIndexIDHandler sets the operation handler for the put data waveserver interfaces logical interface index ID operation - CienaWaveserverInterfacesPutDataWaveserverInterfacesLogicalInterfaceIndexIDHandler ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexIDHandler - // CienaWaveserverInterfacesPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler sets the operation handler for the put data waveserver interfaces logical interface index properties operation - CienaWaveserverInterfacesPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler - // CienaWaveserverInterfacesPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler sets the operation handler for the put data waveserver interfaces logical interface index properties IP v4 operation - CienaWaveserverInterfacesPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler - // CienaWaveserverInterfacesPutDataWaveserverInterfacesLogicalInterfaceIndexStateHandler sets the operation handler for the put data waveserver interfaces logical interface index state operation - CienaWaveserverInterfacesPutDataWaveserverInterfacesLogicalInterfaceIndexStateHandler ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexStateHandler - // CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNameHandler sets the operation handler for the put data waveserver interfaces physical interface name operation - CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNameHandler ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNameHandler - // CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNameIDHandler sets the operation handler for the put data waveserver interfaces physical interface name ID operation - CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNameIDHandler ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNameIDHandler - // CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler sets the operation handler for the put data waveserver interfaces physical interface name properties operation - CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler - // CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler sets the operation handler for the put data waveserver interfaces physical interface name properties ethernet operation - CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler - // CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler sets the operation handler for the put data waveserver interfaces physical interface name properties management operation - CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler - // CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNameStateHandler sets the operation handler for the put data waveserver interfaces physical interface name state operation - CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNameStateHandler ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNameStateHandler - // CienaWaveserverInterfacesPutDataWaveserverInterfacesRoutesHandler sets the operation handler for the put data waveserver interfaces routes operation - CienaWaveserverInterfacesPutDataWaveserverInterfacesRoutesHandler ciena_waveserver_interfaces.PutDataWaveserverInterfacesRoutesHandler - // CienaWaveserverInterfacesPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler sets the operation handler for the put data waveserver interfaces routes IP v4 static route destination operation - CienaWaveserverInterfacesPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler ciena_waveserver_interfaces.PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler - // CienaWaveserverInterfacesPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler sets the operation handler for the put data waveserver interfaces routes IP v4 static route destination next hop index operation - CienaWaveserverInterfacesPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler ciena_waveserver_interfaces.PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler - // ServeError is called when an error is received, there is a default handler - // but you can set your own with this - ServeError func(http.ResponseWriter, *http.Request, error) - - // PreServerShutdown is called before the HTTP(S) server is shutdown - // This allows for custom functions to get executed before the HTTP(S) server stops accepting traffic - PreServerShutdown func() - - // ServerShutdown is called when the HTTP(S) server is shut down and done - // handling all active connections and does not accept connections any more - ServerShutdown func() - - // Custom command line argument groups with their descriptions - CommandLineOptionsGroups []swag.CommandLineOptionsGroup - - // User defined logger function. - Logger func(string, ...interface{}) -} - -// UseRedoc for documentation at /docs -func (o *CocsnAPI) UseRedoc() { - o.useSwaggerUI = false -} - -// UseSwaggerUI for documentation at /docs -func (o *CocsnAPI) UseSwaggerUI() { - o.useSwaggerUI = true -} - -// SetDefaultProduces sets the default produces media type -func (o *CocsnAPI) SetDefaultProduces(mediaType string) { - o.defaultProduces = mediaType -} - -// SetDefaultConsumes returns the default consumes media type -func (o *CocsnAPI) SetDefaultConsumes(mediaType string) { - o.defaultConsumes = mediaType -} - -// SetSpec sets a spec that will be served for the clients. -func (o *CocsnAPI) SetSpec(spec *loads.Document) { - o.spec = spec -} - -// DefaultProduces returns the default produces media type -func (o *CocsnAPI) DefaultProduces() string { - return o.defaultProduces -} - -// DefaultConsumes returns the default consumes media type -func (o *CocsnAPI) DefaultConsumes() string { - return o.defaultConsumes -} - -// Formats returns the registered string formats -func (o *CocsnAPI) Formats() strfmt.Registry { - return o.formats -} - -// RegisterFormat registers a custom format validator -func (o *CocsnAPI) RegisterFormat(name string, format strfmt.Format, validator strfmt.Validator) { - o.formats.Add(name, format, validator) -} - -// Validate validates the registrations in the CocsnAPI -func (o *CocsnAPI) Validate() error { - var unregistered []string - - if o.JSONConsumer == nil { - unregistered = append(unregistered, "JSONConsumer") - } - - if o.JSONProducer == nil { - unregistered = append(unregistered, "JSONProducer") - } - - if o.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesHandler") - } - if o.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesLogicalInterfaceIndexHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexHandler") - } - if o.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesLogicalInterfaceIndexIDHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexIDHandler") - } - if o.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler") - } - if o.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler") - } - if o.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesLogicalInterfaceIndexStateHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesLogicalInterfaceIndexStateHandler") - } - if o.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNameHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNameHandler") - } - if o.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNameIDHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNameIDHandler") - } - if o.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler") - } - if o.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler") - } - if o.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler") - } - if o.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNameStateHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesPhysicalInterfaceNameStateHandler") - } - if o.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesRoutesHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesRoutesHandler") - } - if o.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler") - } - if o.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.DeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler") - } - if o.CienaWaveserverInterfacesGetDataWaveserverInterfacesHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.GetDataWaveserverInterfacesHandler") - } - if o.CienaWaveserverInterfacesGetDataWaveserverInterfacesLogicalInterfaceIndexHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexHandler") - } - if o.CienaWaveserverInterfacesGetDataWaveserverInterfacesLogicalInterfaceIndexIDHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexIDHandler") - } - if o.CienaWaveserverInterfacesGetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler") - } - if o.CienaWaveserverInterfacesGetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler") - } - if o.CienaWaveserverInterfacesGetDataWaveserverInterfacesLogicalInterfaceIndexStateHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.GetDataWaveserverInterfacesLogicalInterfaceIndexStateHandler") - } - if o.CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNameHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNameHandler") - } - if o.CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNameIDHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNameIDHandler") - } - if o.CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler") - } - if o.CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler") - } - if o.CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler") - } - if o.CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNameStateHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.GetDataWaveserverInterfacesPhysicalInterfaceNameStateHandler") - } - if o.CienaWaveserverInterfacesGetDataWaveserverInterfacesRoutesHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.GetDataWaveserverInterfacesRoutesHandler") - } - if o.CienaWaveserverInterfacesGetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler") - } - if o.CienaWaveserverInterfacesGetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.GetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler") - } - if o.CienaWaveserverInterfacesPostDataWaveserverInterfacesHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.PostDataWaveserverInterfacesHandler") - } - if o.CienaWaveserverInterfacesPostDataWaveserverInterfacesLogicalInterfaceHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceHandler") - } - if o.CienaWaveserverInterfacesPostDataWaveserverInterfacesLogicalInterfaceIndexIDHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceIndexIDHandler") - } - if o.CienaWaveserverInterfacesPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler") - } - if o.CienaWaveserverInterfacesPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler") - } - if o.CienaWaveserverInterfacesPostDataWaveserverInterfacesLogicalInterfaceIndexStateHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.PostDataWaveserverInterfacesLogicalInterfaceIndexStateHandler") - } - if o.CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceHandler") - } - if o.CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceNameIDHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNameIDHandler") - } - if o.CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler") - } - if o.CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler") - } - if o.CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler") - } - if o.CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceNameStateHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.PostDataWaveserverInterfacesPhysicalInterfaceNameStateHandler") - } - if o.CienaWaveserverInterfacesPostDataWaveserverInterfacesRoutesHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.PostDataWaveserverInterfacesRoutesHandler") - } - if o.CienaWaveserverInterfacesPostDataWaveserverInterfacesRoutesIPV4StaticRouteHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.PostDataWaveserverInterfacesRoutesIPV4StaticRouteHandler") - } - if o.CienaWaveserverInterfacesPostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.PostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopHandler") - } - if o.CienaWaveserverInterfacesPutDataWaveserverInterfacesHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.PutDataWaveserverInterfacesHandler") - } - if o.CienaWaveserverInterfacesPutDataWaveserverInterfacesLogicalInterfaceIndexHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexHandler") - } - if o.CienaWaveserverInterfacesPutDataWaveserverInterfacesLogicalInterfaceIndexIDHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexIDHandler") - } - if o.CienaWaveserverInterfacesPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler") - } - if o.CienaWaveserverInterfacesPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler") - } - if o.CienaWaveserverInterfacesPutDataWaveserverInterfacesLogicalInterfaceIndexStateHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.PutDataWaveserverInterfacesLogicalInterfaceIndexStateHandler") - } - if o.CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNameHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNameHandler") - } - if o.CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNameIDHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNameIDHandler") - } - if o.CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler") - } - if o.CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler") - } - if o.CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler") - } - if o.CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNameStateHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.PutDataWaveserverInterfacesPhysicalInterfaceNameStateHandler") - } - if o.CienaWaveserverInterfacesPutDataWaveserverInterfacesRoutesHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.PutDataWaveserverInterfacesRoutesHandler") - } - if o.CienaWaveserverInterfacesPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler") - } - if o.CienaWaveserverInterfacesPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler == nil { - unregistered = append(unregistered, "ciena_waveserver_interfaces.PutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler") - } - - if len(unregistered) > 0 { - return fmt.Errorf("missing registration: %s", strings.Join(unregistered, ", ")) - } - - return nil -} - -// ServeErrorFor gets a error handler for a given operation id -func (o *CocsnAPI) ServeErrorFor(operationID string) func(http.ResponseWriter, *http.Request, error) { - return o.ServeError -} - -// AuthenticatorsFor gets the authenticators for the specified security schemes -func (o *CocsnAPI) AuthenticatorsFor(schemes map[string]spec.SecurityScheme) map[string]runtime.Authenticator { - return nil -} - -// Authorizer returns the registered authorizer -func (o *CocsnAPI) Authorizer() runtime.Authorizer { - return nil -} - -// ConsumersFor gets the consumers for the specified media types. -// MIME type parameters are ignored here. -func (o *CocsnAPI) ConsumersFor(mediaTypes []string) map[string]runtime.Consumer { - result := make(map[string]runtime.Consumer, len(mediaTypes)) - for _, mt := range mediaTypes { - switch mt { - case "application/yang-data+json": - result["application/yang-data+json"] = o.JSONConsumer - } - - if c, ok := o.customConsumers[mt]; ok { - result[mt] = c - } - } - return result -} - -// ProducersFor gets the producers for the specified media types. -// MIME type parameters are ignored here. -func (o *CocsnAPI) ProducersFor(mediaTypes []string) map[string]runtime.Producer { - result := make(map[string]runtime.Producer, len(mediaTypes)) - for _, mt := range mediaTypes { - switch mt { - case "application/yang-data+json": - result["application/yang-data+json"] = o.JSONProducer - } - - if p, ok := o.customProducers[mt]; ok { - result[mt] = p - } - } - return result -} - -// HandlerFor gets a http.Handler for the provided operation method and path -func (o *CocsnAPI) HandlerFor(method, path string) (http.Handler, bool) { - if o.handlers == nil { - return nil, false - } - um := strings.ToUpper(method) - if _, ok := o.handlers[um]; !ok { - return nil, false - } - if path == "/" { - path = "" - } - h, ok := o.handlers[um][path] - return h, ok -} - -// Context returns the middleware context for the cocsn API -func (o *CocsnAPI) Context() *middleware.Context { - if o.context == nil { - o.context = middleware.NewRoutableContext(o.spec, o, nil) - } - - return o.context -} - -func (o *CocsnAPI) initHandlerCache() { - o.Context() // don't care about the result, just that the initialization happened - if o.handlers == nil { - o.handlers = make(map[string]map[string]http.Handler) - } - - if o.handlers["DELETE"] == nil { - o.handlers["DELETE"] = make(map[string]http.Handler) - } - o.handlers["DELETE"]["/data/waveserver-interfaces"] = ciena_waveserver_interfaces.NewDeleteDataWaveserverInterfaces(o.context, o.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesHandler) - if o.handlers["DELETE"] == nil { - o.handlers["DELETE"] = make(map[string]http.Handler) - } - o.handlers["DELETE"]["/data/waveserver-interfaces/logical-interface={index}"] = ciena_waveserver_interfaces.NewDeleteDataWaveserverInterfacesLogicalInterfaceIndex(o.context, o.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesLogicalInterfaceIndexHandler) - if o.handlers["DELETE"] == nil { - o.handlers["DELETE"] = make(map[string]http.Handler) - } - o.handlers["DELETE"]["/data/waveserver-interfaces/logical-interface={index}/id"] = ciena_waveserver_interfaces.NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexID(o.context, o.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesLogicalInterfaceIndexIDHandler) - if o.handlers["DELETE"] == nil { - o.handlers["DELETE"] = make(map[string]http.Handler) - } - o.handlers["DELETE"]["/data/waveserver-interfaces/logical-interface={index}/properties"] = ciena_waveserver_interfaces.NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexProperties(o.context, o.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler) - if o.handlers["DELETE"] == nil { - o.handlers["DELETE"] = make(map[string]http.Handler) - } - o.handlers["DELETE"]["/data/waveserver-interfaces/logical-interface={index}/properties/ipv4"] = ciena_waveserver_interfaces.NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4(o.context, o.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler) - if o.handlers["DELETE"] == nil { - o.handlers["DELETE"] = make(map[string]http.Handler) - } - o.handlers["DELETE"]["/data/waveserver-interfaces/logical-interface={index}/state"] = ciena_waveserver_interfaces.NewDeleteDataWaveserverInterfacesLogicalInterfaceIndexState(o.context, o.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesLogicalInterfaceIndexStateHandler) - if o.handlers["DELETE"] == nil { - o.handlers["DELETE"] = make(map[string]http.Handler) - } - o.handlers["DELETE"]["/data/waveserver-interfaces/physical-interface={name}"] = ciena_waveserver_interfaces.NewDeleteDataWaveserverInterfacesPhysicalInterfaceName(o.context, o.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNameHandler) - if o.handlers["DELETE"] == nil { - o.handlers["DELETE"] = make(map[string]http.Handler) - } - o.handlers["DELETE"]["/data/waveserver-interfaces/physical-interface={name}/id"] = ciena_waveserver_interfaces.NewDeleteDataWaveserverInterfacesPhysicalInterfaceNameID(o.context, o.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNameIDHandler) - if o.handlers["DELETE"] == nil { - o.handlers["DELETE"] = make(map[string]http.Handler) - } - o.handlers["DELETE"]["/data/waveserver-interfaces/physical-interface={name}/properties"] = ciena_waveserver_interfaces.NewDeleteDataWaveserverInterfacesPhysicalInterfaceNameProperties(o.context, o.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler) - if o.handlers["DELETE"] == nil { - o.handlers["DELETE"] = make(map[string]http.Handler) - } - o.handlers["DELETE"]["/data/waveserver-interfaces/physical-interface={name}/properties/ethernet"] = ciena_waveserver_interfaces.NewDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet(o.context, o.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler) - if o.handlers["DELETE"] == nil { - o.handlers["DELETE"] = make(map[string]http.Handler) - } - o.handlers["DELETE"]["/data/waveserver-interfaces/physical-interface={name}/properties/management"] = ciena_waveserver_interfaces.NewDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement(o.context, o.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler) - if o.handlers["DELETE"] == nil { - o.handlers["DELETE"] = make(map[string]http.Handler) - } - o.handlers["DELETE"]["/data/waveserver-interfaces/physical-interface={name}/state"] = ciena_waveserver_interfaces.NewDeleteDataWaveserverInterfacesPhysicalInterfaceNameState(o.context, o.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesPhysicalInterfaceNameStateHandler) - if o.handlers["DELETE"] == nil { - o.handlers["DELETE"] = make(map[string]http.Handler) - } - o.handlers["DELETE"]["/data/waveserver-interfaces/routes"] = ciena_waveserver_interfaces.NewDeleteDataWaveserverInterfacesRoutes(o.context, o.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesRoutesHandler) - if o.handlers["DELETE"] == nil { - o.handlers["DELETE"] = make(map[string]http.Handler) - } - o.handlers["DELETE"]["/data/waveserver-interfaces/routes/ipv4-static-route={destination}"] = ciena_waveserver_interfaces.NewDeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestination(o.context, o.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler) - if o.handlers["DELETE"] == nil { - o.handlers["DELETE"] = make(map[string]http.Handler) - } - o.handlers["DELETE"]["/data/waveserver-interfaces/routes/ipv4-static-route={destination}/next-hop={index}"] = ciena_waveserver_interfaces.NewDeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndex(o.context, o.CienaWaveserverInterfacesDeleteDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data/waveserver-interfaces"] = ciena_waveserver_interfaces.NewGetDataWaveserverInterfaces(o.context, o.CienaWaveserverInterfacesGetDataWaveserverInterfacesHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data/waveserver-interfaces/logical-interface={index}"] = ciena_waveserver_interfaces.NewGetDataWaveserverInterfacesLogicalInterfaceIndex(o.context, o.CienaWaveserverInterfacesGetDataWaveserverInterfacesLogicalInterfaceIndexHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data/waveserver-interfaces/logical-interface={index}/id"] = ciena_waveserver_interfaces.NewGetDataWaveserverInterfacesLogicalInterfaceIndexID(o.context, o.CienaWaveserverInterfacesGetDataWaveserverInterfacesLogicalInterfaceIndexIDHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data/waveserver-interfaces/logical-interface={index}/properties"] = ciena_waveserver_interfaces.NewGetDataWaveserverInterfacesLogicalInterfaceIndexProperties(o.context, o.CienaWaveserverInterfacesGetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data/waveserver-interfaces/logical-interface={index}/properties/ipv4"] = ciena_waveserver_interfaces.NewGetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4(o.context, o.CienaWaveserverInterfacesGetDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data/waveserver-interfaces/logical-interface={index}/state"] = ciena_waveserver_interfaces.NewGetDataWaveserverInterfacesLogicalInterfaceIndexState(o.context, o.CienaWaveserverInterfacesGetDataWaveserverInterfacesLogicalInterfaceIndexStateHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data/waveserver-interfaces/physical-interface={name}"] = ciena_waveserver_interfaces.NewGetDataWaveserverInterfacesPhysicalInterfaceName(o.context, o.CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNameHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data/waveserver-interfaces/physical-interface={name}/id"] = ciena_waveserver_interfaces.NewGetDataWaveserverInterfacesPhysicalInterfaceNameID(o.context, o.CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNameIDHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data/waveserver-interfaces/physical-interface={name}/properties"] = ciena_waveserver_interfaces.NewGetDataWaveserverInterfacesPhysicalInterfaceNameProperties(o.context, o.CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data/waveserver-interfaces/physical-interface={name}/properties/ethernet"] = ciena_waveserver_interfaces.NewGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet(o.context, o.CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data/waveserver-interfaces/physical-interface={name}/properties/management"] = ciena_waveserver_interfaces.NewGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement(o.context, o.CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data/waveserver-interfaces/physical-interface={name}/state"] = ciena_waveserver_interfaces.NewGetDataWaveserverInterfacesPhysicalInterfaceNameState(o.context, o.CienaWaveserverInterfacesGetDataWaveserverInterfacesPhysicalInterfaceNameStateHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data/waveserver-interfaces/routes"] = ciena_waveserver_interfaces.NewGetDataWaveserverInterfacesRoutes(o.context, o.CienaWaveserverInterfacesGetDataWaveserverInterfacesRoutesHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data/waveserver-interfaces/routes/ipv4-static-route={destination}"] = ciena_waveserver_interfaces.NewGetDataWaveserverInterfacesRoutesIPV4StaticRouteDestination(o.context, o.CienaWaveserverInterfacesGetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler) - if o.handlers["GET"] == nil { - o.handlers["GET"] = make(map[string]http.Handler) - } - o.handlers["GET"]["/data/waveserver-interfaces/routes/ipv4-static-route={destination}/next-hop={index}"] = ciena_waveserver_interfaces.NewGetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndex(o.context, o.CienaWaveserverInterfacesGetDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler) - if o.handlers["POST"] == nil { - o.handlers["POST"] = make(map[string]http.Handler) - } - o.handlers["POST"]["/data/waveserver-interfaces"] = ciena_waveserver_interfaces.NewPostDataWaveserverInterfaces(o.context, o.CienaWaveserverInterfacesPostDataWaveserverInterfacesHandler) - if o.handlers["POST"] == nil { - o.handlers["POST"] = make(map[string]http.Handler) - } - o.handlers["POST"]["/data/waveserver-interfaces/logical-interface"] = ciena_waveserver_interfaces.NewPostDataWaveserverInterfacesLogicalInterface(o.context, o.CienaWaveserverInterfacesPostDataWaveserverInterfacesLogicalInterfaceHandler) - if o.handlers["POST"] == nil { - o.handlers["POST"] = make(map[string]http.Handler) - } - o.handlers["POST"]["/data/waveserver-interfaces/logical-interface={index}/id"] = ciena_waveserver_interfaces.NewPostDataWaveserverInterfacesLogicalInterfaceIndexID(o.context, o.CienaWaveserverInterfacesPostDataWaveserverInterfacesLogicalInterfaceIndexIDHandler) - if o.handlers["POST"] == nil { - o.handlers["POST"] = make(map[string]http.Handler) - } - o.handlers["POST"]["/data/waveserver-interfaces/logical-interface={index}/properties"] = ciena_waveserver_interfaces.NewPostDataWaveserverInterfacesLogicalInterfaceIndexProperties(o.context, o.CienaWaveserverInterfacesPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler) - if o.handlers["POST"] == nil { - o.handlers["POST"] = make(map[string]http.Handler) - } - o.handlers["POST"]["/data/waveserver-interfaces/logical-interface={index}/properties/ipv4"] = ciena_waveserver_interfaces.NewPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4(o.context, o.CienaWaveserverInterfacesPostDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler) - if o.handlers["POST"] == nil { - o.handlers["POST"] = make(map[string]http.Handler) - } - o.handlers["POST"]["/data/waveserver-interfaces/logical-interface={index}/state"] = ciena_waveserver_interfaces.NewPostDataWaveserverInterfacesLogicalInterfaceIndexState(o.context, o.CienaWaveserverInterfacesPostDataWaveserverInterfacesLogicalInterfaceIndexStateHandler) - if o.handlers["POST"] == nil { - o.handlers["POST"] = make(map[string]http.Handler) - } - o.handlers["POST"]["/data/waveserver-interfaces/physical-interface"] = ciena_waveserver_interfaces.NewPostDataWaveserverInterfacesPhysicalInterface(o.context, o.CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceHandler) - if o.handlers["POST"] == nil { - o.handlers["POST"] = make(map[string]http.Handler) - } - o.handlers["POST"]["/data/waveserver-interfaces/physical-interface={name}/id"] = ciena_waveserver_interfaces.NewPostDataWaveserverInterfacesPhysicalInterfaceNameID(o.context, o.CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceNameIDHandler) - if o.handlers["POST"] == nil { - o.handlers["POST"] = make(map[string]http.Handler) - } - o.handlers["POST"]["/data/waveserver-interfaces/physical-interface={name}/properties"] = ciena_waveserver_interfaces.NewPostDataWaveserverInterfacesPhysicalInterfaceNameProperties(o.context, o.CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler) - if o.handlers["POST"] == nil { - o.handlers["POST"] = make(map[string]http.Handler) - } - o.handlers["POST"]["/data/waveserver-interfaces/physical-interface={name}/properties/ethernet"] = ciena_waveserver_interfaces.NewPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet(o.context, o.CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler) - if o.handlers["POST"] == nil { - o.handlers["POST"] = make(map[string]http.Handler) - } - o.handlers["POST"]["/data/waveserver-interfaces/physical-interface={name}/properties/management"] = ciena_waveserver_interfaces.NewPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement(o.context, o.CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler) - if o.handlers["POST"] == nil { - o.handlers["POST"] = make(map[string]http.Handler) - } - o.handlers["POST"]["/data/waveserver-interfaces/physical-interface={name}/state"] = ciena_waveserver_interfaces.NewPostDataWaveserverInterfacesPhysicalInterfaceNameState(o.context, o.CienaWaveserverInterfacesPostDataWaveserverInterfacesPhysicalInterfaceNameStateHandler) - if o.handlers["POST"] == nil { - o.handlers["POST"] = make(map[string]http.Handler) - } - o.handlers["POST"]["/data/waveserver-interfaces/routes"] = ciena_waveserver_interfaces.NewPostDataWaveserverInterfacesRoutes(o.context, o.CienaWaveserverInterfacesPostDataWaveserverInterfacesRoutesHandler) - if o.handlers["POST"] == nil { - o.handlers["POST"] = make(map[string]http.Handler) - } - o.handlers["POST"]["/data/waveserver-interfaces/routes/ipv4-static-route"] = ciena_waveserver_interfaces.NewPostDataWaveserverInterfacesRoutesIPV4StaticRoute(o.context, o.CienaWaveserverInterfacesPostDataWaveserverInterfacesRoutesIPV4StaticRouteHandler) - if o.handlers["POST"] == nil { - o.handlers["POST"] = make(map[string]http.Handler) - } - o.handlers["POST"]["/data/waveserver-interfaces/routes/ipv4-static-route={destination}/next-hop"] = ciena_waveserver_interfaces.NewPostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHop(o.context, o.CienaWaveserverInterfacesPostDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopHandler) - if o.handlers["PUT"] == nil { - o.handlers["PUT"] = make(map[string]http.Handler) - } - o.handlers["PUT"]["/data/waveserver-interfaces"] = ciena_waveserver_interfaces.NewPutDataWaveserverInterfaces(o.context, o.CienaWaveserverInterfacesPutDataWaveserverInterfacesHandler) - if o.handlers["PUT"] == nil { - o.handlers["PUT"] = make(map[string]http.Handler) - } - o.handlers["PUT"]["/data/waveserver-interfaces/logical-interface={index}"] = ciena_waveserver_interfaces.NewPutDataWaveserverInterfacesLogicalInterfaceIndex(o.context, o.CienaWaveserverInterfacesPutDataWaveserverInterfacesLogicalInterfaceIndexHandler) - if o.handlers["PUT"] == nil { - o.handlers["PUT"] = make(map[string]http.Handler) - } - o.handlers["PUT"]["/data/waveserver-interfaces/logical-interface={index}/id"] = ciena_waveserver_interfaces.NewPutDataWaveserverInterfacesLogicalInterfaceIndexID(o.context, o.CienaWaveserverInterfacesPutDataWaveserverInterfacesLogicalInterfaceIndexIDHandler) - if o.handlers["PUT"] == nil { - o.handlers["PUT"] = make(map[string]http.Handler) - } - o.handlers["PUT"]["/data/waveserver-interfaces/logical-interface={index}/properties"] = ciena_waveserver_interfaces.NewPutDataWaveserverInterfacesLogicalInterfaceIndexProperties(o.context, o.CienaWaveserverInterfacesPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesHandler) - if o.handlers["PUT"] == nil { - o.handlers["PUT"] = make(map[string]http.Handler) - } - o.handlers["PUT"]["/data/waveserver-interfaces/logical-interface={index}/properties/ipv4"] = ciena_waveserver_interfaces.NewPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4(o.context, o.CienaWaveserverInterfacesPutDataWaveserverInterfacesLogicalInterfaceIndexPropertiesIPV4Handler) - if o.handlers["PUT"] == nil { - o.handlers["PUT"] = make(map[string]http.Handler) - } - o.handlers["PUT"]["/data/waveserver-interfaces/logical-interface={index}/state"] = ciena_waveserver_interfaces.NewPutDataWaveserverInterfacesLogicalInterfaceIndexState(o.context, o.CienaWaveserverInterfacesPutDataWaveserverInterfacesLogicalInterfaceIndexStateHandler) - if o.handlers["PUT"] == nil { - o.handlers["PUT"] = make(map[string]http.Handler) - } - o.handlers["PUT"]["/data/waveserver-interfaces/physical-interface={name}"] = ciena_waveserver_interfaces.NewPutDataWaveserverInterfacesPhysicalInterfaceName(o.context, o.CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNameHandler) - if o.handlers["PUT"] == nil { - o.handlers["PUT"] = make(map[string]http.Handler) - } - o.handlers["PUT"]["/data/waveserver-interfaces/physical-interface={name}/id"] = ciena_waveserver_interfaces.NewPutDataWaveserverInterfacesPhysicalInterfaceNameID(o.context, o.CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNameIDHandler) - if o.handlers["PUT"] == nil { - o.handlers["PUT"] = make(map[string]http.Handler) - } - o.handlers["PUT"]["/data/waveserver-interfaces/physical-interface={name}/properties"] = ciena_waveserver_interfaces.NewPutDataWaveserverInterfacesPhysicalInterfaceNameProperties(o.context, o.CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesHandler) - if o.handlers["PUT"] == nil { - o.handlers["PUT"] = make(map[string]http.Handler) - } - o.handlers["PUT"]["/data/waveserver-interfaces/physical-interface={name}/properties/ethernet"] = ciena_waveserver_interfaces.NewPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernet(o.context, o.CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesEthernetHandler) - if o.handlers["PUT"] == nil { - o.handlers["PUT"] = make(map[string]http.Handler) - } - o.handlers["PUT"]["/data/waveserver-interfaces/physical-interface={name}/properties/management"] = ciena_waveserver_interfaces.NewPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagement(o.context, o.CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNamePropertiesManagementHandler) - if o.handlers["PUT"] == nil { - o.handlers["PUT"] = make(map[string]http.Handler) - } - o.handlers["PUT"]["/data/waveserver-interfaces/physical-interface={name}/state"] = ciena_waveserver_interfaces.NewPutDataWaveserverInterfacesPhysicalInterfaceNameState(o.context, o.CienaWaveserverInterfacesPutDataWaveserverInterfacesPhysicalInterfaceNameStateHandler) - if o.handlers["PUT"] == nil { - o.handlers["PUT"] = make(map[string]http.Handler) - } - o.handlers["PUT"]["/data/waveserver-interfaces/routes"] = ciena_waveserver_interfaces.NewPutDataWaveserverInterfacesRoutes(o.context, o.CienaWaveserverInterfacesPutDataWaveserverInterfacesRoutesHandler) - if o.handlers["PUT"] == nil { - o.handlers["PUT"] = make(map[string]http.Handler) - } - o.handlers["PUT"]["/data/waveserver-interfaces/routes/ipv4-static-route={destination}"] = ciena_waveserver_interfaces.NewPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestination(o.context, o.CienaWaveserverInterfacesPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationHandler) - if o.handlers["PUT"] == nil { - o.handlers["PUT"] = make(map[string]http.Handler) - } - o.handlers["PUT"]["/data/waveserver-interfaces/routes/ipv4-static-route={destination}/next-hop={index}"] = ciena_waveserver_interfaces.NewPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndex(o.context, o.CienaWaveserverInterfacesPutDataWaveserverInterfacesRoutesIPV4StaticRouteDestinationNextHopIndexHandler) -} - -// Serve creates a http handler to serve the API over HTTP -// can be used directly in http.ListenAndServe(":8000", api.Serve(nil)) -func (o *CocsnAPI) Serve(builder middleware.Builder) http.Handler { - o.Init() - - if o.Middleware != nil { - return o.Middleware(builder) - } - if o.useSwaggerUI { - return o.context.APIHandlerSwaggerUI(builder) - } - return o.context.APIHandler(builder) -} - -// Init allows you to just initialize the handler cache, you can then recompose the middleware as you see fit -func (o *CocsnAPI) Init() { - if len(o.handlers) == 0 { - o.initHandlerCache() - } -} - -// RegisterConsumer allows you to add (or override) a consumer for a media type. -func (o *CocsnAPI) RegisterConsumer(mediaType string, consumer runtime.Consumer) { - o.customConsumers[mediaType] = consumer -} - -// RegisterProducer allows you to add (or override) a producer for a media type. -func (o *CocsnAPI) RegisterProducer(mediaType string, producer runtime.Producer) { - o.customProducers[mediaType] = producer -} - -// AddMiddlewareFor adds a http middleware to existing handler -func (o *CocsnAPI) AddMiddlewareFor(method, path string, builder middleware.Builder) { - um := strings.ToUpper(method) - if path == "/" { - path = "" - } - o.Init() - if h, ok := o.handlers[um][path]; ok { - o.handlers[method][path] = builder(h) - } -} diff --git a/waveserver/restapi/server.go b/waveserver/restapi/server.go deleted file mode 100644 index c64b8142360eb97780754857373a0b608dc3fab7..0000000000000000000000000000000000000000 --- a/waveserver/restapi/server.go +++ /dev/null @@ -1,511 +0,0 @@ -// Code generated by go-swagger; DO NOT EDIT. - -package restapi - -import ( - "context" - "crypto/tls" - "crypto/x509" - "errors" - "fmt" - "io/ioutil" - "log" - "net" - "net/http" - "os" - "os/signal" - "strconv" - "sync" - "sync/atomic" - "syscall" - "time" - - "github.com/go-openapi/runtime/flagext" - "github.com/go-openapi/swag" - flags "github.com/jessevdk/go-flags" - "golang.org/x/net/netutil" - - "code.fbi.h-da.de/cocsn/cocsn-api/waveserver/restapi/operations" -) - -const ( - schemeHTTP = "http" - schemeHTTPS = "https" - schemeUnix = "unix" -) - -var defaultSchemes []string - -func init() { - defaultSchemes = []string{ - schemeHTTP, - } -} - -// NewServer creates a new api cocsn server but does not configure it -func NewServer(api *operations.CocsnAPI) *Server { - s := new(Server) - - s.shutdown = make(chan struct{}) - s.api = api - s.interrupt = make(chan os.Signal, 1) - return s -} - -// ConfigureAPI configures the API and handlers. -func (s *Server) ConfigureAPI() { - if s.api != nil { - s.handler = configureAPI(s.api) - } -} - -// ConfigureFlags configures the additional flags defined by the handlers. Needs to be called before the parser.Parse -func (s *Server) ConfigureFlags() { - if s.api != nil { - configureFlags(s.api) - } -} - -// Server for the cocsn API -type Server struct { - EnabledListeners []string `long:"scheme" description:"the listeners to enable, this can be repeated and defaults to the schemes in the swagger spec"` - CleanupTimeout time.Duration `long:"cleanup-timeout" description:"grace period for which to wait before killing idle connections" default:"10s"` - GracefulTimeout time.Duration `long:"graceful-timeout" description:"grace period for which to wait before shutting down the server" default:"15s"` - MaxHeaderSize flagext.ByteSize `long:"max-header-size" description:"controls the maximum number of bytes the server will read parsing the request header's keys and values, including the request line. It does not limit the size of the request body." default:"1MiB"` - - SocketPath flags.Filename `long:"socket-path" description:"the unix socket to listen on" default:"/var/run/cocsn.sock"` - domainSocketL net.Listener - - Host string `long:"host" description:"the IP to listen on" default:"localhost" env:"HOST"` - Port int `long:"port" description:"the port to listen on for insecure connections, defaults to a random value" env:"PORT"` - ListenLimit int `long:"listen-limit" description:"limit the number of outstanding requests"` - KeepAlive time.Duration `long:"keep-alive" description:"sets the TCP keep-alive timeouts on accepted connections. It prunes dead TCP connections ( e.g. closing laptop mid-download)" default:"3m"` - ReadTimeout time.Duration `long:"read-timeout" description:"maximum duration before timing out read of the request" default:"30s"` - WriteTimeout time.Duration `long:"write-timeout" description:"maximum duration before timing out write of the response" default:"60s"` - httpServerL net.Listener - - TLSHost string `long:"tls-host" description:"the IP to listen on for tls, when not specified it's the same as --host" env:"TLS_HOST"` - TLSPort int `long:"tls-port" description:"the port to listen on for secure connections, defaults to a random value" env:"TLS_PORT"` - TLSCertificate flags.Filename `long:"tls-certificate" description:"the certificate to use for secure connections" env:"TLS_CERTIFICATE"` - TLSCertificateKey flags.Filename `long:"tls-key" description:"the private key to use for secure connections" env:"TLS_PRIVATE_KEY"` - TLSCACertificate flags.Filename `long:"tls-ca" description:"the certificate authority file to be used with mutual tls auth" env:"TLS_CA_CERTIFICATE"` - TLSListenLimit int `long:"tls-listen-limit" description:"limit the number of outstanding requests"` - TLSKeepAlive time.Duration `long:"tls-keep-alive" description:"sets the TCP keep-alive timeouts on accepted connections. It prunes dead TCP connections ( e.g. closing laptop mid-download)"` - TLSReadTimeout time.Duration `long:"tls-read-timeout" description:"maximum duration before timing out read of the request"` - TLSWriteTimeout time.Duration `long:"tls-write-timeout" description:"maximum duration before timing out write of the response"` - httpsServerL net.Listener - - api *operations.CocsnAPI - handler http.Handler - hasListeners bool - shutdown chan struct{} - shuttingDown int32 - interrupted bool - interrupt chan os.Signal -} - -// Logf logs message either via defined user logger or via system one if no user logger is defined. -func (s *Server) Logf(f string, args ...interface{}) { - if s.api != nil && s.api.Logger != nil { - s.api.Logger(f, args...) - } else { - log.Printf(f, args...) - } -} - -// Fatalf logs message either via defined user logger or via system one if no user logger is defined. -// Exits with non-zero status after printing -func (s *Server) Fatalf(f string, args ...interface{}) { - if s.api != nil && s.api.Logger != nil { - s.api.Logger(f, args...) - os.Exit(1) - } else { - log.Fatalf(f, args...) - } -} - -// SetAPI configures the server with the specified API. Needs to be called before Serve -func (s *Server) SetAPI(api *operations.CocsnAPI) { - if api == nil { - s.api = nil - s.handler = nil - return - } - - s.api = api - s.handler = configureAPI(api) -} - -func (s *Server) hasScheme(scheme string) bool { - schemes := s.EnabledListeners - if len(schemes) == 0 { - schemes = defaultSchemes - } - - for _, v := range schemes { - if v == scheme { - return true - } - } - return false -} - -// Serve the api -func (s *Server) Serve() (err error) { - if !s.hasListeners { - if err = s.Listen(); err != nil { - return err - } - } - - // set default handler, if none is set - if s.handler == nil { - if s.api == nil { - return errors.New("can't create the default handler, as no api is set") - } - - s.SetHandler(s.api.Serve(nil)) - } - - wg := new(sync.WaitGroup) - once := new(sync.Once) - signalNotify(s.interrupt) - go handleInterrupt(once, s) - - servers := []*http.Server{} - - if s.hasScheme(schemeUnix) { - domainSocket := new(http.Server) - domainSocket.MaxHeaderBytes = int(s.MaxHeaderSize) - domainSocket.Handler = s.handler - if int64(s.CleanupTimeout) > 0 { - domainSocket.IdleTimeout = s.CleanupTimeout - } - - configureServer(domainSocket, "unix", string(s.SocketPath)) - - servers = append(servers, domainSocket) - wg.Add(1) - s.Logf("Serving cocsn at unix://%s", s.SocketPath) - go func(l net.Listener) { - defer wg.Done() - if err := domainSocket.Serve(l); err != nil && err != http.ErrServerClosed { - s.Fatalf("%v", err) - } - s.Logf("Stopped serving cocsn at unix://%s", s.SocketPath) - }(s.domainSocketL) - } - - if s.hasScheme(schemeHTTP) { - httpServer := new(http.Server) - httpServer.MaxHeaderBytes = int(s.MaxHeaderSize) - httpServer.ReadTimeout = s.ReadTimeout - httpServer.WriteTimeout = s.WriteTimeout - httpServer.SetKeepAlivesEnabled(int64(s.KeepAlive) > 0) - if s.ListenLimit > 0 { - s.httpServerL = netutil.LimitListener(s.httpServerL, s.ListenLimit) - } - - if int64(s.CleanupTimeout) > 0 { - httpServer.IdleTimeout = s.CleanupTimeout - } - - httpServer.Handler = s.handler - - configureServer(httpServer, "http", s.httpServerL.Addr().String()) - - servers = append(servers, httpServer) - wg.Add(1) - s.Logf("Serving cocsn at http://%s", s.httpServerL.Addr()) - go func(l net.Listener) { - defer wg.Done() - if err := httpServer.Serve(l); err != nil && err != http.ErrServerClosed { - s.Fatalf("%v", err) - } - s.Logf("Stopped serving cocsn at http://%s", l.Addr()) - }(s.httpServerL) - } - - if s.hasScheme(schemeHTTPS) { - httpsServer := new(http.Server) - httpsServer.MaxHeaderBytes = int(s.MaxHeaderSize) - httpsServer.ReadTimeout = s.TLSReadTimeout - httpsServer.WriteTimeout = s.TLSWriteTimeout - httpsServer.SetKeepAlivesEnabled(int64(s.TLSKeepAlive) > 0) - if s.TLSListenLimit > 0 { - s.httpsServerL = netutil.LimitListener(s.httpsServerL, s.TLSListenLimit) - } - if int64(s.CleanupTimeout) > 0 { - httpsServer.IdleTimeout = s.CleanupTimeout - } - httpsServer.Handler = s.handler - - // Inspired by https://blog.bracebin.com/achieving-perfect-ssl-labs-score-with-go - httpsServer.TLSConfig = &tls.Config{ - // Causes servers to use Go's default ciphersuite preferences, - // which are tuned to avoid attacks. Does nothing on clients. - PreferServerCipherSuites: true, - // Only use curves which have assembly implementations - // https://github.com/golang/go/tree/master/src/crypto/elliptic - CurvePreferences: []tls.CurveID{tls.CurveP256}, - // Use modern tls mode https://wiki.mozilla.org/Security/Server_Side_TLS#Modern_compatibility - NextProtos: []string{"h2", "http/1.1"}, - // https://www.owasp.org/index.php/Transport_Layer_Protection_Cheat_Sheet#Rule_-_Only_Support_Strong_Protocols - MinVersion: tls.VersionTLS12, - // These ciphersuites support Forward Secrecy: https://en.wikipedia.org/wiki/Forward_secrecy - CipherSuites: []uint16{ - tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, - tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, - tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, - tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, - tls.TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305, - tls.TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305, - }, - } - - // build standard config from server options - if s.TLSCertificate != "" && s.TLSCertificateKey != "" { - httpsServer.TLSConfig.Certificates = make([]tls.Certificate, 1) - httpsServer.TLSConfig.Certificates[0], err = tls.LoadX509KeyPair(string(s.TLSCertificate), string(s.TLSCertificateKey)) - if err != nil { - return err - } - } - - if s.TLSCACertificate != "" { - // include specified CA certificate - caCert, caCertErr := ioutil.ReadFile(string(s.TLSCACertificate)) - if caCertErr != nil { - return caCertErr - } - caCertPool := x509.NewCertPool() - ok := caCertPool.AppendCertsFromPEM(caCert) - if !ok { - return fmt.Errorf("cannot parse CA certificate") - } - httpsServer.TLSConfig.ClientCAs = caCertPool - httpsServer.TLSConfig.ClientAuth = tls.RequireAndVerifyClientCert - } - - // call custom TLS configurator - configureTLS(httpsServer.TLSConfig) - - if len(httpsServer.TLSConfig.Certificates) == 0 && httpsServer.TLSConfig.GetCertificate == nil { - // after standard and custom config are passed, this ends up with no certificate - if s.TLSCertificate == "" { - if s.TLSCertificateKey == "" { - s.Fatalf("the required flags `--tls-certificate` and `--tls-key` were not specified") - } - s.Fatalf("the required flag `--tls-certificate` was not specified") - } - if s.TLSCertificateKey == "" { - s.Fatalf("the required flag `--tls-key` was not specified") - } - // this happens with a wrong custom TLS configurator - s.Fatalf("no certificate was configured for TLS") - } - - // must have at least one certificate or panics - httpsServer.TLSConfig.BuildNameToCertificate() - - configureServer(httpsServer, "https", s.httpsServerL.Addr().String()) - - servers = append(servers, httpsServer) - wg.Add(1) - s.Logf("Serving cocsn at https://%s", s.httpsServerL.Addr()) - go func(l net.Listener) { - defer wg.Done() - if err := httpsServer.Serve(l); err != nil && err != http.ErrServerClosed { - s.Fatalf("%v", err) - } - s.Logf("Stopped serving cocsn at https://%s", l.Addr()) - }(tls.NewListener(s.httpsServerL, httpsServer.TLSConfig)) - } - - wg.Add(1) - go s.handleShutdown(wg, &servers) - - wg.Wait() - return nil -} - -// Listen creates the listeners for the server -func (s *Server) Listen() error { - if s.hasListeners { // already done this - return nil - } - - if s.hasScheme(schemeHTTPS) { - // Use http host if https host wasn't defined - if s.TLSHost == "" { - s.TLSHost = s.Host - } - // Use http listen limit if https listen limit wasn't defined - if s.TLSListenLimit == 0 { - s.TLSListenLimit = s.ListenLimit - } - // Use http tcp keep alive if https tcp keep alive wasn't defined - if int64(s.TLSKeepAlive) == 0 { - s.TLSKeepAlive = s.KeepAlive - } - // Use http read timeout if https read timeout wasn't defined - if int64(s.TLSReadTimeout) == 0 { - s.TLSReadTimeout = s.ReadTimeout - } - // Use http write timeout if https write timeout wasn't defined - if int64(s.TLSWriteTimeout) == 0 { - s.TLSWriteTimeout = s.WriteTimeout - } - } - - if s.hasScheme(schemeUnix) { - domSockListener, err := net.Listen("unix", string(s.SocketPath)) - if err != nil { - return err - } - s.domainSocketL = domSockListener - } - - if s.hasScheme(schemeHTTP) { - listener, err := net.Listen("tcp", net.JoinHostPort(s.Host, strconv.Itoa(s.Port))) - if err != nil { - return err - } - - h, p, err := swag.SplitHostPort(listener.Addr().String()) - if err != nil { - return err - } - s.Host = h - s.Port = p - s.httpServerL = listener - } - - if s.hasScheme(schemeHTTPS) { - tlsListener, err := net.Listen("tcp", net.JoinHostPort(s.TLSHost, strconv.Itoa(s.TLSPort))) - if err != nil { - return err - } - - sh, sp, err := swag.SplitHostPort(tlsListener.Addr().String()) - if err != nil { - return err - } - s.TLSHost = sh - s.TLSPort = sp - s.httpsServerL = tlsListener - } - - s.hasListeners = true - return nil -} - -// Shutdown server and clean up resources -func (s *Server) Shutdown() error { - if atomic.CompareAndSwapInt32(&s.shuttingDown, 0, 1) { - close(s.shutdown) - } - return nil -} - -func (s *Server) handleShutdown(wg *sync.WaitGroup, serversPtr *[]*http.Server) { - // wg.Done must occur last, after s.api.ServerShutdown() - // (to preserve old behaviour) - defer wg.Done() - - <-s.shutdown - - servers := *serversPtr - - ctx, cancel := context.WithTimeout(context.TODO(), s.GracefulTimeout) - defer cancel() - - // first execute the pre-shutdown hook - s.api.PreServerShutdown() - - shutdownChan := make(chan bool) - for i := range servers { - server := servers[i] - go func() { - var success bool - defer func() { - shutdownChan <- success - }() - if err := server.Shutdown(ctx); err != nil { - // Error from closing listeners, or context timeout: - s.Logf("HTTP server Shutdown: %v", err) - } else { - success = true - } - }() - } - - // Wait until all listeners have successfully shut down before calling ServerShutdown - success := true - for range servers { - success = success && <-shutdownChan - } - if success { - s.api.ServerShutdown() - } -} - -// GetHandler returns a handler useful for testing -func (s *Server) GetHandler() http.Handler { - return s.handler -} - -// SetHandler allows for setting a http handler on this server -func (s *Server) SetHandler(handler http.Handler) { - s.handler = handler -} - -// UnixListener returns the domain socket listener -func (s *Server) UnixListener() (net.Listener, error) { - if !s.hasListeners { - if err := s.Listen(); err != nil { - return nil, err - } - } - return s.domainSocketL, nil -} - -// HTTPListener returns the http listener -func (s *Server) HTTPListener() (net.Listener, error) { - if !s.hasListeners { - if err := s.Listen(); err != nil { - return nil, err - } - } - return s.httpServerL, nil -} - -// TLSListener returns the https listener -func (s *Server) TLSListener() (net.Listener, error) { - if !s.hasListeners { - if err := s.Listen(); err != nil { - return nil, err - } - } - return s.httpsServerL, nil -} - -func handleInterrupt(once *sync.Once, s *Server) { - once.Do(func() { - for range s.interrupt { - if s.interrupted { - s.Logf("Server already shutting down") - continue - } - s.interrupted = true - s.Logf("Shutting down... ") - if err := s.Shutdown(); err != nil { - s.Logf("HTTP server Shutdown: %v", err) - } - } - }) -} - -func signalNotify(interrupt chan<- os.Signal) { - signal.Notify(interrupt, syscall.SIGINT, syscall.SIGTERM) -} diff --git a/waveserver/ws-if.yml b/waveserver/ws-if.yml deleted file mode 100644 index a2ca593104ad80ea718212280289fba12e0c5703..0000000000000000000000000000000000000000 --- a/waveserver/ws-if.yml +++ /dev/null @@ -1,1629 +0,0 @@ ---- -swagger: "2.0" -info: - description: "This module defines Ethernet and IP management interfaces support\ - \ for\n Ciena's Waveserver Platform." - version: "1.0" - title: "ciena-waveserver-interfaces API" -host: "localhost:1234" -consumes: -- "application/yang-data+json" -produces: -- "application/yang-data+json" -paths: - /data/waveserver-interfaces/: - get: - tags: - - "ciena-waveserver-interfaces" - summary: "returns ciena.waveserver.interfaces.WaveserverInterfaces" - description: "Top level container for configuration and operational data for\ - \ physical\n and logical network interfaces." - parameters: [] - responses: - 200: - description: "ciena.waveserver.interfaces.WaveserverInterfaces" - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.WaveserverInterfacesWrapper" - 400: - description: "Internal error" - post: - tags: - - "ciena-waveserver-interfaces" - summary: "creates ciena.waveserver.interfaces.WaveserverInterfaces" - description: "Top level container for configuration and operational data for\ - \ physical\n and logical network interfaces." - parameters: - - in: "body" - name: "ciena.waveserver.interfaces.WaveserverInterfaces.body-param" - description: "ciena.waveserver.interfaces.WaveserverInterfaces to be added\ - \ to list" - required: false - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.WaveserverInterfacesWrapper" - responses: - 201: - description: "Object created" - 400: - description: "Internal error" - 409: - description: "Object already exists" - put: - tags: - - "ciena-waveserver-interfaces" - summary: "creates or updates ciena.waveserver.interfaces.WaveserverInterfaces" - description: "Top level container for configuration and operational data for\ - \ physical\n and logical network interfaces." - parameters: - - in: "body" - name: "ciena.waveserver.interfaces.WaveserverInterfaces.body-param" - description: "ciena.waveserver.interfaces.WaveserverInterfaces to be added\ - \ or updated" - required: false - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.WaveserverInterfacesWrapper" - responses: - 201: - description: "Object created" - 400: - description: "Internal error" - 204: - description: "Object modified" - delete: - tags: - - "ciena-waveserver-interfaces" - summary: "removes ciena.waveserver.interfaces.WaveserverInterfaces" - description: "Top level container for configuration and operational data for\ - \ physical\n and logical network interfaces." - parameters: [] - responses: - 400: - description: "Internal error" - 204: - description: "Object deleted" - /data/waveserver-interfaces/logical-interface/: - post: - tags: - - "ciena-waveserver-interfaces" - summary: "creates ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface" - description: "List of logical IP management interfaces (e.g. 'local')." - parameters: - - in: "body" - name: "ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface.body-param" - description: "ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface\ - \ to be added to list" - required: false - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterfaceWrapper" - responses: - 201: - description: "Object created" - 400: - description: "Internal error" - 409: - description: "Object already exists" - /data/waveserver-interfaces/logical-interface={index}/: - get: - tags: - - "ciena-waveserver-interfaces" - summary: "returns ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface" - description: "List of logical IP management interfaces (e.g. 'local')." - parameters: - - name: "index" - in: "path" - description: "Id of logical-interface" - required: true - type: "integer" - format: "int64" - responses: - 200: - description: "ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface" - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterfaceWrapper" - 400: - description: "Internal error" - put: - tags: - - "ciena-waveserver-interfaces" - summary: "creates or updates ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface" - description: "List of logical IP management interfaces (e.g. 'local')." - parameters: - - name: "index" - in: "path" - description: "Id of logical-interface" - required: true - type: "integer" - format: "int64" - - in: "body" - name: "ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface.body-param" - description: "ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface\ - \ to be added or updated" - required: false - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterfaceWrapper" - responses: - 201: - description: "Object created" - 400: - description: "Internal error" - 204: - description: "Object modified" - delete: - tags: - - "ciena-waveserver-interfaces" - summary: "removes ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface" - description: "List of logical IP management interfaces (e.g. 'local')." - parameters: - - name: "index" - in: "path" - description: "Id of logical-interface" - required: true - type: "integer" - format: "int64" - responses: - 400: - description: "Internal error" - 204: - description: "Object deleted" - /data/waveserver-interfaces/logical-interface={index}/id/: - get: - tags: - - "ciena-waveserver-interfaces" - summary: "returns ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id" - description: "Identification information of this logical management interface." - parameters: - - name: "index" - in: "path" - description: "Id of logical-interface" - required: true - type: "integer" - format: "int64" - responses: - 200: - description: "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id" - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.IdWrapper" - 400: - description: "Internal error" - post: - tags: - - "ciena-waveserver-interfaces" - summary: "creates ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id" - description: "Identification information of this logical management interface." - parameters: - - name: "index" - in: "path" - description: "Id of logical-interface" - required: true - type: "integer" - format: "int64" - - in: "body" - name: "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id.body-param" - description: "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id\ - \ to be added to list" - required: false - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.IdWrapper" - responses: - 201: - description: "Object created" - 400: - description: "Internal error" - 409: - description: "Object already exists" - put: - tags: - - "ciena-waveserver-interfaces" - summary: "creates or updates ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id" - description: "Identification information of this logical management interface." - parameters: - - name: "index" - in: "path" - description: "Id of logical-interface" - required: true - type: "integer" - format: "int64" - - in: "body" - name: "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id.body-param" - description: "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id\ - \ to be added or updated" - required: false - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.IdWrapper" - responses: - 201: - description: "Object created" - 400: - description: "Internal error" - 204: - description: "Object modified" - delete: - tags: - - "ciena-waveserver-interfaces" - summary: "removes ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id" - description: "Identification information of this logical management interface." - parameters: - - name: "index" - in: "path" - description: "Id of logical-interface" - required: true - type: "integer" - format: "int64" - responses: - 400: - description: "Internal error" - 204: - description: "Object deleted" - /data/waveserver-interfaces/logical-interface={index}/properties/: - get: - tags: - - "ciena-waveserver-interfaces" - summary: "returns ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties" - description: "All the configuration data of the logical management interface." - parameters: - - name: "index" - in: "path" - description: "Id of logical-interface" - required: true - type: "integer" - format: "int64" - responses: - 200: - description: "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties" - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.PropertiesWrapper" - 400: - description: "Internal error" - post: - tags: - - "ciena-waveserver-interfaces" - summary: "creates ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties" - description: "All the configuration data of the logical management interface." - parameters: - - name: "index" - in: "path" - description: "Id of logical-interface" - required: true - type: "integer" - format: "int64" - - in: "body" - name: "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties.body-param" - description: "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties\ - \ to be added to list" - required: false - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.PropertiesWrapper" - responses: - 201: - description: "Object created" - 400: - description: "Internal error" - 409: - description: "Object already exists" - put: - tags: - - "ciena-waveserver-interfaces" - summary: "creates or updates ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties" - description: "All the configuration data of the logical management interface." - parameters: - - name: "index" - in: "path" - description: "Id of logical-interface" - required: true - type: "integer" - format: "int64" - - in: "body" - name: "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties.body-param" - description: "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties\ - \ to be added or updated" - required: false - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.PropertiesWrapper" - responses: - 201: - description: "Object created" - 400: - description: "Internal error" - 204: - description: "Object modified" - delete: - tags: - - "ciena-waveserver-interfaces" - summary: "removes ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties" - description: "All the configuration data of the logical management interface." - parameters: - - name: "index" - in: "path" - description: "Id of logical-interface" - required: true - type: "integer" - format: "int64" - responses: - 400: - description: "Internal error" - 204: - description: "Object deleted" - /data/waveserver-interfaces/logical-interface={index}/properties/ipv4/: - get: - tags: - - "ciena-waveserver-interfaces" - summary: "returns ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4" - description: "IPv4 configuration and operational data." - parameters: - - name: "index" - in: "path" - description: "Id of logical-interface" - required: true - type: "integer" - format: "int64" - responses: - 200: - description: "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4" - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4Wrapper" - 400: - description: "Internal error" - post: - tags: - - "ciena-waveserver-interfaces" - summary: "creates ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4" - description: "IPv4 configuration and operational data." - parameters: - - name: "index" - in: "path" - description: "Id of logical-interface" - required: true - type: "integer" - format: "int64" - - in: "body" - name: "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4.body-param" - description: "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4\ - \ to be added to list" - required: false - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4Wrapper" - responses: - 201: - description: "Object created" - 400: - description: "Internal error" - 409: - description: "Object already exists" - put: - tags: - - "ciena-waveserver-interfaces" - summary: "creates or updates ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4" - description: "IPv4 configuration and operational data." - parameters: - - name: "index" - in: "path" - description: "Id of logical-interface" - required: true - type: "integer" - format: "int64" - - in: "body" - name: "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4.body-param" - description: "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4\ - \ to be added or updated" - required: false - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4Wrapper" - responses: - 201: - description: "Object created" - 400: - description: "Internal error" - 204: - description: "Object modified" - delete: - tags: - - "ciena-waveserver-interfaces" - summary: "removes ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4" - description: "IPv4 configuration and operational data." - parameters: - - name: "index" - in: "path" - description: "Id of logical-interface" - required: true - type: "integer" - format: "int64" - responses: - 400: - description: "Internal error" - 204: - description: "Object deleted" - /data/waveserver-interfaces/logical-interface={index}/state/: - get: - tags: - - "ciena-waveserver-interfaces" - summary: "returns ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State" - description: "Logical interface state information." - parameters: - - name: "index" - in: "path" - description: "Id of logical-interface" - required: true - type: "integer" - format: "int64" - responses: - 200: - description: "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State" - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.StateWrapper" - 400: - description: "Internal error" - post: - tags: - - "ciena-waveserver-interfaces" - summary: "creates ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State" - description: "Logical interface state information." - parameters: - - name: "index" - in: "path" - description: "Id of logical-interface" - required: true - type: "integer" - format: "int64" - - in: "body" - name: "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State.body-param" - description: "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State\ - \ to be added to list" - required: false - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.StateWrapper" - responses: - 201: - description: "Object created" - 400: - description: "Internal error" - 409: - description: "Object already exists" - put: - tags: - - "ciena-waveserver-interfaces" - summary: "creates or updates ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State" - description: "Logical interface state information." - parameters: - - name: "index" - in: "path" - description: "Id of logical-interface" - required: true - type: "integer" - format: "int64" - - in: "body" - name: "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State.body-param" - description: "ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State\ - \ to be added or updated" - required: false - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.StateWrapper" - responses: - 201: - description: "Object created" - 400: - description: "Internal error" - 204: - description: "Object modified" - delete: - tags: - - "ciena-waveserver-interfaces" - summary: "removes ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State" - description: "Logical interface state information." - parameters: - - name: "index" - in: "path" - description: "Id of logical-interface" - required: true - type: "integer" - format: "int64" - responses: - 400: - description: "Internal error" - 204: - description: "Object deleted" - /data/waveserver-interfaces/physical-interface/: - post: - tags: - - "ciena-waveserver-interfaces" - summary: "creates ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface" - description: "List of physical Ethernet management interfaces." - parameters: - - in: "body" - name: "ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface.body-param" - description: "ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface\ - \ to be added to list" - required: false - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterfaceWrapper" - responses: - 201: - description: "Object created" - 400: - description: "Internal error" - 409: - description: "Object already exists" - /data/waveserver-interfaces/physical-interface={name}/: - get: - tags: - - "ciena-waveserver-interfaces" - summary: "returns ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface" - description: "List of physical Ethernet management interfaces." - parameters: - - name: "name" - in: "path" - description: "Id of physical-interface" - required: true - type: "string" - responses: - 200: - description: "ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface" - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterfaceWrapper" - 400: - description: "Internal error" - put: - tags: - - "ciena-waveserver-interfaces" - summary: "creates or updates ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface" - description: "List of physical Ethernet management interfaces." - parameters: - - name: "name" - in: "path" - description: "Id of physical-interface" - required: true - type: "string" - - in: "body" - name: "ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface.body-param" - description: "ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface\ - \ to be added or updated" - required: false - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterfaceWrapper" - responses: - 201: - description: "Object created" - 400: - description: "Internal error" - 204: - description: "Object modified" - delete: - tags: - - "ciena-waveserver-interfaces" - summary: "removes ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface" - description: "List of physical Ethernet management interfaces." - parameters: - - name: "name" - in: "path" - description: "Id of physical-interface" - required: true - type: "string" - responses: - 400: - description: "Internal error" - 204: - description: "Object deleted" - /data/waveserver-interfaces/physical-interface={name}/id/: - get: - tags: - - "ciena-waveserver-interfaces" - summary: "returns ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id" - description: "Identification information of this management interface." - parameters: - - name: "name" - in: "path" - description: "Id of physical-interface" - required: true - type: "string" - responses: - 200: - description: "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id" - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.IdWrapper" - 400: - description: "Internal error" - post: - tags: - - "ciena-waveserver-interfaces" - summary: "creates ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id" - description: "Identification information of this management interface." - parameters: - - name: "name" - in: "path" - description: "Id of physical-interface" - required: true - type: "string" - - in: "body" - name: "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id.body-param" - description: "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id\ - \ to be added to list" - required: false - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.IdWrapper" - responses: - 201: - description: "Object created" - 400: - description: "Internal error" - 409: - description: "Object already exists" - put: - tags: - - "ciena-waveserver-interfaces" - summary: "creates or updates ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id" - description: "Identification information of this management interface." - parameters: - - name: "name" - in: "path" - description: "Id of physical-interface" - required: true - type: "string" - - in: "body" - name: "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id.body-param" - description: "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id\ - \ to be added or updated" - required: false - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.IdWrapper" - responses: - 201: - description: "Object created" - 400: - description: "Internal error" - 204: - description: "Object modified" - delete: - tags: - - "ciena-waveserver-interfaces" - summary: "removes ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id" - description: "Identification information of this management interface." - parameters: - - name: "name" - in: "path" - description: "Id of physical-interface" - required: true - type: "string" - responses: - 400: - description: "Internal error" - 204: - description: "Object deleted" - /data/waveserver-interfaces/physical-interface={name}/properties/: - get: - tags: - - "ciena-waveserver-interfaces" - summary: "returns ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties" - description: "All the configuration data of the physical management interface." - parameters: - - name: "name" - in: "path" - description: "Id of physical-interface" - required: true - type: "string" - responses: - 200: - description: "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties" - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.PropertiesWrapper" - 400: - description: "Internal error" - post: - tags: - - "ciena-waveserver-interfaces" - summary: "creates ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties" - description: "All the configuration data of the physical management interface." - parameters: - - name: "name" - in: "path" - description: "Id of physical-interface" - required: true - type: "string" - - in: "body" - name: "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties.body-param" - description: "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties\ - \ to be added to list" - required: false - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.PropertiesWrapper" - responses: - 201: - description: "Object created" - 400: - description: "Internal error" - 409: - description: "Object already exists" - put: - tags: - - "ciena-waveserver-interfaces" - summary: "creates or updates ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties" - description: "All the configuration data of the physical management interface." - parameters: - - name: "name" - in: "path" - description: "Id of physical-interface" - required: true - type: "string" - - in: "body" - name: "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties.body-param" - description: "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties\ - \ to be added or updated" - required: false - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.PropertiesWrapper" - responses: - 201: - description: "Object created" - 400: - description: "Internal error" - 204: - description: "Object modified" - delete: - tags: - - "ciena-waveserver-interfaces" - summary: "removes ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties" - description: "All the configuration data of the physical management interface." - parameters: - - name: "name" - in: "path" - description: "Id of physical-interface" - required: true - type: "string" - responses: - 400: - description: "Internal error" - 204: - description: "Object deleted" - /data/waveserver-interfaces/physical-interface={name}/properties/ethernet/: - get: - tags: - - "ciena-waveserver-interfaces" - summary: "returns ciena.waveserver.interfaces.EthernetIfPropertiesGroup" - description: "Ethernet interface attributes." - parameters: - - name: "name" - in: "path" - description: "Id of physical-interface" - required: true - type: "string" - responses: - 200: - description: "ciena.waveserver.interfaces.EthernetIfPropertiesGroup" - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.EthernetIfPropertiesGroupWrapper" - 400: - description: "Internal error" - post: - tags: - - "ciena-waveserver-interfaces" - summary: "creates ciena.waveserver.interfaces.EthernetIfPropertiesGroup" - description: "Ethernet interface attributes." - parameters: - - name: "name" - in: "path" - description: "Id of physical-interface" - required: true - type: "string" - - in: "body" - name: "ciena.waveserver.interfaces.EthernetIfPropertiesGroup.body-param" - description: "ciena.waveserver.interfaces.EthernetIfPropertiesGroup to be\ - \ added to list" - required: false - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.EthernetIfPropertiesGroupWrapper" - responses: - 201: - description: "Object created" - 400: - description: "Internal error" - 409: - description: "Object already exists" - put: - tags: - - "ciena-waveserver-interfaces" - summary: "creates or updates ciena.waveserver.interfaces.EthernetIfPropertiesGroup" - description: "Ethernet interface attributes." - parameters: - - name: "name" - in: "path" - description: "Id of physical-interface" - required: true - type: "string" - - in: "body" - name: "ciena.waveserver.interfaces.EthernetIfPropertiesGroup.body-param" - description: "ciena.waveserver.interfaces.EthernetIfPropertiesGroup to be\ - \ added or updated" - required: false - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.EthernetIfPropertiesGroupWrapper" - responses: - 201: - description: "Object created" - 400: - description: "Internal error" - 204: - description: "Object modified" - delete: - tags: - - "ciena-waveserver-interfaces" - summary: "removes ciena.waveserver.interfaces.EthernetIfPropertiesGroup" - description: "Ethernet interface attributes." - parameters: - - name: "name" - in: "path" - description: "Id of physical-interface" - required: true - type: "string" - responses: - 400: - description: "Internal error" - 204: - description: "Object deleted" - /data/waveserver-interfaces/physical-interface={name}/properties/management/: - get: - tags: - - "ciena-waveserver-interfaces" - summary: "returns ciena.waveserver.interfaces.ManagementIfPropertiesGroup" - description: "Management interface attributes." - parameters: - - name: "name" - in: "path" - description: "Id of physical-interface" - required: true - type: "string" - responses: - 200: - description: "ciena.waveserver.interfaces.ManagementIfPropertiesGroup" - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.ManagementIfPropertiesGroupWrapper" - 400: - description: "Internal error" - post: - tags: - - "ciena-waveserver-interfaces" - summary: "creates ciena.waveserver.interfaces.ManagementIfPropertiesGroup" - description: "Management interface attributes." - parameters: - - name: "name" - in: "path" - description: "Id of physical-interface" - required: true - type: "string" - - in: "body" - name: "ciena.waveserver.interfaces.ManagementIfPropertiesGroup.body-param" - description: "ciena.waveserver.interfaces.ManagementIfPropertiesGroup to be\ - \ added to list" - required: false - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.ManagementIfPropertiesGroupWrapper" - responses: - 201: - description: "Object created" - 400: - description: "Internal error" - 409: - description: "Object already exists" - put: - tags: - - "ciena-waveserver-interfaces" - summary: "creates or updates ciena.waveserver.interfaces.ManagementIfPropertiesGroup" - description: "Management interface attributes." - parameters: - - name: "name" - in: "path" - description: "Id of physical-interface" - required: true - type: "string" - - in: "body" - name: "ciena.waveserver.interfaces.ManagementIfPropertiesGroup.body-param" - description: "ciena.waveserver.interfaces.ManagementIfPropertiesGroup to be\ - \ added or updated" - required: false - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.ManagementIfPropertiesGroupWrapper" - responses: - 201: - description: "Object created" - 400: - description: "Internal error" - 204: - description: "Object modified" - delete: - tags: - - "ciena-waveserver-interfaces" - summary: "removes ciena.waveserver.interfaces.ManagementIfPropertiesGroup" - description: "Management interface attributes." - parameters: - - name: "name" - in: "path" - description: "Id of physical-interface" - required: true - type: "string" - responses: - 400: - description: "Internal error" - 204: - description: "Object deleted" - /data/waveserver-interfaces/physical-interface={name}/state/: - get: - tags: - - "ciena-waveserver-interfaces" - summary: "returns ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State" - description: "Physical management interface state information." - parameters: - - name: "name" - in: "path" - description: "Id of physical-interface" - required: true - type: "string" - responses: - 200: - description: "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State" - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.StateWrapper" - 400: - description: "Internal error" - post: - tags: - - "ciena-waveserver-interfaces" - summary: "creates ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State" - description: "Physical management interface state information." - parameters: - - name: "name" - in: "path" - description: "Id of physical-interface" - required: true - type: "string" - - in: "body" - name: "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State.body-param" - description: "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State\ - \ to be added to list" - required: false - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.StateWrapper" - responses: - 201: - description: "Object created" - 400: - description: "Internal error" - 409: - description: "Object already exists" - put: - tags: - - "ciena-waveserver-interfaces" - summary: "creates or updates ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State" - description: "Physical management interface state information." - parameters: - - name: "name" - in: "path" - description: "Id of physical-interface" - required: true - type: "string" - - in: "body" - name: "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State.body-param" - description: "ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State\ - \ to be added or updated" - required: false - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.StateWrapper" - responses: - 201: - description: "Object created" - 400: - description: "Internal error" - 204: - description: "Object modified" - delete: - tags: - - "ciena-waveserver-interfaces" - summary: "removes ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State" - description: "Physical management interface state information." - parameters: - - name: "name" - in: "path" - description: "Id of physical-interface" - required: true - type: "string" - responses: - 400: - description: "Internal error" - 204: - description: "Object deleted" - /data/waveserver-interfaces/routes/: - get: - tags: - - "ciena-waveserver-interfaces" - summary: "returns ciena.waveserver.interfaces.waveserverinterfaces.Routes" - description: "Top-level container for IP route configuration and operational\ - \ data." - parameters: [] - responses: - 200: - description: "ciena.waveserver.interfaces.waveserverinterfaces.Routes" - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.RoutesWrapper" - 400: - description: "Internal error" - post: - tags: - - "ciena-waveserver-interfaces" - summary: "creates ciena.waveserver.interfaces.waveserverinterfaces.Routes" - description: "Top-level container for IP route configuration and operational\ - \ data." - parameters: - - in: "body" - name: "ciena.waveserver.interfaces.waveserverinterfaces.Routes.body-param" - description: "ciena.waveserver.interfaces.waveserverinterfaces.Routes to be\ - \ added to list" - required: false - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.RoutesWrapper" - responses: - 201: - description: "Object created" - 400: - description: "Internal error" - 409: - description: "Object already exists" - put: - tags: - - "ciena-waveserver-interfaces" - summary: "creates or updates ciena.waveserver.interfaces.waveserverinterfaces.Routes" - description: "Top-level container for IP route configuration and operational\ - \ data." - parameters: - - in: "body" - name: "ciena.waveserver.interfaces.waveserverinterfaces.Routes.body-param" - description: "ciena.waveserver.interfaces.waveserverinterfaces.Routes to be\ - \ added or updated" - required: false - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.RoutesWrapper" - responses: - 201: - description: "Object created" - 400: - description: "Internal error" - 204: - description: "Object modified" - delete: - tags: - - "ciena-waveserver-interfaces" - summary: "removes ciena.waveserver.interfaces.waveserverinterfaces.Routes" - description: "Top-level container for IP route configuration and operational\ - \ data." - parameters: [] - responses: - 400: - description: "Internal error" - 204: - description: "Object deleted" - /data/waveserver-interfaces/routes/ipv4-static-route/: - post: - tags: - - "ciena-waveserver-interfaces" - summary: "creates ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute" - description: "List of IPv4 static routing entries." - parameters: - - in: "body" - name: "ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute.body-param" - description: "ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute\ - \ to be added to list" - required: false - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRouteWrapper" - responses: - 201: - description: "Object created" - 400: - description: "Internal error" - 409: - description: "Object already exists" - /data/waveserver-interfaces/routes/ipv4-static-route={destination}/: - get: - tags: - - "ciena-waveserver-interfaces" - summary: "returns ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute" - description: "List of IPv4 static routing entries." - parameters: - - name: "destination" - in: "path" - description: "Id of ipv4-static-route" - required: true - type: "string" - responses: - 200: - description: "ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute" - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRouteWrapper" - 400: - description: "Internal error" - put: - tags: - - "ciena-waveserver-interfaces" - summary: "creates or updates ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute" - description: "List of IPv4 static routing entries." - parameters: - - name: "destination" - in: "path" - description: "Id of ipv4-static-route" - required: true - type: "string" - - in: "body" - name: "ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute.body-param" - description: "ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute\ - \ to be added or updated" - required: false - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRouteWrapper" - responses: - 201: - description: "Object created" - 400: - description: "Internal error" - 204: - description: "Object modified" - delete: - tags: - - "ciena-waveserver-interfaces" - summary: "removes ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute" - description: "List of IPv4 static routing entries." - parameters: - - name: "destination" - in: "path" - description: "Id of ipv4-static-route" - required: true - type: "string" - responses: - 400: - description: "Internal error" - 204: - description: "Object deleted" - /data/waveserver-interfaces/routes/ipv4-static-route={destination}/next-hop/: - post: - tags: - - "ciena-waveserver-interfaces" - summary: "creates ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop" - description: "A list of next-hop entries associated with the static route." - parameters: - - name: "destination" - in: "path" - description: "Id of ipv4-static-route" - required: true - type: "string" - - in: "body" - name: "ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop.body-param" - description: "ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop\ - \ to be added to list" - required: false - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHopWrapper" - responses: - 201: - description: "Object created" - 400: - description: "Internal error" - 409: - description: "Object already exists" - /data/waveserver-interfaces/routes/ipv4-static-route={destination}/next-hop={index}/: - get: - tags: - - "ciena-waveserver-interfaces" - summary: "returns ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop" - description: "A list of next-hop entries associated with the static route." - parameters: - - name: "destination" - in: "path" - description: "Id of ipv4-static-route" - required: true - type: "string" - - name: "index" - in: "path" - description: "Id of next-hop" - required: true - type: "integer" - format: "int64" - responses: - 200: - description: "ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop" - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHopWrapper" - 400: - description: "Internal error" - put: - tags: - - "ciena-waveserver-interfaces" - summary: "creates or updates ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop" - description: "A list of next-hop entries associated with the static route." - parameters: - - name: "destination" - in: "path" - description: "Id of ipv4-static-route" - required: true - type: "string" - - name: "index" - in: "path" - description: "Id of next-hop" - required: true - type: "integer" - format: "int64" - - in: "body" - name: "ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop.body-param" - description: "ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop\ - \ to be added or updated" - required: false - schema: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHopWrapper" - responses: - 201: - description: "Object created" - 400: - description: "Internal error" - 204: - description: "Object modified" - delete: - tags: - - "ciena-waveserver-interfaces" - summary: "removes ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop" - description: "A list of next-hop entries associated with the static route." - parameters: - - name: "destination" - in: "path" - description: "Id of ipv4-static-route" - required: true - type: "string" - - name: "index" - in: "path" - description: "Id of next-hop" - required: true - type: "integer" - format: "int64" - responses: - 400: - description: "Internal error" - 204: - description: "Object deleted" -definitions: - ciena.waveserver.interfaces.DuplexEnumeration: - type: "string" - enum: - - "Unknown" - - "full" - - "half" - ciena.waveserver.interfaces.EthernetIfPropertiesGroup: - type: "object" - properties: - mac-address: - type: "string" - description: "The system-assigned MAC address of the Ethernet interface." - flow-control: - type: "boolean" - description: "Specifies whether this interface will participate in Ethernet\ - \ flow\n control, via pause frames." - default: false - duplex: - description: "Ethernet interface duplex mode. For ports with auto-negotiation\ - \ enabled,\n this represents the negotiated duplex mode." - $ref: "#/definitions/ciena.waveserver.interfaces.DuplexEnumeration" - speed: - description: "Ethernet port speed. For ports with auto-negotiation enabled,\ - \ this\n represents the negotiated port speed." - $ref: "#/definitions/ciena.waveserver.interfaces.SpeedEnumeration" - auto-negotiation: - type: "boolean" - description: "Specifies whether the interface should negotiate common transmission\n\ - \ parameters, such as speed, duplex, and flow control with its peer.\ - \ REF:IEEE 802.3-2012 auto-negotiation transmission parameters" - default: false - ciena.waveserver.interfaces.EthernetIfPropertiesGroupWrapper: - properties: - ethernet: - $ref: "#/definitions/ciena.waveserver.interfaces.EthernetIfPropertiesGroup" - ciena.waveserver.interfaces.ManagementIfPropertiesGroup: - type: "object" - properties: - mode: - description: "Management port mode. Specifies whether the port is configured\ - \ as a\n local management interface or wayside communications channel\ - \ (carry\n through)." - $ref: "#/definitions/ciena.waveserver.interfaces.ModeEnumeration" - ciena.waveserver.interfaces.ManagementIfPropertiesGroupWrapper: - properties: - management: - $ref: "#/definitions/ciena.waveserver.interfaces.ManagementIfPropertiesGroup" - ciena.waveserver.interfaces.ModeEnumeration: - type: "string" - enum: - - "management" - - "wayside-channel" - ciena.waveserver.interfaces.RouteNextHopGroup: - type: "object" - properties: - active: - type: "boolean" - description: "Specifies whether the route is active (present in the kernel\ - \ IP\n routing table)." - default: false - static: - type: "boolean" - description: "Specifies whether the route entry is user-created (static) or\n\ - \ dynamically created by a routing protocol." - default: false - associated-interface: - type: "string" - description: "Reference to the associated logical-interface name of the route\ - \ entry.\n Defaults to the 'local' interface for routes within the\ - \ subnet\n associated with the active IP address configured on the\ - \ local\n management interface." - metric: - type: "integer" - format: "int64" - description: "Routing metric cost." - default: 0 - ciena.waveserver.interfaces.SpeedEnumeration: - type: "string" - enum: - - "Unknown" - - "10M" - - "100M" - - "1G" - - "10G" - ciena.waveserver.interfaces.TypeEnumeration: - type: "string" - enum: - - "ethernet" - - "serial" - ciena.waveserver.interfaces.WaveserverInterfaces: - type: "object" - properties: - logical-interface: - type: "array" - description: "List of logical IP management interfaces (e.g. 'local')." - items: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface" - routes: - description: "Top-level container for IP route configuration and operational\ - \ data." - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.Routes" - physical-interface: - type: "array" - description: "List of physical Ethernet management interfaces." - items: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface" - ciena.waveserver.interfaces.WaveserverInterfacesWrapper: - properties: - waveserver-interfaces: - $ref: "#/definitions/ciena.waveserver.interfaces.WaveserverInterfaces" - ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface: - type: "object" - properties: - index: - type: "integer" - format: "int64" - description: "References the system-assigned index of the logical interface." - x-path: "../id/index" - state: - description: "Logical interface state information." - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State" - id: - description: "Identification information of this logical management interface." - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id" - properties: - description: "All the configuration data of the logical management interface." - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties" - ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterfaceWrapper: - properties: - logical-interface: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.LogicalInterface" - ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface: - type: "object" - properties: - name: - type: "string" - description: "References the system-assigned name of the interface." - x-path: "../id/name" - state: - description: "Physical management interface state information." - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State" - id: - description: "Identification information of this management interface." - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id" - properties: - description: "All the configuration data of the physical management interface." - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties" - ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterfaceWrapper: - properties: - physical-interface: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.PhysicalInterface" - ciena.waveserver.interfaces.waveserverinterfaces.Routes: - type: "object" - properties: - ipv4-static-route: - type: "array" - description: "List of IPv4 static routing entries." - items: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute" - ciena.waveserver.interfaces.waveserverinterfaces.RoutesWrapper: - properties: - routes: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.Routes" - ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id: - type: "object" - properties: - name: - type: "string" - description: "The name of the logical management interface, e.g. 'local'." - index: - type: "integer" - format: "int64" - description: "The index of the logical management interface. Waveserver supports\n\ - \ a single logical interface 'local' that is automatically created\ - \ by\n the system. The default index is 1 for the 'local' interface." - ifindex: - type: "integer" - format: "int64" - description: "The system-assigned interface index number, corresponding to\ - \ the\n ifIndex in SNMP IF-MIB. REF:RFC 2863 - The Interfaces\ - \ Group MIB" - ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.IdWrapper: - properties: - id: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Id" - ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties: - type: "object" - properties: - ipv4: - description: "IPv4 configuration and operational data." - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4" - ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.PropertiesWrapper: - properties: - properties: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.Properties" - ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State: - type: "object" - properties: - operational-state: - description: "Operational state of this management interface." - $ref: "#/definitions/ciena.waveserver.typedefs.UpDownEnum" - admin-state: - description: "Whether Admin State is enabled or disabled for this management\ - \ interface." - $ref: "#/definitions/ciena.waveserver.typedefs.EnabledDisabledEnum" - ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.StateWrapper: - properties: - state: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.State" - ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4: - type: "object" - properties: - oper-gateway: - type: "string" - description: "The operational IPv4 gateway on the interface." - oper-ip-address: - type: "string" - description: "The operational IPv4 address and prefix on the interface." - user-ip-address: - type: "string" - description: "The user-configured IPv4 address and prefix on the interface." - dhcp-ip-address: - type: "string" - description: "The DHCP-assigned IPv4 address and prefix on the interface." - dhcp-gateway: - type: "string" - description: "The DHCP-assigned IPv4 gateway on the interface." - admin-state: - description: "Whether IPv4 stack is enabled or disabled on this interface.\n\ - \ Always enabled for the local management interface." - $ref: "#/definitions/ciena.waveserver.typedefs.EnabledDisabledEnum" - user-gateway: - type: "string" - description: "The user-configured primary IPv4 gateway on the interface." - apipa-ip-address: - type: "string" - description: "The Automatic Private IP Addressing (APIPA) assigned IPv4 address\n\ - \ and prefix on the interface." - backup-gateway: - type: "string" - description: "The user-configured backup IPv4 gateway on the interface." - ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4Wrapper: - properties: - ipv4: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.logicalinterface.properties.Ipv4" - ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id: - type: "object" - properties: - name: - type: "string" - description: "The system-assigned name of the physical interface (e.g. DCN,\n\ - \ ILAN-1, ILAN-2). The names are predefined." - description: - type: "string" - description: "Physical interface description, e.g. 'Management'." - ifindex: - type: "integer" - format: "int64" - description: "The system-assigned interface index number, corresponding to\ - \ the\n ifIndex in SNMP IF-MIB. REF:RFC 2863 - The Interfaces\ - \ Group MIB" - type: - description: "Management port type. If the port is DCN, ILAN-1, or ILAN-2,\ - \ the\n port type will be 'ethernet'. If the port is Console,\ - \ the port\n type will be 'serial'. REF:RFC 2863 - The Interfaces\ - \ Group MIB" - $ref: "#/definitions/ciena.waveserver.interfaces.TypeEnumeration" - ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.IdWrapper: - properties: - id: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Id" - ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties: - type: "object" - properties: - ethernet: - description: "Ethernet interface attributes." - $ref: "#/definitions/ciena.waveserver.interfaces.EthernetIfPropertiesGroup" - management: - description: "Management interface attributes." - $ref: "#/definitions/ciena.waveserver.interfaces.ManagementIfPropertiesGroup" - ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.PropertiesWrapper: - properties: - properties: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.Properties" - ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State: - type: "object" - properties: - operational-state: - description: "Operational state of this management interface." - $ref: "#/definitions/ciena.waveserver.typedefs.UpDownEnum" - admin-state: - description: "Whether Admin State is enabled or disabled for this management\ - \ interface." - $ref: "#/definitions/ciena.waveserver.typedefs.EnabledDisabledEnum" - ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.StateWrapper: - properties: - state: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.physicalinterface.State" - ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute: - type: "object" - properties: - destination: - type: "string" - description: "IPv4 route destination prefix for the static route. Only one\ - \ static\n routing entry per unique destination ip/prefix can\ - \ be configured." - next-hop: - type: "array" - description: "A list of next-hop entries associated with the static route." - items: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop" - ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRouteWrapper: - properties: - ipv4-static-route: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.routes.Ipv4StaticRoute" - ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop: - allOf: - - $ref: "#/definitions/ciena.waveserver.interfaces.RouteNextHopGroup" - - type: "object" - properties: - index: - type: "integer" - format: "int64" - description: "The index key of the entry in the next-hop list. Currently\ - \ only\n one static entry is supported per destination prefix,\ - \ so the\n index should always be 1." - ip-address: - type: "string" - description: "IPv4 route next-hop or gateway address associated with the\ - \ route. If\n not specified, the default gateway value for\ - \ the local management\n interface will be used." - description: "A list of next-hop entries associated with the static route." - ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHopWrapper: - properties: - next-hop: - $ref: "#/definitions/ciena.waveserver.interfaces.waveserverinterfaces.routes.ipv4staticroute.NextHop" - ciena.waveserver.typedefs.EnabledDisabledEnum: - type: "string" - enum: - - "disabled" - - "enabled" - ciena.waveserver.typedefs.UpDownEnum: - type: "string" - enum: - - "down" - - "up" diff --git a/ws-if.json b/ws-if.json deleted file mode 100644 index def8d1dbef1135dc7fe959308705b7375afbcf22..0000000000000000000000000000000000000000 --- a/ws-if.json +++ /dev/null @@ -1,12775 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "ciena-waveserver-interfaces", - "description": "This module defines Ethernet and IP management interfaces support for\nCiena's Waveserver Platform.", - "version": "2018-04-27" - }, - "basePath": "/restconf", - "tags": [ - { - "name": "root", - "description": "root resources" - }, - { - "name": "operations", - "description": "operations resources" - }, - { - "name": "data", - "description": "data resources" - }, - { - "name": "get", - "description": "get resources" - }, - { - "name": "post", - "description": "post resources" - }, - { - "name": "patch", - "description": "patch resources" - }, - { - "name": "put", - "description": "put resources" - }, - { - "name": "delete", - "description": "delete resources" - } - ], - "schemes": [ - "http", - "https" - ], - "produces": [ - "application/yang-data+json" - ], - "consumes": [ - "application/yang-data+json" - ], - "paths": { - "/": { - "get": { - "tags": [ - "root", - "get" - ], - "summary": "This module defines Ethernet and IP management interfaces support for\nCiena's Waveserver Platform.", - "description": "This module defines Ethernet and IP management interfaces support for\nCiena's Waveserver Platform.", - "operationId": "root_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - ], - "responses": { - "200": { - "description": "This module defines Ethernet and IP management interfaces support for\nCiena's Waveserver Platform.", - "schema": { - "$ref": "#/definitions/root" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/operations": { - "get": { - "tags": [ - "operations", - "get" - ], - "summary": "This module defines Ethernet and IP management interfaces support for\nCiena's Waveserver Platform.", - "description": "This module defines Ethernet and IP management interfaces support for\nCiena's Waveserver Platform.", - "operationId": "operations_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - ], - "responses": { - "200": { - "description": "This module defines Ethernet and IP management interfaces support for\nCiena's Waveserver Platform.", - "schema": { - "$ref": "#/definitions/operations" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/yang-library-version": { - "get": { - "tags": [ - "yang-library-version", - "get" - ], - "summary": "This module defines Ethernet and IP management interfaces support for\nCiena's Waveserver Platform.", - "description": "This module defines Ethernet and IP management interfaces support for\nCiena's Waveserver Platform.", - "operationId": "yang_library_version_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - ], - "responses": { - "200": { - "description": "This module defines Ethernet and IP management interfaces support for\nCiena's Waveserver Platform.", - "schema": { - "$ref": "#/definitions/yang-library-version" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "This module defines Ethernet and IP management interfaces support for\nCiena's Waveserver Platform.", - "description": "This module defines Ethernet and IP management interfaces support for\nCiena's Waveserver Platform.", - "operationId": "data_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - ], - "responses": { - "200": { - "description": "This module defines Ethernet and IP management interfaces support for\nCiena's Waveserver Platform.", - "schema": { - "$ref": "#/definitions/data" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "post": { - "tags": [ - "data", - "post" - ], - "summary": "This module defines Ethernet and IP management interfaces support for\nCiena's Waveserver Platform.", - "description": "This module defines Ethernet and IP management interfaces support for\nCiena's Waveserver Platform.", - "operationId": "data_post", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/data-post" - } - ], - "responses": { - "201": { - "description": "This module defines Ethernet and IP management interfaces support for\nCiena's Waveserver Platform." - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "put": { - "tags": [ - "data", - "put" - ], - "summary": "This module defines Ethernet and IP management interfaces support for\nCiena's Waveserver Platform.", - "description": "This module defines Ethernet and IP management interfaces support for\nCiena's Waveserver Platform.", - "operationId": "data_put", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/data-put-patch" - } - ], - "responses": { - "201": { - "description": "This module defines Ethernet and IP management interfaces support for\nCiena's Waveserver Platform." - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "patch": { - "tags": [ - "data", - "patch" - ], - "summary": "This module defines Ethernet and IP management interfaces support for\nCiena's Waveserver Platform.", - "description": "This module defines Ethernet and IP management interfaces support for\nCiena's Waveserver Platform.", - "operationId": "data_patch", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/data-put-patch" - } - ], - "responses": { - "204": { - "description": "This module defines Ethernet and IP management interfaces support for\nCiena's Waveserver Platform." - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "Top level container for configuration and operational data for physical\nand logical network interfaces.", - "description": "Top level container for configuration and operational data for physical\nand logical network interfaces.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "Top level container for configuration and operational data for physical\nand logical network interfaces.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "post": { - "tags": [ - "data", - "post" - ], - "summary": "Top level container for configuration and operational data for physical\nand logical network interfaces.", - "description": "Top level container for configuration and operational data for physical\nand logical network interfaces.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_post", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces-post" - } - ], - "responses": { - "201": { - "description": "container waveserver-interfaces created" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "put": { - "tags": [ - "data", - "put" - ], - "summary": "Top level container for configuration and operational data for physical\nand logical network interfaces.", - "description": "Top level container for configuration and operational data for physical\nand logical network interfaces.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_put", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces" - } - ], - "responses": { - "201": { - "description": "container waveserver-interfaces created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "patch": { - "tags": [ - "data", - "patch" - ], - "summary": "Top level container for configuration and operational data for physical\nand logical network interfaces.", - "description": "Top level container for configuration and operational data for physical\nand logical network interfaces.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_patch", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces" - } - ], - "responses": { - "204": { - "description": "container waveserver-interfaces updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "delete": { - "tags": [ - "data", - "delete" - ], - "summary": "Top level container for configuration and operational data for physical\nand logical network interfaces.", - "description": "Top level container for configuration and operational data for physical\nand logical network interfaces.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_delete", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/physical-interface": { - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/physical-interface={physical-interface-name}": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "List of physical Ethernet management interfaces.", - "description": "List of physical Ethernet management interfaces.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "List of physical Ethernet management interfaces.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "put": { - "tags": [ - "data", - "put" - ], - "summary": "List of physical Ethernet management interfaces.", - "description": "List of physical Ethernet management interfaces.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_put", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name" - }, - { - "$ref": "#/parameters/insert" - }, - { - "$ref": "#/parameters/point" - } - ], - "responses": { - "201": { - "description": "list physical-interface created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "patch": { - "tags": [ - "data", - "patch" - ], - "summary": "List of physical Ethernet management interfaces.", - "description": "List of physical Ethernet management interfaces.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_patch", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name" - } - ], - "responses": { - "204": { - "description": "list physical-interface updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "delete": { - "tags": [ - "data", - "delete" - ], - "summary": "List of physical Ethernet management interfaces.", - "description": "List of physical Ethernet management interfaces.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_delete", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/physical-interface={physical-interface-name}/name": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "References the system-assigned name of the interface.", - "description": "References the system-assigned name of the interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_name_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "References the system-assigned name of the interface.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_name" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "put": { - "tags": [ - "data", - "put" - ], - "summary": "References the system-assigned name of the interface.", - "description": "References the system-assigned name of the interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_name_put", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_name" - } - ], - "responses": { - "201": { - "description": "leaf name created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "patch": { - "tags": [ - "data", - "patch" - ], - "summary": "References the system-assigned name of the interface.", - "description": "References the system-assigned name of the interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_name_patch", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_name" - } - ], - "responses": { - "204": { - "description": "leaf name updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "delete": { - "tags": [ - "data", - "delete" - ], - "summary": "References the system-assigned name of the interface.", - "description": "References the system-assigned name of the interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_name_delete", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/physical-interface={physical-interface-name}/id": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "Identification information of this management interface.", - "description": "Identification information of this management interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_id_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "Identification information of this management interface.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_id" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "post": { - "tags": [ - "data", - "post" - ], - "summary": "Identification information of this management interface.", - "description": "Identification information of this management interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_id_post", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_id-post" - } - ], - "responses": { - "201": { - "description": "container id created" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "put": { - "tags": [ - "data", - "put" - ], - "summary": "Identification information of this management interface.", - "description": "Identification information of this management interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_id_put", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_id" - } - ], - "responses": { - "201": { - "description": "container id created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "patch": { - "tags": [ - "data", - "patch" - ], - "summary": "Identification information of this management interface.", - "description": "Identification information of this management interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_id_patch", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_id" - } - ], - "responses": { - "204": { - "description": "container id updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "delete": { - "tags": [ - "data", - "delete" - ], - "summary": "Identification information of this management interface.", - "description": "Identification information of this management interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_id_delete", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/physical-interface={physical-interface-name}/id/name": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "The system-assigned name of the physical interface (e.g. DCN,\nILAN-1, ILAN-2). The names are predefined.", - "description": "The system-assigned name of the physical interface (e.g. DCN,\nILAN-1, ILAN-2). The names are predefined.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_id_name_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "The system-assigned name of the physical interface (e.g. DCN,\nILAN-1, ILAN-2). The names are predefined.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_id_name" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "put": { - "tags": [ - "data", - "put" - ], - "summary": "The system-assigned name of the physical interface (e.g. DCN,\nILAN-1, ILAN-2). The names are predefined.", - "description": "The system-assigned name of the physical interface (e.g. DCN,\nILAN-1, ILAN-2). The names are predefined.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_id_name_put", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_id_name" - } - ], - "responses": { - "201": { - "description": "leaf name created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "patch": { - "tags": [ - "data", - "patch" - ], - "summary": "The system-assigned name of the physical interface (e.g. DCN,\nILAN-1, ILAN-2). The names are predefined.", - "description": "The system-assigned name of the physical interface (e.g. DCN,\nILAN-1, ILAN-2). The names are predefined.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_id_name_patch", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_id_name" - } - ], - "responses": { - "204": { - "description": "leaf name updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "delete": { - "tags": [ - "data", - "delete" - ], - "summary": "The system-assigned name of the physical interface (e.g. DCN,\nILAN-1, ILAN-2). The names are predefined.", - "description": "The system-assigned name of the physical interface (e.g. DCN,\nILAN-1, ILAN-2). The names are predefined.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_id_name_delete", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/physical-interface={physical-interface-name}/id/type": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "Management port type. If the port is DCN, ILAN-1, or ILAN-2, the\nport type will be 'ethernet'. If the port is Console, the port\ntype will be 'serial'.", - "description": "Management port type. If the port is DCN, ILAN-1, or ILAN-2, the\nport type will be 'ethernet'. If the port is Console, the port\ntype will be 'serial'.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_id_type_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "Management port type. If the port is DCN, ILAN-1, or ILAN-2, the\nport type will be 'ethernet'. If the port is Console, the port\ntype will be 'serial'.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_id_type" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "put": { - "tags": [ - "data", - "put" - ], - "summary": "Management port type. If the port is DCN, ILAN-1, or ILAN-2, the\nport type will be 'ethernet'. If the port is Console, the port\ntype will be 'serial'.", - "description": "Management port type. If the port is DCN, ILAN-1, or ILAN-2, the\nport type will be 'ethernet'. If the port is Console, the port\ntype will be 'serial'.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_id_type_put", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_id_type" - } - ], - "responses": { - "201": { - "description": "leaf type created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "patch": { - "tags": [ - "data", - "patch" - ], - "summary": "Management port type. If the port is DCN, ILAN-1, or ILAN-2, the\nport type will be 'ethernet'. If the port is Console, the port\ntype will be 'serial'.", - "description": "Management port type. If the port is DCN, ILAN-1, or ILAN-2, the\nport type will be 'ethernet'. If the port is Console, the port\ntype will be 'serial'.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_id_type_patch", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_id_type" - } - ], - "responses": { - "204": { - "description": "leaf type updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "delete": { - "tags": [ - "data", - "delete" - ], - "summary": "Management port type. If the port is DCN, ILAN-1, or ILAN-2, the\nport type will be 'ethernet'. If the port is Console, the port\ntype will be 'serial'.", - "description": "Management port type. If the port is DCN, ILAN-1, or ILAN-2, the\nport type will be 'ethernet'. If the port is Console, the port\ntype will be 'serial'.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_id_type_delete", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/physical-interface={physical-interface-name}/id/description": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "Physical interface description, e.g. 'Management'.", - "description": "Physical interface description, e.g. 'Management'.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_id_description_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "Physical interface description, e.g. 'Management'.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_id_description" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/physical-interface={physical-interface-name}/id/ifindex": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "The system-assigned interface index number, corresponding to the\nifIndex in SNMP IF-MIB.", - "description": "The system-assigned interface index number, corresponding to the\nifIndex in SNMP IF-MIB.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_id_ifindex_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "The system-assigned interface index number, corresponding to the\nifIndex in SNMP IF-MIB.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_id_ifindex" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/physical-interface={physical-interface-name}/state": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "Physical management interface state information.", - "description": "Physical management interface state information.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_state_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "Physical management interface state information.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_state" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "post": { - "tags": [ - "data", - "post" - ], - "summary": "Physical management interface state information.", - "description": "Physical management interface state information.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_state_post", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_state-post" - } - ], - "responses": { - "201": { - "description": "container state created" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "put": { - "tags": [ - "data", - "put" - ], - "summary": "Physical management interface state information.", - "description": "Physical management interface state information.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_state_put", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_state" - } - ], - "responses": { - "201": { - "description": "container state created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "patch": { - "tags": [ - "data", - "patch" - ], - "summary": "Physical management interface state information.", - "description": "Physical management interface state information.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_state_patch", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_state" - } - ], - "responses": { - "204": { - "description": "container state updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "delete": { - "tags": [ - "data", - "delete" - ], - "summary": "Physical management interface state information.", - "description": "Physical management interface state information.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_state_delete", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/physical-interface={physical-interface-name}/state/admin-state": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "Whether Admin State is enabled or disabled for this management interface.", - "description": "Whether Admin State is enabled or disabled for this management interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_state_admin_state_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "Whether Admin State is enabled or disabled for this management interface.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_state_admin-state" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "put": { - "tags": [ - "data", - "put" - ], - "summary": "Whether Admin State is enabled or disabled for this management interface.", - "description": "Whether Admin State is enabled or disabled for this management interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_state_admin_state_put", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_state_admin-state" - } - ], - "responses": { - "201": { - "description": "leaf admin-state created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "patch": { - "tags": [ - "data", - "patch" - ], - "summary": "Whether Admin State is enabled or disabled for this management interface.", - "description": "Whether Admin State is enabled or disabled for this management interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_state_admin_state_patch", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_state_admin-state" - } - ], - "responses": { - "204": { - "description": "leaf admin-state updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "delete": { - "tags": [ - "data", - "delete" - ], - "summary": "Whether Admin State is enabled or disabled for this management interface.", - "description": "Whether Admin State is enabled or disabled for this management interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_state_admin_state_delete", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/physical-interface={physical-interface-name}/state/operational-state": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "Operational state of this management interface.", - "description": "Operational state of this management interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_state_operational_state_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "Operational state of this management interface.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_state_operational-state" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/physical-interface={physical-interface-name}/properties": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "All the configuration data of the physical management interface.", - "description": "All the configuration data of the physical management interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_properties_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "All the configuration data of the physical management interface.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "post": { - "tags": [ - "data", - "post" - ], - "summary": "All the configuration data of the physical management interface.", - "description": "All the configuration data of the physical management interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_properties_post", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties-post" - } - ], - "responses": { - "201": { - "description": "container properties created" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "put": { - "tags": [ - "data", - "put" - ], - "summary": "All the configuration data of the physical management interface.", - "description": "All the configuration data of the physical management interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_properties_put", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties" - } - ], - "responses": { - "201": { - "description": "container properties created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "patch": { - "tags": [ - "data", - "patch" - ], - "summary": "All the configuration data of the physical management interface.", - "description": "All the configuration data of the physical management interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_properties_patch", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties" - } - ], - "responses": { - "204": { - "description": "container properties updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "delete": { - "tags": [ - "data", - "delete" - ], - "summary": "All the configuration data of the physical management interface.", - "description": "All the configuration data of the physical management interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_properties_delete", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/physical-interface={physical-interface-name}/properties/management": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "Management interface attributes.", - "description": "Management interface attributes.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_properties_management_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "Management interface attributes.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties_management" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "post": { - "tags": [ - "data", - "post" - ], - "summary": "Management interface attributes.", - "description": "Management interface attributes.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_properties_management_post", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties_management-post" - } - ], - "responses": { - "201": { - "description": "container management created" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "put": { - "tags": [ - "data", - "put" - ], - "summary": "Management interface attributes.", - "description": "Management interface attributes.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_properties_management_put", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties_management" - } - ], - "responses": { - "201": { - "description": "container management created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "patch": { - "tags": [ - "data", - "patch" - ], - "summary": "Management interface attributes.", - "description": "Management interface attributes.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_properties_management_patch", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties_management" - } - ], - "responses": { - "204": { - "description": "container management updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "delete": { - "tags": [ - "data", - "delete" - ], - "summary": "Management interface attributes.", - "description": "Management interface attributes.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_properties_management_delete", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/physical-interface={physical-interface-name}/properties/management/mode": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "Management port mode. Specifies whether the port is configured as a\nlocal management interface or wayside communications channel (carry\nthrough).", - "description": "Management port mode. Specifies whether the port is configured as a\nlocal management interface or wayside communications channel (carry\nthrough).", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_properties_management_mode_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "Management port mode. Specifies whether the port is configured as a\nlocal management interface or wayside communications channel (carry\nthrough).", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties_management_mode" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "put": { - "tags": [ - "data", - "put" - ], - "summary": "Management port mode. Specifies whether the port is configured as a\nlocal management interface or wayside communications channel (carry\nthrough).", - "description": "Management port mode. Specifies whether the port is configured as a\nlocal management interface or wayside communications channel (carry\nthrough).", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_properties_management_mode_put", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties_management_mode" - } - ], - "responses": { - "201": { - "description": "leaf mode created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "patch": { - "tags": [ - "data", - "patch" - ], - "summary": "Management port mode. Specifies whether the port is configured as a\nlocal management interface or wayside communications channel (carry\nthrough).", - "description": "Management port mode. Specifies whether the port is configured as a\nlocal management interface or wayside communications channel (carry\nthrough).", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_properties_management_mode_patch", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties_management_mode" - } - ], - "responses": { - "204": { - "description": "leaf mode updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "delete": { - "tags": [ - "data", - "delete" - ], - "summary": "Management port mode. Specifies whether the port is configured as a\nlocal management interface or wayside communications channel (carry\nthrough).", - "description": "Management port mode. Specifies whether the port is configured as a\nlocal management interface or wayside communications channel (carry\nthrough).", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_properties_management_mode_delete", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/physical-interface={physical-interface-name}/properties/ethernet": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "Ethernet interface attributes.", - "description": "Ethernet interface attributes.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_properties_ethernet_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "Ethernet interface attributes.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties_ethernet" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "post": { - "tags": [ - "data", - "post" - ], - "summary": "Ethernet interface attributes.", - "description": "Ethernet interface attributes.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_properties_ethernet_post", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties_ethernet-post" - } - ], - "responses": { - "201": { - "description": "container ethernet created" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "put": { - "tags": [ - "data", - "put" - ], - "summary": "Ethernet interface attributes.", - "description": "Ethernet interface attributes.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_properties_ethernet_put", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties_ethernet" - } - ], - "responses": { - "201": { - "description": "container ethernet created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "patch": { - "tags": [ - "data", - "patch" - ], - "summary": "Ethernet interface attributes.", - "description": "Ethernet interface attributes.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_properties_ethernet_patch", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties_ethernet" - } - ], - "responses": { - "204": { - "description": "container ethernet updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "delete": { - "tags": [ - "data", - "delete" - ], - "summary": "Ethernet interface attributes.", - "description": "Ethernet interface attributes.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_properties_ethernet_delete", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/physical-interface={physical-interface-name}/properties/ethernet/speed": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "Ethernet port speed. For ports with auto-negotiation enabled, this\nrepresents the negotiated port speed.", - "description": "Ethernet port speed. For ports with auto-negotiation enabled, this\nrepresents the negotiated port speed.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_properties_ethernet_speed_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "Ethernet port speed. For ports with auto-negotiation enabled, this\nrepresents the negotiated port speed.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties_ethernet_speed" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/physical-interface={physical-interface-name}/properties/ethernet/duplex": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "Ethernet interface duplex mode. For ports with auto-negotiation enabled,\nthis represents the negotiated duplex mode.", - "description": "Ethernet interface duplex mode. For ports with auto-negotiation enabled,\nthis represents the negotiated duplex mode.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_properties_ethernet_duplex_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "Ethernet interface duplex mode. For ports with auto-negotiation enabled,\nthis represents the negotiated duplex mode.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties_ethernet_duplex" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/physical-interface={physical-interface-name}/properties/ethernet/flow-control": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "Specifies whether this interface will participate in Ethernet flow\ncontrol, via pause frames.", - "description": "Specifies whether this interface will participate in Ethernet flow\ncontrol, via pause frames.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_properties_ethernet_flow_control_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "Specifies whether this interface will participate in Ethernet flow\ncontrol, via pause frames.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties_ethernet_flow-control" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/physical-interface={physical-interface-name}/properties/ethernet/auto-negotiation": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "Specifies whether the interface should negotiate common transmission\nparameters, such as speed, duplex, and flow control with its peer.", - "description": "Specifies whether the interface should negotiate common transmission\nparameters, such as speed, duplex, and flow control with its peer.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_properties_ethernet_auto_negotiation_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "Specifies whether the interface should negotiate common transmission\nparameters, such as speed, duplex, and flow control with its peer.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties_ethernet_auto-negotiation" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/physical-interface={physical-interface-name}/properties/ethernet/mac-address": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "The system-assigned MAC address of the Ethernet interface.", - "description": "The system-assigned MAC address of the Ethernet interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_physical_interface_physical_interface_name_properties_ethernet_mac_address_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/physical-interface-name" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "The system-assigned MAC address of the Ethernet interface.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties_ethernet_mac-address" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/logical-interface": { - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/logical-interface={logical-interface-index}": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "List of logical IP management interfaces (e.g. 'local').", - "description": "List of logical IP management interfaces (e.g. 'local').", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "List of logical IP management interfaces (e.g. 'local').", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "put": { - "tags": [ - "data", - "put" - ], - "summary": "List of logical IP management interfaces (e.g. 'local').", - "description": "List of logical IP management interfaces (e.g. 'local').", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_put", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index" - }, - { - "$ref": "#/parameters/insert" - }, - { - "$ref": "#/parameters/point" - } - ], - "responses": { - "201": { - "description": "list logical-interface created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "patch": { - "tags": [ - "data", - "patch" - ], - "summary": "List of logical IP management interfaces (e.g. 'local').", - "description": "List of logical IP management interfaces (e.g. 'local').", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_patch", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index" - } - ], - "responses": { - "204": { - "description": "list logical-interface updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "delete": { - "tags": [ - "data", - "delete" - ], - "summary": "List of logical IP management interfaces (e.g. 'local').", - "description": "List of logical IP management interfaces (e.g. 'local').", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_delete", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/logical-interface={logical-interface-index}/index": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "References the system-assigned index of the logical interface.", - "description": "References the system-assigned index of the logical interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_index_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "References the system-assigned index of the logical interface.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_index" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "put": { - "tags": [ - "data", - "put" - ], - "summary": "References the system-assigned index of the logical interface.", - "description": "References the system-assigned index of the logical interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_index_put", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_index" - } - ], - "responses": { - "201": { - "description": "leaf index created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "patch": { - "tags": [ - "data", - "patch" - ], - "summary": "References the system-assigned index of the logical interface.", - "description": "References the system-assigned index of the logical interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_index_patch", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_index" - } - ], - "responses": { - "204": { - "description": "leaf index updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "delete": { - "tags": [ - "data", - "delete" - ], - "summary": "References the system-assigned index of the logical interface.", - "description": "References the system-assigned index of the logical interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_index_delete", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/logical-interface={logical-interface-index}/id": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "Identification information of this logical management interface.", - "description": "Identification information of this logical management interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_id_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "Identification information of this logical management interface.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_id" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "post": { - "tags": [ - "data", - "post" - ], - "summary": "Identification information of this logical management interface.", - "description": "Identification information of this logical management interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_id_post", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_id-post" - } - ], - "responses": { - "201": { - "description": "container id created" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "put": { - "tags": [ - "data", - "put" - ], - "summary": "Identification information of this logical management interface.", - "description": "Identification information of this logical management interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_id_put", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_id" - } - ], - "responses": { - "201": { - "description": "container id created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "patch": { - "tags": [ - "data", - "patch" - ], - "summary": "Identification information of this logical management interface.", - "description": "Identification information of this logical management interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_id_patch", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_id" - } - ], - "responses": { - "204": { - "description": "container id updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "delete": { - "tags": [ - "data", - "delete" - ], - "summary": "Identification information of this logical management interface.", - "description": "Identification information of this logical management interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_id_delete", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/logical-interface={logical-interface-index}/id/index": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "The index of the logical management interface. Waveserver supports\na single logical interface 'local' that is automatically created by\nthe system. The default index is 1 for the 'local' interface.", - "description": "The index of the logical management interface. Waveserver supports\na single logical interface 'local' that is automatically created by\nthe system. The default index is 1 for the 'local' interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_id_index_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "The index of the logical management interface. Waveserver supports\na single logical interface 'local' that is automatically created by\nthe system. The default index is 1 for the 'local' interface.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_id_index" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "put": { - "tags": [ - "data", - "put" - ], - "summary": "The index of the logical management interface. Waveserver supports\na single logical interface 'local' that is automatically created by\nthe system. The default index is 1 for the 'local' interface.", - "description": "The index of the logical management interface. Waveserver supports\na single logical interface 'local' that is automatically created by\nthe system. The default index is 1 for the 'local' interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_id_index_put", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_id_index" - } - ], - "responses": { - "201": { - "description": "leaf index created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "patch": { - "tags": [ - "data", - "patch" - ], - "summary": "The index of the logical management interface. Waveserver supports\na single logical interface 'local' that is automatically created by\nthe system. The default index is 1 for the 'local' interface.", - "description": "The index of the logical management interface. Waveserver supports\na single logical interface 'local' that is automatically created by\nthe system. The default index is 1 for the 'local' interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_id_index_patch", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_id_index" - } - ], - "responses": { - "204": { - "description": "leaf index updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "delete": { - "tags": [ - "data", - "delete" - ], - "summary": "The index of the logical management interface. Waveserver supports\na single logical interface 'local' that is automatically created by\nthe system. The default index is 1 for the 'local' interface.", - "description": "The index of the logical management interface. Waveserver supports\na single logical interface 'local' that is automatically created by\nthe system. The default index is 1 for the 'local' interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_id_index_delete", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/logical-interface={logical-interface-index}/id/name": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "The name of the logical management interface, e.g. 'local'.", - "description": "The name of the logical management interface, e.g. 'local'.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_id_name_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "The name of the logical management interface, e.g. 'local'.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_id_name" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/logical-interface={logical-interface-index}/id/ifindex": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "The system-assigned interface index number, corresponding to the\nifIndex in SNMP IF-MIB.", - "description": "The system-assigned interface index number, corresponding to the\nifIndex in SNMP IF-MIB.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_id_ifindex_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "The system-assigned interface index number, corresponding to the\nifIndex in SNMP IF-MIB.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_id_ifindex" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/logical-interface={logical-interface-index}/state": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "Logical interface state information.", - "description": "Logical interface state information.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_state_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "Logical interface state information.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_state" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "post": { - "tags": [ - "data", - "post" - ], - "summary": "Logical interface state information.", - "description": "Logical interface state information.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_state_post", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_state-post" - } - ], - "responses": { - "201": { - "description": "container state created" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "put": { - "tags": [ - "data", - "put" - ], - "summary": "Logical interface state information.", - "description": "Logical interface state information.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_state_put", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_state" - } - ], - "responses": { - "201": { - "description": "container state created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "patch": { - "tags": [ - "data", - "patch" - ], - "summary": "Logical interface state information.", - "description": "Logical interface state information.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_state_patch", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_state" - } - ], - "responses": { - "204": { - "description": "container state updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "delete": { - "tags": [ - "data", - "delete" - ], - "summary": "Logical interface state information.", - "description": "Logical interface state information.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_state_delete", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/logical-interface={logical-interface-index}/state/admin-state": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "Whether Admin State is enabled or disabled for this management interface.", - "description": "Whether Admin State is enabled or disabled for this management interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_state_admin_state_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "Whether Admin State is enabled or disabled for this management interface.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_state_admin-state" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "put": { - "tags": [ - "data", - "put" - ], - "summary": "Whether Admin State is enabled or disabled for this management interface.", - "description": "Whether Admin State is enabled or disabled for this management interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_state_admin_state_put", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_state_admin-state" - } - ], - "responses": { - "201": { - "description": "leaf admin-state created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "patch": { - "tags": [ - "data", - "patch" - ], - "summary": "Whether Admin State is enabled or disabled for this management interface.", - "description": "Whether Admin State is enabled or disabled for this management interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_state_admin_state_patch", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_state_admin-state" - } - ], - "responses": { - "204": { - "description": "leaf admin-state updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "delete": { - "tags": [ - "data", - "delete" - ], - "summary": "Whether Admin State is enabled or disabled for this management interface.", - "description": "Whether Admin State is enabled or disabled for this management interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_state_admin_state_delete", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/logical-interface={logical-interface-index}/state/operational-state": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "Operational state of this management interface.", - "description": "Operational state of this management interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_state_operational_state_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "Operational state of this management interface.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_state_operational-state" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/logical-interface={logical-interface-index}/properties": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "All the configuration data of the logical management interface.", - "description": "All the configuration data of the logical management interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_properties_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "All the configuration data of the logical management interface.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "post": { - "tags": [ - "data", - "post" - ], - "summary": "All the configuration data of the logical management interface.", - "description": "All the configuration data of the logical management interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_properties_post", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties-post" - } - ], - "responses": { - "201": { - "description": "container properties created" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "put": { - "tags": [ - "data", - "put" - ], - "summary": "All the configuration data of the logical management interface.", - "description": "All the configuration data of the logical management interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_properties_put", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties" - } - ], - "responses": { - "201": { - "description": "container properties created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "patch": { - "tags": [ - "data", - "patch" - ], - "summary": "All the configuration data of the logical management interface.", - "description": "All the configuration data of the logical management interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_properties_patch", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties" - } - ], - "responses": { - "204": { - "description": "container properties updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "delete": { - "tags": [ - "data", - "delete" - ], - "summary": "All the configuration data of the logical management interface.", - "description": "All the configuration data of the logical management interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_properties_delete", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/logical-interface={logical-interface-index}/properties/ipv4": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "IPv4 configuration and operational data.", - "description": "IPv4 configuration and operational data.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_properties_ipv4_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "IPv4 configuration and operational data.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "post": { - "tags": [ - "data", - "post" - ], - "summary": "IPv4 configuration and operational data.", - "description": "IPv4 configuration and operational data.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_properties_ipv4_post", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4-post" - } - ], - "responses": { - "201": { - "description": "container ipv4 created" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "put": { - "tags": [ - "data", - "put" - ], - "summary": "IPv4 configuration and operational data.", - "description": "IPv4 configuration and operational data.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_properties_ipv4_put", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4" - } - ], - "responses": { - "201": { - "description": "container ipv4 created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "patch": { - "tags": [ - "data", - "patch" - ], - "summary": "IPv4 configuration and operational data.", - "description": "IPv4 configuration and operational data.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_properties_ipv4_patch", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4" - } - ], - "responses": { - "204": { - "description": "container ipv4 updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "delete": { - "tags": [ - "data", - "delete" - ], - "summary": "IPv4 configuration and operational data.", - "description": "IPv4 configuration and operational data.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_properties_ipv4_delete", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/logical-interface={logical-interface-index}/properties/ipv4/admin-state": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "Whether IPv4 stack is enabled or disabled on this interface.\nAlways enabled for the local management interface.", - "description": "Whether IPv4 stack is enabled or disabled on this interface.\nAlways enabled for the local management interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_properties_ipv4_admin_state_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "Whether IPv4 stack is enabled or disabled on this interface.\nAlways enabled for the local management interface.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4_admin-state" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "put": { - "tags": [ - "data", - "put" - ], - "summary": "Whether IPv4 stack is enabled or disabled on this interface.\nAlways enabled for the local management interface.", - "description": "Whether IPv4 stack is enabled or disabled on this interface.\nAlways enabled for the local management interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_properties_ipv4_admin_state_put", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4_admin-state" - } - ], - "responses": { - "201": { - "description": "leaf admin-state created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "patch": { - "tags": [ - "data", - "patch" - ], - "summary": "Whether IPv4 stack is enabled or disabled on this interface.\nAlways enabled for the local management interface.", - "description": "Whether IPv4 stack is enabled or disabled on this interface.\nAlways enabled for the local management interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_properties_ipv4_admin_state_patch", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4_admin-state" - } - ], - "responses": { - "204": { - "description": "leaf admin-state updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "delete": { - "tags": [ - "data", - "delete" - ], - "summary": "Whether IPv4 stack is enabled or disabled on this interface.\nAlways enabled for the local management interface.", - "description": "Whether IPv4 stack is enabled or disabled on this interface.\nAlways enabled for the local management interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_properties_ipv4_admin_state_delete", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/logical-interface={logical-interface-index}/properties/ipv4/user-ip-address": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "The user-configured IPv4 address and prefix on the interface.", - "description": "The user-configured IPv4 address and prefix on the interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_properties_ipv4_user_ip_address_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "The user-configured IPv4 address and prefix on the interface.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4_user-ip-address" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "put": { - "tags": [ - "data", - "put" - ], - "summary": "The user-configured IPv4 address and prefix on the interface.", - "description": "The user-configured IPv4 address and prefix on the interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_properties_ipv4_user_ip_address_put", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4_user-ip-address" - } - ], - "responses": { - "201": { - "description": "leaf user-ip-address created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "patch": { - "tags": [ - "data", - "patch" - ], - "summary": "The user-configured IPv4 address and prefix on the interface.", - "description": "The user-configured IPv4 address and prefix on the interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_properties_ipv4_user_ip_address_patch", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4_user-ip-address" - } - ], - "responses": { - "204": { - "description": "leaf user-ip-address updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "delete": { - "tags": [ - "data", - "delete" - ], - "summary": "The user-configured IPv4 address and prefix on the interface.", - "description": "The user-configured IPv4 address and prefix on the interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_properties_ipv4_user_ip_address_delete", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/logical-interface={logical-interface-index}/properties/ipv4/oper-ip-address": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "The operational IPv4 address and prefix on the interface.", - "description": "The operational IPv4 address and prefix on the interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_properties_ipv4_oper_ip_address_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "The operational IPv4 address and prefix on the interface.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4_oper-ip-address" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/logical-interface={logical-interface-index}/properties/ipv4/dhcp-ip-address": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "The DHCP-assigned IPv4 address and prefix on the interface.", - "description": "The DHCP-assigned IPv4 address and prefix on the interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_properties_ipv4_dhcp_ip_address_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "The DHCP-assigned IPv4 address and prefix on the interface.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4_dhcp-ip-address" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/logical-interface={logical-interface-index}/properties/ipv4/apipa-ip-address": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "The Automatic Private IP Addressing (APIPA) assigned IPv4 address\nand prefix on the interface.", - "description": "The Automatic Private IP Addressing (APIPA) assigned IPv4 address\nand prefix on the interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_properties_ipv4_apipa_ip_address_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "The Automatic Private IP Addressing (APIPA) assigned IPv4 address\nand prefix on the interface.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4_apipa-ip-address" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/logical-interface={logical-interface-index}/properties/ipv4/user-gateway": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "The user-configured primary IPv4 gateway on the interface.", - "description": "The user-configured primary IPv4 gateway on the interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_properties_ipv4_user_gateway_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "The user-configured primary IPv4 gateway on the interface.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4_user-gateway" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "put": { - "tags": [ - "data", - "put" - ], - "summary": "The user-configured primary IPv4 gateway on the interface.", - "description": "The user-configured primary IPv4 gateway on the interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_properties_ipv4_user_gateway_put", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4_user-gateway" - } - ], - "responses": { - "201": { - "description": "leaf user-gateway created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "patch": { - "tags": [ - "data", - "patch" - ], - "summary": "The user-configured primary IPv4 gateway on the interface.", - "description": "The user-configured primary IPv4 gateway on the interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_properties_ipv4_user_gateway_patch", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4_user-gateway" - } - ], - "responses": { - "204": { - "description": "leaf user-gateway updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "delete": { - "tags": [ - "data", - "delete" - ], - "summary": "The user-configured primary IPv4 gateway on the interface.", - "description": "The user-configured primary IPv4 gateway on the interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_properties_ipv4_user_gateway_delete", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/logical-interface={logical-interface-index}/properties/ipv4/backup-gateway": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "The user-configured backup IPv4 gateway on the interface.", - "description": "The user-configured backup IPv4 gateway on the interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_properties_ipv4_backup_gateway_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "The user-configured backup IPv4 gateway on the interface.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4_backup-gateway" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "put": { - "tags": [ - "data", - "put" - ], - "summary": "The user-configured backup IPv4 gateway on the interface.", - "description": "The user-configured backup IPv4 gateway on the interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_properties_ipv4_backup_gateway_put", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4_backup-gateway" - } - ], - "responses": { - "201": { - "description": "leaf backup-gateway created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "patch": { - "tags": [ - "data", - "patch" - ], - "summary": "The user-configured backup IPv4 gateway on the interface.", - "description": "The user-configured backup IPv4 gateway on the interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_properties_ipv4_backup_gateway_patch", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4_backup-gateway" - } - ], - "responses": { - "204": { - "description": "leaf backup-gateway updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "delete": { - "tags": [ - "data", - "delete" - ], - "summary": "The user-configured backup IPv4 gateway on the interface.", - "description": "The user-configured backup IPv4 gateway on the interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_properties_ipv4_backup_gateway_delete", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/logical-interface={logical-interface-index}/properties/ipv4/oper-gateway": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "The operational IPv4 gateway on the interface.", - "description": "The operational IPv4 gateway on the interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_properties_ipv4_oper_gateway_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "The operational IPv4 gateway on the interface.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4_oper-gateway" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/logical-interface={logical-interface-index}/properties/ipv4/dhcp-gateway": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "The DHCP-assigned IPv4 gateway on the interface.", - "description": "The DHCP-assigned IPv4 gateway on the interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_logical_interface_logical_interface_index_properties_ipv4_dhcp_gateway_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/logical-interface-index" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "The DHCP-assigned IPv4 gateway on the interface.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4_dhcp-gateway" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/routes": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "Top-level container for IP route configuration and operational data.", - "description": "Top-level container for IP route configuration and operational data.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_routes_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "Top-level container for IP route configuration and operational data.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_routes" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "post": { - "tags": [ - "data", - "post" - ], - "summary": "Top-level container for IP route configuration and operational data.", - "description": "Top-level container for IP route configuration and operational data.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_routes_post", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_routes-post" - } - ], - "responses": { - "201": { - "description": "container routes created" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "put": { - "tags": [ - "data", - "put" - ], - "summary": "Top-level container for IP route configuration and operational data.", - "description": "Top-level container for IP route configuration and operational data.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_routes_put", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_routes" - } - ], - "responses": { - "201": { - "description": "container routes created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "patch": { - "tags": [ - "data", - "patch" - ], - "summary": "Top-level container for IP route configuration and operational data.", - "description": "Top-level container for IP route configuration and operational data.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_routes_patch", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_routes" - } - ], - "responses": { - "204": { - "description": "container routes updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "delete": { - "tags": [ - "data", - "delete" - ], - "summary": "Top-level container for IP route configuration and operational data.", - "description": "Top-level container for IP route configuration and operational data.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_routes_delete", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/routes/ipv4-static-route": { - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/routes/ipv4-static-route={ipv4-static-route-destination}": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "List of IPv4 static routing entries.", - "description": "List of IPv4 static routing entries.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_routes_ipv4_static_route_ipv4_static_route_destination_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/ipv4-static-route-destination" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "List of IPv4 static routing entries.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "put": { - "tags": [ - "data", - "put" - ], - "summary": "List of IPv4 static routing entries.", - "description": "List of IPv4 static routing entries.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_routes_ipv4_static_route_ipv4_static_route_destination_put", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/ipv4-static-route-destination" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination" - }, - { - "$ref": "#/parameters/insert" - }, - { - "$ref": "#/parameters/point" - } - ], - "responses": { - "201": { - "description": "list ipv4-static-route created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "patch": { - "tags": [ - "data", - "patch" - ], - "summary": "List of IPv4 static routing entries.", - "description": "List of IPv4 static routing entries.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_routes_ipv4_static_route_ipv4_static_route_destination_patch", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/ipv4-static-route-destination" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination" - } - ], - "responses": { - "204": { - "description": "list ipv4-static-route updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "delete": { - "tags": [ - "data", - "delete" - ], - "summary": "List of IPv4 static routing entries.", - "description": "List of IPv4 static routing entries.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_routes_ipv4_static_route_ipv4_static_route_destination_delete", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/ipv4-static-route-destination" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/routes/ipv4-static-route={ipv4-static-route-destination}/destination": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "IPv4 route destination prefix for the static route. Only one static\nrouting entry per unique destination ip/prefix can be configured.", - "description": "IPv4 route destination prefix for the static route. Only one static\nrouting entry per unique destination ip/prefix can be configured.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_routes_ipv4_static_route_ipv4_static_route_destination_destination_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/ipv4-static-route-destination" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "IPv4 route destination prefix for the static route. Only one static\nrouting entry per unique destination ip/prefix can be configured.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination_destination" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "put": { - "tags": [ - "data", - "put" - ], - "summary": "IPv4 route destination prefix for the static route. Only one static\nrouting entry per unique destination ip/prefix can be configured.", - "description": "IPv4 route destination prefix for the static route. Only one static\nrouting entry per unique destination ip/prefix can be configured.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_routes_ipv4_static_route_ipv4_static_route_destination_destination_put", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/ipv4-static-route-destination" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination_destination" - } - ], - "responses": { - "201": { - "description": "leaf destination created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "patch": { - "tags": [ - "data", - "patch" - ], - "summary": "IPv4 route destination prefix for the static route. Only one static\nrouting entry per unique destination ip/prefix can be configured.", - "description": "IPv4 route destination prefix for the static route. Only one static\nrouting entry per unique destination ip/prefix can be configured.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_routes_ipv4_static_route_ipv4_static_route_destination_destination_patch", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/ipv4-static-route-destination" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination_destination" - } - ], - "responses": { - "204": { - "description": "leaf destination updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "delete": { - "tags": [ - "data", - "delete" - ], - "summary": "IPv4 route destination prefix for the static route. Only one static\nrouting entry per unique destination ip/prefix can be configured.", - "description": "IPv4 route destination prefix for the static route. Only one static\nrouting entry per unique destination ip/prefix can be configured.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_routes_ipv4_static_route_ipv4_static_route_destination_destination_delete", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/ipv4-static-route-destination" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/routes/ipv4-static-route={ipv4-static-route-destination}/next-hop": { - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/routes/ipv4-static-route={ipv4-static-route-destination}/next-hop={next-hop-index}": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "A list of next-hop entries associated with the static route.", - "description": "A list of next-hop entries associated with the static route.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_routes_ipv4_static_route_ipv4_static_route_destination_next_hop_next_hop_index_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/ipv4-static-route-destination" - }, - { - "$ref": "#/parameters/next-hop-index" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "A list of next-hop entries associated with the static route.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination_next-hop_next-hop-index" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "put": { - "tags": [ - "data", - "put" - ], - "summary": "A list of next-hop entries associated with the static route.", - "description": "A list of next-hop entries associated with the static route.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_routes_ipv4_static_route_ipv4_static_route_destination_next_hop_next_hop_index_put", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/ipv4-static-route-destination" - }, - { - "$ref": "#/parameters/next-hop-index" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination_next-hop_next-hop-index" - }, - { - "$ref": "#/parameters/insert" - }, - { - "$ref": "#/parameters/point" - } - ], - "responses": { - "201": { - "description": "list next-hop created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "patch": { - "tags": [ - "data", - "patch" - ], - "summary": "A list of next-hop entries associated with the static route.", - "description": "A list of next-hop entries associated with the static route.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_routes_ipv4_static_route_ipv4_static_route_destination_next_hop_next_hop_index_patch", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/ipv4-static-route-destination" - }, - { - "$ref": "#/parameters/next-hop-index" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination_next-hop_next-hop-index" - } - ], - "responses": { - "204": { - "description": "list next-hop updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "delete": { - "tags": [ - "data", - "delete" - ], - "summary": "A list of next-hop entries associated with the static route.", - "description": "A list of next-hop entries associated with the static route.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_routes_ipv4_static_route_ipv4_static_route_destination_next_hop_next_hop_index_delete", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/ipv4-static-route-destination" - }, - { - "$ref": "#/parameters/next-hop-index" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/routes/ipv4-static-route={ipv4-static-route-destination}/next-hop={next-hop-index}/index": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "The index key of the entry in the next-hop list. Currently only\none static entry is supported per destination prefix, so the\nindex should always be 1.", - "description": "The index key of the entry in the next-hop list. Currently only\none static entry is supported per destination prefix, so the\nindex should always be 1.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_routes_ipv4_static_route_ipv4_static_route_destination_next_hop_next_hop_index_index_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/ipv4-static-route-destination" - }, - { - "$ref": "#/parameters/next-hop-index" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "The index key of the entry in the next-hop list. Currently only\none static entry is supported per destination prefix, so the\nindex should always be 1.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination_next-hop_next-hop-index_index" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "put": { - "tags": [ - "data", - "put" - ], - "summary": "The index key of the entry in the next-hop list. Currently only\none static entry is supported per destination prefix, so the\nindex should always be 1.", - "description": "The index key of the entry in the next-hop list. Currently only\none static entry is supported per destination prefix, so the\nindex should always be 1.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_routes_ipv4_static_route_ipv4_static_route_destination_next_hop_next_hop_index_index_put", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/ipv4-static-route-destination" - }, - { - "$ref": "#/parameters/next-hop-index" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination_next-hop_next-hop-index_index" - } - ], - "responses": { - "201": { - "description": "leaf index created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "patch": { - "tags": [ - "data", - "patch" - ], - "summary": "The index key of the entry in the next-hop list. Currently only\none static entry is supported per destination prefix, so the\nindex should always be 1.", - "description": "The index key of the entry in the next-hop list. Currently only\none static entry is supported per destination prefix, so the\nindex should always be 1.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_routes_ipv4_static_route_ipv4_static_route_destination_next_hop_next_hop_index_index_patch", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/ipv4-static-route-destination" - }, - { - "$ref": "#/parameters/next-hop-index" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination_next-hop_next-hop-index_index" - } - ], - "responses": { - "204": { - "description": "leaf index updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "delete": { - "tags": [ - "data", - "delete" - ], - "summary": "The index key of the entry in the next-hop list. Currently only\none static entry is supported per destination prefix, so the\nindex should always be 1.", - "description": "The index key of the entry in the next-hop list. Currently only\none static entry is supported per destination prefix, so the\nindex should always be 1.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_routes_ipv4_static_route_ipv4_static_route_destination_next_hop_next_hop_index_index_delete", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/ipv4-static-route-destination" - }, - { - "$ref": "#/parameters/next-hop-index" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/routes/ipv4-static-route={ipv4-static-route-destination}/next-hop={next-hop-index}/ip-address": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "IPv4 route next-hop or gateway address associated with the route. If\nnot specified, the default gateway value for the local management\ninterface will be used.", - "description": "IPv4 route next-hop or gateway address associated with the route. If\nnot specified, the default gateway value for the local management\ninterface will be used.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_routes_ipv4_static_route_ipv4_static_route_destination_next_hop_next_hop_index_ip_address_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/ipv4-static-route-destination" - }, - { - "$ref": "#/parameters/next-hop-index" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "IPv4 route next-hop or gateway address associated with the route. If\nnot specified, the default gateway value for the local management\ninterface will be used.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination_next-hop_next-hop-index_ip-address" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "put": { - "tags": [ - "data", - "put" - ], - "summary": "IPv4 route next-hop or gateway address associated with the route. If\nnot specified, the default gateway value for the local management\ninterface will be used.", - "description": "IPv4 route next-hop or gateway address associated with the route. If\nnot specified, the default gateway value for the local management\ninterface will be used.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_routes_ipv4_static_route_ipv4_static_route_destination_next_hop_next_hop_index_ip_address_put", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/ipv4-static-route-destination" - }, - { - "$ref": "#/parameters/next-hop-index" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination_next-hop_next-hop-index_ip-address" - } - ], - "responses": { - "201": { - "description": "leaf ip-address created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "patch": { - "tags": [ - "data", - "patch" - ], - "summary": "IPv4 route next-hop or gateway address associated with the route. If\nnot specified, the default gateway value for the local management\ninterface will be used.", - "description": "IPv4 route next-hop or gateway address associated with the route. If\nnot specified, the default gateway value for the local management\ninterface will be used.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_routes_ipv4_static_route_ipv4_static_route_destination_next_hop_next_hop_index_ip_address_patch", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/ipv4-static-route-destination" - }, - { - "$ref": "#/parameters/next-hop-index" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination_next-hop_next-hop-index_ip-address" - } - ], - "responses": { - "204": { - "description": "leaf ip-address updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "delete": { - "tags": [ - "data", - "delete" - ], - "summary": "IPv4 route next-hop or gateway address associated with the route. If\nnot specified, the default gateway value for the local management\ninterface will be used.", - "description": "IPv4 route next-hop or gateway address associated with the route. If\nnot specified, the default gateway value for the local management\ninterface will be used.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_routes_ipv4_static_route_ipv4_static_route_destination_next_hop_next_hop_index_ip_address_delete", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/ipv4-static-route-destination" - }, - { - "$ref": "#/parameters/next-hop-index" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/routes/ipv4-static-route={ipv4-static-route-destination}/next-hop={next-hop-index}/metric": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "Routing metric cost.", - "description": "Routing metric cost.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_routes_ipv4_static_route_ipv4_static_route_destination_next_hop_next_hop_index_metric_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/ipv4-static-route-destination" - }, - { - "$ref": "#/parameters/next-hop-index" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "Routing metric cost.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination_next-hop_next-hop-index_metric" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "put": { - "tags": [ - "data", - "put" - ], - "summary": "Routing metric cost.", - "description": "Routing metric cost.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_routes_ipv4_static_route_ipv4_static_route_destination_next_hop_next_hop_index_metric_put", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/ipv4-static-route-destination" - }, - { - "$ref": "#/parameters/next-hop-index" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination_next-hop_next-hop-index_metric" - } - ], - "responses": { - "201": { - "description": "leaf metric created or replaced" - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "patch": { - "tags": [ - "data", - "patch" - ], - "summary": "Routing metric cost.", - "description": "Routing metric cost.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_routes_ipv4_static_route_ipv4_static_route_destination_next_hop_next_hop_index_metric_patch", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/ipv4-static-route-destination" - }, - { - "$ref": "#/parameters/next-hop-index" - }, - { - "$ref": "#/parameters/data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination_next-hop_next-hop-index_metric" - } - ], - "responses": { - "204": { - "description": "leaf metric updated" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - }, - "delete": { - "tags": [ - "data", - "delete" - ], - "summary": "Routing metric cost.", - "description": "Routing metric cost.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_routes_ipv4_static_route_ipv4_static_route_destination_next_hop_next_hop_index_metric_delete", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/ipv4-static-route-destination" - }, - { - "$ref": "#/parameters/next-hop-index" - } - ], - "responses": { - "204": { - "$ref": "#/responses/204" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/routes/ipv4-static-route={ipv4-static-route-destination}/next-hop={next-hop-index}/associated-interface": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "Reference to the associated logical-interface name of the route entry.\nDefaults to the 'local' interface for routes within the subnet\nassociated with the active IP address configured on the local\nmanagement interface.", - "description": "Reference to the associated logical-interface name of the route entry.\nDefaults to the 'local' interface for routes within the subnet\nassociated with the active IP address configured on the local\nmanagement interface.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_routes_ipv4_static_route_ipv4_static_route_destination_next_hop_next_hop_index_associated_interface_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/ipv4-static-route-destination" - }, - { - "$ref": "#/parameters/next-hop-index" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "Reference to the associated logical-interface name of the route entry.\nDefaults to the 'local' interface for routes within the subnet\nassociated with the active IP address configured on the local\nmanagement interface.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination_next-hop_next-hop-index_associated-interface" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/routes/ipv4-static-route={ipv4-static-route-destination}/next-hop={next-hop-index}/static": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "Specifies whether the route entry is user-created (static) or\ndynamically created by a routing protocol.", - "description": "Specifies whether the route entry is user-created (static) or\ndynamically created by a routing protocol.", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_routes_ipv4_static_route_ipv4_static_route_destination_next_hop_next_hop_index_static_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/ipv4-static-route-destination" - }, - { - "$ref": "#/parameters/next-hop-index" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "Specifies whether the route entry is user-created (static) or\ndynamically created by a routing protocol.", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination_next-hop_next-hop-index_static" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - }, - "/data/ciena-waveserver-interfaces:waveserver-interfaces/routes/ipv4-static-route={ipv4-static-route-destination}/next-hop={next-hop-index}/active": { - "get": { - "tags": [ - "data", - "get" - ], - "summary": "Specifies whether the route is active (present in the kernel IP\nrouting table).", - "description": "Specifies whether the route is active (present in the kernel IP\nrouting table).", - "operationId": "data_ciena_waveserver_interfaces_waveserver_interfaces_routes_ipv4_static_route_ipv4_static_route_destination_next_hop_next_hop_index_active_get", - "produces": [ - "application/yang-data+json" - ], - "parameters": [ - { - "$ref": "#/parameters/ipv4-static-route-destination" - }, - { - "$ref": "#/parameters/next-hop-index" - }, - { - "$ref": "#/parameters/content" - }, - { - "$ref": "#/parameters/depth" - }, - { - "$ref": "#/parameters/fields" - }, - { - "$ref": "#/parameters/filter" - }, - { - "$ref": "#/parameters/with-defaults" - } - ], - "responses": { - "200": { - "description": "Specifies whether the route is active (present in the kernel IP\nrouting table).", - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination_next-hop_next-hop-index_active" - } - }, - "204": { - "$ref": "#/responses/204" - }, - "400": { - "$ref": "#/responses/400" - }, - "401": { - "$ref": "#/responses/401" - }, - "404": { - "$ref": "#/responses/404" - }, - "405": { - "$ref": "#/responses/405" - }, - "409": { - "$ref": "#/responses/409" - } - }, - "security": [ - { - "basicAuth": [] - } - ] - } - } - }, - "parameters": { - "content": { - "name": "content", - "in": "query", - "description": "controlling descendant nodes in response", - "required": false, - "type": "string", - "format": "enumeration", - "default": "config", - "enum": [ - "config", - "nonconfig", - "all" - ] - }, - "depth": { - "name": "depth", - "in": "query", - "description": "limit the depth of nodes in response", - "required": false, - "type": "integer", - "format": "uint16" - }, - "fields": { - "name": "fields", - "in": "query", - "description": "optionally identify specific data nodes in response", - "required": false, - "type": "string", - "format": "string" - }, - "filter": { - "name": "filter", - "in": "query", - "description": "xpath expression to filter data nodes in response", - "required": false, - "type": "string", - "format": "string" - }, - "with-defaults": { - "name": "with-defaults", - "in": "query", - "description": "controlling default values in response", - "required": false, - "type": "string", - "format": "enumeration", - "default": "report-all", - "enum": [ - "report-all", - "trim", - "explicit", - "report-all-tagged" - ] - }, - "insert": { - "name": "insert", - "in": "query", - "description": "controlling the order when adding new list elements", - "required": false, - "type": "string", - "format": "enumeration", - "default": "first", - "enum": [ - "first", - "last", - "before", - "after" - ] - }, - "point": { - "name": "point", - "in": "query", - "description": "used to specify the insertion point", - "required": false, - "type": "string", - "format": "string" - }, - "physical-interface-name": { - "name": "physical-interface-name", - "in": "path", - "description": "References the system-assigned name of the interface.", - "required": true, - "type": "string", - "format": "leafref" - }, - "next-hop-index": { - "name": "next-hop-index", - "in": "path", - "description": "The index key of the entry in the next-hop list. Currently only\none static entry is supported per destination prefix, so the\nindex should always be 1.", - "required": true, - "type": "integer", - "format": "uint32" - }, - "logical-interface-index": { - "name": "logical-interface-index", - "in": "path", - "description": "References the system-assigned index of the logical interface.", - "required": true, - "type": "string", - "format": "leafref" - }, - "ipv4-static-route-destination": { - "name": "ipv4-static-route-destination", - "in": "path", - "description": "IPv4 route destination prefix for the static route. Only one static\nrouting entry per unique destination ip/prefix can be configured.", - "required": true, - "type": "string", - "format": "string" - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination_next-hop_next-hop-index_metric": { - "name": "metric", - "in": "body", - "description": "Routing metric cost.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination_next-hop_next-hop-index_metric" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination_next-hop_next-hop-index_ip-address": { - "name": "ip-address", - "in": "body", - "description": "IPv4 route next-hop or gateway address associated with the route. If\nnot specified, the default gateway value for the local management\ninterface will be used.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination_next-hop_next-hop-index_ip-address" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination_next-hop_next-hop-index_index": { - "name": "index", - "in": "body", - "description": "The index key of the entry in the next-hop list. Currently only\none static entry is supported per destination prefix, so the\nindex should always be 1.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination_next-hop_next-hop-index_index" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination_next-hop_next-hop-index": { - "name": "next-hop", - "in": "body", - "description": "A list of next-hop entries associated with the static route.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination_next-hop_next-hop-index" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination_destination": { - "name": "destination", - "in": "body", - "description": "IPv4 route destination prefix for the static route. Only one static\nrouting entry per unique destination ip/prefix can be configured.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination_destination" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination": { - "name": "ipv4-static-route", - "in": "body", - "description": "List of IPv4 static routing entries.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_routes-post": { - "name": "routes", - "in": "body", - "description": "Top-level container for IP route configuration and operational data.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_routes-post" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_routes": { - "name": "routes", - "in": "body", - "description": "Top-level container for IP route configuration and operational data.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_routes" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_state_admin-state": { - "name": "admin-state", - "in": "body", - "description": "Whether Admin State is enabled or disabled for this management interface.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_state_admin-state" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_state-post": { - "name": "state", - "in": "body", - "description": "Physical management interface state information.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_state-post" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_state": { - "name": "state", - "in": "body", - "description": "Physical management interface state information.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_state" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties_management_mode": { - "name": "mode", - "in": "body", - "description": "Management port mode. Specifies whether the port is configured as a\nlocal management interface or wayside communications channel (carry\nthrough).", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties_management_mode" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties_management-post": { - "name": "management", - "in": "body", - "description": "Management interface attributes.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties_management-post" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties_management": { - "name": "management", - "in": "body", - "description": "Management interface attributes.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties_management" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties_ethernet-post": { - "name": "ethernet", - "in": "body", - "description": "Ethernet interface attributes.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties_ethernet-post" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties_ethernet": { - "name": "ethernet", - "in": "body", - "description": "Ethernet interface attributes.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties_ethernet" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties-post": { - "name": "properties", - "in": "body", - "description": "All the configuration data of the physical management interface.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties-post" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties": { - "name": "properties", - "in": "body", - "description": "All the configuration data of the physical management interface.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_name": { - "name": "name", - "in": "body", - "description": "References the system-assigned name of the interface.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_name" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_id_type": { - "name": "type", - "in": "body", - "description": "Management port type. If the port is DCN, ILAN-1, or ILAN-2, the\nport type will be 'ethernet'. If the port is Console, the port\ntype will be 'serial'.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_id_type" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_id_name": { - "name": "name", - "in": "body", - "description": "The system-assigned name of the physical interface (e.g. DCN,\nILAN-1, ILAN-2). The names are predefined.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_id_name" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_id-post": { - "name": "id", - "in": "body", - "description": "Identification information of this management interface.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_id-post" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_id": { - "name": "id", - "in": "body", - "description": "Identification information of this management interface.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_id" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name": { - "name": "physical-interface", - "in": "body", - "description": "List of physical Ethernet management interfaces.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_state_admin-state": { - "name": "admin-state", - "in": "body", - "description": "Whether Admin State is enabled or disabled for this management interface.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_state_admin-state" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_state-post": { - "name": "state", - "in": "body", - "description": "Logical interface state information.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_state-post" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_state": { - "name": "state", - "in": "body", - "description": "Logical interface state information.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_state" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4_user-ip-address": { - "name": "user-ip-address", - "in": "body", - "description": "The user-configured IPv4 address and prefix on the interface.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4_user-ip-address" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4_user-gateway": { - "name": "user-gateway", - "in": "body", - "description": "The user-configured primary IPv4 gateway on the interface.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4_user-gateway" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4_backup-gateway": { - "name": "backup-gateway", - "in": "body", - "description": "The user-configured backup IPv4 gateway on the interface.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4_backup-gateway" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4_admin-state": { - "name": "admin-state", - "in": "body", - "description": "Whether IPv4 stack is enabled or disabled on this interface.\nAlways enabled for the local management interface.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4_admin-state" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4-post": { - "name": "ipv4", - "in": "body", - "description": "IPv4 configuration and operational data.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4-post" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4": { - "name": "ipv4", - "in": "body", - "description": "IPv4 configuration and operational data.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties-post": { - "name": "properties", - "in": "body", - "description": "All the configuration data of the logical management interface.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties-post" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties": { - "name": "properties", - "in": "body", - "description": "All the configuration data of the logical management interface.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_index": { - "name": "index", - "in": "body", - "description": "References the system-assigned index of the logical interface.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_index" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_id_index": { - "name": "index", - "in": "body", - "description": "The index of the logical management interface. Waveserver supports\na single logical interface 'local' that is automatically created by\nthe system. The default index is 1 for the 'local' interface.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_id_index" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_id-post": { - "name": "id", - "in": "body", - "description": "Identification information of this logical management interface.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_id-post" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_id": { - "name": "id", - "in": "body", - "description": "Identification information of this logical management interface.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_id" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index": { - "name": "logical-interface", - "in": "body", - "description": "List of logical IP management interfaces (e.g. 'local').", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces-post": { - "name": "waveserver-interfaces", - "in": "body", - "description": "Top level container for configuration and operational data for physical\nand logical network interfaces.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces-post" - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces": { - "name": "waveserver-interfaces", - "in": "body", - "description": "Top level container for configuration and operational data for physical\nand logical network interfaces.", - "required": true, - "schema": { - "$ref": "#/definitions/data_ciena-waveserver-interfaces_waveserver-interfaces" - } - }, - "data-put-patch": { - "name": "data", - "in": "body", - "description": "This module defines Ethernet and IP management interfaces support for\nCiena's Waveserver Platform.", - "required": true, - "schema": { - "$ref": "#/definitions/data-put-patch" - } - }, - "data-post": { - "name": "data", - "in": "body", - "description": "This module defines Ethernet and IP management interfaces support for\nCiena's Waveserver Platform.", - "required": true, - "schema": { - "$ref": "#/definitions/data-post" - } - } - }, - "responses": { - "200": { - "description": "OK" - }, - "201": { - "description": "Created" - }, - "204": { - "description": "No Content" - }, - "400": { - "description": "Bad Request" - }, - "401": { - "description": "Unauthorized" - }, - "404": { - "description": "Not Found" - }, - "405": { - "description": "Method Not Allowed" - }, - "409": { - "description": "Conflict" - } - }, - "securityDefinitions": { - "basicAuth": { - "type": "basic" - } - }, - "definitions": { - "yang-library-version": { - "type": "object", - "properties": { - "ietf-restconf:yang-library-version": { - "type": "object", - "description": "This leaf identifies the revision date of the 'ietf-yang-library' YANG module that is implemented by this server. See RESTCONF RFC 8040 for further information.", - "x-yang": { - "type": "leaf" - }, - "properties": { - } - } - } - }, - "root": { - "type": "object", - "properties": { - "ietf-restconf:restconf": { - "type": "object", - "x-yang": { - "type": "root" - }, - "description": "This is the RESTCONF root resource for the RESTCONF datastore and operation resources. See RESTCONF RFC 8040 for further information.", - "properties": { - "data": { - "type": "object", - "properties": { - } - }, - "operations": { - "type": "object", - "properties": { - } - }, - "yang-library-version": { - "type": "string" - } - } - } - } - }, - "operations": { - "type": "object", - "properties": { - "ietf-restconf:operations": { - "type": "object", - "x-yang": { - "type": "operations" - }, - "description": "This resource is a container that provides access to the data-model-specific RPC operations supported by the server. See RESTCONF RFC 8040 for further information.", - "properties": { - - } - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination_next-hop_next-hop-index_static": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:static": { - "description": "Specifies whether the route entry is user-created (static) or\ndynamically created by a routing protocol. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination_next-hop_next-hop-index_metric": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:metric": { - "description": "Routing metric cost. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination_next-hop_next-hop-index_ip-address": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:ip-address": { - "description": "IPv4 route next-hop or gateway address associated with the route. If\nnot specified, the default gateway value for the local management\ninterface will be used. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination_next-hop_next-hop-index_index": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:index": { - "description": "The index key of the entry in the next-hop list. Currently only\none static entry is supported per destination prefix, so the\nindex should always be 1. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination_next-hop_next-hop-index_associated-interface": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:associated-interface": { - "description": "Reference to the associated logical-interface name of the route entry.\nDefaults to the 'local' interface for routes within the subnet\nassociated with the active IP address configured on the local\nmanagement interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination_next-hop_next-hop-index_active": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:active": { - "description": "Specifies whether the route is active (present in the kernel IP\nrouting table). (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination_next-hop_next-hop-index": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:next-hop": { - "type": "array", - "description": "A list of next-hop entries associated with the static route. (list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "active": { - "description": "Specifies whether the route is active (present in the kernel IP\nrouting table). (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - }, - "associated-interface": { - "description": "Reference to the associated logical-interface name of the route entry.\nDefaults to the 'local' interface for routes within the subnet\nassociated with the active IP address configured on the local\nmanagement interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "index": { - "description": "The index key of the entry in the next-hop list. Currently only\none static entry is supported per destination prefix, so the\nindex should always be 1. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - }, - "ip-address": { - "description": "IPv4 route next-hop or gateway address associated with the route. If\nnot specified, the default gateway value for the local management\ninterface will be used. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "metric": { - "description": "Routing metric cost. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - }, - "static": { - "description": "Specifies whether the route entry is user-created (static) or\ndynamically created by a routing protocol. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - } - } - } - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination_destination": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:destination": { - "description": "IPv4 route destination prefix for the static route. Only one static\nrouting entry per unique destination ip/prefix can be configured. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_routes_ipv4-static-route_ipv4-static-route-destination": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:ipv4-static-route": { - "type": "array", - "description": "List of IPv4 static routing entries. (list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "destination": { - "description": "IPv4 route destination prefix for the static route. Only one static\nrouting entry per unique destination ip/prefix can be configured. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "next-hop": { - "type": "array", - "description": "A list of next-hop entries associated with the static route. (list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "active": { - "description": "Specifies whether the route is active (present in the kernel IP\nrouting table). (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - }, - "associated-interface": { - "description": "Reference to the associated logical-interface name of the route entry.\nDefaults to the 'local' interface for routes within the subnet\nassociated with the active IP address configured on the local\nmanagement interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "index": { - "description": "The index key of the entry in the next-hop list. Currently only\none static entry is supported per destination prefix, so the\nindex should always be 1. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - }, - "ip-address": { - "description": "IPv4 route next-hop or gateway address associated with the route. If\nnot specified, the default gateway value for the local management\ninterface will be used. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "metric": { - "description": "Routing metric cost. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - }, - "static": { - "description": "Specifies whether the route entry is user-created (static) or\ndynamically created by a routing protocol. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - } - } - } - } - } - } - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_routes-post": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:ipv4-static-route": { - "type": "array", - "description": "List of IPv4 static routing entries. (list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "destination": { - "description": "IPv4 route destination prefix for the static route. Only one static\nrouting entry per unique destination ip/prefix can be configured. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "next-hop": { - "type": "array", - "description": "A list of next-hop entries associated with the static route. (list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "active": { - "description": "Specifies whether the route is active (present in the kernel IP\nrouting table). (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - }, - "associated-interface": { - "description": "Reference to the associated logical-interface name of the route entry.\nDefaults to the 'local' interface for routes within the subnet\nassociated with the active IP address configured on the local\nmanagement interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "index": { - "description": "The index key of the entry in the next-hop list. Currently only\none static entry is supported per destination prefix, so the\nindex should always be 1. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - }, - "ip-address": { - "description": "IPv4 route next-hop or gateway address associated with the route. If\nnot specified, the default gateway value for the local management\ninterface will be used. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "metric": { - "description": "Routing metric cost. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - }, - "static": { - "description": "Specifies whether the route entry is user-created (static) or\ndynamically created by a routing protocol. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - } - } - } - } - } - } - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_routes": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:routes": { - "description": "Top-level container for IP route configuration and operational data. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "ipv4-static-route": { - "type": "array", - "description": "List of IPv4 static routing entries. (list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "destination": { - "description": "IPv4 route destination prefix for the static route. Only one static\nrouting entry per unique destination ip/prefix can be configured. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "next-hop": { - "type": "array", - "description": "A list of next-hop entries associated with the static route. (list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "active": { - "description": "Specifies whether the route is active (present in the kernel IP\nrouting table). (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - }, - "associated-interface": { - "description": "Reference to the associated logical-interface name of the route entry.\nDefaults to the 'local' interface for routes within the subnet\nassociated with the active IP address configured on the local\nmanagement interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "index": { - "description": "The index key of the entry in the next-hop list. Currently only\none static entry is supported per destination prefix, so the\nindex should always be 1. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - }, - "ip-address": { - "description": "IPv4 route next-hop or gateway address associated with the route. If\nnot specified, the default gateway value for the local management\ninterface will be used. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "metric": { - "description": "Routing metric cost. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - }, - "static": { - "description": "Specifies whether the route entry is user-created (static) or\ndynamically created by a routing protocol. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - } - } - } - } - } - } - } - } - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_state_operational-state": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:operational-state": { - "description": "Operational state of this management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "down", - "enum": [ - "down", - "up" - ] - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_state_admin-state": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:admin-state": { - "description": "Whether Admin State is enabled or disabled for this management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "disabled", - "enum": [ - "disabled", - "enabled" - ] - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_state-post": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:admin-state": { - "description": "Whether Admin State is enabled or disabled for this management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "disabled", - "enum": [ - "disabled", - "enabled" - ] - }, - "ciena-waveserver-interfaces:operational-state": { - "description": "Operational state of this management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "down", - "enum": [ - "down", - "up" - ] - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_state": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:state": { - "description": "Physical management interface state information. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "admin-state": { - "description": "Whether Admin State is enabled or disabled for this management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "disabled", - "enum": [ - "disabled", - "enabled" - ] - }, - "operational-state": { - "description": "Operational state of this management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "down", - "enum": [ - "down", - "up" - ] - } - } - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties_management_mode": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:mode": { - "description": "Management port mode. Specifies whether the port is configured as a\nlocal management interface or wayside communications channel (carry\nthrough). (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "management", - "enum": [ - "management", - "wayside-channel" - ] - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties_management-post": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:mode": { - "description": "Management port mode. Specifies whether the port is configured as a\nlocal management interface or wayside communications channel (carry\nthrough). (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "management", - "enum": [ - "management", - "wayside-channel" - ] - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties_management": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:management": { - "description": "Management interface attributes. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "mode": { - "description": "Management port mode. Specifies whether the port is configured as a\nlocal management interface or wayside communications channel (carry\nthrough). (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "management", - "enum": [ - "management", - "wayside-channel" - ] - } - } - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties_ethernet_speed": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:speed": { - "description": "Ethernet port speed. For ports with auto-negotiation enabled, this\nrepresents the negotiated port speed. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "Unknown", - "enum": [ - "Unknown", - "10M", - "100M", - "1G", - "10G" - ] - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties_ethernet_mac-address": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:mac-address": { - "description": "The system-assigned MAC address of the Ethernet interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties_ethernet_flow-control": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:flow-control": { - "description": "Specifies whether this interface will participate in Ethernet flow\ncontrol, via pause frames. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties_ethernet_duplex": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:duplex": { - "description": "Ethernet interface duplex mode. For ports with auto-negotiation enabled,\nthis represents the negotiated duplex mode. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "Unknown", - "enum": [ - "Unknown", - "full", - "half" - ] - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties_ethernet_auto-negotiation": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:auto-negotiation": { - "description": "Specifies whether the interface should negotiate common transmission\nparameters, such as speed, duplex, and flow control with its peer. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties_ethernet-post": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:speed": { - "description": "Ethernet port speed. For ports with auto-negotiation enabled, this\nrepresents the negotiated port speed. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "Unknown", - "enum": [ - "Unknown", - "10M", - "100M", - "1G", - "10G" - ] - }, - "ciena-waveserver-interfaces:duplex": { - "description": "Ethernet interface duplex mode. For ports with auto-negotiation enabled,\nthis represents the negotiated duplex mode. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "Unknown", - "enum": [ - "Unknown", - "full", - "half" - ] - }, - "ciena-waveserver-interfaces:flow-control": { - "description": "Specifies whether this interface will participate in Ethernet flow\ncontrol, via pause frames. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - }, - "ciena-waveserver-interfaces:auto-negotiation": { - "description": "Specifies whether the interface should negotiate common transmission\nparameters, such as speed, duplex, and flow control with its peer. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - }, - "ciena-waveserver-interfaces:mac-address": { - "description": "The system-assigned MAC address of the Ethernet interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties_ethernet": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:ethernet": { - "description": "Ethernet interface attributes. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "speed": { - "description": "Ethernet port speed. For ports with auto-negotiation enabled, this\nrepresents the negotiated port speed. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "Unknown", - "enum": [ - "Unknown", - "10M", - "100M", - "1G", - "10G" - ] - }, - "duplex": { - "description": "Ethernet interface duplex mode. For ports with auto-negotiation enabled,\nthis represents the negotiated duplex mode. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "Unknown", - "enum": [ - "Unknown", - "full", - "half" - ] - }, - "flow-control": { - "description": "Specifies whether this interface will participate in Ethernet flow\ncontrol, via pause frames. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - }, - "auto-negotiation": { - "description": "Specifies whether the interface should negotiate common transmission\nparameters, such as speed, duplex, and flow control with its peer. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - }, - "mac-address": { - "description": "The system-assigned MAC address of the Ethernet interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties-post": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:management": { - "description": "Management interface attributes. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "mode": { - "description": "Management port mode. Specifies whether the port is configured as a\nlocal management interface or wayside communications channel (carry\nthrough). (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "management", - "enum": [ - "management", - "wayside-channel" - ] - } - } - }, - "ciena-waveserver-interfaces:ethernet": { - "description": "Ethernet interface attributes. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "speed": { - "description": "Ethernet port speed. For ports with auto-negotiation enabled, this\nrepresents the negotiated port speed. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "Unknown", - "enum": [ - "Unknown", - "10M", - "100M", - "1G", - "10G" - ] - }, - "duplex": { - "description": "Ethernet interface duplex mode. For ports with auto-negotiation enabled,\nthis represents the negotiated duplex mode. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "Unknown", - "enum": [ - "Unknown", - "full", - "half" - ] - }, - "flow-control": { - "description": "Specifies whether this interface will participate in Ethernet flow\ncontrol, via pause frames. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - }, - "auto-negotiation": { - "description": "Specifies whether the interface should negotiate common transmission\nparameters, such as speed, duplex, and flow control with its peer. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - }, - "mac-address": { - "description": "The system-assigned MAC address of the Ethernet interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_properties": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:properties": { - "description": "All the configuration data of the physical management interface. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "management": { - "description": "Management interface attributes. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "mode": { - "description": "Management port mode. Specifies whether the port is configured as a\nlocal management interface or wayside communications channel (carry\nthrough). (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "management", - "enum": [ - "management", - "wayside-channel" - ] - } - } - }, - "ethernet": { - "description": "Ethernet interface attributes. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "speed": { - "description": "Ethernet port speed. For ports with auto-negotiation enabled, this\nrepresents the negotiated port speed. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "Unknown", - "enum": [ - "Unknown", - "10M", - "100M", - "1G", - "10G" - ] - }, - "duplex": { - "description": "Ethernet interface duplex mode. For ports with auto-negotiation enabled,\nthis represents the negotiated duplex mode. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "Unknown", - "enum": [ - "Unknown", - "full", - "half" - ] - }, - "flow-control": { - "description": "Specifies whether this interface will participate in Ethernet flow\ncontrol, via pause frames. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - }, - "auto-negotiation": { - "description": "Specifies whether the interface should negotiate common transmission\nparameters, such as speed, duplex, and flow control with its peer. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - }, - "mac-address": { - "description": "The system-assigned MAC address of the Ethernet interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - } - } - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_name": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:name": { - "description": "References the system-assigned name of the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "leafref" - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_id_type": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:type": { - "description": "Management port type. If the port is DCN, ILAN-1, or ILAN-2, the\nport type will be 'ethernet'. If the port is Console, the port\ntype will be 'serial'. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "ethernet", - "enum": [ - "ethernet", - "serial" - ] - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_id_name": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:name": { - "description": "The system-assigned name of the physical interface (e.g. DCN,\nILAN-1, ILAN-2). The names are predefined. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_id_ifindex": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:ifindex": { - "description": "The system-assigned interface index number, corresponding to the\nifIndex in SNMP IF-MIB. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_id_description": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:description": { - "description": "Physical interface description, e.g. 'Management'. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_id-post": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:name": { - "description": "The system-assigned name of the physical interface (e.g. DCN,\nILAN-1, ILAN-2). The names are predefined. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "ciena-waveserver-interfaces:type": { - "description": "Management port type. If the port is DCN, ILAN-1, or ILAN-2, the\nport type will be 'ethernet'. If the port is Console, the port\ntype will be 'serial'. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "ethernet", - "enum": [ - "ethernet", - "serial" - ] - }, - "ciena-waveserver-interfaces:description": { - "description": "Physical interface description, e.g. 'Management'. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "ciena-waveserver-interfaces:ifindex": { - "description": "The system-assigned interface index number, corresponding to the\nifIndex in SNMP IF-MIB. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name_id": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:id": { - "description": "Identification information of this management interface. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "name": { - "description": "The system-assigned name of the physical interface (e.g. DCN,\nILAN-1, ILAN-2). The names are predefined. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "type": { - "description": "Management port type. If the port is DCN, ILAN-1, or ILAN-2, the\nport type will be 'ethernet'. If the port is Console, the port\ntype will be 'serial'. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "ethernet", - "enum": [ - "ethernet", - "serial" - ] - }, - "description": { - "description": "Physical interface description, e.g. 'Management'. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "ifindex": { - "description": "The system-assigned interface index number, corresponding to the\nifIndex in SNMP IF-MIB. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - } - } - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_physical-interface_physical-interface-name": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:physical-interface": { - "type": "array", - "description": "List of physical Ethernet management interfaces. (list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "id": { - "description": "Identification information of this management interface. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "name": { - "description": "The system-assigned name of the physical interface (e.g. DCN,\nILAN-1, ILAN-2). The names are predefined. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "type": { - "description": "Management port type. If the port is DCN, ILAN-1, or ILAN-2, the\nport type will be 'ethernet'. If the port is Console, the port\ntype will be 'serial'. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "ethernet", - "enum": [ - "ethernet", - "serial" - ] - }, - "description": { - "description": "Physical interface description, e.g. 'Management'. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "ifindex": { - "description": "The system-assigned interface index number, corresponding to the\nifIndex in SNMP IF-MIB. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - } - } - }, - "name": { - "description": "References the system-assigned name of the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "leafref" - }, - "properties": { - "description": "All the configuration data of the physical management interface. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "management": { - "description": "Management interface attributes. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "mode": { - "description": "Management port mode. Specifies whether the port is configured as a\nlocal management interface or wayside communications channel (carry\nthrough). (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "management", - "enum": [ - "management", - "wayside-channel" - ] - } - } - }, - "ethernet": { - "description": "Ethernet interface attributes. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "speed": { - "description": "Ethernet port speed. For ports with auto-negotiation enabled, this\nrepresents the negotiated port speed. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "Unknown", - "enum": [ - "Unknown", - "10M", - "100M", - "1G", - "10G" - ] - }, - "duplex": { - "description": "Ethernet interface duplex mode. For ports with auto-negotiation enabled,\nthis represents the negotiated duplex mode. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "Unknown", - "enum": [ - "Unknown", - "full", - "half" - ] - }, - "flow-control": { - "description": "Specifies whether this interface will participate in Ethernet flow\ncontrol, via pause frames. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - }, - "auto-negotiation": { - "description": "Specifies whether the interface should negotiate common transmission\nparameters, such as speed, duplex, and flow control with its peer. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - }, - "mac-address": { - "description": "The system-assigned MAC address of the Ethernet interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - } - } - }, - "state": { - "description": "Physical management interface state information. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "admin-state": { - "description": "Whether Admin State is enabled or disabled for this management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "disabled", - "enum": [ - "disabled", - "enabled" - ] - }, - "operational-state": { - "description": "Operational state of this management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "down", - "enum": [ - "down", - "up" - ] - } - } - } - } - } - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_state_operational-state": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:operational-state": { - "description": "Operational state of this management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "down", - "enum": [ - "down", - "up" - ] - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_state_admin-state": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:admin-state": { - "description": "Whether Admin State is enabled or disabled for this management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "disabled", - "enum": [ - "disabled", - "enabled" - ] - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_state-post": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:admin-state": { - "description": "Whether Admin State is enabled or disabled for this management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "disabled", - "enum": [ - "disabled", - "enabled" - ] - }, - "ciena-waveserver-interfaces:operational-state": { - "description": "Operational state of this management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "down", - "enum": [ - "down", - "up" - ] - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_state": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:state": { - "description": "Logical interface state information. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "admin-state": { - "description": "Whether Admin State is enabled or disabled for this management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "disabled", - "enum": [ - "disabled", - "enabled" - ] - }, - "operational-state": { - "description": "Operational state of this management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "down", - "enum": [ - "down", - "up" - ] - } - } - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4_user-ip-address": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:user-ip-address": { - "description": "The user-configured IPv4 address and prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4_user-gateway": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:user-gateway": { - "description": "The user-configured primary IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4_oper-ip-address": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:oper-ip-address": { - "description": "The operational IPv4 address and prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4_oper-gateway": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:oper-gateway": { - "description": "The operational IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4_dhcp-ip-address": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:dhcp-ip-address": { - "description": "The DHCP-assigned IPv4 address and prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4_dhcp-gateway": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:dhcp-gateway": { - "description": "The DHCP-assigned IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4_backup-gateway": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:backup-gateway": { - "description": "The user-configured backup IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4_apipa-ip-address": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:apipa-ip-address": { - "description": "The Automatic Private IP Addressing (APIPA) assigned IPv4 address\nand prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4_admin-state": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:admin-state": { - "description": "Whether IPv4 stack is enabled or disabled on this interface.\nAlways enabled for the local management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "disabled", - "enum": [ - "disabled", - "enabled" - ] - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4-post": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:admin-state": { - "description": "Whether IPv4 stack is enabled or disabled on this interface.\nAlways enabled for the local management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "disabled", - "enum": [ - "disabled", - "enabled" - ] - }, - "ciena-waveserver-interfaces:user-ip-address": { - "description": "The user-configured IPv4 address and prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "ciena-waveserver-interfaces:oper-ip-address": { - "description": "The operational IPv4 address and prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "ciena-waveserver-interfaces:dhcp-ip-address": { - "description": "The DHCP-assigned IPv4 address and prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "ciena-waveserver-interfaces:apipa-ip-address": { - "description": "The Automatic Private IP Addressing (APIPA) assigned IPv4 address\nand prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "ciena-waveserver-interfaces:user-gateway": { - "description": "The user-configured primary IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "ciena-waveserver-interfaces:backup-gateway": { - "description": "The user-configured backup IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "ciena-waveserver-interfaces:oper-gateway": { - "description": "The operational IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "ciena-waveserver-interfaces:dhcp-gateway": { - "description": "The DHCP-assigned IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties_ipv4": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:ipv4": { - "description": "IPv4 configuration and operational data. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "admin-state": { - "description": "Whether IPv4 stack is enabled or disabled on this interface.\nAlways enabled for the local management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "disabled", - "enum": [ - "disabled", - "enabled" - ] - }, - "user-ip-address": { - "description": "The user-configured IPv4 address and prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "oper-ip-address": { - "description": "The operational IPv4 address and prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "dhcp-ip-address": { - "description": "The DHCP-assigned IPv4 address and prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "apipa-ip-address": { - "description": "The Automatic Private IP Addressing (APIPA) assigned IPv4 address\nand prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "user-gateway": { - "description": "The user-configured primary IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "backup-gateway": { - "description": "The user-configured backup IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "oper-gateway": { - "description": "The operational IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "dhcp-gateway": { - "description": "The DHCP-assigned IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties-post": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:ipv4": { - "description": "IPv4 configuration and operational data. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "admin-state": { - "description": "Whether IPv4 stack is enabled or disabled on this interface.\nAlways enabled for the local management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "disabled", - "enum": [ - "disabled", - "enabled" - ] - }, - "user-ip-address": { - "description": "The user-configured IPv4 address and prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "oper-ip-address": { - "description": "The operational IPv4 address and prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "dhcp-ip-address": { - "description": "The DHCP-assigned IPv4 address and prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "apipa-ip-address": { - "description": "The Automatic Private IP Addressing (APIPA) assigned IPv4 address\nand prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "user-gateway": { - "description": "The user-configured primary IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "backup-gateway": { - "description": "The user-configured backup IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "oper-gateway": { - "description": "The operational IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "dhcp-gateway": { - "description": "The DHCP-assigned IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_properties": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:properties": { - "description": "All the configuration data of the logical management interface. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "ipv4": { - "description": "IPv4 configuration and operational data. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "admin-state": { - "description": "Whether IPv4 stack is enabled or disabled on this interface.\nAlways enabled for the local management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "disabled", - "enum": [ - "disabled", - "enabled" - ] - }, - "user-ip-address": { - "description": "The user-configured IPv4 address and prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "oper-ip-address": { - "description": "The operational IPv4 address and prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "dhcp-ip-address": { - "description": "The DHCP-assigned IPv4 address and prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "apipa-ip-address": { - "description": "The Automatic Private IP Addressing (APIPA) assigned IPv4 address\nand prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "user-gateway": { - "description": "The user-configured primary IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "backup-gateway": { - "description": "The user-configured backup IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "oper-gateway": { - "description": "The operational IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "dhcp-gateway": { - "description": "The DHCP-assigned IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - } - } - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_index": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:index": { - "description": "References the system-assigned index of the logical interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "leafref" - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_id_name": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:name": { - "description": "The name of the logical management interface, e.g. 'local'. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_id_index": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:index": { - "description": "The index of the logical management interface. Waveserver supports\na single logical interface 'local' that is automatically created by\nthe system. The default index is 1 for the 'local' interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_id_ifindex": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:ifindex": { - "description": "The system-assigned interface index number, corresponding to the\nifIndex in SNMP IF-MIB. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_id-post": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:index": { - "description": "The index of the logical management interface. Waveserver supports\na single logical interface 'local' that is automatically created by\nthe system. The default index is 1 for the 'local' interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - }, - "ciena-waveserver-interfaces:name": { - "description": "The name of the logical management interface, e.g. 'local'. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "ciena-waveserver-interfaces:ifindex": { - "description": "The system-assigned interface index number, corresponding to the\nifIndex in SNMP IF-MIB. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index_id": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:id": { - "description": "Identification information of this logical management interface. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "index": { - "description": "The index of the logical management interface. Waveserver supports\na single logical interface 'local' that is automatically created by\nthe system. The default index is 1 for the 'local' interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - }, - "name": { - "description": "The name of the logical management interface, e.g. 'local'. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "ifindex": { - "description": "The system-assigned interface index number, corresponding to the\nifIndex in SNMP IF-MIB. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - } - } - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces_logical-interface_logical-interface-index": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:logical-interface": { - "type": "array", - "description": "List of logical IP management interfaces (e.g. 'local'). (list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "id": { - "description": "Identification information of this logical management interface. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "index": { - "description": "The index of the logical management interface. Waveserver supports\na single logical interface 'local' that is automatically created by\nthe system. The default index is 1 for the 'local' interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - }, - "name": { - "description": "The name of the logical management interface, e.g. 'local'. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "ifindex": { - "description": "The system-assigned interface index number, corresponding to the\nifIndex in SNMP IF-MIB. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - } - } - }, - "index": { - "description": "References the system-assigned index of the logical interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "leafref" - }, - "properties": { - "description": "All the configuration data of the logical management interface. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "ipv4": { - "description": "IPv4 configuration and operational data. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "admin-state": { - "description": "Whether IPv4 stack is enabled or disabled on this interface.\nAlways enabled for the local management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "disabled", - "enum": [ - "disabled", - "enabled" - ] - }, - "user-ip-address": { - "description": "The user-configured IPv4 address and prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "oper-ip-address": { - "description": "The operational IPv4 address and prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "dhcp-ip-address": { - "description": "The DHCP-assigned IPv4 address and prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "apipa-ip-address": { - "description": "The Automatic Private IP Addressing (APIPA) assigned IPv4 address\nand prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "user-gateway": { - "description": "The user-configured primary IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "backup-gateway": { - "description": "The user-configured backup IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "oper-gateway": { - "description": "The operational IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "dhcp-gateway": { - "description": "The DHCP-assigned IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - } - } - }, - "state": { - "description": "Logical interface state information. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "admin-state": { - "description": "Whether Admin State is enabled or disabled for this management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "disabled", - "enum": [ - "disabled", - "enabled" - ] - }, - "operational-state": { - "description": "Operational state of this management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "down", - "enum": [ - "down", - "up" - ] - } - } - } - } - } - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces-post": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:physical-interface": { - "type": "array", - "description": "List of physical Ethernet management interfaces. (list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "id": { - "description": "Identification information of this management interface. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "name": { - "description": "The system-assigned name of the physical interface (e.g. DCN,\nILAN-1, ILAN-2). The names are predefined. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "type": { - "description": "Management port type. If the port is DCN, ILAN-1, or ILAN-2, the\nport type will be 'ethernet'. If the port is Console, the port\ntype will be 'serial'. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "ethernet", - "enum": [ - "ethernet", - "serial" - ] - }, - "description": { - "description": "Physical interface description, e.g. 'Management'. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "ifindex": { - "description": "The system-assigned interface index number, corresponding to the\nifIndex in SNMP IF-MIB. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - } - } - }, - "name": { - "description": "References the system-assigned name of the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "leafref" - }, - "properties": { - "description": "All the configuration data of the physical management interface. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "management": { - "description": "Management interface attributes. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "mode": { - "description": "Management port mode. Specifies whether the port is configured as a\nlocal management interface or wayside communications channel (carry\nthrough). (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "management", - "enum": [ - "management", - "wayside-channel" - ] - } - } - }, - "ethernet": { - "description": "Ethernet interface attributes. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "speed": { - "description": "Ethernet port speed. For ports with auto-negotiation enabled, this\nrepresents the negotiated port speed. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "Unknown", - "enum": [ - "Unknown", - "10M", - "100M", - "1G", - "10G" - ] - }, - "duplex": { - "description": "Ethernet interface duplex mode. For ports with auto-negotiation enabled,\nthis represents the negotiated duplex mode. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "Unknown", - "enum": [ - "Unknown", - "full", - "half" - ] - }, - "flow-control": { - "description": "Specifies whether this interface will participate in Ethernet flow\ncontrol, via pause frames. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - }, - "auto-negotiation": { - "description": "Specifies whether the interface should negotiate common transmission\nparameters, such as speed, duplex, and flow control with its peer. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - }, - "mac-address": { - "description": "The system-assigned MAC address of the Ethernet interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - } - } - }, - "state": { - "description": "Physical management interface state information. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "admin-state": { - "description": "Whether Admin State is enabled or disabled for this management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "disabled", - "enum": [ - "disabled", - "enabled" - ] - }, - "operational-state": { - "description": "Operational state of this management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "down", - "enum": [ - "down", - "up" - ] - } - } - } - } - } - }, - "ciena-waveserver-interfaces:logical-interface": { - "type": "array", - "description": "List of logical IP management interfaces (e.g. 'local'). (list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "id": { - "description": "Identification information of this logical management interface. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "index": { - "description": "The index of the logical management interface. Waveserver supports\na single logical interface 'local' that is automatically created by\nthe system. The default index is 1 for the 'local' interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - }, - "name": { - "description": "The name of the logical management interface, e.g. 'local'. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "ifindex": { - "description": "The system-assigned interface index number, corresponding to the\nifIndex in SNMP IF-MIB. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - } - } - }, - "index": { - "description": "References the system-assigned index of the logical interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "leafref" - }, - "properties": { - "description": "All the configuration data of the logical management interface. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "ipv4": { - "description": "IPv4 configuration and operational data. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "admin-state": { - "description": "Whether IPv4 stack is enabled or disabled on this interface.\nAlways enabled for the local management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "disabled", - "enum": [ - "disabled", - "enabled" - ] - }, - "user-ip-address": { - "description": "The user-configured IPv4 address and prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "oper-ip-address": { - "description": "The operational IPv4 address and prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "dhcp-ip-address": { - "description": "The DHCP-assigned IPv4 address and prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "apipa-ip-address": { - "description": "The Automatic Private IP Addressing (APIPA) assigned IPv4 address\nand prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "user-gateway": { - "description": "The user-configured primary IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "backup-gateway": { - "description": "The user-configured backup IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "oper-gateway": { - "description": "The operational IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "dhcp-gateway": { - "description": "The DHCP-assigned IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - } - } - }, - "state": { - "description": "Logical interface state information. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "admin-state": { - "description": "Whether Admin State is enabled or disabled for this management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "disabled", - "enum": [ - "disabled", - "enabled" - ] - }, - "operational-state": { - "description": "Operational state of this management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "down", - "enum": [ - "down", - "up" - ] - } - } - } - } - } - }, - "ciena-waveserver-interfaces:routes": { - "description": "Top-level container for IP route configuration and operational data. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "ipv4-static-route": { - "type": "array", - "description": "List of IPv4 static routing entries. (list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "destination": { - "description": "IPv4 route destination prefix for the static route. Only one static\nrouting entry per unique destination ip/prefix can be configured. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "next-hop": { - "type": "array", - "description": "A list of next-hop entries associated with the static route. (list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "active": { - "description": "Specifies whether the route is active (present in the kernel IP\nrouting table). (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - }, - "associated-interface": { - "description": "Reference to the associated logical-interface name of the route entry.\nDefaults to the 'local' interface for routes within the subnet\nassociated with the active IP address configured on the local\nmanagement interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "index": { - "description": "The index key of the entry in the next-hop list. Currently only\none static entry is supported per destination prefix, so the\nindex should always be 1. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - }, - "ip-address": { - "description": "IPv4 route next-hop or gateway address associated with the route. If\nnot specified, the default gateway value for the local management\ninterface will be used. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "metric": { - "description": "Routing metric cost. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - }, - "static": { - "description": "Specifies whether the route entry is user-created (static) or\ndynamically created by a routing protocol. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - } - } - } - } - } - } - } - } - } - } - }, - "data_ciena-waveserver-interfaces_waveserver-interfaces": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:waveserver-interfaces": { - "description": "Top level container for configuration and operational data for physical\nand logical network interfaces. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "physical-interface": { - "type": "array", - "description": "List of physical Ethernet management interfaces. (list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "id": { - "description": "Identification information of this management interface. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "name": { - "description": "The system-assigned name of the physical interface (e.g. DCN,\nILAN-1, ILAN-2). The names are predefined. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "type": { - "description": "Management port type. If the port is DCN, ILAN-1, or ILAN-2, the\nport type will be 'ethernet'. If the port is Console, the port\ntype will be 'serial'. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "ethernet", - "enum": [ - "ethernet", - "serial" - ] - }, - "description": { - "description": "Physical interface description, e.g. 'Management'. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "ifindex": { - "description": "The system-assigned interface index number, corresponding to the\nifIndex in SNMP IF-MIB. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - } - } - }, - "name": { - "description": "References the system-assigned name of the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "leafref" - }, - "properties": { - "description": "All the configuration data of the physical management interface. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "management": { - "description": "Management interface attributes. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "mode": { - "description": "Management port mode. Specifies whether the port is configured as a\nlocal management interface or wayside communications channel (carry\nthrough). (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "management", - "enum": [ - "management", - "wayside-channel" - ] - } - } - }, - "ethernet": { - "description": "Ethernet interface attributes. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "speed": { - "description": "Ethernet port speed. For ports with auto-negotiation enabled, this\nrepresents the negotiated port speed. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "Unknown", - "enum": [ - "Unknown", - "10M", - "100M", - "1G", - "10G" - ] - }, - "duplex": { - "description": "Ethernet interface duplex mode. For ports with auto-negotiation enabled,\nthis represents the negotiated duplex mode. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "Unknown", - "enum": [ - "Unknown", - "full", - "half" - ] - }, - "flow-control": { - "description": "Specifies whether this interface will participate in Ethernet flow\ncontrol, via pause frames. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - }, - "auto-negotiation": { - "description": "Specifies whether the interface should negotiate common transmission\nparameters, such as speed, duplex, and flow control with its peer. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - }, - "mac-address": { - "description": "The system-assigned MAC address of the Ethernet interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - } - } - }, - "state": { - "description": "Physical management interface state information. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "admin-state": { - "description": "Whether Admin State is enabled or disabled for this management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "disabled", - "enum": [ - "disabled", - "enabled" - ] - }, - "operational-state": { - "description": "Operational state of this management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "down", - "enum": [ - "down", - "up" - ] - } - } - } - } - } - }, - "logical-interface": { - "type": "array", - "description": "List of logical IP management interfaces (e.g. 'local'). (list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "id": { - "description": "Identification information of this logical management interface. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "index": { - "description": "The index of the logical management interface. Waveserver supports\na single logical interface 'local' that is automatically created by\nthe system. The default index is 1 for the 'local' interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - }, - "name": { - "description": "The name of the logical management interface, e.g. 'local'. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "ifindex": { - "description": "The system-assigned interface index number, corresponding to the\nifIndex in SNMP IF-MIB. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - } - } - }, - "index": { - "description": "References the system-assigned index of the logical interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "leafref" - }, - "properties": { - "description": "All the configuration data of the logical management interface. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "ipv4": { - "description": "IPv4 configuration and operational data. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "admin-state": { - "description": "Whether IPv4 stack is enabled or disabled on this interface.\nAlways enabled for the local management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "disabled", - "enum": [ - "disabled", - "enabled" - ] - }, - "user-ip-address": { - "description": "The user-configured IPv4 address and prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "oper-ip-address": { - "description": "The operational IPv4 address and prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "dhcp-ip-address": { - "description": "The DHCP-assigned IPv4 address and prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "apipa-ip-address": { - "description": "The Automatic Private IP Addressing (APIPA) assigned IPv4 address\nand prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "user-gateway": { - "description": "The user-configured primary IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "backup-gateway": { - "description": "The user-configured backup IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "oper-gateway": { - "description": "The operational IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "dhcp-gateway": { - "description": "The DHCP-assigned IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - } - } - }, - "state": { - "description": "Logical interface state information. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "admin-state": { - "description": "Whether Admin State is enabled or disabled for this management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "disabled", - "enum": [ - "disabled", - "enabled" - ] - }, - "operational-state": { - "description": "Operational state of this management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "down", - "enum": [ - "down", - "up" - ] - } - } - } - } - } - }, - "routes": { - "description": "Top-level container for IP route configuration and operational data. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "ipv4-static-route": { - "type": "array", - "description": "List of IPv4 static routing entries. (list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "destination": { - "description": "IPv4 route destination prefix for the static route. Only one static\nrouting entry per unique destination ip/prefix can be configured. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "next-hop": { - "type": "array", - "description": "A list of next-hop entries associated with the static route. (list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "active": { - "description": "Specifies whether the route is active (present in the kernel IP\nrouting table). (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - }, - "associated-interface": { - "description": "Reference to the associated logical-interface name of the route entry.\nDefaults to the 'local' interface for routes within the subnet\nassociated with the active IP address configured on the local\nmanagement interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "index": { - "description": "The index key of the entry in the next-hop list. Currently only\none static entry is supported per destination prefix, so the\nindex should always be 1. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - }, - "ip-address": { - "description": "IPv4 route next-hop or gateway address associated with the route. If\nnot specified, the default gateway value for the local management\ninterface will be used. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "metric": { - "description": "Routing metric cost. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - }, - "static": { - "description": "Specifies whether the route entry is user-created (static) or\ndynamically created by a routing protocol. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - } - } - } - } - } - } - } - } - } - } - } - } - }, - "data-put-patch": { - "type": "object", - "properties": { - "ietf-restconf:data": { - "description": "This module defines Ethernet and IP management interfaces support for\nCiena's Waveserver Platform.", - "type": "object", - "x-yang": { - "type": "datastore" - }, - "properties": { - "ciena-waveserver-interfaces:waveserver-interfaces": { - "description": "Top level container for configuration and operational data for physical\nand logical network interfaces. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "physical-interface": { - "type": "array", - "description": "List of physical Ethernet management interfaces. (list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "id": { - "description": "Identification information of this management interface. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "name": { - "description": "The system-assigned name of the physical interface (e.g. DCN,\nILAN-1, ILAN-2). The names are predefined. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "type": { - "description": "Management port type. If the port is DCN, ILAN-1, or ILAN-2, the\nport type will be 'ethernet'. If the port is Console, the port\ntype will be 'serial'. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "ethernet", - "enum": [ - "ethernet", - "serial" - ] - }, - "description": { - "description": "Physical interface description, e.g. 'Management'. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "ifindex": { - "description": "The system-assigned interface index number, corresponding to the\nifIndex in SNMP IF-MIB. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - } - } - }, - "name": { - "description": "References the system-assigned name of the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "leafref" - }, - "properties": { - "description": "All the configuration data of the physical management interface. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "management": { - "description": "Management interface attributes. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "mode": { - "description": "Management port mode. Specifies whether the port is configured as a\nlocal management interface or wayside communications channel (carry\nthrough). (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "management", - "enum": [ - "management", - "wayside-channel" - ] - } - } - }, - "ethernet": { - "description": "Ethernet interface attributes. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "speed": { - "description": "Ethernet port speed. For ports with auto-negotiation enabled, this\nrepresents the negotiated port speed. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "Unknown", - "enum": [ - "Unknown", - "10M", - "100M", - "1G", - "10G" - ] - }, - "duplex": { - "description": "Ethernet interface duplex mode. For ports with auto-negotiation enabled,\nthis represents the negotiated duplex mode. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "Unknown", - "enum": [ - "Unknown", - "full", - "half" - ] - }, - "flow-control": { - "description": "Specifies whether this interface will participate in Ethernet flow\ncontrol, via pause frames. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - }, - "auto-negotiation": { - "description": "Specifies whether the interface should negotiate common transmission\nparameters, such as speed, duplex, and flow control with its peer. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - }, - "mac-address": { - "description": "The system-assigned MAC address of the Ethernet interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - } - } - }, - "state": { - "description": "Physical management interface state information. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "admin-state": { - "description": "Whether Admin State is enabled or disabled for this management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "disabled", - "enum": [ - "disabled", - "enabled" - ] - }, - "operational-state": { - "description": "Operational state of this management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "down", - "enum": [ - "down", - "up" - ] - } - } - } - } - } - }, - "logical-interface": { - "type": "array", - "description": "List of logical IP management interfaces (e.g. 'local'). (list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "id": { - "description": "Identification information of this logical management interface. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "index": { - "description": "The index of the logical management interface. Waveserver supports\na single logical interface 'local' that is automatically created by\nthe system. The default index is 1 for the 'local' interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - }, - "name": { - "description": "The name of the logical management interface, e.g. 'local'. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "ifindex": { - "description": "The system-assigned interface index number, corresponding to the\nifIndex in SNMP IF-MIB. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - } - } - }, - "index": { - "description": "References the system-assigned index of the logical interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "leafref" - }, - "properties": { - "description": "All the configuration data of the logical management interface. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "ipv4": { - "description": "IPv4 configuration and operational data. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "admin-state": { - "description": "Whether IPv4 stack is enabled or disabled on this interface.\nAlways enabled for the local management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "disabled", - "enum": [ - "disabled", - "enabled" - ] - }, - "user-ip-address": { - "description": "The user-configured IPv4 address and prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "oper-ip-address": { - "description": "The operational IPv4 address and prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "dhcp-ip-address": { - "description": "The DHCP-assigned IPv4 address and prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "apipa-ip-address": { - "description": "The Automatic Private IP Addressing (APIPA) assigned IPv4 address\nand prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "user-gateway": { - "description": "The user-configured primary IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "backup-gateway": { - "description": "The user-configured backup IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "oper-gateway": { - "description": "The operational IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "dhcp-gateway": { - "description": "The DHCP-assigned IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - } - } - }, - "state": { - "description": "Logical interface state information. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "admin-state": { - "description": "Whether Admin State is enabled or disabled for this management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "disabled", - "enum": [ - "disabled", - "enabled" - ] - }, - "operational-state": { - "description": "Operational state of this management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "down", - "enum": [ - "down", - "up" - ] - } - } - } - } - } - }, - "routes": { - "description": "Top-level container for IP route configuration and operational data. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "ipv4-static-route": { - "type": "array", - "description": "List of IPv4 static routing entries. (list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "destination": { - "description": "IPv4 route destination prefix for the static route. Only one static\nrouting entry per unique destination ip/prefix can be configured. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "next-hop": { - "type": "array", - "description": "A list of next-hop entries associated with the static route. (list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "active": { - "description": "Specifies whether the route is active (present in the kernel IP\nrouting table). (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - }, - "associated-interface": { - "description": "Reference to the associated logical-interface name of the route entry.\nDefaults to the 'local' interface for routes within the subnet\nassociated with the active IP address configured on the local\nmanagement interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "index": { - "description": "The index key of the entry in the next-hop list. Currently only\none static entry is supported per destination prefix, so the\nindex should always be 1. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - }, - "ip-address": { - "description": "IPv4 route next-hop or gateway address associated with the route. If\nnot specified, the default gateway value for the local management\ninterface will be used. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "metric": { - "description": "Routing metric cost. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - }, - "static": { - "description": "Specifies whether the route entry is user-created (static) or\ndynamically created by a routing protocol. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - } - } - } - } - } - } - } - } - } - } - } - } - } - } - }, - "data-post": { - "type": "object", - "properties": { - "ciena-waveserver-interfaces:waveserver-interfaces": { - "description": "Top level container for configuration and operational data for physical\nand logical network interfaces. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "physical-interface": { - "type": "array", - "description": "List of physical Ethernet management interfaces. (list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "id": { - "description": "Identification information of this management interface. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "name": { - "description": "The system-assigned name of the physical interface (e.g. DCN,\nILAN-1, ILAN-2). The names are predefined. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "type": { - "description": "Management port type. If the port is DCN, ILAN-1, or ILAN-2, the\nport type will be 'ethernet'. If the port is Console, the port\ntype will be 'serial'. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "ethernet", - "enum": [ - "ethernet", - "serial" - ] - }, - "description": { - "description": "Physical interface description, e.g. 'Management'. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "ifindex": { - "description": "The system-assigned interface index number, corresponding to the\nifIndex in SNMP IF-MIB. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - } - } - }, - "name": { - "description": "References the system-assigned name of the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "leafref" - }, - "properties": { - "description": "All the configuration data of the physical management interface. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "management": { - "description": "Management interface attributes. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "mode": { - "description": "Management port mode. Specifies whether the port is configured as a\nlocal management interface or wayside communications channel (carry\nthrough). (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "management", - "enum": [ - "management", - "wayside-channel" - ] - } - } - }, - "ethernet": { - "description": "Ethernet interface attributes. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "speed": { - "description": "Ethernet port speed. For ports with auto-negotiation enabled, this\nrepresents the negotiated port speed. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "Unknown", - "enum": [ - "Unknown", - "10M", - "100M", - "1G", - "10G" - ] - }, - "duplex": { - "description": "Ethernet interface duplex mode. For ports with auto-negotiation enabled,\nthis represents the negotiated duplex mode. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "Unknown", - "enum": [ - "Unknown", - "full", - "half" - ] - }, - "flow-control": { - "description": "Specifies whether this interface will participate in Ethernet flow\ncontrol, via pause frames. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - }, - "auto-negotiation": { - "description": "Specifies whether the interface should negotiate common transmission\nparameters, such as speed, duplex, and flow control with its peer. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - }, - "mac-address": { - "description": "The system-assigned MAC address of the Ethernet interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - } - } - }, - "state": { - "description": "Physical management interface state information. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "admin-state": { - "description": "Whether Admin State is enabled or disabled for this management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "disabled", - "enum": [ - "disabled", - "enabled" - ] - }, - "operational-state": { - "description": "Operational state of this management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "down", - "enum": [ - "down", - "up" - ] - } - } - } - } - } - }, - "logical-interface": { - "type": "array", - "description": "List of logical IP management interfaces (e.g. 'local'). (list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "id": { - "description": "Identification information of this logical management interface. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "index": { - "description": "The index of the logical management interface. Waveserver supports\na single logical interface 'local' that is automatically created by\nthe system. The default index is 1 for the 'local' interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - }, - "name": { - "description": "The name of the logical management interface, e.g. 'local'. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "ifindex": { - "description": "The system-assigned interface index number, corresponding to the\nifIndex in SNMP IF-MIB. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - } - } - }, - "index": { - "description": "References the system-assigned index of the logical interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "leafref" - }, - "properties": { - "description": "All the configuration data of the logical management interface. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "ipv4": { - "description": "IPv4 configuration and operational data. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "admin-state": { - "description": "Whether IPv4 stack is enabled or disabled on this interface.\nAlways enabled for the local management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "disabled", - "enum": [ - "disabled", - "enabled" - ] - }, - "user-ip-address": { - "description": "The user-configured IPv4 address and prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "oper-ip-address": { - "description": "The operational IPv4 address and prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "dhcp-ip-address": { - "description": "The DHCP-assigned IPv4 address and prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "apipa-ip-address": { - "description": "The Automatic Private IP Addressing (APIPA) assigned IPv4 address\nand prefix on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "user-gateway": { - "description": "The user-configured primary IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "backup-gateway": { - "description": "The user-configured backup IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "oper-gateway": { - "description": "The operational IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "dhcp-gateway": { - "description": "The DHCP-assigned IPv4 gateway on the interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - } - } - } - } - }, - "state": { - "description": "Logical interface state information. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "admin-state": { - "description": "Whether Admin State is enabled or disabled for this management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "disabled", - "enum": [ - "disabled", - "enabled" - ] - }, - "operational-state": { - "description": "Operational state of this management interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "enumeration", - "default": "down", - "enum": [ - "down", - "up" - ] - } - } - } - } - } - }, - "routes": { - "description": "Top-level container for IP route configuration and operational data. (non-presence)", - "type": "object", - "x-yang": { - "type": "container", - "is_presence": "false" - }, - "properties": { - "ipv4-static-route": { - "type": "array", - "description": "List of IPv4 static routing entries. (list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "destination": { - "description": "IPv4 route destination prefix for the static route. Only one static\nrouting entry per unique destination ip/prefix can be configured. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "next-hop": { - "type": "array", - "description": "A list of next-hop entries associated with the static route. (list)", - "x-yang": { - "type": "list" - }, - "items": { - "type": "object", - "properties": { - "active": { - "description": "Specifies whether the route is active (present in the kernel IP\nrouting table). (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - }, - "associated-interface": { - "description": "Reference to the associated logical-interface name of the route entry.\nDefaults to the 'local' interface for routes within the subnet\nassociated with the active IP address configured on the local\nmanagement interface. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "index": { - "description": "The index key of the entry in the next-hop list. Currently only\none static entry is supported per destination prefix, so the\nindex should always be 1. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - }, - "ip-address": { - "description": "IPv4 route next-hop or gateway address associated with the route. If\nnot specified, the default gateway value for the local management\ninterface will be used. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "string" - }, - "metric": { - "description": "Routing metric cost. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "integer", - "format": "uint32" - }, - "static": { - "description": "Specifies whether the route entry is user-created (static) or\ndynamically created by a routing protocol. (leaf)", - "x-yang": { - "type": "leaf" - }, - "type": "string", - "format": "boolean" - } - } - } - } - } - } - } - } - } - } - } - } - }, - "data": { - "type": "object", - "properties": { - "ietf-restconf:data": { - "type": "object", - "description": "This resource represents the combined configuration and state data resources that can be accessed by a client and cannot be created or deleted by the client. See RESTCONF RFC 8040 for further information.", - "x-yang": { - "type": "datastore" - }, - "properties": { - } - } - } - } - } -} diff --git a/yang/cocsn.yang b/yang/cocsn.yang index 6b644a03efd35179044b857241b11cdc3f21a18d..e19dd39d6da408677d6e0f462a102fc93a5db6b0 100644 --- a/yang/cocsn.yang +++ b/yang/cocsn.yang @@ -24,7 +24,6 @@ module cocsn { container interfaces { list interface { - config false; key "name"; leaf name { type string; @@ -38,6 +37,7 @@ module cocsn { "Interface IP address. Example value: 10.10.10.1"; } leaf phys-address { + config false; type yang:phys-address; description "The interface's address at its protocol sub-layer. For @@ -70,7 +70,7 @@ module cocsn { container routes { list route { - config false; + config true; key "destination"; leaf destination { type string; @@ -104,29 +104,4 @@ module cocsn { } } } - - container arp-table { - list arp-entry { - config false; - key "address"; - leaf address { - type string; - mandatory "true"; - description - "IP address of the arp entry"; - } - leaf phs-address { - type yang:phys-address; - mandatory "true"; - description - "MAC address of the arp entry"; - } - leaf interface { - type string; - mandatory "true"; - description - "Interface of the arp entry"; - } - } - } } \ No newline at end of file diff --git a/yang/cocsn.yml b/yang/cocsn.yml deleted file mode 100644 index 8189791e36f033a5b4279424f83b9202d0cc341e..0000000000000000000000000000000000000000 --- a/yang/cocsn.yml +++ /dev/null @@ -1,176 +0,0 @@ ---- -swagger: "2.0" -info: - description: "This YANG module represents the CoCSN API" - version: "1.0" - title: "cocsn API" -host: "localhost:8080" -consumes: -- "application/yang-data+json" -produces: -- "application/yang-data+json" -paths: - /data/interfaces/: - get: - tags: - - "cocsn" - summary: "returns cocsn.Interfaces" - description: "returns cocsn.Interfaces" - parameters: [] - responses: - 200: - description: "cocsn.Interfaces" - schema: - $ref: "#/definitions/cocsn.InterfacesWrapper" - 400: - description: "Internal error" - post: - tags: - - "cocsn" - summary: "creates cocsn.Interfaces" - description: "creates cocsn.Interfaces" - parameters: - - in: "body" - name: "cocsn.Interfaces.body-param" - description: "cocsn.Interfaces to be added to list" - required: false - schema: - $ref: "#/definitions/cocsn.InterfacesWrapper" - responses: - 201: - description: "Object created" - 400: - description: "Internal error" - 409: - description: "Object already exists" - put: - tags: - - "cocsn" - summary: "creates or updates cocsn.Interfaces" - description: "creates or updates cocsn.Interfaces" - parameters: - - in: "body" - name: "cocsn.Interfaces.body-param" - description: "cocsn.Interfaces to be added or updated" - required: false - schema: - $ref: "#/definitions/cocsn.InterfacesWrapper" - responses: - 201: - description: "Object created" - 400: - description: "Internal error" - 204: - description: "Object modified" - delete: - tags: - - "cocsn" - summary: "removes cocsn.Interfaces" - description: "removes cocsn.Interfaces" - parameters: [] - responses: - 400: - description: "Internal error" - 204: - description: "Object deleted" - /data/interfaces/interface-state={name}/: - get: - tags: - - "cocsn" - summary: "returns cocsn.interfaces.InterfaceState" - description: "returns cocsn.interfaces.InterfaceState" - parameters: - - name: "name" - in: "path" - description: "Id of interface-state" - required: true - type: "string" - responses: - 200: - description: "cocsn.interfaces.InterfaceState" - schema: - $ref: "#/definitions/cocsn.interfaces.InterfaceStateWrapper" - 400: - description: "Internal error" - /data/interfaces/interface={name}/: - get: - tags: - - "cocsn" - summary: "returns cocsn.interfaces.Interface" - description: "returns cocsn.interfaces.Interface" - parameters: - - name: "name" - in: "path" - description: "Id of interface" - required: true - type: "string" - responses: - 200: - description: "cocsn.interfaces.Interface" - schema: - $ref: "#/definitions/cocsn.interfaces.InterfaceWrapper" - 400: - description: "Internal error" -definitions: - cocsn.Interfaces: - type: "object" - properties: - interface: - type: "array" - items: - $ref: "#/definitions/cocsn.interfaces.Interface" - interface-state: - type: "array" - items: - $ref: "#/definitions/cocsn.interfaces.InterfaceState" - cocsn.InterfacesWrapper: - properties: - interfaces: - $ref: "#/definitions/cocsn.Interfaces" - cocsn.OperStatusEnumeration: - type: "string" - enum: - - "up" - - "down" - cocsn.interfaces.Interface: - type: "object" - properties: - phys-address: - type: "string" - description: "The interface's address at its protocol sub-layer. For\n \ - \ example, for an 802.x interface, this object normally\n \ - \ contains a Media Access Control (MAC) address. The\n \ - \ interface's media-specific modules must define the bit\n\ - \ and byte ordering and the format of the value of this\n\ - \ object. For interfaces that do not have such an address\n\ - \ (e.g., a serial line), this node is not present. REF:RFC\ - \ 2863: The Interfaces Group MIB - ifPhysAddress" - name: - type: "string" - description: "Interface name. Example value: en0" - addresses: - type: "array" - description: "Interface IP address. Example value: 10.10.10.1" - items: - type: "string" - enabled: - type: "boolean" - description: "Enable or disable the interface. Example value: true" - default: false - cocsn.interfaces.InterfaceState: - type: "object" - properties: - name: - type: "string" - description: "Interface name. Example value: GigabitEthernet 0/0/0" - oper-status: - description: "Describes whether the interface is physically up or down" - $ref: "#/definitions/cocsn.OperStatusEnumeration" - cocsn.interfaces.InterfaceStateWrapper: - properties: - interface-state: - $ref: "#/definitions/cocsn.interfaces.InterfaceState" - cocsn.interfaces.InterfaceWrapper: - properties: - interface: - $ref: "#/definitions/cocsn.interfaces.Interface" diff --git a/yang/debug.yang b/yang/debug.yang deleted file mode 100644 index a3e02a17d074244e7df9fa2066d52512cf27df1e..0000000000000000000000000000000000000000 --- a/yang/debug.yang +++ /dev/null @@ -1,29 +0,0 @@ -module debug { - yang-version 1.1; - namespace "urn:example:params:xml:ns:yang:example"; - prefix if; - - organization - "example"; - - description - "example"; - - revision "2020-08-17" { - description - "Initial Revision"; - } - - container interfaces { - list interface { - config false; - key "name"; - leaf name { - type string; - mandatory "true"; - description - "Interface name. Example value: en0"; - } - } - } -} \ No newline at end of file