-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added missing features and live tests: batches, devices,
emails, events, ips, organizations, ports, vlans, volumes and VPN
- Loading branch information
Nurfet Becirevic
committed
Aug 12, 2019
1 parent
03165b2
commit 304ea48
Showing
35 changed files
with
1,987 additions
and
92 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,25 @@ | ||
# -*- coding: utf-8 -*- | ||
# SPDX-License-Identifier: LGPL-3.0-only | ||
|
||
|
||
class BGPConfig: | ||
def __init__(self, data): | ||
self.id = data["id"] | ||
self.status = data["status"] | ||
self.deployment_type = data["deployment_type"] | ||
self.asn = data["asn"] | ||
self.md5 = data["md5"] | ||
self.route_object = data["route_object"] | ||
self.max_prefix = data["max_prefix"] | ||
self.created_at = data["created_at"] | ||
self.requested_at = data["requested_at"] | ||
self.project = data["project"] | ||
self.sessions = data["sessions"] | ||
self.ranges = data["ranges"] | ||
self.href = data["href"] | ||
|
||
def __str__(self): | ||
return "%s" % self.id | ||
|
||
def __repr__(self): | ||
return "{}: {}".format(self.__class__.__name__, self.id) |
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,22 @@ | ||
# -*- coding: utf-8 -*- | ||
# SPDX-License-Identifier: LGPL-3.0-only | ||
|
||
|
||
class BGPSession: | ||
def __init__(self, data): | ||
self.id = data["id"] | ||
self.status = data["status"] | ||
self.learned_routes = data["learned_routes"] | ||
self.switch_name = data["switch_name"] | ||
self.default_route = data["default_route"] | ||
self.created_at = data["created_at"] | ||
self.updated_at = data["updated_at"] | ||
self.device = data["device"] | ||
self.address_family = data["address_family"] | ||
self.href = data["href"] | ||
|
||
def __str__(self): | ||
return "%s" % self.id | ||
|
||
def __repr__(self): | ||
return "{}: {}".format(self.__class__.__name__, self.id) |
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,32 @@ | ||
# -*- coding: utf-8 -*- | ||
# SPDX-License-Identifier: LGPL-3.0-only | ||
|
||
|
||
class Batch: | ||
def __init__(self, data): | ||
if data["id"] is not None: | ||
self.id = data["id"] | ||
if data["error_messages"] is not None: | ||
self.error_messages = data["error_messages"] | ||
if data["quantity"] is not None: | ||
self.quantity = data["quantity"] | ||
if data["state"] is not None: | ||
self.state = data["state"] | ||
if data["created_at"] is not None: | ||
self.created_at = data["created_at"] | ||
if data["updated_at"] is not None: | ||
self.updated_at = data["updated_at"] | ||
if data["devices"] is not None: | ||
self.devices = data["devices"] | ||
if data["project"] is not None: | ||
self.project = data["project"] | ||
if data["state"] is not None: | ||
self.state = data["state"] | ||
if data["error_messages"] is not None: | ||
self.error_messages = data["error_messages"] | ||
|
||
def __str__(self): | ||
return "%s" % self.id | ||
|
||
def __repr__(self): | ||
return "{}: {}".format(self.__class__.__name__, self.id) |
Oops, something went wrong.