Skip to content

Commit

Permalink
Add support for IMDS version setting
Browse files Browse the repository at this point in the history
Support the new --imds-support command line argument. This allows the user
to upload an image that will switch launched instances to the IMDS v2
implementation.
  • Loading branch information
rjschwei committed Feb 23, 2024
1 parent 1b66fc3 commit 61a67ea
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ec2uploadimg
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def parse_args(args):
dest='grub2',
help='The image uses the GRUB2 bootloader (Optional)'
)
help_msg = 'Set he protocol version to be used when instances are '
help_msg = 'Set the protocol version to be used when instances are '
help_msg += 'launched from the image, supported values 2.0/v2.0. '
help_msg += '(Optional)'
parser.add_argument(
Expand Down
2 changes: 1 addition & 1 deletion lib/ec2imgutils/ec2uploadimg.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def __init__(self,
boot_mode=None,
tpm_support=None,
imds_support=None
):
):
EC2ImgUtils.__init__(
self,
log_level=log_level,
Expand Down
4 changes: 2 additions & 2 deletions tests/test_libec2uploadimg.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
code_path = os.path.abspath('%s/../lib' % test_path)
sys.path.insert(0, code_path)

import ec2imgutils.ec2uploadimg as ec2upimg
from ec2imgutils.ec2imgutilsExceptions import (
import ec2imgutils.ec2uploadimg as ec2upimg # noqa: E402
from ec2imgutils.ec2imgutilsExceptions import ( # noqa: E402
EC2UploadImgException
)

Expand Down

0 comments on commit 61a67ea

Please sign in to comment.