Skip to content
This repository was archived by the owner on Aug 12, 2020. It is now read-only.

Commit 6502175

Browse files
committed
refactor module name
1 parent 3da2223 commit 6502175

40 files changed

+137
-137
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,4 @@ docs/_build/
5656
# PyBuilder
5757
target/
5858
.idea/
59-
etc/softbgp/softbgp.ini
59+
etc/yabgp/yabgp.ini

README.rst

+27-27
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
softbgp
2-
=======
1+
YABGP
2+
=====
33

44
|License| |Build Status| |Code Climate|
55

6-
What is softbgp?
7-
~~~~~~~~~~~~~~~~
6+
What is yabgp?
7+
~~~~~~~~~~~~~~
88

9-
SoftBGP is a Python implementation for BGP Protocol. It was born in
9+
YABGP is a yet another Python implementation for BGP Protocol. It was born in
1010
Cisco around 2011, we use it to establish BGP connections with all kinds
1111
of routers (include real Cisco/HuaWei/Juniper routers and some router
1212
simulators in Cisco like IOL/IOU) and receive/parse BGP messages for
@@ -34,21 +34,21 @@ Features
3434
Quick Start
3535
~~~~~~~~~~~
3636

37-
We recommend run ``softbgp`` through python virtual-env from source
37+
We recommend run ``yabgp`` through python virtual-env from source
3838
code or pip install
3939

40-
Use softbgp from source code:
40+
Use yabgp from source code:
4141

4242
.. code:: bash
4343
44-
$ virtualenv softbgp-virl
45-
$ source softbgp-virl/bin/activate
46-
$ git clone https://github.com/softbgp/softbgp
47-
$ cd softbgp
44+
$ virtualenv yabgp-virl
45+
$ source yabgp-virl/bin/activate
46+
$ git clone https://github.com/yabgp/yabgp
47+
$ cd yabgp
4848
$ pip install -r requirements.txt
4949
$ cd bin
50-
$ python softbgpd -h
51-
usage: softbgpd [-h] [--bgp-local_addr BGP_LOCAL_ADDR]
50+
$ python yabgpd -h
51+
usage: yabgpd [-h] [--bgp-local_addr BGP_LOCAL_ADDR]
5252
[--bgp-local_as BGP_LOCAL_AS] [--bgp-md5 BGP_MD5]
5353
[--bgp-remote_addr BGP_REMOTE_ADDR]
5454
[--bgp-remote_as BGP_REMOTE_AS] [--config-dir DIR]
@@ -95,13 +95,13 @@ Use pip install
9595
9696
.. code:: bash
9797
98-
$ virtualenv softbgp-virl
99-
$ source softbgp-virl/bin/activate
100-
$ pip install softbgp
101-
$ which softbgpd
102-
/home/bgpmon/softbgp-virl/bin/softbgpd
103-
$ softbgpd -h
104-
usage: softbgpd [-h] [--bgp-local_addr BGP_LOCAL_ADDR]
98+
$ virtualenv yabgp-virl
99+
$ source yabgp-virl/bin/activate
100+
$ pip install yabgp
101+
$ which yabgpd
102+
/home/bgpmon/yabgp-virl/bin/yabgpd
103+
$ yabgpd -h
104+
usage: yabgpd [-h] [--bgp-local_addr BGP_LOCAL_ADDR]
105105
[--bgp-local_as BGP_LOCAL_AS] [--bgp-md5 BGP_MD5]
106106
[--bgp-remote_addr BGP_REMOTE_ADDR]
107107
[--bgp-remote_as BGP_REMOTE_AS] [--config-dir DIR]
@@ -148,11 +148,11 @@ For example:
148148
149149
.. code:: bash
150150
151-
$ softbgpd --bgp-local_addr=1.1.1.1 --bgp-local_as=65001 --bgp-remote_addr=1.1.1.2 --bgp-remote_as=65001 --bgp-md5=test --config-file=../etc/softbgp/softbgp.ini
151+
$ yabgpd --bgp-local_addr=1.1.1.1 --bgp-local_as=65001 --bgp-remote_addr=1.1.1.2 --bgp-remote_as=65001 --bgp-md5=test --config-file=../etc/yabgp/yabgp.ini
152152
153153
BGP message example:
154154
155-
in ``softbgp.ini``, you can point out if you want to store the parsing
155+
in ``yabgp.ini``, you can point out if you want to store the parsing
156156
BGP message to local disk and where you want to put them in.
157157
158158
::
@@ -220,8 +220,8 @@ and message parsing, we reference from
220220
https://github.com/Exa-Networks/exabgp
221221
222222
.. |License| image:: https://img.shields.io/hexpm/l/plug.svg
223-
:target: https://github.com/softbgp/softbgp/blob/master/LICENSE
224-
.. |Build Status| image:: https://travis-ci.org/ctrlbgp/softbgp.svg?branch=master
225-
:target: https://travis-ci.org/ctrlbgp/softbgp
226-
.. |Code Climate| image:: https://codeclimate.com/github/ctrlbgp/softbgp/badges/gpa.svg
227-
:target: https://codeclimate.com/github/ctrlbgp/softbgp
223+
:target: https://github.com/yabgp/yabgp/blob/master/LICENSE
224+
.. |Build Status| image:: https://travis-ci.org/smartbgp/yabgp.svg?branch=master
225+
:target: https://travis-ci.org/smartbgp/yabgp
226+
.. |Code Climate| image:: https://codeclimate.com/github/smartbgp/yabgp/badges/gpa.svg
227+
:target: https://codeclimate.com/github/smartbgp/yabgp

bin/softbgpd bin/yabgpd

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ possible_topdir = os.path.normpath(os.path.join(os.path.abspath(__file__),
2525
os.pardir,
2626
os.pardir))
2727
if os.path.exists(os.path.join(possible_topdir,
28-
'softbgp',
28+
'yabgp',
2929
'__init__.py')):
3030
sys.path.insert(0, possible_topdir)
3131

3232
else:
3333
possible_topdir = '/'
3434

35-
from softbgp.agent.cmd import main
35+
from yabgp.agent.cmd import main
3636

3737
if __name__ == '__main__':
3838
sys.exit(main())

etc/softbgp/softbgp.ini.sample etc/yabgp/yabgp.ini.sample

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
# ===================== items for peer configuration ================================
4545
# the following parameters will be ignored if conf_file is configured
4646
# and this configuration only support one bgp peer, if you need start more peers in
47-
# one softbgp process, please use conf_file to configure them.
47+
# one yabgp process, please use conf_file to configure them.
4848

4949
# remote as number
5050
# remote_as =

setup.cfg

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[metadata]
2-
name = softbgp
2+
name = yabgp
33
summary = A Python BGP Implementation
44
license = Apache License 2.0
5-
author = OpenBGP project team
5+
author = SmartBGP project team
66
author-email = [email protected]
7-
home-page = http://ctrlbgp.github.io/
7+
home-page = http://smartbgp.github.io/
88
description-file = README.rst
99
platform = any
1010
classifier =
@@ -20,14 +20,14 @@ keywords =
2020

2121
[global]
2222
setup-hooks =
23-
softbgp.hooks.setup_hook
23+
yabgp.hooks.setup_hook
2424

2525
[files]
2626
packages =
27-
softbgp
27+
yabgp
2828
data_files =
29-
etc/softbgp =
30-
etc/softbgp/softbgp.ini.sample
29+
etc/yabgp =
30+
etc/yabgp/yabgp.ini.sample
3131
[entry_points]
3232
console_scripts =
33-
softbgpd = softbgp.agent.cmd:main
33+
yabgpd = yabgp.agent.cmd:main

setup.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515

1616
import setuptools
1717

18-
import softbgp.hooks
18+
import yabgp.hooks
1919

20-
softbgp.hooks.save_orig()
20+
yabgp.hooks.save_orig()
2121

2222
setuptools.setup(
23-
name='softbgp',
23+
name='yabgp',
2424
setup_requires=['pbr'],
2525
pbr=True)
File renamed without changes.

softbgp/agent/__init__.py yabgp/agent/__init__.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020
from oslo.config import cfg
2121
from twisted.internet import reactor
2222

23-
from softbgp import version
24-
from softbgp.core.factory import BGPPeering
25-
from softbgp.common.config import get_bgp_config
26-
from softbgp.common import constants as bgp_cons
27-
from softbgp.common import log
23+
from yabgp import version
24+
from yabgp.core.factory import BGPPeering
25+
from yabgp.common.config import get_bgp_config
26+
from yabgp.common import constants as bgp_cons
27+
from yabgp.common import log
2828
log.early_init_log(logging.DEBUG)
2929

3030
CONF = cfg.CONF
@@ -82,10 +82,10 @@ def prepare_twisted_service():
8282

8383
def prepare_service(args=None):
8484
try:
85-
CONF(args=args, project='softbgp', version=version,
86-
default_config_files=['/etc/softbgp/softbgp.ini'])
85+
CONF(args=args, project='yabgp', version=version,
86+
default_config_files=['/etc/yabgp/yabgp.ini'])
8787
except cfg.ConfigFilesNotFoundError:
88-
CONF(args=args, project='softbgp', version=version)
88+
CONF(args=args, project='yabgp', version=version)
8989

9090
log.init_log()
9191
LOG.info('Log (Re)opened.')

softbgp/agent/cmd.py yabgp/agent/cmd.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
"""start service"""
1717

18-
from softbgp.agent import prepare_service
18+
from yabgp.agent import prepare_service
1919

2020

2121
def main():
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

softbgp/core/factory.py yabgp/core/factory.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@
2929
from twisted.internet import reactor
3030
from oslo.config import cfg
3131

32-
from softbgp.core.protocol import BGP
33-
from softbgp.core.fsm import FSM
34-
from softbgp.common import constants as bgp_cons
35-
from softbgp.common.afn import AFNUM_INET
32+
from yabgp.core.protocol import BGP
33+
from yabgp.core.fsm import FSM
34+
from yabgp.common import constants as bgp_cons
35+
from yabgp.common.afn import AFNUM_INET
3636

3737
LOG = logging.getLogger(__name__)
3838

@@ -340,7 +340,7 @@ def get_tcp_md5sig(md5_str, host, port):
340340

341341
os_type = platform.system()
342342
if os_type != 'Linux':
343-
LOG.error('OpenBGP has no MD5 support for %s' % os_type)
343+
LOG.error('YABGP has no MD5 support for %s' % os_type)
344344
return None
345345

346346
# address family

softbgp/core/fsm.py yabgp/core/fsm.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
import time
1818
import logging
1919

20-
from softbgp.core.timer import BGPTimer
21-
from softbgp.common import constants as bgp_cons
20+
from yabgp.core.timer import BGPTimer
21+
from yabgp.common import constants as bgp_cons
2222

2323
LOG = logging.getLogger(__name__)
2424

softbgp/core/protocol.py yabgp/core/protocol.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@
2424
from oslo.config import cfg
2525
from twisted.internet import protocol
2626

27-
from softbgp.core.timer import BGPTimer
28-
from softbgp.common import constants as bgp_cons
29-
from softbgp.message.open import Open
30-
from softbgp.message.keepalive import KeepAlive
31-
from softbgp.message.update import Update
32-
from softbgp.message.notification import Notification
33-
from softbgp.message.route_refresh import RouteRefresh
34-
from softbgp.common import exception as excep
27+
from yabgp.core.timer import BGPTimer
28+
from yabgp.common import constants as bgp_cons
29+
from yabgp.message.open import Open
30+
from yabgp.message.keepalive import KeepAlive
31+
from yabgp.message.update import Update
32+
from yabgp.message.notification import Notification
33+
from yabgp.message.route_refresh import RouteRefresh
34+
from yabgp.common import exception as excep
3535

3636
LOG = logging.getLogger(__name__)
3737

File renamed without changes.

softbgp/hooks.py yabgp/hooks.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import sys
1818
from setuptools.command import easy_install
1919

20-
from softbgp import version
20+
from yabgp import version
2121

2222

2323
# Global variables in this module doesn't work as we expect
@@ -63,7 +63,7 @@ def my_get_script_args(*args, **kwargs):
6363
orig_get_version = packaging.get_version
6464

6565
def my_get_version(package_name, pre_version=None):
66-
if package_name == 'softbgp':
66+
if package_name == 'yabgp':
6767
return str(version)
6868
return orig_get_version(package_name, pre_version)
6969

File renamed without changes.
File renamed without changes.

softbgp/message/attribute/aggregator.py yabgp/message/attribute/aggregator.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717

1818
from ipaddr import IPv4Address
1919

20-
from softbgp.message.attribute import Attribute
21-
from softbgp.message.attribute import AttributeID
22-
from softbgp.message.attribute import AttributeFlag
23-
from softbgp.common import constants as bgp_cons
24-
from softbgp.common import exception as excep
20+
from yabgp.message.attribute import Attribute
21+
from yabgp.message.attribute import AttributeID
22+
from yabgp.message.attribute import AttributeFlag
23+
from yabgp.common import constants as bgp_cons
24+
from yabgp.common import exception as excep
2525

2626

2727
class Aggregator(Attribute):

softbgp/message/attribute/aspath.py yabgp/message/attribute/aspath.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515

1616
import struct
1717

18-
from softbgp.message.attribute import Attribute
19-
from softbgp.message.attribute import AttributeID
20-
from softbgp.message.attribute import AttributeFlag
21-
from softbgp.common import exception as excep
22-
from softbgp.common import constants as bgp_cons
18+
from yabgp.message.attribute import Attribute
19+
from yabgp.message.attribute import AttributeID
20+
from yabgp.message.attribute import AttributeFlag
21+
from yabgp.common import exception as excep
22+
from yabgp.common import constants as bgp_cons
2323

2424

2525
class ASPath(Attribute):

softbgp/message/attribute/atomicaggregate.py yabgp/message/attribute/atomicaggregate.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515

1616
import struct
1717

18-
from softbgp.message.attribute import Attribute
19-
from softbgp.message.attribute import AttributeID
20-
from softbgp.message.attribute import AttributeFlag
21-
from softbgp.common import constants as bgp_cons
22-
from softbgp.common import exception as excep
18+
from yabgp.message.attribute import Attribute
19+
from yabgp.message.attribute import AttributeID
20+
from yabgp.message.attribute import AttributeFlag
21+
from yabgp.common import constants as bgp_cons
22+
from yabgp.common import exception as excep
2323

2424

2525
class AtomicAggregate(Attribute):

softbgp/message/attribute/clusterlist.py yabgp/message/attribute/clusterlist.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717

1818
from ipaddr import IPv4Address
1919

20-
from softbgp.message.attribute import Attribute
21-
from softbgp.message.attribute import AttributeID
22-
from softbgp.message.attribute import AttributeFlag
23-
from softbgp.common import constants as bgp_cons
24-
from softbgp.common import exception as excep
20+
from yabgp.message.attribute import Attribute
21+
from yabgp.message.attribute import AttributeID
22+
from yabgp.message.attribute import AttributeFlag
23+
from yabgp.common import constants as bgp_cons
24+
from yabgp.common import exception as excep
2525

2626

2727
class ClusterList(Attribute):

softbgp/message/attribute/community.py yabgp/message/attribute/community.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515

1616
import struct
1717

18-
from softbgp.message.attribute import Attribute
19-
from softbgp.message.attribute import AttributeID
20-
from softbgp.message.attribute import AttributeFlag
21-
from softbgp.common import exception as excep
22-
from softbgp.common import constants as bgp_cons
18+
from yabgp.message.attribute import Attribute
19+
from yabgp.message.attribute import AttributeID
20+
from yabgp.message.attribute import AttributeFlag
21+
from yabgp.common import exception as excep
22+
from yabgp.common import constants as bgp_cons
2323

2424

2525
class Community(Attribute):

0 commit comments

Comments
 (0)