Page MenuHomeDevCentral

Standardize states using pkg.installed everywhere
ClosedPublic

Authored by dereckson on Sep 13 2018, 09:58.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 18, 22:16
Unknown Object (File)
Wed, Dec 18, 21:55
Unknown Object (File)
Tue, Dec 17, 01:00
Unknown Object (File)
Sat, Dec 7, 23:24
Unknown Object (File)
Sat, Dec 7, 06:41
Unknown Object (File)
Sat, Nov 30, 07:46
Unknown Object (File)
Sat, Nov 30, 07:29
Unknown Object (File)
Wed, Nov 27, 18:05
Subscribers
None

Details

Summary

Some entries contained only the state module name pkg
instead of the full function.

This approach was deemed more compatible with requisite logic,
where onyl the state module name and the id are required, without
the function name.

Yet, it's the only case this syntax was used, and as such, it should
be standardized.

If there is an advantage state module is more visible, there is also
a drawback: the function name isn't separated from the parameters.

As such, all states will now use the following syntax:

<id>:
   <state module>.<method>:
     - parameter1
     - parameter2
     - …
Test Plan

no op

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Passed
Unit
No Test Coverage
Branch
pkg-installed (branched from master)
Build Status
Buildable 2725
Build 2973: arc lint + arc unit

Event Timeline

dereckson created this revision.
dereckson added a reviewer: dereckson.

The following regexp was used to replace lines:

s/pkg:\n *\- installed/pkg.installed:/g

As sed replaces only one line at each time without a complicated script, perl was used to perform the replace:

perl -0777 -i -pe 's/pkg:\n *\- installed/pkg.installed:/g'

Mass replacement was so done by the following command:

find . -name '*sls' -exec perl -0777 -i -pe 's/pkg:\n *\- installed/pkg.installed:/g' {} \;

This revision is now accepted and ready to land.Sep 13 2018, 10:03
This revision was automatically updated to reflect the committed changes.