Skip to content

Commit

Permalink
resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
emoscardini committed Sep 29, 2023
2 parents 58ea12f + 6dbb588 commit fc078ce
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.11] - 2023-09-18

### Changed
- Change fabric port to 443 for ziti version 0.30.0 and above

## [1.0.10] - 2023-09-14

### Fixed

- Fixed issue with salt roles not being a list
## [1.0.9] - 2023-08-02

- Rebuild to comsume ziti_router_auto_enroll 1.0.11.
Expand Down
14 changes: 12 additions & 2 deletions router_registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def create_parser():
:return: A Namespace containing arguments
"""
__version__ = '1.0.10'
__version__ = '1.0.12'
parser = argparse.ArgumentParser()

mgroup = parser.add_mutually_exclusive_group(required=True)
Expand Down Expand Up @@ -617,6 +617,16 @@ def handle_ziti_router_auto_enroll(args, router_info, enrollment_commands):
else:
enrollment_commands.append(router_info['productMetadata']['zitiBinaryBundleLinuxAMD64'])

# check if ziti version is 0.30.0 or above
fabric_port = ziti_router_auto_enroll.compare_semver(
router_info['productMetadata']['zitiVersion'],'0.30.0'
)

# pass in fabric port 443 for versions 0.30.0 and above
if fabric_port >= 0:
logging.debug("Setting fabric port to 443")
enrollment_commands.append('--controllerFabricPort')
enrollment_commands.append('443')
# print enrollment command in debug
logging.debug(enrollment_commands)

Expand Down Expand Up @@ -661,7 +671,7 @@ def salt_stack_add(router_info):
minion_config = '/etc/salt/minion.d/nf-minion.conf'
yaml_content = ({'id': router_info['edgeRouter']['hostId'],
'master': '127.0.0.1',
'grains': {'roles': 'ER'}})
'grains': {'roles': ['ER']}})
try:
with open(minion_config, "w", encoding='UTF-8') as open_file:
yaml.dump(yaml_content, open_file, sort_keys=False)
Expand Down

0 comments on commit fc078ce

Please sign in to comment.