[openlmi-tools/f19] remove sample scripts from the package

Peter Hatina phatina at fedoraproject.org
Mon Apr 29 10:51:14 UTC 2013


commit 36ddb8837088b49d1af7f3bfc90a0aa84150e0f4
Author: Peter Hatina <phatina at redhat.com>
Date:   Mon Apr 29 12:15:49 2013 +0200

    remove sample scripts from the package

 openlmi-tools-02-package.patch |  304 ++++++++++++++++++++++++++++++++++++++++
 openlmi-tools.spec             |   10 ++-
 2 files changed, 313 insertions(+), 1 deletions(-)
---
diff --git a/openlmi-tools-02-package.patch b/openlmi-tools-02-package.patch
new file mode 100644
index 0000000..0809940
--- /dev/null
+++ b/openlmi-tools-02-package.patch
@@ -0,0 +1,304 @@
+diff --git a/README b/README
+index 65f9b58..b46cb49 100644
+--- a/README
++++ b/README
+@@ -15,27 +15,7 @@ bindings, standard APIs, and standard scripting interfaces.
+ 
+ OpenLMI-tools is a set of command line tools for OpenLMI-providers.
+ 
+-Following cli tools are part of this sub-project:
+-
+-* lmiservice
+-    This tool provides remote service management. Supported operations with
+-    services are: start, stop, restart, enable, disable, reload, try-restart,
+-    cond-restart, reload-or-restart and status.
+-
+-* lmipower
+-    This tool provides remote power management. Supported operations with
+-    remote machine are: poweroff, reboot, suspend, hibernate, force-poweroff,
+-    force-reboot.
+-
+-* lmiuser
+-    This tool provides remote user management. Currently supported operations
+-    are: list-users, list-groups, group-members (list of groups, where
+-    the specified user belongs to), useradd.
+-
+-* lmiip
+-    This tool provides remote networking management. Currently it provides
+-    following operations: set static ip address, remove address assigned
+-    to an interface, list ip address setting for all/selected interface.
++OpenLMI-tools currently consists of:
+ 
+ * lmishell
+     This tool provides interactive shell for CIM objects management.
+@@ -62,135 +42,113 @@ $ ../configure --prefix=/usr
+ * Example usage                                                               *
+ *******************************************************************************
+ 
+-Following examples show, how to use command-line tools:
+-
+-* lmiservice
+-    $ lmiservice -h <hostname> -u <username> -p <password> status <service_name>
+-    $ lmiservice -h <hostname> -u <username> -p <password> start <service_name>
+-    $ lmiservice -h <hostname> -u <username> -p <password> stop <service_name>
+-
+-* lmipower
+-    $ lmipower -h <hostname> -u <username> -p <password> poweroff
+-    $ lmipower -h <hostname> -u <username> -p <password> reboot
+-
+-* lmiuser
+-    $ lmiuser -h <hostname> -u <username> -p <password> list-users
+-    $ lmiuser -h <hostname> -u <username> -p <password> list-groups
+-    $ lmiuser -h <hostname> -u <username> -p <password> group-members <group_name>
+-
+-* lmiip
+-    $ lmiip -h <hostname> -u <username> -p <password> addr show
+-        - shows available network interfaces and their associated addresses
+-    $ lmiip -h <hostname> -u <username> -p <password> addr set <address>/<mask> dev <device_name>
+-        - sets the ipv4 address to specified interface
+-    $ lmiip -h <hostname> -u <username> -p <password> addr
+-
+-* lmi-shell
+-    - general usage example:
+-        - how to start a shell:
+-            $ lmishell
+-            >
+-
+-        - how to exit from the shell:
+-            > <ctrl+d>
+-            $
+-        - how to use previous commands:
+-            - press up arrow to list previous commands in history
+-            - reverse-search by <ctrl+r> and type substring of the command
+-
+-        - how to clear a history:
+-            > clear_history()
+-
+-        - how to connect to a remote machine:
+-            > c = connect("hostname", "username", "password")
+-
+-            or
+-
+-            > c = connect("hostname", "username")
+-            password: <not echoed>
+-            >
+-        - how to turn off display "sugar" for return values:
+-            > use_display_sugar(False)
+-
+-    - example how to stop a service:
+-        $ lmishell
+-        > c = connect("hostname", "username", "password")
+-        > service = c.root.cimv2.LMI_Service.first_instance("service")
+-        > service.Status
+-        OK
+-        > service.StopService()
+-        hostname: ok (0)
+-        > service.Status
+-        Stopped
+-        > <ctrl+d>
+-        $
+-
+-    - example how to show a class documentation:
+-        $ lmishell
+-        > c = connect("hostname", "username", "password")
+-        > lmi_service = c.root.cimv2.LMI_Service
+-        > lmi_service.doc()
+-            ... class documentation ...
+-        <q>
+-        > <ctrl+d>
+-        $
++Following examples show, how to use lmishell:
+ 
+-    -example how to show an instance documentation with properties:
++* general usage example:
++    - how to start a shell:
+         $ lmishell
+-        > c = connect("hostname", "username", "password")
+-        > service = c.root.cimv2.LMI_Service.first_instance()
+-        > service.doc()
+-            ... instance documentation with properties ...
+-        > <ctrl+d>
+-        $
++        >
+ 
+-    - example how to print available namespaces, classes, methods, etc
+-        $ lmishell
+-        > c = connect("hostname", "username", "password")
+-        > c.print_namespaces()
+-        root
+-        > c.root.print_namespaces()
+-        cimv2
+-        interop
+-        PG_InterOp
+-        PG_Internal
+-        > c.root.cimv2.print_classes()
+-            ... available classes ...
+-        > service = c.root.cimv2.LMI_Service.first_instance()
+-        > service.print_methods()
+-            ... instance methods ...
+-        > service.print_properties()
+-            ... instance properties ...
++    - how to exit from the shell:
+         > <ctrl+d>
+         $
++    - how to use previous commands:
++        - press up arrow to list previous commands in history
++        - reverse-search by <ctrl+r> and type substring of the command
+ 
+-    - example how to get associated objects with an instance
+-        $ lmishell
+-        > c = connect("hostname", "username", "password")
+-        > instance = c.root.cimv2.LMI_Group.first_instance()
+-        > associated_objects = instance.associators()
+-        > <ctrl+d>
+-        $
+-    - example how to get association objects with an instance
+-        $ lmishell
+-        > c = connect("hostname", "username", "password")
+-        > os = c.root.cimv2.Linux_OperatingSystem.first_instance()
+-        > association_objects = os.references()
+-        > <ctrl+d>
++    - how to clear a history:
++        > clear_history()
+ 
+-    - example how to update an object property value
+-        $ lmishell
++    - how to connect to a remote machine:
+         > c = connect("hostname", "username", "password")
+-        > user = c.root.cimv2.LMI_Account.first_instance()
+-        > user.LoginShell = "/usr/bin/zsh"
+-        > user.push()
+-        > <ctrl+d>
+-        $
+ 
+-    - example how to delete an instance from CIM broker
+-        $ lmishell
+-        > c = connect("hostname", "username", "password")
+-        > instance = c.root.cimv2.LMI_Account.first_instance()
+-        > instance.delete()
+-        > <ctrl+d>
+-        $
++        or
++
++        > c = connect("hostname", "username")
++        password: <not echoed>
++        >
++    - how to turn off display "sugar" for return values:
++        > use_display_sugar(False)
++
++* example how to stop a service:
++    $ lmishell
++    > c = connect("hostname", "username", "password")
++    > service = c.root.cimv2.LMI_Service.first_instance("service")
++    > service.Status
++    OK
++    > service.StopService()
++    hostname: ok (0)
++    > service.Status
++    Stopped
++    > <ctrl+d>
++    $
++
++* example how to show a class documentation:
++    $ lmishell
++    > c = connect("hostname", "username", "password")
++    > lmi_service = c.root.cimv2.LMI_Service
++    > lmi_service.doc()
++        ... class documentation ...
++    <q>
++    > <ctrl+d>
++    $
++
++* example how to show an instance documentation with properties:
++    $ lmishell
++    > c = connect("hostname", "username", "password")
++    > service = c.root.cimv2.LMI_Service.first_instance()
++    > service.doc()
++        ... instance documentation with properties ...
++    > <ctrl+d>
++    $
++
++* example how to print available namespaces, classes, methods, etc
++    $ lmishell
++    > c = connect("hostname", "username", "password")
++    > c.print_namespaces()
++    root
++    > c.root.print_namespaces()
++    cimv2
++    interop
++    PG_InterOp
++    PG_Internal
++    > c.root.cimv2.print_classes()
++        ... available classes ...
++    > service = c.root.cimv2.LMI_Service.first_instance()
++    > service.print_methods()
++        ... instance methods ...
++    > service.print_properties()
++        ... instance properties ...
++    > <ctrl+d>
++    $
++
++* example how to get associated objects with an instance
++    $ lmishell
++    > c = connect("hostname", "username", "password")
++    > instance = c.root.cimv2.LMI_Group.first_instance()
++    > associated_objects = instance.associators()
++    > <ctrl+d>
++    $
++* example how to get association objects with an instance
++    $ lmishell
++    > c = connect("hostname", "username", "password")
++    > os = c.root.cimv2.Linux_OperatingSystem.first_instance()
++    > association_objects = os.references()
++    > <ctrl+d>
++
++* example how to update an object property value
++    $ lmishell
++    > c = connect("hostname", "username", "password")
++    > user = c.root.cimv2.LMI_Account.first_instance()
++    > user.LoginShell = "/usr/bin/zsh"
++    > user.push()
++    > <ctrl+d>
++    $
++
++* example how to delete an instance from CIM broker
++    $ lmishell
++    > c = connect("hostname", "username", "password")
++    > instance = c.root.cimv2.LMI_Account.first_instance()
++    > instance.delete()
++    > <ctrl+d>
++    $
+diff --git a/cli-tools/lmi/makefile.am b/cli-tools/lmi/makefile.am
+index ecc2e2c..eb0d662 100644
+--- a/cli-tools/lmi/makefile.am
++++ b/cli-tools/lmi/makefile.am
+@@ -1,12 +1,6 @@
+ lmi_PYTHON = \
+-    lmi_address.py \
+     lmi_client_base.py \
+-    lmi_client_ip.py \
+-    lmi_client_power.py \
+-    lmi_client_service.py \
+     lmi_client_shell.py \
+-    lmi_client_user.py \
+-    lmi_options.py \
+     __init__.py
+ 
+ lmidir = $(pythondir)/lmi
+diff --git a/cli-tools/makefile.am b/cli-tools/makefile.am
+index 8f446c7..75241f9 100644
+--- a/cli-tools/makefile.am
++++ b/cli-tools/makefile.am
+@@ -1,11 +1,6 @@
+ SUBDIRS = lmi
+ 
+-bin_SCRIPTS = \
+-    lmiip \
+-    lmipower \
+-    lmiservice \
+-    lmishell \
+-    lmiuser
++bin_SCRIPTS = lmishell
+ 
+ EXTRA_DIST = $(bin_SCRIPTS)
+ 
diff --git a/openlmi-tools.spec b/openlmi-tools.spec
index 777c325..51c7a36 100644
--- a/openlmi-tools.spec
+++ b/openlmi-tools.spec
@@ -1,14 +1,16 @@
 Name:           openlmi-tools
 Version:        0.5
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        Set of CLI tools for Openlmi providers
 
 License:        GPLv2+
 URL:            http://fedorahosted.org/openlmi
 Source0:        http://fedorahosted.org/released/openlmi-tools/%{name}-%{version}.tar.gz
 Patch0:         openlmi-tools-01-namespaces.patch
+Patch1:         openlmi-tools-02-package.patch
 BuildArch:      noarch
 
+BuildRequires:  automake
 BuildRequires:  python2-devel
 BuildRequires:  pywbem
 Requires:       pywbem
@@ -23,8 +25,11 @@ Obsoletes:      cura-tools < 0.1-4
 %setup -q
 
 %patch0 -p1
+%patch1 -p1
 
 %build
+aclocal
+automake
 %configure
 make %{?_smp_mflags}
 
@@ -37,6 +42,9 @@ make install DESTDIR=%{buildroot}
 %{python_sitelib}/lmi/
 
 %changelog
+* Mon Apr 29 2013 Peter Hatina <phatina at redhat.com> - 0.5-3
+- remove sample scripts from the package
+
 * Wed Feb 20 2013 Peter Hatina <phatina at redhat.com> - 0.5-2
 - fix namespace handling
 


More information about the scm-commits mailing list