bottlerocket icon indicating copy to clipboard operation
bottlerocket copied to clipboard

settings: add network settings extension

Open sam-berning opened this issue 1 year ago • 0 comments

Issue number:

Closes #3652

Description of changes:

Creates a network settings extension

Testing done:

Unit testing, built aws-dev variant and packaged settings-network in it. Tested on an ec2 instance.

network settings worked as expected, and the setting extension generation returned as expected:

bash-5.1# /usr/libexec/settings/network proto1 generate --setting-version v1
{
  "Complete": {
    "hostname": "ip-{instance public ip}.us-west-2.compute.internal"
  }
}

(EDIT 1-18)

Also built and tested a vmware-dev image, and the extension worked as expected:

bash-5.1# /usr/libexec/settings/network proto1 generate --setting-version v1
{
  "Complete": {
    "hostname": "{vm ip address}"
  }
}

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

sam-berning avatar Jan 16 '24 21:01 sam-berning