Skip to content

Commit

Permalink
Merge pull request #441 from globocom/develop
Browse files Browse the repository at this point in the history
Develop to Master
  • Loading branch information
renan-lopes-rodrigues authored Sep 11, 2024
2 parents 523c025 + a7c68de commit e9c5eca
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@ It was not created to be and inventory database, so it does not have CMDB functi
## Documentation
[Documentation](http://globonetworkapi.readthedocs.org/)

## Run API
Run `make build_img && make start` and visit `http://localhost:8000/healthcheck` if running locally.

## Run Unit Tests
To run the unit tests just run `make build_img && make start && make test_ci` this instruction will run all the unit tests specified in the `networkapi/tests/__init__.py` file.
Run `make test_ci`. This command will run all the unit tests specified in the `networkapi/tests/__init__.py` file.

## Create and run migrations
To create a new migration, just run into app container `cd dbmigrate; db-migrate --new=<MIGRATION_NAME>`. This step will create a enpty migration file, you must write the SQL statement.
Expand Down
8 changes: 5 additions & 3 deletions networkapi/api_neighbor/v4/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,11 @@ class RemoteIpAndRemoteAsnAtDifferentEquipmentsException(APIException):
status_code = status.HTTP_400_BAD_REQUEST

def __init__(self, neighbor):
self.detail = u'RemoteIp id = {} and RemoteAsn id = {} belongs to ' \
u'different Equipments'.\
format(neighbor.remote_ip, neighbor.remote_asn)
# self.detail = u'RemoteIp id = {} and RemoteAsn id = {} belongs to ' \
# u'different Equipments'.\
# format(neighbor.remote_ip, neighbor.remote_asn)
self.detail = u'O ASN remoto (id: {}) não está associado a qualquer equipamento do IP (id: {}). '.\
format(neighbor.remote_asn, neighbor.remote_ip)


class LocalIpAndPeerGroupAtDifferentEnvironmentsException(APIException):
Expand Down

0 comments on commit e9c5eca

Please sign in to comment.