Skip to content

Commit

Permalink
Fix Partition not found error
Browse files Browse the repository at this point in the history
  • Loading branch information
nandakishorepeddi committed Jan 5, 2024
1 parent 57fa813 commit 7b6aaef
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
15 changes: 10 additions & 5 deletions f5_cccl/bigip.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,11 +446,16 @@ def _refresh_net(self):

def get_default_route_domain(self):
"""Return the configured default route domain for the partition"""
partition = self._bigip.tm.auth.partitions.partition.load(
name=self._partition)
# Note: This information is needed when processing the request config
# which occurs before self.refresh() is called
return partition.defaultRouteDomain
try:
partition = self._bigip.tm.auth.partitions.partition.load(
name=self._partition)
return partition.defaultRouteDomain
# Note: This information is needed when processing the request config
# which occurs before self.refresh() is called
except Exception as error:
LOGGER.error("F5 SDK Error: %s", error)
raise cccl_exc.F5CcclResourceNotFoundError(
f"The requested partition {self._partition} was not found.")

def get_virtuals(self, all_virtuals=False):
"""Return the index of virtual servers."""
Expand Down
2 changes: 1 addition & 1 deletion requirements.test.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Test Requirements

f5-sdk==3.0.21
f5-icontrol-rest==1.3.13
#f5-icontrol-rest==1.3.13
ipaddress==1.0.17
PyJWT==2.4.0
mock==2.0.0
Expand Down
2 changes: 1 addition & 1 deletion setup_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# F5-CCCL Install Requirements
f5-icontrol-rest==1.3.13
#f5-icontrol-rest==1.3.13
f5-sdk==3.0.21
ipaddress==1.0.17
netaddr==0.7.19
Expand Down

0 comments on commit 7b6aaef

Please sign in to comment.