-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5f343d4
commit ef20956
Showing
7 changed files
with
77 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# == Schema Information | ||
# | ||
# Table name: class4.gateway_nat_handling_modes | ||
# | ||
# id :integer not null, primary key | ||
# name :string not null | ||
# | ||
|
||
class Equipment::GatewayNatHandlingMode < Yeti::ActiveRecord | ||
self.table_name = 'class4.gateway_nat_handling_modes' | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,24 @@ | ||
# frozen_string_literal: true | ||
|
||
# == Schema Information | ||
# | ||
# Table name: class4.lnp_cache | ||
# | ||
# id :integer not null, primary key | ||
# dst :string not null | ||
# lrn :string not null | ||
# created_at :datetime | ||
# updated_at :datetime | ||
# expires_at :datetime | ||
# database_id :integer | ||
# data :string | ||
# tag :string | ||
# id :integer not null, primary key | ||
# dst :string not null | ||
# lrn :string not null | ||
# created_at :datetime | ||
# updated_at :datetime | ||
# expires_at :datetime | ||
# database_id :integer | ||
# data :string | ||
# tag :string | ||
# routing_tag_id :integer | ||
# | ||
|
||
class Lnp::Cache < Yeti::ActiveRecord | ||
self.table_name = 'class4.lnp_cache' | ||
|
||
belongs_to :database, class_name: 'Lnp::Database', foreign_key: :database_id | ||
belongs_to :routing_tag, class_name: 'Routing::RoutingTag', foreign_key: :routing_tag_id | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
class NewNatHandlingMode < ActiveRecord::Migration[5.2] | ||
#TODO: | ||
# remove tag from lnp_cache | ||
# remove transparent_dialor_id from gateways | ||
# remove dialog_nat_handling from gateways | ||
# column :transparent_seqno | ||
# column :transparent_ssrc | ||
# | ||
def up | ||
execute %q{ | ||
create table class4.gateway_nat_handling_modes ( | ||
id smallint primary key, | ||
name varchar not null unique | ||
); | ||
insert into class4.gateway_nat_handling_modes( id,name) values (0, 'Disabled'); | ||
insert into class4.gateway_nat_handling_modes( id,name) values (1, 'Learn next hop from incoming requests'); | ||
insert into class4.gateway_nat_handling_modes( id,name) values (2, 'Use R-Uri as next hop(Ignore incoming contact)'); | ||
alter table class4.gateways | ||
add nat_handling_mode_id smallint not null default 1 references class4.gateway_nat_handling_modes(id); | ||
alter table class4.lnp_cache | ||
add routing_tag_id smallint; | ||
} | ||
end | ||
|
||
|
||
def down | ||
execute %q{ | ||
-- drop schema switch19 cascade; | ||
alter table class4.gateways drop column nat_handling_mode_id; | ||
drop table class4.gateway_nat_handling_modes; | ||
alter table class4.lnp_cache drop column routing_tag_id; | ||
} | ||
end | ||
end |