mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 05:10:22 -07:00
Various bigip_selfip fixes (#33500)
* Various bigip_selfip fixes Minor optimizations. Fixes address regex * Fixing upstream errors
This commit is contained in:
parent
df86d8f39e
commit
dd94cc8229
2 changed files with 9 additions and 26 deletions
|
@ -216,7 +216,6 @@ vlan:
|
|||
sample: vlan1
|
||||
'''
|
||||
|
||||
import os
|
||||
import re
|
||||
|
||||
from ansible.module_utils.f5_utils import AnsibleF5Client
|
||||
|
@ -600,7 +599,6 @@ class ModuleManager(object):
|
|||
self.want.update({'traffic_group': '/Common/traffic-group-local-only'})
|
||||
if self.want.route_domain is None:
|
||||
self.want.update({'route_domain': 0})
|
||||
|
||||
if self.want.check_mode:
|
||||
return True
|
||||
self.create_on_device()
|
||||
|
@ -610,12 +608,10 @@ class ModuleManager(object):
|
|||
raise F5ModuleError("Failed to create the Self IP")
|
||||
|
||||
def create_on_device(self):
|
||||
params = self.changes.api_params()
|
||||
params = self.want.api_params()
|
||||
self.client.api.tm.net.selfips.selfip.create(
|
||||
name=self.want.name,
|
||||
partition=self.want.partition,
|
||||
address=self.want.address,
|
||||
vlan=self.want.vlan,
|
||||
**params
|
||||
)
|
||||
|
||||
|
@ -741,9 +737,8 @@ class Difference(object):
|
|||
|
||||
@property
|
||||
def traffic_group(self):
|
||||
if self.want.traffic_group == self.have.traffic_group:
|
||||
return None
|
||||
return self.want.traffic_group
|
||||
if self.want.traffic_group != self.have.traffic_group:
|
||||
return self.want.traffic_group
|
||||
|
||||
|
||||
class ArgumentSpec(object):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue