Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove external as api #28

Merged
merged 2 commits into from
Apr 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }

group :production do
source 'https://rubygems.pkg.github.com/ool-mddo' do
gem 'netomox', '>= 0.9.0'
gem 'netomox', '>= 0.9.1'
end

gem 'grape', '>= 1.7.0'
Expand Down
23 changes: 0 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ Data directory:

* `MDDO_QUERIES_DIR`: query result directory (default: `./queries`)
* `MDDO_TOPOLOGIES_DIR`: topology data directory (for netoviz; default: `./topologies`)
* `MDDO_CONFIGS_DIR`: batfish snapshot directory (default: `./configs`)

Log level variable:

Expand Down Expand Up @@ -274,28 +273,6 @@ curl -s http://localhost:9292/topologies/mddo-ospf/emulated_asis/topology/layer3

</details>

### External-AS topology operation

Generate external-AS topology of the snapshot.
It calls `generate_topology` function defined in `$MDDO_CONFIGS_DIR/<network>/<snapshot>/external_as_topology/<usecase>/main.rb`.

* POST `/topologies/<network>/<snapshot>/external_as_topology`
* option
* `usecase`: Usecase name
* `options`: [optional] Option parameters (Hash) for a function to generate external-AS topology

```shell
curl -s -X POST -H 'Content-Type: application/json' \
-d '{"usecase": "pni_te", "options": {}}' \
http://localhost:9292/topologies/mddo-bgp/original_asis/external_as_topology
```

`generate_topology` requirements:

* accept `options` as an argument
* returns topology data (RFC8345) of external-AS
* NOTE: use `load` in `main.rb` to update these scripts without reloading netomox-exp process.

### Static Verification

Verify all layers or a layer according to its network-type.
Expand Down
3 changes: 0 additions & 3 deletions app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
require_relative 'lib/api/topologies'

module NetomoxExp
# Directory to load external-AS topology script
# NOTE: to `load` topology script, it must be absolute-path
CONFIGS_DIR = ENV.fetch('MDDO_CONFIGS_DIR', 'configs')
# Directory to save batfish query answers
QUERIES_DIR = ENV.fetch('MDDO_QUERIES_DIR', 'queries')
# Directory to save topology json from batfish query answers
Expand Down
2 changes: 0 additions & 2 deletions lib/api/topologies/network/snapshot.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# frozen_string_literal: true

require 'grape'
require_relative 'snapshot/external_as_topology'
require_relative 'snapshot/converted_topology'
require_relative 'snapshot/topology/layer'
require_relative 'snapshot/topology'
Expand All @@ -14,7 +13,6 @@ class Snapshot < Grape::API
requires :snapshot, type: String, desc: 'Snapshot name'
end
resource ':snapshot' do
mount ApiRoute::ExternalAsTopology
mount ApiRoute::ConvertedTopology
mount ApiRoute::Topology
end
Expand Down
35 changes: 0 additions & 35 deletions lib/api/topologies/network/snapshot/external_as_topology.rb

This file was deleted.

Loading