Skip to content

Commit

Permalink
Merge pull request #117 from nutanix/task/fix-failing-sanity
Browse files Browse the repository at this point in the history
Task/fix failing sanity
  • Loading branch information
Gevorg-Khachatryan-97 authored Feb 21, 2022
2 parents f1fddca + 791ab50 commit 58a72cc
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unit_testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9']
python-version: ['3.9']
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
Expand Down
1 change: 0 additions & 1 deletion plugins/module_utils/prism/pbrs.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ def __init__(self, module):
super(Pbr, self).__init__(module, resource_type=resource_type)
self.build_spec_methods = {
"priority": self._build_spec_priority,
# "pbr_uuid": self.build_spec_pbr_uuid,
"vpc": self._build_spec_vpc,
"source": self._build_spec_source,
"destination": self._build_spec_destination,
Expand Down
22 changes: 18 additions & 4 deletions plugins/modules/ntnx_pbrs.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,17 @@
suboptions:
code:
type: int
description: ICMP code
description:
- ICMP code and it's required by type
- Mutually exclusive with any
type:
description: ICMP type
description:
- ICMP type
- Mutually exclusive with any
type: int
any:
description: allow any icmp code or type
type: bool
action:
type: dict
description: The behavior on the request
Expand Down Expand Up @@ -428,14 +435,21 @@ def get_module_spec():
dst=dict(type="list", default=["*"], elements="str"),
)

icmp_spec = dict(code=dict(type="int"), type=dict(type="int"))
icmp_spec = dict(
any=dict(type="bool"), code=dict(type="int"), type=dict(type="int")
)

protocol_spec = dict(
any=dict(type="bool"),
tcp=dict(type="dict", options=tcp_and_udp_spec),
udp=dict(type="dict", options=tcp_and_udp_spec),
number=dict(type="int"),
icmp=dict(type="dict", options=icmp_spec),
icmp=dict(
type="dict",
options=icmp_spec,
mutually_exclusive=[("any", "code"), ("any", "type")],
required_by={"type": "code"},
),
)

action_spec = dict(
Expand Down

0 comments on commit 58a72cc

Please sign in to comment.