-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixing issue with batch change serialization (#51)
Fixes #51 There was an issue with how we serialized: 1. we were looking for a field named `recordData`, when it was just `record` 2. during deserialization, we were not converting the `record` properly using the `rdata_converter` 3. Also fixed #50, as it was a small serialization issue as well
- Loading branch information
Paul Cleary
authored
Jun 14, 2019
1 parent
e40a55b
commit 1d4bbb6
Showing
8 changed files
with
82 additions
and
24 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,4 +107,5 @@ venv.bak/ | |
# misc | ||
.idea/ | ||
.DS_Store | ||
.vscode | ||
|
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 |
---|---|---|
|
@@ -13,8 +13,8 @@ class VinylDNSContext(object): | |
""" | ||
def __init__(self): | ||
self.client = VinylDNSClient("http://localhost:9000", "okAccessKey", "okSecretKey") | ||
self.tear_down() | ||
self.group = None | ||
self.tear_down() | ||
|
||
group = Group( | ||
name='vinyldns-python-test-group', | ||
|
@@ -33,7 +33,15 @@ def __init__(self): | |
) | ||
zone_change = self.client.connect_zone(zone) | ||
self.zone = zone_change.zone | ||
wait_until_zone_exists(self.client, self.zone.id) | ||
|
||
reverse_zone = Zone( | ||
name='2.0.192.in-addr.arpa.', | ||
email='[email protected]', | ||
admin_group_id=self.group.id | ||
) | ||
zone_change = self.client.connect_zone(reverse_zone) | ||
self.reverse_zone = zone_change.zone | ||
wait_until_zone_exists(self.client, self.reverse_zone.id) | ||
|
||
# finalizer called by py.test when the simulation is torn down | ||
def tear_down(self): | ||
|
@@ -48,14 +56,13 @@ def clear_groups(self): | |
def clear_zones(self): | ||
# Get the groups for the ok user | ||
groups = self.client.list_all_my_groups().groups | ||
group_ids = map(lambda x: x.id, groups) | ||
group_ids = list(map(lambda x: x.id, groups)) | ||
|
||
zones = self.client.list_zones().zones | ||
|
||
# we only want to delete zones that the ok user "owns" | ||
zones_to_delete = filter(lambda x: (x.admin_group_id in group_ids), zones) | ||
|
||
zoneids_to_delete = map(lambda x: x.id, zones_to_delete) | ||
zones_to_delete = list(filter(lambda x: x.admin_group_id in group_ids, zones)) | ||
zoneids_to_delete = list(map(lambda x: x.id, zones_to_delete)) | ||
|
||
for id in zoneids_to_delete: | ||
self.client.abandon_zone(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
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