gabstopper / ansible-stonesoft

Ansible libraries for automating Stonesoft FW Management
Apache License 2.0
10 stars 3 forks source link

Error with bgp profile #10

Closed meandus closed 6 years ago

meandus commented 6 years ago

fatal: [phmbun1corea.hw.adeo.com]: FAILED! => { "changed": false, "module_stderr": "Traceback (most recent call last):\n File \"/tmp/ansible_h76cuO/ansible_module_l3fw_cluster.py\", line 1476, in \n main()\n File \"/tmp/ansible_h76cuO/ansible_module_l3fw_cluster.py\", line 1473, in main\n StonesoftCluster()\n File \"/tmp/ansible_h76cuO/ansible_module_l3fw_cluster.py\", line 771, in init\n super(StonesoftCluster, self).init(self.module_args, supports_check_mode=True)\n File \"/tmp/ansible_h76cuO/ansible_modlib.zip/ansible/module_utils/stonesoft_util.py\", line 367, in init\n File \"/tmp/ansible_h76cuO/ansible_module_l3fw_cluster.py\", line 946, in exec_module\n if self.update_bgp(bgp):\n File \"/tmp/ansible_h76cuO/ansible_module_l3fw_cluster.py\", line 1334, in update_bgp\n if bgp_profile is not None and bgp_profile != bgp.profile.name:\nAttributeError: 'NoneType' object has no attribute 'name'\n", "module_stdout": "", "msg": "MODULE FAILURE", "rc": 0 }

      bgp_peering:
      -   external_bgp_peer: PEER_NC1_to_Store13
          interface_id: '1013'
          name: Store13_to_phmbu
      -   external_bgp_peer: PEER_NC2_to_Store13
          interface_id: '2013'
          name: Store13_to_phmbu
      bgp_profile: Default BGP Profile
      enabled: true
gabstopper commented 6 years ago

You can remove the bgp_profile line from the ansible configuration, this is partly my fault because I hadn't implemented changing the bgp_profile. I will implement this for next push.

gabstopper commented 6 years ago

Hi Remy, This is resolved in the latest commit. BGP Profile is fully implemented.