[augeas-devel] Renaming a node

Raphaël Pinson raphink at gmail.com
Thu Jul 24 07:38:37 UTC 2008


Hi again,

As I am experimenting with comments, I considered several ways of dealing
with commented values (cf. http://augeas.net/page/Dealing_with_comments).

* Creating a "commented" flag under the commented node:

e.g.
   /files/path/to/my/file/field = "value"
   /files/path/to/my/file/field/commented

   This is my favorite pick, but David pointed out that this way of doing
could confuse the devs using the lens, since they would have to check for
the existence of the "commented" flag before using the parsed value.


* Embedding the parsed value inside a "commented" node:

e.g.
   /files/path/to/my/file/commented
   /files/path/to/my/file/commented/field = "value"

  This fixes the flag issue, since the value clearly appears inside a
"commented" node, but it makes it much harder to comment/uncomment the value
(which is my point eventually). To uncomment this, one would need to extract
the nodes from the "commented" node. I don't know how to achieve that
easily.


* Using another name for the node:

e.g.
   /files/path/to/my/file/c_field = "value"

  This also fixes the flag issue, since the field name is different. To
comment/uncomment here would mean to rename the field, if possible.
Something that would look like :

 mv /files/path/to/my/file/c_field /files/path/to/my/file/field

  I don't know how hard it would be to get to such a possibility in Augeas.


If you have more ideas, please let me know :)


Raphaël
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/augeas-devel/attachments/20080724/b6bb6b0a/attachment.htm>


More information about the augeas-devel mailing list