Merge ~chad.smith/cloud-init:uninitialized-variables into cloud-init:master
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Scott Moser | ||||
Approved revision: | efab669ff3d9c0089b0686c03234093b629bb1c8 | ||||
Merge reported by: | Chad Smith | ||||
Merged at revision: | 1d8c327139a8c291eeb244ee1a6a8badd83e9e72 | ||||
Proposed branch: | ~chad.smith/cloud-init:uninitialized-variables | ||||
Merge into: | cloud-init:master | ||||
Diff against target: |
146 lines (+33/-16) 6 files modified
cloudinit/cmd/status.py (+5/-2) cloudinit/cmd/tests/test_status.py (+18/-3) cloudinit/config/cc_power_state_change.py (+1/-0) cloudinit/config/cc_rh_subscription.py (+2/-3) cloudinit/distros/freebsd.py (+3/-8) cloudinit/util.py (+4/-0) |
||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Scott Moser | Approve | ||
Server Team CI bot | continuous-integration | Approve | |
Review via email: mp+336453@code.launchpad.net |
Commit message
Fix potential cases of uninitialized variables.
While addressing undeclared variable in 'cloud-init status', I also fixed
the errors raised by automated code reviews against cloud-init master at
https:/
The following items are addressed:
* Fix 'cloud-init status':
* Only report 'running' state when any stage in
/
Default start time to 0 if null.
* undeclared variable 'reason' now reports 'Cloud-init enabled by
systemd cloud-init-
* cc_rh_subscript
exception is raised, use ProcessExecution as e instead.
* distros/freebsd.py:
* Drop repetitive looping over ipv4 and ipv6 nic lists.
* Initialize bsddev to 'NOTFOUND' in the event that no devs are
discovered
* declare nics_with_addresses = set() in broader scope outside
check_downable conditional
* cloudinit/util.py: Raise TypeError if mtype parameter isn't string,
iterable or None.
LP: #1744796
Description of the change
See commit message
Filtering to errors raised by lgtm: /lgtm.com/ projects/ g/cloud- init/cloud- init/alerts/ ?mode=tree& severity= error
https:/