-
Notifications
You must be signed in to change notification settings - Fork 816
Expanding the manifest capabilities #2952
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -228,6 +228,7 @@ def generate_container_mgmt(self, package: Package): | |
| image_id = package.image_id | ||
| name = package.manifest['service']['name'] | ||
| container_spec = package.manifest['container'] | ||
| is_asic_service = package.manifest['service']['asic-service'] | ||
| script_path = os.path.join(DOCKER_CTL_SCRIPT_LOCATION, f'{name}.sh') | ||
| script_template = get_tmpl_path(DOCKER_CTL_SCRIPT_TEMPLATE) | ||
| run_opt = [] | ||
|
|
@@ -237,6 +238,17 @@ def generate_container_mgmt(self, package: Package): | |
|
|
||
| run_opt.append('-t') | ||
|
|
||
| if not is_asic_service: | ||
azmy98 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| if container_spec['network']: | ||
| docker_network_type = container_spec['network'] | ||
| run_opt.append(f'--net={docker_network_type}') | ||
| else: | ||
| if container_spec['network'] != 'none': | ||
| raise ServiceCreatorError(f"Invalid Configuration, asic-service must not contain network type") | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But ASIC services should not have network specified. This comment was given by the NVIDIA SONiC team. I am missing something?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what do you suggest? to enforce the
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, let me clarify:
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see, but this is what I do in this if and else that i added.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are you suggesting to do explicitly
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes |
||
|
|
||
| for port in container_spec['ports']: | ||
| run_opt.append(f'--publish {port}') | ||
azmy98 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| for volume in container_spec['volumes']: | ||
| run_opt.append(f'-v {volume}') | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.