ctys-attribute

March, 2011



.

NAME

ctys-attribute - Manage attributes of plugins, VMs, and PMs.


SYNTAX


ctys-attribute


   [--attribute-create[=<position>]]
   [--attribute-delete[=<occurance>]]
   [--attribute-replace[=<occurance>]]

   (
     [
       --attribute-keyonly 
       --attribute-name=<attr-name>]
     |
     (
       [
         --attribute-name=<attr-name> 
         --attribute-value-new=<attr-val-list>]
       |
       [
         --attribute-name=<attr-name> 
         --attribute-value-new=<attr-val-list>
         --attribute-value-old=<attr-val-list>
       ]
     )
   )

   [-d <debug-level>]
   [-h]
   [-H <help-options>]
   [--list]
   [-t <session-type>]
   [-V]
   [-X]
   <file-name-list>


   <attr-val-list>:=<attr-val>[%<attr-val-list>]

   <file-name-list>:=<file-name>[ <file-name-list>]

   <occurance>:=(
                  first|last|all
                  #nr
  	        )
		#nr=1-9999999

                default:=first

   <position>:=(
                 top|bottom
                 #line
	       )
               #line=1-9999999

               default:=top







DESCRIPTION

ATTENTION: This document is under development, therefore just a temporary pre-release, which may change in future versions. The software is alpha-release.

ctys-attribute provides the management of runtime attributes for dynamic and persistent plugins, VMs, and PMs. The attributes of the persistent data are utilized for the handling of machine information for selection, inventory management, and execution.

The current version supports offline-modification only. The cacheDB has to be updated either by new automated scan or by manual modification. Both may be extended in new versions.

The file is either scanned for specific attributes, or just a new attribute value assignment is inserted. Therefore various types of attribute syntaxes from the various supported namespaces are recognized. The following namespaces are currently supported:



Namespace Syntax VM-Config Applicable Tools
ctys-configuration ctys '#@#'-prefixes ctys-attribute, ctys-groups,
      ctys-macros, ctys-scripts,
      Text-Editor
QEMU/KVM ctys '#@#'-prefixes ctys-attribute, Text-Editor
shell bash variables ctys-attribute, Text-Editor
VirtualBox conf-files+repository 1.) VBoxManage,XML call parameters ctys-attribute, Text-Editor,
      VBoxManage, VirtualBox-GUI
VMware conf-files+repository 2.) vmx keywords ctys-attribute, Text-Editor,
      Vmware-GUI
Xen conf-files Python variables ctys-attribute, Text-Editor
Supported Attribute Namespaces
1.) Not all keywords are supported yet.
Native OEM tools are required in addition.
2.) The repository is not supported yet.
Native OEM tools are required in addition.


.

OPTIONS

ctys-attribute

--attribute-create=<position>

Create a new entry, this is done without recognition of presence. For sequential scan the position could be provided for order-priority.

--attribute-delete=<occurance>

Delete an entry, for sequential scan the position could be provided for order-priority.

--attribute-keyonly

Creates a key only, an attribute without an assigned value.

--attribute-name=<attr-name>

The name of the attribute to be modified.

--attribute-value-new=<attr-val-list>

The list of new attributes to be set.

--attribute-value-old=<attr-val-list>

The list of old attributes to be replaced. Missing attributes are ignored.

-d <debug-level>*

Same as ctys.

--directory=<directory>

Directory for storage of created configuration files.

-h|--help|-help*

Print help, refer to "-H" for additional information.

-H <help-option>

The extended help option is based on system interfaces for display of manpages, PDF and HTML documents. This comprises the man pages and installed manuals.

For additional help refer to the documents or type ctys -H help.

--list

The list of present attributes.

-t <session-type>

The session type the VM has to be created for. Currently QEMU (for QEMU and KVM on x86), VMW , VBOX , and XEN are supported. Each defines a common set of parameters with additional specific variations.

-V

Version.

-X

Terse.


.

ARGUMENTS

<file-name-list> : List of files to be modified.


.

EXAMPLES

List XEN configuration file

  ctys-attribute --list tst01.conf

List CTYS configuration file

  ctys-attribute --list tst01.ctys

Deactivate a from ENUMERATE

  ctys-attribute \
    --attribute-keyonly  \
    --attribute-create=TOP \
    --attribute-name=MAGICID-IGNORE \
    tst01.conf

Activate for ENUMERATE

  ctys-attribute \
    --attribute-keyonly  \
    --attribute-delete=TOP \
    --attribute-name=MAGICID-IGNORE \
    tst01.conf
  
  ctys-attribute \
    --attribute-keyonly  \
    --attribute-create=TOP \
    --attribute-name=MAGICID-VMW \
    tst01.conf

Replace all values of an attribute in XEN configuration file

  ctys-attribute \
    --attribute-name='kernelbase' \
    --attribute-replace=ALL  \
    --attribute-value-new="'/nboot1'"  \
    tst01.conf

Replace string in all values of an attribute in XEN configuration file

  ctys-attribute \
    --attribute-name='kernelbase' \
    --attribute-replace=ALL \
    --attribute-value-new="'/nboot1'" \
    --attribute-value-old="'/boot'" \
    tst01.conf

Replace string in FIRST value of an attribute in XEN configuration file

  ctys-attribute \
    --attribute-name='kernelbase' \
    --attribute-replace=FIRST \
    --attribute-value-new="'/nboot1'" \
    --attribute-value-old="'/boot'" \
    tst01.conf

Replace string in LAST value of an attribute in XEN configuration file

  ctys-attribute \
    --attribute-name='kernelbase' \
    --attribute-replace=LAST \
    --attribute-value-new="'/nboot1'" \
    --attribute-value-old="'/boot'" \
    tst01.conf

Replace string in 2. value of an attribute in CTYS configuration file

  ctys-attribute \
    --attribute-name='kernelbase' \
    --attribute-replace=2 \
    --attribute-value-new="'/nboot1'" \
    --attribute-value-old="'/boot'" \
    tst01.conf

Replace all values of an attribute in CTYS configuration file

  ctys-attribute \
    --attribute-name='WRAPPERCALL' \
    --attribute-replace=ALL  \
    --attribute-value-new="'123'"  \
    tst01.ctys

Create new attribute value assignment in CTYS configuration file

  ctys-attribute \
    --attribute-create=TOP \
    --attribute-name='NEWATTR' \
    --attribute-value-new="'123'"  \
    tst01.ctys

Create new attribute value assignment in CTYS configuration file

  ctys-attribute \
    --attribute-create=BOTTOM \
    --attribute-name='NEWATTR' \
    --attribute-value-new="'123'"  \
    tst01.ctys

Create new attribute value assignment in CTYS configuration file

  ctys-attribute \
    --attribute-create=15 \
    --attribute-name='NEWATTR' \
    --attribute-value-new="'123'"  \
    tst01.ctys

Delete first occurance of an attribute in CTYS configuration file

  ctys-attribute \
    --attribute-delete \
    --attribute-name='NEWATTR' \
    tst01.ctys

or

  ctys-attribute \
    --attribute-delete=1 \
    --attribute-name='NEWATTR' \
    tst01.ctys

Delete ALL occurances of an attribute in CTYS configuration file

  ctys-attribute \
    --attribute-delete=ALL \
    --attribute-name='NEWATTR' \
    tst01.ctys



.

EXIT-VALUES

0: OK:
Result is valid.

1: NOK:
Erroneous parameters.

2: NOK:
Missing an environment element like files or databases.


SEE ALSO

ctys specifications
ctys-machine-states(7)
ctys executables
ctys-createConfVM(1) , ctys-cloneVM(1)

ctys plugins
PMs
ctys-PM(1)

VMs
KVM(1) , ctys-QEMU(1) , ctys-VBOX(1) , ctys-VMW(1) , ctys-XEN(1)

HOSTS
ctys-CLI(1) , ctys-RDP(1) , ctys-VNC(1) , ctys-X11(1)




AUTHOR

Arno-Can Uestuensoez <https://arnocan.wordpress.com/>
<https://unifiedsessionsmanager.sourceforge.io/>
<https://github.com/unifiedsessionsmanager>




COPYRIGHT

Copyright (C) 2008, 2009, 2010, 2011, 2020 Ingenieurbuero Arno-Can Uestuensoez

For BASE package following licenses apply,

This document is part of the DOC package,

For additional information refer to enclosed Releasenotes and License files.