[PATCH] Update back-end license to LGPLv2.1
by pvital@linux.vnet.ibm.com
From: Paulo Vital <pvital(a)linux.vnet.ibm.com>
Moving back the license of back-end to LGPLv2.1 since Wok and Kimchi don't depend
anymore on some imported code under LGPLv3.
COPYING.LGPL was updated according to http://www.gnu.org/licenses/lgpl-2.1.txt
Signed-off-by: Paulo Vital <pvital(a)linux.vnet.ibm.com>
---
COPYING | 2 +-
COPYING.LGPL | 657 ++++++++++++++++++++++++++++++++++++++++++++---------------
2 files changed, 498 insertions(+), 161 deletions(-)
diff --git a/COPYING b/COPYING
index f641eaf..329dfa2 100644
--- a/COPYING
+++ b/COPYING
@@ -10,7 +10,7 @@ Kimchi makes use of different projects and they are placed as below:
- the code under ui/fontello is imported from Fontello (http://fontello.com).
The rest of this distribution is governed by the GNU Lesser General Public
-License version 3.
+License version 2.1.
See COPYING.LGPL and COPYING.ASL2.
diff --git a/COPYING.LGPL b/COPYING.LGPL
index 65c5ca8..4362b49 100644
--- a/COPYING.LGPL
+++ b/COPYING.LGPL
@@ -1,165 +1,502 @@
- GNU LESSER GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
-
- This version of the GNU Lesser General Public License incorporates
-the terms and conditions of version 3 of the GNU General Public
-License, supplemented by the additional permissions listed below.
-
- 0. Additional Definitions.
-
- As used herein, "this License" refers to version 3 of the GNU Lesser
-General Public License, and the "GNU GPL" refers to version 3 of the GNU
-General Public License.
-
- "The Library" refers to a covered work governed by this License,
-other than an Application or a Combined Work as defined below.
-
- An "Application" is any work that makes use of an interface provided
-by the Library, but which is not otherwise based on the Library.
-Defining a subclass of a class defined by the Library is deemed a mode
-of using an interface provided by the Library.
-
- A "Combined Work" is a work produced by combining or linking an
-Application with the Library. The particular version of the Library
-with which the Combined Work was made is also called the "Linked
-Version".
-
- The "Minimal Corresponding Source" for a Combined Work means the
-Corresponding Source for the Combined Work, excluding any source code
-for portions of the Combined Work that, considered in isolation, are
-based on the Application, and not on the Linked Version.
-
- The "Corresponding Application Code" for a Combined Work means the
-object code and/or source code for the Application, including any data
-and utility programs needed for reproducing the Combined Work from the
-Application, but excluding the System Libraries of the Combined Work.
-
- 1. Exception to Section 3 of the GNU GPL.
-
- You may convey a covered work under sections 3 and 4 of this License
-without being bound by section 3 of the GNU GPL.
-
- 2. Conveying Modified Versions.
-
- If you modify a copy of the Library, and, in your modifications, a
-facility refers to a function or data to be supplied by an Application
-that uses the facility (other than as an argument passed when the
-facility is invoked), then you may convey a copy of the modified
-version:
-
- a) under this License, provided that you make a good faith effort to
- ensure that, in the event an Application does not supply the
- function or data, the facility still operates, and performs
- whatever part of its purpose remains meaningful, or
-
- b) under the GNU GPL, with none of the additional permissions of
- this License applicable to that copy.
-
- 3. Object Code Incorporating Material from Library Header Files.
-
- The object code form of an Application may incorporate material from
-a header file that is part of the Library. You may convey such object
-code under terms of your choice, provided that, if the incorporated
-material is not limited to numerical parameters, data structure
-layouts and accessors, or small macros, inline functions and templates
-(ten or fewer lines in length), you do both of the following:
-
- a) Give prominent notice with each copy of the object code that the
- Library is used in it and that the Library and its use are
- covered by this License.
-
- b) Accompany the object code with a copy of the GNU GPL and this license
- document.
-
- 4. Combined Works.
-
- You may convey a Combined Work under terms of your choice that,
-taken together, effectively do not restrict modification of the
-portions of the Library contained in the Combined Work and reverse
-engineering for debugging such modifications, if you also do each of
-the following:
-
- a) Give prominent notice with each copy of the Combined Work that
- the Library is used in it and that the Library and its use are
- covered by this License.
-
- b) Accompany the Combined Work with a copy of the GNU GPL and this license
- document.
-
- c) For a Combined Work that displays copyright notices during
- execution, include the copyright notice for the Library among
- these notices, as well as a reference directing the user to the
- copies of the GNU GPL and this license document.
-
- d) Do one of the following:
-
- 0) Convey the Minimal Corresponding Source under the terms of this
- License, and the Corresponding Application Code in a form
- suitable for, and under terms that permit, the user to
- recombine or relink the Application with a modified version of
- the Linked Version to produce a modified Combined Work, in the
- manner specified by section 6 of the GNU GPL for conveying
- Corresponding Source.
-
- 1) Use a suitable shared library mechanism for linking with the
- Library. A suitable mechanism is one that (a) uses at run time
- a copy of the Library already present on the user's computer
- system, and (b) will operate properly with a modified version
- of the Library that is interface-compatible with the Linked
- Version.
-
- e) Provide Installation Information, but only if you would otherwise
- be required to provide such information under section 6 of the
- GNU GPL, and only to the extent that such information is
- necessary to install and execute a modified version of the
- Combined Work produced by recombining or relinking the
- Application with a modified version of the Linked Version. (If
- you use option 4d0, the Installation Information must accompany
- the Minimal Corresponding Source and Corresponding Application
- Code. If you use option 4d1, you must provide the Installation
- Information in the manner specified by section 6 of the GNU GPL
- for conveying Corresponding Source.)
-
- 5. Combined Libraries.
-
- You may place library facilities that are a work based on the
-Library side by side in a single library together with other library
-facilities that are not Applications and are not covered by this
-License, and convey such a combined library under terms of your
-choice, if you do both of the following:
-
- a) Accompany the combined library with a copy of the same work based
- on the Library, uncombined with any other library facilities,
- conveyed under the terms of this License.
-
- b) Give prominent notice with the combined library that part of it
- is a work based on the Library, and explaining where to find the
- accompanying uncombined form of the same work.
-
- 6. Revised Versions of the GNU Lesser General Public License.
-
- The Free Software Foundation may publish revised and/or new versions
-of the GNU Lesser General Public License from time to time. Such new
-versions will be similar in spirit to the present version, but may
-differ in detail to address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Library as you received it specifies that a certain numbered version
-of the GNU Lesser General Public License "or any later version"
-applies to it, you have the option of following the terms and
-conditions either of that published version or of any later version
-published by the Free Software Foundation. If the Library as you
-received it does not specify a version number of the GNU Lesser
-General Public License, you may choose any version of the GNU Lesser
-General Public License ever published by the Free Software Foundation.
-
- If the Library as you received it specifies that a proxy can decide
-whether future versions of the GNU Lesser General Public License shall
-apply, that proxy's public statement of acceptance of any version is
-permanent authorization for you to choose that version for the
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under any
+particular circumstance, the balance of the section is intended to apply,
+and the section as a whole is intended to apply in other circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License may add
+an explicit geographical distribution limitation excluding those countries,
+so that distribution is permitted only in or among countries not thus
+excluded. In such case, this License incorporates the limitation as if
+written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms of the
+ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library. It is
+safest to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least the
+"copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
--
2.4.3
9 years, 3 months
[PATCH] Adding python-libsass and new-ui SCSS src WOK
by sguimaraes943@gmail.com
From: samhenri <samuel.guimaraes(a)eldorado.org.br>
Added libsass as dev dependency to compile scss files to css when building Wok.
Also updated ui/css makefile to build the new-ui source code included in this commit.
*This commit won't affect old-ui since the old css files are still there and the templates weren't updated in this commit.
samhenri (1):
Adding python-libsass and new-ui SCSS source to WOK
.gitignore | 3 +
configure.ac | 3 +
contrib/wok.spec.fedora.in | 1 +
contrib/wok.spec.suse.in | 1 +
.../plugins/kimchi/contrib/kimchi.spec.fedora.in | 1 +
src/wok/plugins/kimchi/contrib/kimchi.spec.suse.in | 1 +
ui/css/Makefile.am | 6 +-
ui/css/src/bootstrap-select.custom.scss | 67 ++
ui/css/src/bootstrap.custom.scss | 82 ++
ui/css/src/modules/_animation.scss | 33 +
ui/css/src/modules/_base.scss | 35 +
ui/css/src/modules/_buttons.scss | 30 +
ui/css/src/modules/_dialog-flat.scss | 73 ++
ui/css/src/modules/_host.scss | 169 ++++
ui/css/src/modules/_line-chart.scss | 210 +++++
ui/css/src/modules/_login.scss | 54 ++
ui/css/src/modules/_menu-flat.scss | 352 ++++++++
ui/css/src/modules/_mixins.scss | 29 +
ui/css/src/modules/_modal-flat.scss | 254 ++++++
ui/css/src/modules/_navbar-flat.scss | 901 +++++++++++++++++++
ui/css/src/modules/_tables-flat.scss | 271 ++++++
ui/css/src/modules/_toolbar.scss | 60 ++
ui/css/src/modules/_wok-grid.scss | 123 +++
ui/css/src/modules/_wok-variables.scss | 982 +++++++++++++++++++++
ui/css/src/vendor/bootstrap-sass/LICENSE | 21 +
.../vendor/bootstrap-sass/bootstrap/_alerts.scss | 73 ++
.../vendor/bootstrap-sass/bootstrap/_badges.scss | 68 ++
.../bootstrap-sass/bootstrap/_breadcrumbs.scss | 26 +
.../bootstrap-sass/bootstrap/_button-groups.scss | 244 +++++
.../vendor/bootstrap-sass/bootstrap/_buttons.scss | 168 ++++
.../vendor/bootstrap-sass/bootstrap/_carousel.scss | 269 ++++++
.../vendor/bootstrap-sass/bootstrap/_close.scss | 36 +
.../src/vendor/bootstrap-sass/bootstrap/_code.scss | 69 ++
.../bootstrap/_component-animations.scss | 37 +
.../bootstrap-sass/bootstrap/_dropdowns.scss | 216 +++++
.../vendor/bootstrap-sass/bootstrap/_forms.scss | 611 +++++++++++++
.../bootstrap-sass/bootstrap/_glyphicons.scss | 307 +++++++
.../src/vendor/bootstrap-sass/bootstrap/_grid.scss | 84 ++
.../bootstrap-sass/bootstrap/_input-groups.scss | 167 ++++
.../bootstrap-sass/bootstrap/_jumbotron.scss | 52 ++
.../vendor/bootstrap-sass/bootstrap/_labels.scss | 66 ++
.../bootstrap-sass/bootstrap/_list-group.scss | 130 +++
.../vendor/bootstrap-sass/bootstrap/_media.scss | 66 ++
.../vendor/bootstrap-sass/bootstrap/_mixins.scss | 40 +
.../vendor/bootstrap-sass/bootstrap/_modals.scss | 150 ++++
.../vendor/bootstrap-sass/bootstrap/_navbar.scss | 662 ++++++++++++++
.../src/vendor/bootstrap-sass/bootstrap/_navs.scss | 242 +++++
.../bootstrap-sass/bootstrap/_normalize.scss | 424 +++++++++
.../vendor/bootstrap-sass/bootstrap/_pager.scss | 54 ++
.../bootstrap-sass/bootstrap/_pagination.scss | 89 ++
.../vendor/bootstrap-sass/bootstrap/_panels.scss | 271 ++++++
.../vendor/bootstrap-sass/bootstrap/_popovers.scss | 131 +++
.../vendor/bootstrap-sass/bootstrap/_print.scss | 101 +++
.../bootstrap-sass/bootstrap/_progress-bars.scss | 87 ++
.../bootstrap/_responsive-embed.scss | 35 +
.../bootstrap/_responsive-utilities.scss | 179 ++++
.../bootstrap-sass/bootstrap/_scaffolding.scss | 161 ++++
.../vendor/bootstrap-sass/bootstrap/_tables.scss | 234 +++++
.../vendor/bootstrap-sass/bootstrap/_theme.scss | 291 ++++++
.../bootstrap-sass/bootstrap/_thumbnails.scss | 38 +
.../vendor/bootstrap-sass/bootstrap/_tooltip.scss | 101 +++
.../src/vendor/bootstrap-sass/bootstrap/_type.scss | 298 +++++++
.../bootstrap-sass/bootstrap/_utilities.scss | 55 ++
.../bootstrap-sass/bootstrap/_variables.scss | 872 ++++++++++++++++++
.../vendor/bootstrap-sass/bootstrap/_wells.scss | 29 +
.../bootstrap-sass/bootstrap/mixins/_alerts.scss | 14 +
.../bootstrap/mixins/_background-variant.scss | 12 +
.../bootstrap/mixins/_border-radius.scss | 18 +
.../bootstrap-sass/bootstrap/mixins/_buttons.scss | 68 ++
.../bootstrap/mixins/_center-block.scss | 7 +
.../bootstrap-sass/bootstrap/mixins/_clearfix.scss | 22 +
.../bootstrap-sass/bootstrap/mixins/_forms.scss | 88 ++
.../bootstrap/mixins/_gradients.scss | 58 ++
.../bootstrap/mixins/_grid-framework.scss | 81 ++
.../bootstrap-sass/bootstrap/mixins/_grid.scss | 122 +++
.../bootstrap/mixins/_hide-text.scss | 21 +
.../bootstrap-sass/bootstrap/mixins/_image.scss | 33 +
.../bootstrap-sass/bootstrap/mixins/_labels.scss | 12 +
.../bootstrap/mixins/_list-group.scss | 32 +
.../bootstrap/mixins/_nav-divider.scss | 10 +
.../bootstrap/mixins/_nav-vertical-align.scss | 9 +
.../bootstrap-sass/bootstrap/mixins/_opacity.scss | 8 +
.../bootstrap/mixins/_pagination.scss | 24 +
.../bootstrap-sass/bootstrap/mixins/_panels.scss | 24 +
.../bootstrap/mixins/_progress-bar.scss | 10 +
.../bootstrap/mixins/_reset-filter.scss | 8 +
.../bootstrap/mixins/_reset-text.scss | 18 +
.../bootstrap-sass/bootstrap/mixins/_resize.scss | 6 +
.../bootstrap/mixins/_responsive-visibility.scss | 21 +
.../bootstrap-sass/bootstrap/mixins/_size.scss | 10 +
.../bootstrap/mixins/_tab-focus.scss | 9 +
.../bootstrap/mixins/_table-row.scss | 28 +
.../bootstrap/mixins/_text-emphasis.scss | 12 +
.../bootstrap/mixins/_text-overflow.scss | 8 +
.../bootstrap/mixins/_vendor-prefixes.scss | 222 +++++
ui/css/src/vendor/bootstrap-select-sass/LICENSE | 21 +
.../bootstrap-select-sass/bootstrap-select.scss | 332 +++++++
.../vendor/bootstrap-select-sass/variables.scss | 7 +
ui/css/src/vendor/compass-mixins/LICENSE | 29 +
ui/css/src/vendor/compass-mixins/lib/_compass.scss | 4 +
.../vendor/compass-mixins/lib/compass/_css3.scss | 19 +
.../compass-mixins/lib/compass/_functions.scss | 3 +
.../vendor/compass-mixins/lib/compass/_layout.scss | 3 +
.../compass-mixins/lib/compass/_reset-legacy.scss | 3 +
.../vendor/compass-mixins/lib/compass/_reset.scss | 3 +
.../compass-mixins/lib/compass/_support.scss | 40 +
.../compass-mixins/lib/compass/_typography.scss | 4 +
.../compass-mixins/lib/compass/_utilities.scss | 9 +
.../lib/compass/css3/_animation.scss | 2 +
.../lib/compass/css3/_appearance.scss | 16 +
.../lib/compass/css3/_background-clip.scss | 43 +
.../lib/compass/css3/_background-origin.scss | 42 +
.../lib/compass/css3/_background-size.scss | 26 +
.../lib/compass/css3/_border-radius.scss | 130 +++
.../lib/compass/css3/_box-shadow.scss | 76 ++
.../lib/compass/css3/_box-sizing.scss | 13 +
.../compass-mixins/lib/compass/css3/_box.scss | 111 +++
.../compass-mixins/lib/compass/css3/_columns.scss | 148 ++++
.../compass-mixins/lib/compass/css3/_filter.scss | 23 +
.../lib/compass/css3/_font-face.scss | 48 +
.../lib/compass/css3/_hyphenation.scss | 77 ++
.../compass-mixins/lib/compass/css3/_images.scss | 132 +++
.../lib/compass/css3/_inline-block.scss | 22 +
.../compass-mixins/lib/compass/css3/_opacity.scss | 19 +
.../compass-mixins/lib/compass/css3/_pie.scss | 73 ++
.../compass-mixins/lib/compass/css3/_regions.scss | 22 +
.../compass-mixins/lib/compass/css3/_shared.scss | 38 +
.../lib/compass/css3/_text-shadow.scss | 87 ++
.../lib/compass/css3/_transform-legacy.scss | 87 ++
.../lib/compass/css3/_transform.scss | 598 +++++++++++++
.../lib/compass/css3/_transition.scss | 221 +++++
.../lib/compass/css3/_user-interface.scss | 17 +
.../lib/compass/functions/_constants.scss | 18 +
.../lib/compass/functions/_display.scss | 36 +
.../lib/compass/functions/_lists.scss | 53 ++
.../lib/compass/layout/_grid-background.scss | 178 ++++
.../lib/compass/layout/_sticky-footer.scss | 23 +
.../lib/compass/layout/_stretching.scss | 24 +
.../lib/compass/reset/_utilities-legacy.scss | 135 +++
.../lib/compass/reset/_utilities.scss | 142 +++
.../lib/compass/typography/_links.scss | 3 +
.../lib/compass/typography/_lists.scss | 4 +
.../lib/compass/typography/_text.scss | 4 +
.../lib/compass/typography/_vertical_rhythm.scss | 221 +++++
.../lib/compass/typography/links/_hover-link.scss | 5 +
.../lib/compass/typography/links/_link-colors.scss | 28 +
.../compass/typography/links/_unstyled-link.scss | 7 +
.../lib/compass/typography/lists/_bullets.scss | 34 +
.../compass/typography/lists/_horizontal-list.scss | 61 ++
.../typography/lists/_inline-block-list.scss | 50 ++
.../lib/compass/typography/lists/_inline-list.scss | 44 +
.../lib/compass/typography/text/_ellipsis.scss | 25 +
.../lib/compass/typography/text/_force-wrap.scss | 12 +
.../lib/compass/typography/text/_nowrap.scss | 2 +
.../lib/compass/typography/text/_replacement.scss | 68 ++
.../lib/compass/utilities/_color.scss | 1 +
.../lib/compass/utilities/_general.scss | 6 +
.../lib/compass/utilities/_links.scss | 5 +
.../lib/compass/utilities/_lists.scss | 6 +
.../lib/compass/utilities/_print.scss | 17 +
.../lib/compass/utilities/_sprites.scss | 2 +
.../lib/compass/utilities/_tables.scss | 3 +
.../lib/compass/utilities/_text.scss | 5 +
.../lib/compass/utilities/color/_contrast.scss | 28 +
.../lib/compass/utilities/general/_clearfix.scss | 44 +
.../lib/compass/utilities/general/_float.scss | 30 +
.../lib/compass/utilities/general/_hacks.scss | 46 +
.../lib/compass/utilities/general/_min.scss | 16 +
.../lib/compass/utilities/general/_reset.scss | 2 +
.../lib/compass/utilities/general/_tabs.scss | 1 +
.../lib/compass/utilities/general/_tag-cloud.scss | 18 +
.../lib/compass/utilities/links/_hover-link.scss | 3 +
.../lib/compass/utilities/links/_link-colors.scss | 3 +
.../compass/utilities/links/_unstyled-link.scss | 3 +
.../lib/compass/utilities/lists/_bullets.scss | 3 +
.../compass/utilities/lists/_horizontal-list.scss | 3 +
.../utilities/lists/_inline-block-list.scss | 3 +
.../lib/compass/utilities/lists/_inline-list.scss | 3 +
.../lib/compass/utilities/sprites/_base.scss | 66 ++
.../lib/compass/utilities/sprites/_sprite-img.scss | 79 ++
.../tables/_alternating-rows-and-columns.scss | 22 +
.../lib/compass/utilities/tables/_borders.scss | 33 +
.../lib/compass/utilities/tables/_scaffolding.scss | 9 +
.../lib/compass/utilities/text/_ellipsis.scss | 3 +
.../lib/compass/utilities/text/_nowrap.scss | 3 +
.../lib/compass/utilities/text/_replacement.scss | 3 +
ui/css/src/wok.scss | 135 +++
ui/libs/bootstrap-select/Makefile.am | 4 +-
ui/libs/bootstrap-select/bootstrap-select.min.js | 8 -
ui/libs/bootstrap-select/dist/Makefile.am | 20 +
ui/libs/bootstrap-select/dist/css/Makefile.am | 22 +
.../dist/css/bootstrap-select.min.css | 6 +
ui/libs/bootstrap-select/dist/js/Makefile.am | 22 +
.../dist/js/bootstrap-select.min.js | 8 +
194 files changed, 16417 insertions(+), 12 deletions(-)
create mode 100644 ui/css/src/bootstrap-select.custom.scss
create mode 100644 ui/css/src/bootstrap.custom.scss
create mode 100644 ui/css/src/modules/_animation.scss
create mode 100644 ui/css/src/modules/_base.scss
create mode 100644 ui/css/src/modules/_buttons.scss
create mode 100644 ui/css/src/modules/_dialog-flat.scss
create mode 100644 ui/css/src/modules/_host.scss
create mode 100644 ui/css/src/modules/_line-chart.scss
create mode 100644 ui/css/src/modules/_login.scss
create mode 100644 ui/css/src/modules/_menu-flat.scss
create mode 100644 ui/css/src/modules/_mixins.scss
create mode 100644 ui/css/src/modules/_modal-flat.scss
create mode 100644 ui/css/src/modules/_navbar-flat.scss
create mode 100644 ui/css/src/modules/_tables-flat.scss
create mode 100644 ui/css/src/modules/_toolbar.scss
create mode 100644 ui/css/src/modules/_wok-grid.scss
create mode 100644 ui/css/src/modules/_wok-variables.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/LICENSE
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_alerts.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_badges.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_breadcrumbs.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_button-groups.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_buttons.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_carousel.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_close.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_code.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_component-animations.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_dropdowns.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_forms.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_glyphicons.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_grid.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_input-groups.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_jumbotron.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_labels.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_list-group.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_media.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_mixins.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_modals.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_navbar.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_navs.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_normalize.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_pager.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_pagination.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_panels.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_popovers.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_print.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_progress-bars.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_responsive-embed.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_responsive-utilities.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_scaffolding.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_tables.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_theme.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_thumbnails.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_tooltip.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_type.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_utilities.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_variables.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/_wells.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/mixins/_alerts.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/mixins/_background-variant.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/mixins/_border-radius.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/mixins/_buttons.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/mixins/_center-block.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/mixins/_clearfix.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/mixins/_forms.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/mixins/_gradients.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/mixins/_grid-framework.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/mixins/_grid.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/mixins/_hide-text.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/mixins/_image.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/mixins/_labels.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/mixins/_list-group.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/mixins/_nav-divider.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/mixins/_nav-vertical-align.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/mixins/_opacity.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/mixins/_pagination.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/mixins/_panels.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/mixins/_progress-bar.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/mixins/_reset-filter.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/mixins/_reset-text.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/mixins/_resize.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/mixins/_responsive-visibility.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/mixins/_size.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/mixins/_tab-focus.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/mixins/_table-row.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/mixins/_text-emphasis.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/mixins/_text-overflow.scss
create mode 100644 ui/css/src/vendor/bootstrap-sass/bootstrap/mixins/_vendor-prefixes.scss
create mode 100644 ui/css/src/vendor/bootstrap-select-sass/LICENSE
create mode 100644 ui/css/src/vendor/bootstrap-select-sass/bootstrap-select.scss
create mode 100644 ui/css/src/vendor/bootstrap-select-sass/variables.scss
create mode 100644 ui/css/src/vendor/compass-mixins/LICENSE
create mode 100644 ui/css/src/vendor/compass-mixins/lib/_compass.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/_css3.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/_functions.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/_layout.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/_reset-legacy.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/_reset.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/_support.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/_typography.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/_utilities.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/css3/_animation.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/css3/_appearance.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/css3/_background-clip.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/css3/_background-origin.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/css3/_background-size.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/css3/_border-radius.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/css3/_box-shadow.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/css3/_box-sizing.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/css3/_box.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/css3/_columns.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/css3/_filter.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/css3/_font-face.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/css3/_hyphenation.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/css3/_images.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/css3/_inline-block.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/css3/_opacity.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/css3/_pie.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/css3/_regions.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/css3/_shared.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/css3/_text-shadow.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/css3/_transform-legacy.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/css3/_transform.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/css3/_transition.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/css3/_user-interface.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/functions/_constants.scss
create mode 100755 ui/css/src/vendor/compass-mixins/lib/compass/functions/_display.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/functions/_lists.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/layout/_grid-background.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/layout/_sticky-footer.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/layout/_stretching.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/reset/_utilities-legacy.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/reset/_utilities.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/typography/_links.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/typography/_lists.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/typography/_text.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/typography/_vertical_rhythm.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/typography/links/_hover-link.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/typography/links/_link-colors.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/typography/links/_unstyled-link.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/typography/lists/_bullets.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/typography/lists/_horizontal-list.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/typography/lists/_inline-block-list.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/typography/lists/_inline-list.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/typography/text/_ellipsis.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/typography/text/_force-wrap.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/typography/text/_nowrap.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/typography/text/_replacement.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/utilities/_color.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/utilities/_general.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/utilities/_links.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/utilities/_lists.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/utilities/_print.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/utilities/_sprites.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/utilities/_tables.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/utilities/_text.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/utilities/color/_contrast.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/utilities/general/_clearfix.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/utilities/general/_float.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/utilities/general/_hacks.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/utilities/general/_min.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/utilities/general/_reset.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/utilities/general/_tabs.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/utilities/general/_tag-cloud.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/utilities/links/_hover-link.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/utilities/links/_link-colors.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/utilities/links/_unstyled-link.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/utilities/lists/_bullets.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/utilities/lists/_horizontal-list.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/utilities/lists/_inline-block-list.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/utilities/lists/_inline-list.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/utilities/sprites/_base.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/utilities/sprites/_sprite-img.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/utilities/tables/_alternating-rows-and-columns.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/utilities/tables/_borders.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/utilities/tables/_scaffolding.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/utilities/text/_ellipsis.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/utilities/text/_nowrap.scss
create mode 100644 ui/css/src/vendor/compass-mixins/lib/compass/utilities/text/_replacement.scss
create mode 100755 ui/css/src/wok.scss
delete mode 100644 ui/libs/bootstrap-select/bootstrap-select.min.js
create mode 100644 ui/libs/bootstrap-select/dist/Makefile.am
create mode 100644 ui/libs/bootstrap-select/dist/css/Makefile.am
create mode 100644 ui/libs/bootstrap-select/dist/css/bootstrap-select.min.css
create mode 100644 ui/libs/bootstrap-select/dist/js/Makefile.am
create mode 100644 ui/libs/bootstrap-select/dist/js/bootstrap-select.min.js
--
1.9.3
9 years, 3 months
[PATCH v2] Configure deb package to use systemd service if needed
by Jose Ricardo Ziviani
Signed-off-by: Jose Ricardo Ziviani <joserz(a)linux.vnet.ibm.com>
---
Makefile.am | 12 +++++++++---
contrib/DEBIAN/control.in | 3 ++-
contrib/DEBIAN/postinst | 26 ++++++++++++++++++++++++++
3 files changed, 37 insertions(+), 4 deletions(-)
create mode 100755 contrib/DEBIAN/postinst
diff --git a/Makefile.am b/Makefile.am
index 0eabd3d..70c48ef 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -70,10 +70,16 @@ all-local:
install-deb: install
cp -R $(top_srcdir)/contrib/DEBIAN $(DESTDIR)/
- $(MKDIR_P) $(DESTDIR)/etc/init
+ @if test -d "$(systemdsystemunitdir)" ; then \
+ $(MKDIR_P) $(DESTDIR)/$(systemdsystemunitdir); \
+ cp -R contrib/wokd.service.fedora \
+ $(DESTDIR)/$(systemdsystemunitdir)/wokd.service; \
+ else \
+ $(MKDIR_P) $(DESTDIR)/etc/init; \
+ cp -R $(top_srcdir)/contrib/wokd-upstart.conf.debian \
+ $(DESTDIR)/etc/init/wokd.conf; \
+ fi
$(MKDIR_P) $(DESTDIR)/usr/lib/firewalld/services
- cp -R $(top_srcdir)/contrib/wokd-upstart.conf.debian \
- $(DESTDIR)/etc/init/wokd.conf
cp -R $(top_srcdir)/src/firewalld.xml \
$(DESTDIR)/usr/lib/firewalld/services/wokd.xml
diff --git a/contrib/DEBIAN/control.in b/contrib/DEBIAN/control.in
index b21133c..50dc837 100644
--- a/contrib/DEBIAN/control.in
+++ b/contrib/DEBIAN/control.in
@@ -17,6 +17,7 @@ Depends: python-cherrypy3 (>= 3.2.0),
texlive-fonts-extra
Build-Depends: libxslt,
openssl,
- python-lxml
+ python-lxml,
+ pkg-config
Maintainer: Aline Manera <alinefm(a)br.ibm.com>
Description: Wok - Webserver Originated from Kimchi
diff --git a/contrib/DEBIAN/postinst b/contrib/DEBIAN/postinst
new file mode 100755
index 0000000..98f9c4e
--- /dev/null
+++ b/contrib/DEBIAN/postinst
@@ -0,0 +1,26 @@
+#!/bin/sh -e
+#
+# Project Wok
+#
+# Copyright IBM, Corp. 2015
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+systemd_exists=$(type /bin/systemctl > /dev/null 2>&1; echo $?)
+if test $systemd_exists = "0"; then
+ /bin/systemctl enable wokd > /dev/null 2>&1
+ /bin/systemctl daemon-reload > /dev/null 2>&1
+ /bin/systemctl start wokd > /dev/null 2>&1
+fi
--
1.9.1
9 years, 3 months
[PATCH] Avoid show user/password in url browser
by Rodrigo Trujillo
There is a remote, but real, possibility that kimchi.min.js breaks and
is not loaded for some reason in Kimchi login page. If this happen, the
form submmit action is not going to be binded to a javascript function
that calls a AJAX POST request. Then the browser is going to submmit the
form in the default way: using a GET request. GET requests add form data
in the URL, so user will be able to see the user and password in the URL
field and in the log:
"GET /login.html?username=321&password=234 HTTP/1.0" 200 2936
"https://localhost:8001/login.html" "Mozilla/5.0 (X11; Fedora; Linux
x86_64; rv:39.0) Gecko/20100101 Firefox/39.0"
This patch fixes this problem adding 'method="post"' in the login html
form.
Signed-off-by: Rodrigo Trujillo <rodrigo.trujillo(a)linux.vnet.ibm.com>
---
ui/pages/login.html.tmpl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ui/pages/login.html.tmpl b/ui/pages/login.html.tmpl
index e2f6855..55848b4 100644
--- a/ui/pages/login.html.tmpl
+++ b/ui/pages/login.html.tmpl
@@ -79,7 +79,7 @@
<div id="messUserPass" class="err-mess" style="display: none;">$_("The username or password you entered is incorrect. Please try again.")</div>
<div id="messSession" class="err-mess" style="display: none;">$_("Session timeout, please re-login.")</div>
</div>
- <form id="form-login" class="login-panel">
+ <form id="form-login" class="login-panel" method="post">
<div class="row">
<input type="text" id="username" name="username" required="required" placeholder="$_("User Name")" autofocus/>
<div id="username-msg" class="msg-required"></div>
--
2.1.0
9 years, 3 months
[PATCH V2 0/3] Fix make check-local issues
by Lucio Correia
V2: Add path 3/3 - fix RuntimeWarning in check_i18n.py
Lucio Correia (3):
Fix name mismatch with imported module
Fix PEP8 issues
Fix RuntimeWarning in check_i18n.py
src/wok/config.py.in | 19 +++++++++++--------
src/wok/plugins/kimchi/contrib/check_i18n.py | 2 +-
src/wok/plugins/kimchi/model/host.py | 4 ++--
src/wok/plugins/kimchi/tests/test_config.py.in | 1 -
src/wok/plugins/kimchi/tests/test_host.py | 5 ++---
5 files changed, 16 insertions(+), 15 deletions(-)
9 years, 3 months
[PATCH 0/3 V4] Update README and header for Wok files
by pvital@linux.vnet.ibm.com
From: Paulo Vital <pvital(a)linux.vnet.ibm.com>
V3 -> V4:
- Fixed gettext dependency
V1 -> V2 -> V3:
- Grammar fixes
V1:
Update the README file of Wok and Kimchi projects after the split of code
and changed the header of all back-end and front-end files of Wok.
Paulo Vital (3):
Update README.md of Wok and Kimchi after slipt.
Update the header of all Wok back-end files
Update the header of all Wok front-end files
Makefile.am | 6 +-
autogen.sh | 20 +++++
configure.ac | 4 +-
contrib/DEBIAN/Makefile.am | 7 +-
contrib/DEBIAN/postrm | 6 +-
contrib/Makefile.am | 7 +-
contrib/check_i18n.py | 4 +-
docs/Makefile.am | 6 +-
docs/README.md | 93 ++++++++++++++++++++++
src/Makefile.am | 4 +-
src/nginx/Makefile.am | 4 +-
src/nginx/wok.conf.in | 4 +-
src/wok/Makefile.am | 6 +-
src/wok/__init__.py | 6 +-
src/wok/asynctask.py | 6 +-
src/wok/auth.py | 4 +-
src/wok/basemodel.py | 6 +-
src/wok/cachebust.py | 6 +-
src/wok/config.py.in | 4 +-
src/wok/control/Makefile.am | 6 +-
src/wok/control/__init__.py | 6 +-
src/wok/control/base.py | 4 +-
src/wok/control/plugins.py | 6 +-
src/wok/control/tasks.py | 6 +-
src/wok/control/utils.py | 6 +-
src/wok/exception.py | 6 +-
src/wok/i18n.py | 4 +-
src/wok/model/Makefile.am | 6 +-
src/wok/model/__init__.py | 6 +-
src/wok/model/model.py | 4 +-
src/wok/model/plugins.py | 6 +-
src/wok/model/tasks.py | 6 +-
src/wok/objectstore.py | 6 +-
src/wok/plugins/Makefile.am | 6 +-
src/wok/plugins/__init__.py | 6 +-
src/wok/plugins/kimchi/docs/README.md | 86 ++++++++------------
src/wok/plugins/sample/Makefile.am | 6 +-
src/wok/plugins/sample/__init__.py | 6 +-
src/wok/plugins/sample/i18n.py | 4 +-
src/wok/plugins/sample/model.py | 6 +-
src/wok/plugins/sample/ui/Makefile.am | 8 +-
src/wok/plugins/sample/ui/config/Makefile.am | 7 +-
src/wok/plugins/sample/ui/js/Makefile.am | 6 +-
src/wok/plugins/sample/ui/js/util.js | 6 +-
src/wok/plugins/sample/ui/pages/Makefile.am | 6 +-
src/wok/plugins/sample/ui/pages/i18n.json.tmpl | 6 +-
.../plugins/sample/ui/pages/sample-tab1.html.tmpl | 6 +-
.../plugins/sample/ui/pages/sample-tab2.html.tmpl | 6 +-
src/wok/proxy.py | 4 +-
src/wok/rollbackcontext.py | 6 +-
src/wok/root.py | 4 +-
src/wok/server.py | 6 +-
src/wok/sslcert.py | 6 +-
src/wok/template.py | 6 +-
src/wok/utils.py | 4 +-
src/wok/xmlutils/Makefile.am | 6 +-
src/wok/xmlutils/__init__.py | 6 +-
src/wok/xmlutils/utils.py | 6 +-
src/wokd.in | 4 +-
ui/Makefile.am | 6 +-
ui/base64/Makefile.am | 4 +-
ui/css/Makefile.am | 6 +-
ui/css/fontawesome/Makefile.am | 4 +-
ui/css/jquery-ui.custom.css | 4 +-
ui/css/opensans/Makefile.am | 4 +-
ui/css/theme-default/about.css | 6 +-
ui/css/theme-default/base.css | 6 +-
ui/css/theme-default/button-flat.css | 4 +-
ui/css/theme-default/button.css | 4 +-
ui/css/theme-default/checkbox-flat.css | 6 +-
ui/css/theme-default/circleGauge.css | 6 +-
ui/css/theme-default/datagrid.css | 4 +-
ui/css/theme-default/dialog-flat.css | 6 +-
ui/css/theme-default/error.css | 6 +-
ui/css/theme-default/form.css | 4 +-
ui/css/theme-default/framework.css | 6 +-
ui/css/theme-default/gauge-flat.css | 6 +-
ui/css/theme-default/grid.css | 6 +-
ui/css/theme-default/jquery-ui.custom.css | 6 +-
ui/css/theme-default/line-chart.css | 6 +-
ui/css/theme-default/line.css | 4 +-
ui/css/theme-default/list-flat.css | 6 +-
ui/css/theme-default/login-window.css | 6 +-
ui/css/theme-default/menu-flat.css | 4 +-
ui/css/theme-default/message-flat.css | 6 +-
ui/css/theme-default/message.css | 4 +-
ui/css/theme-default/messagebar-flat.css | 6 +-
ui/css/theme-default/nav-tree.css | 6 +-
ui/css/theme-default/navbar.css | 6 +-
ui/css/theme-default/popover.css | 6 +-
ui/css/theme-default/radio-flat.css | 8 +-
ui/css/theme-default/reset.css | 4 +-
ui/css/theme-default/selectmenu-flat.css | 4 +-
ui/css/theme-default/tabs.css | 4 +-
ui/css/theme-default/textbox-flat.css | 6 +-
ui/css/theme-default/theme.css | 4 +-
ui/css/theme-default/tile-check.css | 6 +-
ui/css/theme-default/toolbar.css | 6 +-
ui/css/theme-default/topbar.css | 4 +-
ui/css/theme-default/window.css | 4 +-
ui/images/Makefile.am | 6 +-
ui/images/theme-default/Makefile.am | 6 +-
ui/js/Makefile.am | 6 +-
ui/js/src/wok.api.js | 4 +-
ui/js/src/wok.cookie.js | 6 +-
ui/js/src/wok.form.js | 6 +-
ui/js/src/wok.grid.js | 4 +-
ui/js/src/wok.lang.js | 6 +-
ui/js/src/wok.line-chart.js | 6 +-
ui/js/src/wok.login.js | 4 +-
ui/js/src/wok.main.js | 4 +-
ui/js/src/wok.message.js | 6 +-
ui/js/src/wok.object.js | 6 +-
ui/js/src/wok.popable.js | 6 +-
ui/js/src/wok.select.js | 6 +-
ui/js/src/wok.string.js | 6 +-
ui/js/src/wok.substitute.js | 6 +-
ui/js/src/wok.topic.js | 6 +-
ui/js/src/wok.user.js | 6 +-
ui/js/src/wok.utils.js | 4 +-
ui/js/src/wok.window.js | 6 +-
ui/js/widgets/button-dropDown.js | 6 +-
ui/js/widgets/button-flat.js | 4 +-
ui/js/widgets/checkbox-flat.js | 4 +-
ui/js/widgets/circleGauge.js | 6 +-
ui/js/widgets/combobox.js | 6 +-
ui/js/widgets/dialog-flat.js | 4 +-
ui/js/widgets/filter-select.js | 6 +-
ui/js/widgets/gauge-flat.js | 4 +-
ui/js/widgets/grid.js | 4 +-
ui/js/widgets/line.js | 4 +-
ui/js/widgets/list-flat.js | 4 +-
ui/js/widgets/menu-flat.js | 4 +-
ui/js/widgets/message-flat.js | 4 +-
ui/js/widgets/messagebar-flat.js | 4 +-
ui/js/widgets/radio-flat.js | 4 +-
ui/js/widgets/samples/dialog.html | 4 +-
ui/js/widgets/samples/gauge-flat.html | 6 +-
ui/js/widgets/samples/grid.html | 4 +-
ui/js/widgets/samples/line.html | 4 +-
ui/js/widgets/samples/list.html | 4 +-
.../menu-button-radio-checkbox-text-select.html | 4 +-
ui/js/widgets/samples/message.html | 4 +-
ui/js/widgets/samples/messagebar-flat.html | 4 +-
ui/js/widgets/samples/tabs.html | 4 +-
ui/js/widgets/select-menu.js | 6 +-
ui/js/widgets/selectmenu-flat.js | 4 +-
ui/js/widgets/textbox-flat.js | 4 +-
ui/libs/Makefile.am | 6 +-
ui/libs/bootstrap-select/Makefile.am | 4 +-
ui/libs/bootstrap/Makefile.am | 4 +-
ui/libs/es5-shim/Makefile.am | 4 +-
ui/libs/jquery-i18n/Makefile.am | 4 +-
ui/libs/jquery-ui/Makefile.am | 4 +-
ui/libs/jquery-ui/themes/Makefile.am | 6 +-
ui/libs/jquery-ui/themes/base/Makefile.am | 6 +-
ui/libs/jquery-ui/themes/base/images/Makefile.am | 6 +-
ui/libs/jquery/Makefile.am | 4 +-
ui/pages/Makefile.am | 6 +-
ui/pages/error.html.tmpl | 6 +-
ui/pages/i18n.json.tmpl | 4 +-
ui/pages/login.html.tmpl | 6 +-
ui/pages/websockify/Makefile.am | 6 +-
ui/pages/wok-ui.html.tmpl | 6 +-
164 files changed, 731 insertions(+), 311 deletions(-)
--
2.4.3
9 years, 3 months
[PATCH] Update gitignore after move of plugins structure
by pvital@linux.vnet.ibm.com
From: Paulo Vital <pvital(a)linux.vnet.ibm.com>
Signed-off-by: Paulo Vital <pvital(a)linux.vnet.ibm.com>
---
.gitignore | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.gitignore b/.gitignore
index 142b093..fdeffe4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -35,8 +35,8 @@ src/nginx/wok.conf
src/wok/config.py
tests/run_tests.sh
tests/test_config.py
-plugins/sample/po/POTFILES
-plugins/sample/sample.conf
+src/wok/plugins/sample/po/POTFILES
+src/wok/plugins/sample/sample.conf
po/POTFILES
po/gen-pot
*.orig
--
2.4.3
9 years, 3 months
[PATCH 01/15] V2 Ginger Base : Taking off the host tab functionality from kimchi
by chandra@linux.vnet.ibm.com
From: Chandra Shekhar Reddy Potula <chandra(a)linux.vnet.ibm.com>
---
plugins/kimchi/API.json | 134 ------------
plugins/kimchi/Makefile.am | 3 +-
plugins/kimchi/config.py.in | 4 -
plugins/kimchi/control/host.py | 96 ---------
plugins/kimchi/docs/README.md | 6 +-
plugins/kimchi/i18n.py | 47 +----
plugins/kimchi/kimchi.conf | 7 -
plugins/kimchi/mockmodel.py | 18 --
plugins/kimchi/model/config.py | 21 --
plugins/kimchi/model/host.py | 322 +----------------------------
plugins/kimchi/root.py | 1 -
plugins/kimchi/tests/test_authorization.py | 6 -
plugins/kimchi/tests/test_config.py.in | 7 -
plugins/kimchi/tests/test_host.py | 96 +--------
plugins/kimchi/tests/test_model.py | 237 ---------------------
plugins/kimchi/tests/test_rest.py | 54 -----
plugins/kimchi/ui/config/tab-ext.xml | 7 -
17 files changed, 7 insertions(+), 1059 deletions(-)
diff --git a/plugins/kimchi/API.json b/plugins/kimchi/API.json
index f1f58ff..e75b35f 100644
--- a/plugins/kimchi/API.json
+++ b/plugins/kimchi/API.json
@@ -59,30 +59,6 @@
}
},
"properties": {
- "debugreports_create": {
- "type": "object",
- "error": "KCHDR0006E",
- "properties": {
- "name": {
- "description": "The name for the debug report file.",
- "type": "string",
- "pattern": "^[_A-Za-z0-9-]*$",
- "error": "KCHDR0007E"
- }
- }
- },
- "debugreport_update": {
- "type": "object",
- "properties": {
- "name": {
- "description": "New name of debug report",
- "type": "string",
- "pattern": "^[_A-Za-z0-9-]*$",
- "error": "KCHDR0007E"
- }
- },
- "additionalProperties": false
- },
"storagepools_create": {
"type": "object",
"error": "KCHPOOL0026E",
@@ -684,116 +660,6 @@
"additionalProperties": false,
"error": "KCHAPI0001E"
},
- "repositories_create": {
- "type": "object",
- "properties": {
- "repo_id": {
- "description": "Repository ID used for YUM repository.",
- "type": "string",
- "error": "KCHREPOS0001E"
- },
- "baseurl": {
- "description": "URL to the directory where the repodata directory of a repository is located. Can be an http://, ftp:// or file:// URL.",
- "type": "string",
- "error": "KCHREPOS0002E"
- },
- "config": {
- "description": "Dictionary containing repository configuration",
- "type": "object",
- "error": "KCHREPOS0003E",
- "properties": {
- "dist": {
- "description": "Distribution to DEB repository",
- "type": "string",
- "error": "KCHREPOS0004E"
- },
- "comps": {
- "description": "List of components to DEB repository",
- "type": "array",
- "error": "KCHREPOS0005E",
- "uniqueItems": true,
- "items": {
- "description": "Component name",
- "type": "string",
- "error": "KCHREPOS0006E"
- }
- },
- "repo_name": {
- "description": "YUM repository name",
- "type": "string",
- "error": "KCHREPOS0023E"
- },
- "mirrorlist": {
- "description": "URL to a file containing a list of baseurls",
- "type": "string",
- "error": "KCHREPOS0007E"
- },
- "metalink": {
- "description": "URL to a metalink file for the repomd.xml",
- "type": "string",
- "error": "KCHREPOS0029E"
- }
- }
- }
- },
- "additionalProperties": false,
- "error": "KCHAPI0001E"
- },
- "repository_update": {
- "type": "object",
- "properties": {
- "baseurl": {
- "description": "URL to the directory where the repodata directory of a repository is located. Can be an http://, ftp:// or file:// URL.",
- "type": "string",
- "error": "KCHREPOS0002E"
- },
- "config": {
- "description": "Dictionary containing repository configuration",
- "type": "object",
- "error": "KCHREPOS0003E",
- "properties": {
- "dist": {
- "description": "Distribution to DEB repository",
- "type": "string",
- "error": "KCHREPOS0004E"
- },
- "comps": {
- "description": "List of components to DEB repository",
- "type": "array",
- "error": "KCHREPOS0005E",
- "uniqueItems": true,
- "items": {
- "description": "Component name",
- "type": "string",
- "error": "KCHREPOS0006E"
- }
- },
- "repo_name": {
- "description": "Human-readable string describing the YUM repository.",
- "type": "string",
- "error": "KCHREPOS0008E"
- },
- "mirrorlist": {
- "description": "URL to a file containing a list of baseurls for YUM repository",
- "type": "string",
- "error": "KCHREPOS0007E"
- },
- "gpgcheck": {
- "description": "Indicates if a GPG signature check on the packages gotten from repository should be performed.",
- "type": "boolean",
- "error": "KCHREPOS0009E"
- },
- "gpgkey": {
- "description": "URL pointing to the ASCII-armored GPG key file for the repository.",
- "type": "string",
- "error": "KCHREPOS0010E"
- }
- }
- }
- },
- "additionalProperties": false,
- "error": "KCHAPI0001E"
- },
"devices_get_list": {
"type": "object",
"properties": {
diff --git a/plugins/kimchi/Makefile.am b/plugins/kimchi/Makefile.am
index 49c835e..c30e7b9 100644
--- a/plugins/kimchi/Makefile.am
+++ b/plugins/kimchi/Makefile.am
@@ -99,7 +99,6 @@ config.py: config.py.in Makefile
install-deb: install
cp -R $(top_srcdir)/contrib/DEBIAN $(DESTDIR)/
mkdir -p $(DESTDIR)/var/lib/kimchi/vnc-tokens
- mkdir -p $(DESTDIR)/var/lib/kimchi/debugreports
mkdir -p $(DESTDIR)/var/lib/kimchi/screenshots
mkdir -p $(DESTDIR)/var/lib/kimchi/isos
@@ -140,7 +139,7 @@ install-data-local:
$(MKDIR_P) $(DESTDIR)$(kimchidir)
$(INSTALL_DATA) API.json $(DESTDIR)$(kimchidir)/API.json
mkdir -p $(DESTDIR)/var/lib/kimchi/vnc-tokens
- mkdir -p $(DESTDIR)/var/lib/kimchi/{debugreports,isos,screenshots}
+ mkdir -p $(DESTDIR)/var/lib/kimchi/{isos,screenshots}
uninstall-local:
$(RM) $(DESTDIR)$(kimchidir)/API.json
diff --git a/plugins/kimchi/config.py.in b/plugins/kimchi/config.py.in
index 6ae0ccd..43e7811 100644
--- a/plugins/kimchi/config.py.in
+++ b/plugins/kimchi/config.py.in
@@ -38,10 +38,6 @@ def get_distros_store():
return os.path.join(PluginPaths('kimchi').conf_dir, 'distros.d')
-def get_debugreports_path():
- return os.path.join(PluginPaths('kimchi').state_dir, 'debugreports')
-
-
def get_screenshot_path():
return os.path.join(PluginPaths('kimchi').state_dir, 'screenshots')
diff --git a/plugins/kimchi/control/host.py b/plugins/kimchi/control/host.py
index 0a40f1b..c71c47b 100644
--- a/plugins/kimchi/control/host.py
+++ b/plugins/kimchi/control/host.py
@@ -19,7 +19,6 @@
from wok.control.base import Collection, Resource, SimpleCollection
from wok.control.utils import UrlSubNode
-from wok.exception import NotFoundError
from cpuinfo import CPUInfo
@@ -31,14 +30,7 @@ class Host(Resource):
self.role_key = 'host'
self.admin_methods = ['GET', 'POST']
self.uri_fmt = '/host/%s'
- self.reboot = self.generate_action_handler('reboot')
- self.shutdown = self.generate_action_handler('shutdown')
- self.stats = HostStats(self.model)
- self.partitions = Partitions(self.model)
self.devices = Devices(self.model)
- self.packagesupdate = PackagesUpdate(self.model)
- self.repositories = Repositories(self.model)
- self.swupdate = self.generate_action_handler_task('swupdate')
self.cpuinfo = CPUInfo(self.model)
@property
@@ -46,54 +38,6 @@ class Host(Resource):
return self.info
-class HostStats(Resource):
- def __init__(self, model, id=None):
- super(HostStats, self).__init__(model, id)
- self.role_key = 'host'
- self.admin_methods = ['GET']
- self.history = HostStatsHistory(self.model)
-
- @property
- def data(self):
- return self.info
-
-
-class HostStatsHistory(Resource):
- @property
- def data(self):
- return self.info
-
-
-class Partitions(Collection):
- def __init__(self, model):
- super(Partitions, self).__init__(model)
- self.role_key = 'storage'
- self.admin_methods = ['GET']
- self.resource = Partition
-
- # Defining get_resources in order to return list of partitions in UI
- # sorted by their path
- def _get_resources(self, flag_filter):
- res_list = super(Partitions, self)._get_resources(flag_filter)
- res_list = filter(lambda x: x.info['available'], res_list)
- res_list.sort(key=lambda x: x.info['path'])
- return res_list
-
-
-class Partition(Resource):
- def __init__(self, model, id):
- self.role_key = 'storage'
- self.admin_methods = ['GET']
- super(Partition, self).__init__(model, id)
-
- @property
- def data(self):
- if not self.info['available']:
- raise NotFoundError("KCHPART0001E", {'name': self.info['name']})
-
- return self.info
-
-
class Devices(Collection):
def __init__(self, model):
super(Devices, self).__init__(model)
@@ -115,43 +59,3 @@ class Device(Resource):
def data(self):
return self.info
-
-class PackagesUpdate(Collection):
- def __init__(self, model):
- super(PackagesUpdate, self).__init__(model)
- self.role_key = 'host'
- self.admin_methods = ['GET']
- self.resource = PackageUpdate
-
-
-class PackageUpdate(Resource):
- def __init__(self, model, id=None):
- super(PackageUpdate, self).__init__(model, id)
- self.role_key = 'host'
- self.admin_methods = ['GET']
-
- @property
- def data(self):
- return self.info
-
-
-class Repositories(Collection):
- def __init__(self, model):
- super(Repositories, self).__init__(model)
- self.role_key = 'host'
- self.admin_methods = ['GET', 'POST']
- self.resource = Repository
-
-
-class Repository(Resource):
- def __init__(self, model, id):
- super(Repository, self).__init__(model, id)
- self.role_key = 'host'
- self.admin_methods = ['GET', 'PUT', 'POST', 'DELETE']
- self.uri_fmt = "/host/repositories/%s"
- self.enable = self.generate_action_handler('enable')
- self.disable = self.generate_action_handler('disable')
-
- @property
- def data(self):
- return self.info
diff --git a/plugins/kimchi/docs/README.md b/plugins/kimchi/docs/README.md
index f400333..ee6bfed 100644
--- a/plugins/kimchi/docs/README.md
+++ b/plugins/kimchi/docs/README.md
@@ -196,13 +196,13 @@ Usage
Connect your browser to https://localhost:8001. You should see a screen like:
-![Wok Login Screen](/docs/kimchi-login.png)
+![Wok Login Screen](docs/kimchi-login.png)
Wok uses PAM to authenticate users so you can log in with the same username
and password that you would use to log in to the machine itself. Once logged in
you will see a screen like:
-![Kimchi Guest View](/docs/kimchi-guest.png)
+![Kimchi Guest View](docs/kimchi-guest.png)
This shows you the list of running guests including a live screenshot of
the guest session. You can use the action buttons to shutdown the guests
@@ -216,7 +216,7 @@ top navigation bar.
The template screen looks like:
-![Kimchi Template View](/docs/kimchi-templates.png)
+![Kimchi Template View](docs/kimchi-templates.png)
From this view, you can change the parameters of a template or create a
new template using the "+" button in the upper right corner.
diff --git a/plugins/kimchi/i18n.py b/plugins/kimchi/i18n.py
index 253f00d..a2ea858 100644
--- a/plugins/kimchi/i18n.py
+++ b/plugins/kimchi/i18n.py
@@ -244,15 +244,6 @@ messages = {
"KCHNET0021E": _("Failed to activate interface %(iface)s. Please check the physical link status."),
"KCHNET0022E": _("Failed to start network %(name)s. Details: %(err)s"),
- "KCHDR0001E": _("Debug report %(name)s does not exist"),
- "KCHDR0002E": _("Debug report tool not found in system"),
- "KCHDR0003E": _("Unable to create debug report %(name)s. Details: %(err)s."),
- "KCHDR0004E": _("Can not find any debug report with the given name %(name)s"),
- "KCHDR0005E": _("Unable to generate debug report %(name)s. Details: %(err)s"),
- "KCHDR0006E": _("You should give a name for the debug report file."),
- "KCHDR0007E": _("Debug report name must be a string. Only letters, digits, underscore ('_') and hyphen ('-') are allowed."),
- "KCHDR0008E": _("The debug report with specified name \"%(name)s\" already exists. Please use another one."),
-
"KCHSR0001E": _("Storage server %(server)s was not used by Kimchi"),
"KCHDISTRO0001E": _("Distro '%(name)s' does not exist"),
@@ -264,11 +255,6 @@ messages = {
"KCHHOST0003E": _("Node device '%(name)s' not found"),
"KCHHOST0004E": _("Conflicting flag filters specified."),
- "KCHPKGUPD0001E": _("No packages marked for update"),
- "KCHPKGUPD0002E": _("Package %(name)s is not marked to be updated."),
- "KCHPKGUPD0003E": _("Error while getting packages marked to be updated. Details: %(err)s"),
- "KCHPKGUPD0004E": _("There is no compatible package manager for this system."),
-
"KCHUTILS0003E": _("Unable to choose a virtual machine name"),
"KCHVMSTOR0002E": _("Invalid storage type. Types supported: 'cdrom', 'disk'"),
@@ -286,38 +272,7 @@ messages = {
"KCHVMSTOR0016E": _("Volume already in use by other virtual machine."),
"KCHVMSTOR0017E": _("Only one of path or pool/volume can be specified to add a new virtual machine disk"),
"KCHVMSTOR0018E": _("Volume chosen with format %(format)s does not fit in the storage type %(type)s"),
-
- "KCHREPOS0001E": _("YUM Repository ID must be one word only string."),
- "KCHREPOS0002E": _("Repository URL must be an http://, ftp:// or file:// URL."),
- "KCHREPOS0003E": _("Repository configuration is a dictionary with specific values according to repository type."),
- "KCHREPOS0004E": _("Distribution to DEB repository must be a string"),
- "KCHREPOS0005E": _("Components to DEB repository must be listed in a array"),
- "KCHREPOS0006E": _("Components to DEB repository must be a string"),
- "KCHREPOS0007E": _("Mirror list to repository must be a string"),
- "KCHREPOS0008E": _("YUM Repository name must be string."),
- "KCHREPOS0009E": _("GPG check must be a boolean value."),
- "KCHREPOS0010E": _("GPG key must be a URL pointing to the ASCII-armored file."),
- "KCHREPOS0011E": _("Could not update repository %(repo_id)s."),
- "KCHREPOS0012E": _("Repository %(repo_id)s does not exist."),
- "KCHREPOS0013E": _("Specify repository base URL, mirror list or metalink in order to create or update a YUM repository."),
- "KCHREPOS0014E": _("Repository management tool was not recognized for your system."),
- "KCHREPOS0015E": _("Repository %(repo_id)s is already enabled."),
- "KCHREPOS0016E": _("Repository %(repo_id)s is already disabled."),
- "KCHREPOS0017E": _("Could not remove repository %(repo_id)s."),
- "KCHREPOS0018E": _("Could not write repository configuration file %(repo_file)s"),
- "KCHREPOS0019E": _("Specify repository distribution in order to create a DEB repository."),
- "KCHREPOS0020E": _("Could not enable repository %(repo_id)s."),
- "KCHREPOS0021E": _("Could not disable repository %(repo_id)s."),
- "KCHREPOS0022E": _("YUM Repository ID already exists"),
- "KCHREPOS0023E": _("YUM Repository name must be a string"),
- "KCHREPOS0024E": _("Unable to list repositories. Details: '%(err)s'"),
- "KCHREPOS0025E": _("Unable to retrieve repository information. Details: '%(err)s'"),
- "KCHREPOS0026E": _("Unable to add repository. Details: '%(err)s'"),
- "KCHREPOS0027E": _("Unable to remove repository. Details: '%(err)s'"),
- "KCHREPOS0028E": _("Configuration items: '%(items)s' are not supported by repository manager"),
- "KCHREPOS0029E": _("Repository metalink must be an http://, ftp:// or file:// URL."),
- "KCHREPOS0030E": _("Cannot specify mirrorlist and metalink at the same time."),
-
+
"KCHSNAP0001E": _("Virtual machine '%(vm)s' must be stopped before creating a snapshot of it."),
"KCHSNAP0002E": _("Unable to create snapshot '%(name)s' on virtual machine '%(vm)s'. Details: %(err)s"),
"KCHSNAP0003E": _("Snapshot '%(name)s' does not exist on virtual machine '%(vm)s'."),
diff --git a/plugins/kimchi/kimchi.conf b/plugins/kimchi/kimchi.conf
index 1bf78e4..ebf346f 100644
--- a/plugins/kimchi/kimchi.conf
+++ b/plugins/kimchi/kimchi.conf
@@ -23,13 +23,6 @@ tools.staticdir.on = True
tools.staticdir.dir = wok.config.PluginPaths('kimchi').state_dir + '/screenshots'
tools.nocache.on = False
-[/data/debugreports]
-tools.staticdir.on = True
-tools.staticdir.dir = wok.config.PluginPaths('kimchi').state_dir + '/debugreports'
-tools.nocache.on = False
-tools.wokauth.on = True
-tools.staticdir.content_types = {'xz': 'application/x-xz'}
-
[/help]
tools.staticdir.on = True
tools.staticdir.dir = wok.config.PluginPaths('kimchi').ui_dir + '/pages/help'
diff --git a/plugins/kimchi/mockmodel.py b/plugins/kimchi/mockmodel.py
index b269c26..4550c26 100644
--- a/plugins/kimchi/mockmodel.py
+++ b/plugins/kimchi/mockmodel.py
@@ -34,7 +34,6 @@ import config
import imageinfo
import osinfo
from model import cpuinfo
-from model.debugreports import DebugReportsModel
from model.host import DeviceModel
from model.libvirtstoragepool import IscsiPoolDef, NetfsPoolDef
from model.libvirtstoragepool import StoragePoolDef
@@ -114,7 +113,6 @@ class MockModel(Model):
StoragePoolModel._update_lvm_disks = self._update_lvm_disks
StorageVolumesModel.get_list = self._mock_storagevolumes_get_list
StorageVolumeModel.doUpload = self._mock_storagevolume_doUpload
- DebugReportsModel._gen_debugreport_file = self._gen_debugreport_file
LibvirtVMTemplate._get_volume_path = self._get_volume_path
VMTemplate.get_iso_info = self._probe_image
imageinfo.probe_image = self._probe_image
@@ -246,22 +244,6 @@ class MockModel(Model):
return MockModel._libvirt_get_vol_path(pool, vol)
- def _gen_debugreport_file(self, name):
- return add_task('/plugins/kimchi/debugreports/%s' % name,
- self._create_log, self.objstore, name)
-
- def _create_log(self, cb, name):
- path = config.get_debugreports_path()
- tmpf = os.path.join(path, name + '.tmp')
- realf = os.path.join(path, name + '.txt')
- length = random.randint(1000, 10000)
- with open(tmpf, 'w') as fd:
- while length:
- fd.write('I am logged')
- length = length - 1
- os.rename(tmpf, realf)
- cb("OK", True)
-
def _update_lvm_disks(self, pool_name, disks):
conn = self.conn.get()
pool = conn.storagePoolLookupByName(pool_name.encode('utf-8'))
diff --git a/plugins/kimchi/model/config.py b/plugins/kimchi/model/config.py
index 464ffae..702943b 100644
--- a/plugins/kimchi/model/config.py
+++ b/plugins/kimchi/model/config.py
@@ -28,10 +28,7 @@ from wok.utils import check_url_path, run_command, wok_log
from ..config import find_qemu_binary
from ..distroloader import DistroLoader
-from ..repositories import Repositories
from ..screenshot import VMScreenshot
-from ..swupdate import SoftwareUpdate
-from debugreports import DebugReportsModel
from featuretests import FeatureTests, FEATURETEST_POOL_NAME
from featuretests import FEATURETEST_VM_NAME
@@ -116,28 +113,10 @@ class CapabilitiesModel(object):
return False
def lookup(self, *ident):
- report_tool = DebugReportsModel.get_system_report_tool()
- try:
- SoftwareUpdate()
- except Exception:
- update_tool = False
- else:
- update_tool = True
-
- try:
- repo = Repositories()
- except Exception:
- repo_mngt_tool = None
- else:
- repo_mngt_tool = repo._pkg_mnger.TYPE
-
return {'libvirt_stream_protocols': self.libvirt_stream_protocols,
'qemu_spice': self._qemu_support_spice(),
'qemu_stream': self.qemu_stream,
'screenshot': VMScreenshot.get_stream_test_result(),
- 'system_report_tool': bool(report_tool),
- 'update_tool': update_tool,
- 'repo_mngt_tool': repo_mngt_tool,
'federation': kconfig.get("server", "federation"),
'auth': kconfig.get("authentication", "method"),
'kernel_vfio': self.kernel_vfio,
diff --git a/plugins/kimchi/model/host.py b/plugins/kimchi/model/host.py
index 75d4de0..c8f5d24 100644
--- a/plugins/kimchi/model/host.py
+++ b/plugins/kimchi/model/host.py
@@ -18,27 +18,15 @@
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
import libvirt
-import os
-import platform
import psutil
-import time
-from cherrypy.process.plugins import BackgroundTask
-from collections import defaultdict
-from wok.basemodel import Singleton
from wok.exception import InvalidOperation, InvalidParameter
from wok.exception import NotFoundError, OperationFailed
-from wok.utils import add_task, wok_log
from wok.xmlutils.utils import xpath_get_text
-from wok.model.tasks import TaskModel
import hostdev
-from .. import disks
-from .. import netinfo
-from ..repositories import Repositories
-from ..swupdate import SoftwareUpdate
from config import CapabilitiesModel
-from vms import DOM_STATE_MAP
+from wok.model.tasks import TaskModel
HOST_STATS_INTERVAL = 1
@@ -49,57 +37,6 @@ class HostModel(object):
self.conn = kargs['conn']
self.objstore = kargs['objstore']
self.task = TaskModel(**kargs)
- self.host_info = self._get_host_info()
-
- def _get_ppc_cpu_info(self):
- res = {}
- with open('/proc/cpuinfo') as f:
- for line in f.xreadlines():
- # Parse CPU, CPU's revision and CPU's clock information
- for key in ['cpu', 'revision', 'clock']:
- if key in line:
- info = line.split(':')[1].strip()
- if key == 'clock':
- value = float(info.split('MHz')[0].strip()) / 1000
- else:
- value = info.split('(')[0].strip()
- res[key] = value
-
- # Power machines show, for each cpu/core, a block with
- # all cpu information. Here we control the scan of the
- # necessary information (1st block provides
- # everything), skipping the function when find all
- # information.
- if len(res.keys()) == 3:
- return "%(cpu)s (%(revision)s) @ %(clock)s GHz\
- " % res
-
- return ""
-
- def _get_host_info(self):
- res = {}
- if platform.machine().startswith('ppc'):
- res['cpu_model'] = self._get_ppc_cpu_info()
- else:
- with open('/proc/cpuinfo') as f:
- for line in f.xreadlines():
- if "model name" in line:
- res['cpu_model'] = line.split(':')[1].strip()
- break
-
- res['cpus'] = 0
- res['memory'] = 0L
-
- # Include IBM PowerKVM name to supported distro names
- _sup_distros = platform._supported_dists + ('ibm_powerkvm',)
- # 'fedora' '17' 'Beefy Miracle'
- distro, version, codename = platform.linux_distribution(
- supported_dists=_sup_distros)
- res['os_distro'] = distro
- res['os_version'] = version
- res['os_codename'] = unicode(codename, "utf-8")
-
- return res
def lookup(self, *name):
cpus = psutil.NUM_CPUS
@@ -121,179 +58,6 @@ class HostModel(object):
self.host_info['memory'] = psutil.phymem_usage().total
return self.host_info
- def swupdate(self, *name):
- try:
- swupdate = SoftwareUpdate()
- except:
- raise OperationFailed('KCHPKGUPD0004E')
-
- pkgs = swupdate.getNumOfUpdates()
- if pkgs == 0:
- raise OperationFailed('KCHPKGUPD0001E')
-
- wok_log.debug('Host is going to be updated.')
- taskid = add_task('/plugins/kimchi/host/swupdate', swupdate.doUpdate,
- self.objstore, None)
- return self.task.lookup(taskid)
-
- def shutdown(self, args=None):
- # Check for running vms before shutdown
- running_vms = self._get_vms_list_by_state('running')
- if len(running_vms) > 0:
- raise OperationFailed("KCHHOST0001E")
-
- wok_log.info('Host is going to shutdown.')
- os.system('shutdown -h now')
-
- def reboot(self, args=None):
- # Find running VMs
- running_vms = self._get_vms_list_by_state('running')
- if len(running_vms) > 0:
- raise OperationFailed("KCHHOST0002E")
-
- wok_log.info('Host is going to reboot.')
- os.system('reboot')
-
- def _get_vms_list_by_state(self, state):
- conn = self.conn.get()
- return [dom.name().decode('utf-8')
- for dom in conn.listAllDomains(0)
- if (DOM_STATE_MAP[dom.info()[0]]) == state]
-
-
-class HostStatsModel(object):
- __metaclass__ = Singleton
-
- def __init__(self, **kargs):
- self.host_stats = defaultdict(list)
- self.host_stats_thread = BackgroundTask(HOST_STATS_INTERVAL,
- self._update_host_stats)
- self.host_stats_thread.start()
-
- def lookup(self, *name):
- return {'cpu_utilization': self.host_stats['cpu_utilization'][-1],
- 'memory': self.host_stats['memory'][-1],
- 'disk_read_rate': self.host_stats['disk_read_rate'][-1],
- 'disk_write_rate': self.host_stats['disk_write_rate'][-1],
- 'net_recv_rate': self.host_stats['net_recv_rate'][-1],
- 'net_sent_rate': self.host_stats['net_sent_rate'][-1]}
-
- def _update_host_stats(self):
- preTimeStamp = self.host_stats['timestamp']
- timestamp = time.time()
- # FIXME when we upgrade psutil, we can get uptime by psutil.uptime
- # we get uptime by float(open("/proc/uptime").readline().split()[0])
- # and calculate the first io_rate after the OS started.
- with open("/proc/uptime") as time_f:
- seconds = (timestamp - preTimeStamp if preTimeStamp else
- float(time_f.readline().split()[0]))
-
- self.host_stats['timestamp'] = timestamp
- self._get_host_disk_io_rate(seconds)
- self._get_host_network_io_rate(seconds)
-
- self._get_percentage_host_cpu_usage()
- self._get_host_memory_stats()
-
- # store only 60 stats (1 min)
- for key, value in self.host_stats.iteritems():
- if isinstance(value, list):
- if len(value) == 60:
- self.host_stats[key] = value[10:]
-
- def _get_percentage_host_cpu_usage(self):
- # This is cpu usage producer. This producer will calculate the usage
- # at an interval of HOST_STATS_INTERVAL.
- # The psutil.cpu_percent works as non blocking.
- # psutil.cpu_percent maintains a cpu time sample.
- # It will update the cpu time sample when it is called.
- # So only this producer can call psutil.cpu_percent in kimchi.
- self.host_stats['cpu_utilization'].append(psutil.cpu_percent(None))
-
- def _get_host_memory_stats(self):
- virt_mem = psutil.virtual_memory()
- # available:
- # the actual amount of available memory that can be given
- # instantly to processes that request more memory in bytes; this
- # is calculated by summing different memory values depending on
- # the platform (e.g. free + buffers + cached on Linux)
- memory_stats = {'total': virt_mem.total,
- 'free': virt_mem.free,
- 'cached': virt_mem.cached,
- 'buffers': virt_mem.buffers,
- 'avail': virt_mem.available}
- self.host_stats['memory'].append(memory_stats)
-
- def _get_host_disk_io_rate(self, seconds):
- disk_read_bytes = self.host_stats['disk_read_bytes']
- disk_write_bytes = self.host_stats['disk_write_bytes']
- prev_read_bytes = disk_read_bytes[-1] if disk_read_bytes else 0
- prev_write_bytes = disk_write_bytes[-1] if disk_write_bytes else 0
-
- disk_io = psutil.disk_io_counters(False)
- read_bytes = disk_io.read_bytes
- write_bytes = disk_io.write_bytes
-
- rd_rate = int(float(read_bytes - prev_read_bytes) / seconds + 0.5)
- wr_rate = int(float(write_bytes - prev_write_bytes) / seconds + 0.5)
-
- self.host_stats['disk_read_rate'].append(rd_rate)
- self.host_stats['disk_write_rate'].append(wr_rate)
- self.host_stats['disk_read_bytes'].append(read_bytes)
- self.host_stats['disk_write_bytes'].append(write_bytes)
-
- def _get_host_network_io_rate(self, seconds):
- net_recv_bytes = self.host_stats['net_recv_bytes']
- net_sent_bytes = self.host_stats['net_sent_bytes']
- prev_recv_bytes = net_recv_bytes[-1] if net_recv_bytes else 0
- prev_sent_bytes = net_sent_bytes[-1] if net_sent_bytes else 0
-
- net_ios = psutil.network_io_counters(True)
- recv_bytes = 0
- sent_bytes = 0
- for key in set(netinfo.nics() +
- netinfo.wlans()) & set(net_ios.iterkeys()):
- recv_bytes = recv_bytes + net_ios[key].bytes_recv
- sent_bytes = sent_bytes + net_ios[key].bytes_sent
-
- rx_rate = int(float(recv_bytes - prev_recv_bytes) / seconds + 0.5)
- tx_rate = int(float(sent_bytes - prev_sent_bytes) / seconds + 0.5)
-
- self.host_stats['net_recv_rate'].append(rx_rate)
- self.host_stats['net_sent_rate'].append(tx_rate)
- self.host_stats['net_recv_bytes'].append(recv_bytes)
- self.host_stats['net_sent_bytes'].append(sent_bytes)
-
-
-class HostStatsHistoryModel(object):
- def __init__(self, **kargs):
- self.history = HostStatsModel(**kargs)
-
- def lookup(self, *name):
- return {'cpu_utilization': self.history.host_stats['cpu_utilization'],
- 'memory': self.history.host_stats['memory'],
- 'disk_read_rate': self.history.host_stats['disk_read_rate'],
- 'disk_write_rate': self.history.host_stats['disk_write_rate'],
- 'net_recv_rate': self.history.host_stats['net_recv_rate'],
- 'net_sent_rate': self.history.host_stats['net_sent_rate']}
-
-
-class PartitionsModel(object):
- def __init__(self, **kargs):
- pass
-
- def get_list(self):
- result = disks.get_partitions_names()
- return result
-
-
-class PartitionModel(object):
- def __init__(self, **kargs):
- pass
-
- def lookup(self, name):
- return disks.get_partition_details(name)
-
class DevicesModel(object):
def __init__(self, **kargs):
@@ -390,87 +154,3 @@ class DeviceModel(object):
raise NotFoundError('KCHHOST0003E', {'name': nodedev_name})
return hostdev.get_dev_info(dev)
-
-class PackagesUpdateModel(object):
- def __init__(self, **kargs):
- try:
- self.host_swupdate = SoftwareUpdate()
- except:
- self.host_swupdate = None
-
- def get_list(self):
- if self.host_swupdate is None:
- raise OperationFailed('KCHPKGUPD0004E')
-
- return self.host_swupdate.getUpdates()
-
-
-class PackageUpdateModel(object):
- def __init__(self, **kargs):
- pass
-
- def lookup(self, name):
- try:
- swupdate = SoftwareUpdate()
- except Exception:
- raise OperationFailed('KCHPKGUPD0004E')
-
- return swupdate.getUpdate(name)
-
-
-class RepositoriesModel(object):
- def __init__(self, **kargs):
- try:
- self.host_repositories = Repositories()
- except:
- self.host_repositories = None
-
- def get_list(self):
- if self.host_repositories is None:
- raise InvalidOperation('KCHREPOS0014E')
-
- return sorted(self.host_repositories.getRepositories())
-
- def create(self, params):
- if self.host_repositories is None:
- raise InvalidOperation('KCHREPOS0014E')
-
- return self.host_repositories.addRepository(params)
-
-
-class RepositoryModel(object):
- def __init__(self, **kargs):
- try:
- self._repositories = Repositories()
- except:
- self._repositories = None
-
- def lookup(self, repo_id):
- if self._repositories is None:
- raise InvalidOperation('KCHREPOS0014E')
-
- return self._repositories.getRepository(repo_id)
-
- def enable(self, repo_id):
- if self._repositories is None:
- raise InvalidOperation('KCHREPOS0014E')
-
- return self._repositories.enableRepository(repo_id)
-
- def disable(self, repo_id):
- if self._repositories is None:
- raise InvalidOperation('KCHREPOS0014E')
-
- return self._repositories.disableRepository(repo_id)
-
- def update(self, repo_id, params):
- if self._repositories is None:
- raise InvalidOperation('KCHREPOS0014E')
-
- return self._repositories.updateRepository(repo_id, params)
-
- def delete(self, repo_id):
- if self._repositories is None:
- raise InvalidOperation('KCHREPOS0014E')
-
- return self._repositories.removeRepository(repo_id)
diff --git a/plugins/kimchi/root.py b/plugins/kimchi/root.py
index 1e2bfc7..2c8ac5b 100644
--- a/plugins/kimchi/root.py
+++ b/plugins/kimchi/root.py
@@ -58,7 +58,6 @@ class KimchiRoot(WokRoot):
make_dirs = [
os.path.abspath(config.get_distros_store()),
- os.path.abspath(config.get_debugreports_path()),
os.path.abspath(config.get_screenshot_path())
]
for directory in make_dirs:
diff --git a/plugins/kimchi/tests/test_authorization.py b/plugins/kimchi/tests/test_authorization.py
index 87d68ab..fda86a3 100644
--- a/plugins/kimchi/tests/test_authorization.py
+++ b/plugins/kimchi/tests/test_authorization.py
@@ -77,12 +77,6 @@ class AuthorizationTests(unittest.TestCase):
resp = self.request('/plugins/kimchi/host/shutdown', '{}', 'POST')
self.assertEquals(403, resp.status)
- # Non-root users can not get or debug reports
- resp = self.request('/plugins/kimchi/debugreports', '{}', 'GET')
- self.assertEquals(403, resp.status)
- resp = self.request('/plugins/kimchi/debugreports', '{}', 'POST')
- self.assertEquals(403, resp.status)
-
# Non-root users can not create or delete network (only get)
resp = self.request('/plugins/kimchi/networks', '{}', 'GET')
self.assertEquals(200, resp.status)
diff --git a/plugins/kimchi/tests/test_config.py.in b/plugins/kimchi/tests/test_config.py.in
index 4604eb1..b74ba7c 100644
--- a/plugins/kimchi/tests/test_config.py.in
+++ b/plugins/kimchi/tests/test_config.py.in
@@ -248,13 +248,6 @@ class ConfigTests(unittest.TestCase):
'tools.staticdir.dir': get_screenshot_path(),
'tools.nocache.on': False
},
- '/data/debugreports': {
- 'tools.staticdir.on': True,
- 'tools.staticdir.dir': get_debugreports_path(),
- 'tools.nocache.on': False,
- 'tools.wokauth.on': True,
- 'tools.staticdir.content_types': {'xz': 'application/x-xz'}
- },
'/help': {
'tools.staticdir.on': True,
'tools.staticdir.dir': '%s/ui/pages/help' % pluginPrefix,
diff --git a/plugins/kimchi/tests/test_host.py b/plugins/kimchi/tests/test_host.py
index 6cd0833..530262c 100644
--- a/plugins/kimchi/tests/test_host.py
+++ b/plugins/kimchi/tests/test_host.py
@@ -20,8 +20,6 @@
import json
import os
-import platform
-import psutil
import tempfile
import time
import unittest
@@ -29,7 +27,7 @@ from functools import partial
from wok.plugins.kimchi.mockmodel import MockModel
-from utils import get_free_port, patch_auth, request, run_server, wait_task
+from utils import get_free_port, patch_auth, request, run_server
test_server = None
@@ -62,98 +60,6 @@ class HostTests(unittest.TestCase):
def setUp(self):
self.request = partial(request, host, ssl_port)
- def test_hostinfo(self):
- resp = self.request('/plugins/kimchi/host').read()
- info = json.loads(resp)
- keys = ['os_distro', 'os_version', 'os_codename', 'cpu_model',
- 'memory', 'cpus']
- self.assertEquals(sorted(keys), sorted(info.keys()))
-
- distro, version, codename = platform.linux_distribution()
- self.assertEquals(distro, info['os_distro'])
- self.assertEquals(version, info['os_version'])
- self.assertEquals(unicode(codename, "utf-8"), info['os_codename'])
- self.assertEquals(psutil.TOTAL_PHYMEM, info['memory'])
-
- def test_hoststats(self):
- time.sleep(1)
- stats_keys = ['cpu_utilization', 'memory', 'disk_read_rate',
- 'disk_write_rate', 'net_recv_rate', 'net_sent_rate']
- resp = self.request('/plugins/kimchi/host/stats').read()
- stats = json.loads(resp)
- self.assertEquals(sorted(stats_keys), sorted(stats.keys()))
-
- cpu_utilization = stats['cpu_utilization']
- self.assertIsInstance(cpu_utilization, float)
- self.assertGreaterEqual(cpu_utilization, 0.0)
- self.assertTrue(cpu_utilization <= 100.0)
-
- memory_stats = stats['memory']
- self.assertIn('total', memory_stats)
- self.assertIn('free', memory_stats)
- self.assertIn('cached', memory_stats)
- self.assertIn('buffers', memory_stats)
- self.assertIn('avail', memory_stats)
-
- resp = self.request('/plugins/kimchi/host/stats/history').read()
- history = json.loads(resp)
- self.assertEquals(sorted(stats_keys), sorted(history.keys()))
-
- def test_host_actions(self):
- def _task_lookup(taskid):
- return json.loads(
- self.request('/plugins/kimchi/tasks/%s' % taskid).read()
- )
-
- resp = self.request('/plugins/kimchi/host/shutdown', '{}', 'POST')
- self.assertEquals(200, resp.status)
- resp = self.request('/plugins/kimchi/host/reboot', '{}', 'POST')
- self.assertEquals(200, resp.status)
-
- # Test system update
- resp = self.request('/plugins/kimchi/host/packagesupdate', None, 'GET')
- pkgs = json.loads(resp.read())
- self.assertEquals(3, len(pkgs))
-
- pkg_keys = ['package_name', 'repository', 'arch', 'version']
- for p in pkgs:
- name = p['package_name']
- resp = self.request('/plugins/kimchi/host/packagesupdate/' + name,
- None, 'GET')
- info = json.loads(resp.read())
- self.assertEquals(sorted(pkg_keys), sorted(info.keys()))
-
- resp = self.request('/plugins/kimchi/host/swupdate', '{}', 'POST')
- task = json.loads(resp.read())
- task_params = [u'id', u'message', u'status', u'target_uri']
- self.assertEquals(sorted(task_params), sorted(task.keys()))
-
- resp = self.request('/tasks/' + task[u'id'], None,
- 'GET')
- task_info = json.loads(resp.read())
- self.assertEquals(task_info['status'], 'running')
- wait_task(_task_lookup, task_info['id'])
- resp = self.request('/tasks/' + task[u'id'], None,
- 'GET')
- task_info = json.loads(resp.read())
- self.assertEquals(task_info['status'], 'finished')
- self.assertIn(u'All packages updated', task_info['message'])
- pkgs = model.packagesupdate_get_list()
- self.assertEquals(0, len(pkgs))
-
- def test_host_partitions(self):
- resp = self.request('/plugins/kimchi/host/partitions')
- self.assertEquals(200, resp.status)
- partitions = json.loads(resp.read())
-
- keys = ['name', 'path', 'type', 'fstype', 'size', 'mountpoint',
- 'available']
- for item in partitions:
- resp = self.request('/plugins/kimchi/host/partitions/%s' %
- item['name'])
- info = json.loads(resp.read())
- self.assertEquals(sorted(info.keys()), sorted(keys))
-
def test_host_devices(self):
def asset_devices_type(devices, dev_type):
for dev in devices:
diff --git a/plugins/kimchi/tests/test_model.py b/plugins/kimchi/tests/test_model.py
index 7c89048..1a1ca49 100644
--- a/plugins/kimchi/tests/test_model.py
+++ b/plugins/kimchi/tests/test_model.py
@@ -951,54 +951,6 @@ class ModelTests(unittest.TestCase):
self.assertTrue('kimchi-vm' in vms)
- @unittest.skipUnless(utils.running_as_root(), 'Must be run as root')
- def test_debug_reports(self):
- inst = model.Model('test:///default',
- objstore_loc=self.tmp_store)
-
- if not inst.capabilities_lookup()['system_report_tool']:
- raise unittest.SkipTest("Without debug report tool")
-
- try:
- timeout = int(os.environ['TEST_REPORT_TIMEOUT'])
- except (ValueError, KeyError):
- timeout = 120
-
- namePrefix = 'unitTestReport'
- # sosreport always deletes unsual letters like '-' and '_' in the
- # generated report file name.
- uuidstr = str(uuid.uuid4()).translate(None, "-_")
- reportName = namePrefix + uuidstr
- try:
- inst.debugreport_delete(namePrefix + '*')
- except NotFoundError:
- pass
- with RollbackContext() as rollback:
- report_list = inst.debugreports_get_list()
- self.assertFalse(reportName in report_list)
- try:
- tmp_name = reportName + "_1"
- task = inst.debugreports_create({'name': reportName})
- rollback.prependDefer(inst.debugreport_delete, tmp_name)
- taskid = task['id']
- inst.task_wait(taskid, timeout)
- self.assertEquals('finished',
- inst.task_lookup(taskid)['status'],
- "It is not necessary an error. "
- "You may need to increase the "
- "timeout number by "
- "TEST_REPORT_TIMEOUT=200 "
- "./run_tests.sh test_model")
- report_list = inst.debugreports_get_list()
- self.assertTrue(reportName in report_list)
- name = inst.debugreport_update(reportName, {'name': tmp_name})
- self.assertEquals(name, tmp_name)
- report_list = inst.debugreports_get_list()
- self.assertTrue(tmp_name in report_list)
- except OperationFailed, e:
- if 'debugreport tool not found' not in e.message:
- raise e
-
def test_get_distros(self):
inst = model.Model('test:///default',
objstore_loc=self.tmp_store)
@@ -1037,195 +989,6 @@ class ModelTests(unittest.TestCase):
volumes = inst.storagevolumes_get_list(args['name'])
self.assertEquals(len(volumes), 2)
- def test_repository_create(self):
- inst = model.Model('test:///default',
- objstore_loc=self.tmp_store)
-
- yum_repos = [{'repo_id': 'fedora-fake',
- 'baseurl': 'http://www.fedora.org'},
- {'repo_id': 'fedora-updates-fake',
- 'config':
- {'mirrorlist': 'http://www.fedoraproject.org'}}]
-
- deb_repos = [{'baseurl': 'http://archive.ubuntu.com/ubuntu/',
- 'config': {'dist': 'quantal'}},
- {'baseurl': 'http://archive.ubuntu.com/ubuntu/',
- 'config': {'dist': 'quantal', 'comps': ['main']}}]
-
- yum_invalid_repos = []
- deb_invalid_repos = []
-
- for url in invalid_repository_urls:
- wrong_baseurl = {'repo_id': 'wrong-id', 'baseurl': url}
- wrong_mirrorlist = {'repo_id': 'wrong-id',
- 'baseurl': 'www.example.com',
- 'config': {'mirrorlist': url}}
- wrong_config_item = {
- 'repo_id': 'wrong-id',
- 'baseurl': 'www.example.com',
- 'config': {
- 'gpgkey': 'file:///tmp/KEY-fedora-updates-fake-19'}}
-
- yum_invalid_repos.append(wrong_baseurl)
- yum_invalid_repos.append(wrong_mirrorlist)
- yum_invalid_repos.append(wrong_config_item)
-
- wrong_baseurl['config'] = {'dist': 'tasty'}
- wrong_config = {'baseurl': deb_repos[0]['baseurl'],
- 'config': {
- 'unsupported_item': "a_unsupported_item"}}
- deb_invalid_repos.append(wrong_baseurl)
- deb_invalid_repos.append(wrong_config)
-
- repo_type = inst.capabilities_lookup()['repo_mngt_tool']
- if repo_type == 'yum':
- test_repos = yum_repos
- invalid_repos = yum_invalid_repos
- elif repo_type == 'deb':
- test_repos = deb_repos
- invalid_repos = deb_invalid_repos
- else:
- # repository management tool was not recognized by Kimchi
- # skip test case
- return
-
- # create repositories with invalid data
- for repo in invalid_repos:
- self.assertRaises(InvalidParameter, inst.repositories_create, repo)
-
- for repo in test_repos:
- system_host_repos = len(inst.repositories_get_list())
- repo_id = inst.repositories_create(repo)
- host_repos = inst.repositories_get_list()
- self.assertEquals(system_host_repos + 1, len(host_repos))
-
- repo_info = inst.repository_lookup(repo_id)
- self.assertEquals(repo_id, repo_info['repo_id'])
- self.assertEquals(True, repo_info.get('enabled'))
- self.assertEquals(repo.get('baseurl', ''),
- repo_info.get('baseurl'))
-
- original_config = repo.get('config', {})
- config_info = repo_info.get('config', {})
-
- if repo_type == 'yum':
- self.assertEquals(original_config.get('mirrorlist', ''),
- config_info.get('mirrorlist', ''))
- self.assertEquals(True, config_info['gpgcheck'])
- else:
- self.assertEquals(original_config['dist'], config_info['dist'])
- self.assertEquals(original_config.get('comps', []),
- config_info.get('comps', []))
-
- inst.repository_delete(repo_id)
- self.assertRaises(NotFoundError, inst.repository_lookup, repo_id)
-
- self.assertRaises(NotFoundError, inst.repository_lookup, 'google')
-
- def test_repository_update(self):
- inst = model.Model('test:///default',
- objstore_loc=self.tmp_store)
-
- yum_repo = {'repo_id': 'fedora-fake',
- 'baseurl': 'http://www.fedora.org'}
- yum_new_repo = {'baseurl': 'http://www.fedoraproject.org'}
-
- deb_repo = {'baseurl': 'http://archive.ubuntu.com/ubuntu/',
- 'config': {'dist': 'quantal'}}
- deb_new_repo = {'baseurl': 'http://br.archive.canonical.com/ubuntu/',
- 'config': {'dist': 'utopic'}}
-
- yum_invalid_repos = []
- deb_invalid_repos = []
-
- for url in invalid_repository_urls:
- wrong_baseurl = {'baseurl': url}
- wrong_mirrorlist = {'baseurl': 'www.example.com',
- 'config': {'mirrorlist': url}}
-
- yum_invalid_repos.append(wrong_baseurl)
- yum_invalid_repos.append(wrong_mirrorlist)
-
- wrong_baseurl['config'] = {'dist': 'tasty'}
- deb_invalid_repos.append(wrong_baseurl)
-
- repo_type = inst.capabilities_lookup()['repo_mngt_tool']
- if repo_type == 'yum':
- repo = yum_repo
- new_repo = yum_new_repo
- invalid_repos = yum_invalid_repos
- elif repo_type == 'deb':
- repo = deb_repo
- new_repo = deb_new_repo
- invalid_repos = deb_invalid_repos
- else:
- # repository management tool was not recognized by Kimchi
- # skip test case
- return
-
- system_host_repos = len(inst.repositories_get_list())
-
- with RollbackContext() as rollback:
- repo_id = inst.repositories_create(repo)
- rollback.prependDefer(inst.repository_delete, repo_id)
-
- host_repos = inst.repositories_get_list()
- self.assertEquals(system_host_repos + 1, len(host_repos))
-
- # update repositories with invalid data
- for tmp_repo in invalid_repos:
- self.assertRaises(InvalidParameter, inst.repository_update,
- repo_id, tmp_repo)
-
- new_repo_id = inst.repository_update(repo_id, new_repo)
- repo_info = inst.repository_lookup(new_repo_id)
-
- self.assertEquals(new_repo_id, repo_info['repo_id'])
- self.assertEquals(new_repo['baseurl'], repo_info['baseurl'])
- self.assertEquals(True, repo_info['enabled'])
- inst.repository_update(new_repo_id, repo)
-
- def test_repository_disable_enable(self):
- inst = model.Model('test:///default',
- objstore_loc=self.tmp_store)
-
- yum_repo = {'repo_id': 'fedora-fake',
- 'baseurl': 'http://www.fedora.org'}
- deb_repo = {'baseurl': 'http://archive.ubuntu.com/ubuntu/',
- 'config': {'dist': 'quantal'}}
-
- repo_type = inst.capabilities_lookup()['repo_mngt_tool']
- if repo_type == 'yum':
- repo = yum_repo
- elif repo_type == 'deb':
- repo = deb_repo
- else:
- # repository management tool was not recognized by Kimchi
- # skip test case
- return
-
- system_host_repos = len(inst.repositories_get_list())
-
- repo_id = inst.repositories_create(repo)
-
- host_repos = inst.repositories_get_list()
- self.assertEquals(system_host_repos + 1, len(host_repos))
-
- repo_info = inst.repository_lookup(repo_id)
- self.assertEquals(True, repo_info['enabled'])
-
- inst.repository_disable(repo_id)
- repo_info = inst.repository_lookup(repo_id)
- self.assertEquals(False, repo_info['enabled'])
-
- inst.repository_enable(repo_id)
- repo_info = inst.repository_lookup(repo_id)
- self.assertEquals(True, repo_info['enabled'])
-
- # remove files creates
- inst.repository_delete(repo_id)
-
-
class BaseModelTests(unittest.TestCase):
class FoosModel(object):
def __init__(self):
diff --git a/plugins/kimchi/tests/test_rest.py b/plugins/kimchi/tests/test_rest.py
index 243074e..c0f219a 100644
--- a/plugins/kimchi/tests/test_rest.py
+++ b/plugins/kimchi/tests/test_rest.py
@@ -1226,60 +1226,6 @@ class RestTests(unittest.TestCase):
# Distro not found error
self.assertIn('KCHDISTRO0001E', distro.get('reason'))
- def test_debugreports(self):
- resp = request(host, ssl_port, '/plugins/kimchi/debugreports')
- self.assertEquals(200, resp.status)
-
- def _report_delete(self, name):
- request(host, ssl_port, '/plugins/kimchi/debugreports/%s' % name, '{}',
- 'DELETE')
-
- def test_create_debugreport(self):
- req = json.dumps({'name': 'report1'})
- with RollbackContext() as rollback:
- resp = request(host, ssl_port, '/plugins/kimchi/debugreports', req,
- 'POST')
- self.assertEquals(202, resp.status)
- task = json.loads(resp.read())
- # make sure the debugreport doesn't exist until the
- # the task is finished
- wait_task(self._task_lookup, task['id'])
- rollback.prependDefer(self._report_delete, 'report2')
- resp = request(host, ssl_port,
- '/plugins/kimchi/debugreports/report1')
- debugreport = json.loads(resp.read())
- self.assertEquals("report1", debugreport['name'])
- self.assertEquals(200, resp.status)
- req = json.dumps({'name': 'report2'})
- resp = request(host, ssl_port,
- '/plugins/kimchi/debugreports/report1', req, 'PUT')
- self.assertEquals(303, resp.status)
-
- def test_debugreport_download(self):
- req = json.dumps({'name': 'report1'})
- with RollbackContext() as rollback:
- resp = request(host, ssl_port, '/plugins/kimchi/debugreports', req,
- 'POST')
- self.assertEquals(202, resp.status)
- task = json.loads(resp.read())
- # make sure the debugreport doesn't exist until the
- # the task is finished
- wait_task(self._task_lookup, task['id'], 20)
- rollback.prependDefer(self._report_delete, 'report1')
- resp = request(host, ssl_port,
- '/plugins/kimchi/debugreports/report1')
- debugreport = json.loads(resp.read())
- self.assertEquals("report1", debugreport['name'])
- self.assertEquals(200, resp.status)
- resp = request(host, ssl_port,
- '/plugins/kimchi/debugreports/report1/content')
- self.assertEquals(200, resp.status)
- resp = request(host, ssl_port,
- '/plugins/kimchi/debugreports/report1')
- debugre = json.loads(resp.read())
- resp = request(host, ssl_port, debugre['uri'])
- self.assertEquals(200, resp.status)
-
def test_repositories(self):
def verify_repo(t, res):
for field in ('repo_id', 'enabled', 'baseurl', 'config'):
diff --git a/plugins/kimchi/ui/config/tab-ext.xml b/plugins/kimchi/ui/config/tab-ext.xml
index ee88c88..48ec9ec 100644
--- a/plugins/kimchi/ui/config/tab-ext.xml
+++ b/plugins/kimchi/ui/config/tab-ext.xml
@@ -2,13 +2,6 @@
<tabs-ext>
<tab>
<access role="admin" mode="admin"/>
- <access role="user" mode="none"/>
-
- <title>Host</title>
- <path>plugins/kimchi/host.html</path>
- </tab>
- <tab>
- <access role="admin" mode="admin"/>
<access role="user" mode="byInstance"/>
<title>Guests</title>
--
2.1.0
9 years, 3 months
[PATCH] Configure deb package to use systemd service if needed
by Jose Ricardo Ziviani
Signed-off-by: Jose Ricardo Ziviani <joserz(a)linux.vnet.ibm.com>
---
Makefile.am | 12 +++++++++---
contrib/DEBIAN/control.in | 3 ++-
contrib/DEBIAN/postinst | 26 ++++++++++++++++++++++++++
3 files changed, 37 insertions(+), 4 deletions(-)
create mode 100755 contrib/DEBIAN/postinst
diff --git a/Makefile.am b/Makefile.am
index 0eabd3d..70c48ef 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -70,10 +70,16 @@ all-local:
install-deb: install
cp -R $(top_srcdir)/contrib/DEBIAN $(DESTDIR)/
- $(MKDIR_P) $(DESTDIR)/etc/init
+ @if test -d "$(systemdsystemunitdir)" ; then \
+ $(MKDIR_P) $(DESTDIR)/$(systemdsystemunitdir); \
+ cp -R contrib/wokd.service.fedora \
+ $(DESTDIR)/$(systemdsystemunitdir)/wokd.service; \
+ else \
+ $(MKDIR_P) $(DESTDIR)/etc/init; \
+ cp -R $(top_srcdir)/contrib/wokd-upstart.conf.debian \
+ $(DESTDIR)/etc/init/wokd.conf; \
+ fi
$(MKDIR_P) $(DESTDIR)/usr/lib/firewalld/services
- cp -R $(top_srcdir)/contrib/wokd-upstart.conf.debian \
- $(DESTDIR)/etc/init/wokd.conf
cp -R $(top_srcdir)/src/firewalld.xml \
$(DESTDIR)/usr/lib/firewalld/services/wokd.xml
diff --git a/contrib/DEBIAN/control.in b/contrib/DEBIAN/control.in
index b21133c..50dc837 100644
--- a/contrib/DEBIAN/control.in
+++ b/contrib/DEBIAN/control.in
@@ -17,6 +17,7 @@ Depends: python-cherrypy3 (>= 3.2.0),
texlive-fonts-extra
Build-Depends: libxslt,
openssl,
- python-lxml
+ python-lxml,
+ pkg-config
Maintainer: Aline Manera <alinefm(a)br.ibm.com>
Description: Wok - Webserver Originated from Kimchi
diff --git a/contrib/DEBIAN/postinst b/contrib/DEBIAN/postinst
new file mode 100755
index 0000000..26fe032
--- /dev/null
+++ b/contrib/DEBIAN/postinst
@@ -0,0 +1,26 @@
+#!/bin/sh -e
+#
+# Project Kimchi
+#
+# Copyright IBM, Corp. 2013
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+systemd_exists=$(type /bin/systemctl > /dev/null 2>&1; echo $?)
+if test $systemd_exists = "0"; then
+ /bin/systemctl enable wokd > /dev/null 2>&1
+ /bin/systemctl daemon-reload > /dev/null 2>&1
+ /bin/systemctl start wokd > /dev/null 2>&1
+fi
--
1.9.1
9 years, 3 months
[PATCH 0/4] Issue 557 - Package Update Improvements - Part II
by Jose Ricardo Ziviani
This patchset implements a simple monitor for package update. When the
host tab is selected, it verifies whether a package manager is already
running in the system. If so, the software update progress window, in
the host tab, will display the contents of the package manager logfile.
Thus, the user will know the progress of a package update even if it was
not started up by Kimchi (or if wokd was restarted for any reason).
Jose Ricardo Ziviani (4):
Add functions for package manager monitoring
Implement the package manager monitor backend
Implement the package manager monitor frontend
Update the documentation
plugins/kimchi/control/host.py | 1 +
plugins/kimchi/docs/API.md | 2 +
plugins/kimchi/i18n.py | 1 +
plugins/kimchi/model/host.py | 10 +++
plugins/kimchi/swupdate.py | 138 ++++++++++++++++++++++++++++++++
plugins/kimchi/ui/js/src/kimchi.api.js | 39 +++++++++
plugins/kimchi/ui/js/src/kimchi.host.js | 29 +++++++
plugins/kimchi/ui/pages/i18n.json.tmpl | 2 +
8 files changed, 222 insertions(+)
--
1.9.1
9 years, 3 months