cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ro...@apache.org
Subject [cloudstack] 23/24: Fixes based on @marcaurele 's code review
Date Thu, 21 Dec 2017 12:50:03 GMT
This is an automated email from the ASF dual-hosted git repository.

rohit pushed a commit to branch debian9-systemvmtemplate
in repository https://gitbox.apache.org/repos/asf/cloudstack.git

commit 470fb27b2467330cd655b9fb13072b6a8a408129
Author: Rohit Yadav <rohit.yadav@shapeblue.com>
AuthorDate: Thu Dec 21 15:20:38 2017 +0530

    Fixes based on @marcaurele 's code review
    
    I'll squash/meld this with previous commits before merging the branch.
    
    Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
---
 LICENSE                                            | 59 --------------
 pom.xml                                            |  2 -
 python/lib/cloudutils/utilities.py                 |  5 +-
 systemvm/debian/opt/cloud/bin/cs/CsDhcp.py         |  2 +-
 .../systemvmtemplate/scripts/definition.rb         | 95 ----------------------
 tools/whisker/descriptor.xml                       | 29 -------
 6 files changed, 2 insertions(+), 190 deletions(-)

diff --git a/LICENSE b/LICENSE
index c30d859..0dcb45c 100644
--- a/LICENSE
+++ b/LICENSE
@@ -271,65 +271,6 @@ Within the scripts/vm/hypervisor/xenserver directory
         from OpenStack, LLC  http://www.openstack.org 
             swift 
 
-Within the tools/appliance/definitions/{devcloud,systemvmtemplate,systemvmtemplate64} directory
-    licensed under the MIT License http://www.opensource.org/licenses/mit-license.php  (as
follows)
-
-            Copyright (c) 2010-2012 Patrick Debois 
-            
-            Permission is hereby granted, free  of charge, to any person obtaining
-            a  copy  of this  software  and  associated  documentation files  (the
-            "Software"), to  deal in  the Software without  restriction, including
-            without limitation  the rights to  use, copy, modify,  merge, publish,
-            distribute,  sublicense, and/or sell  copies of  the Software,  and to
-            permit persons to whom the Software  is furnished to do so, subject to
-            the following conditions:
-            
-            The  above  copyright  notice  and  this permission  notice  shall  be
-            included in all copies or substantial portions of the Software.
-            
-            THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
-            EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
-            MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
-            NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-            LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-            OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
-            WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-                        
-        from Patrick Debois  http://www.jedi.be/blog/ 
-            base.sh  from https://github.com/jedi4ever/veewee
-            cleanup.sh  from https://github.com/jedi4ever/veewee
-            definition.rb  from https://github.com/jedi4ever/veewee
-            preseed.cfg  from https://github.com/jedi4ever/veewee
-            zerodisk.sh  from https://github.com/jedi4ever/veewee
-
-Within the tools/devcloud/src/deps/boxes/basebox-build directory
-    licensed under the MIT License http://www.opensource.org/licenses/mit-license.php  (as
follows)
-
-            Copyright (c) 2010-2012 Patrick Debois 
-            
-            Permission is hereby granted, free  of charge, to any person obtaining
-            a  copy  of this  software  and  associated  documentation files  (the
-            "Software"), to  deal in  the Software without  restriction, including
-            without limitation  the rights to  use, copy, modify,  merge, publish,
-            distribute,  sublicense, and/or sell  copies of  the Software,  and to
-            permit persons to whom the Software  is furnished to do so, subject to
-            the following conditions:
-            
-            The  above  copyright  notice  and  this permission  notice  shall  be
-            included in all copies or substantial portions of the Software.
-            
-            THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
-            EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
-            MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
-            NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-            LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-            OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
-            WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-                        
-        from Patrick Debois  http://www.jedi.be/blog/ 
-            definition.rb  from https://github.com/jedi4ever/veewee
-            preseed.cfg  from https://github.com/jedi4ever/veewee
-
 Within the ui/lib directory
     placed in the public domain
         by Eric Meyer  http://meyerweb.com/eric/ 
diff --git a/pom.xml b/pom.xml
index 00a3542..e6b61a8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -883,8 +883,6 @@
               <exclude>tools/devcloud/basebuild/puppet-devcloudinitial/files/network.conf</exclude>
               <exclude>tools/appliance/*/template.json</exclude>
               <exclude>tools/cli/cloudmonkey.egg-info/*</exclude>
-              <exclude>tools/devcloud/src/deps/boxes/basebox-build/definition.rb</exclude>
-              <exclude>tools/devcloud/src/deps/boxes/basebox-build/preseed.cfg</exclude>
               <exclude>tools/marvin/Marvin.egg-info/*</exclude>
               <exclude>ui/css/token-input-facebook.css</exclude>
               <exclude>ui/l10n/*</exclude>
diff --git a/python/lib/cloudutils/utilities.py b/python/lib/cloudutils/utilities.py
index b9d4763..6fbc582 100755
--- a/python/lib/cloudutils/utilities.py
+++ b/python/lib/cloudutils/utilities.py
@@ -217,10 +217,7 @@ class serviceOpsRedhat7(serviceOps):
     def isServiceRunning(self, servicename):
         try:
             o = bash("systemctl is-active " + servicename)
-            if "inactive" not in o.getStdout():
-                return True
-            else:
-                return False
+            return "inactive" not in o.getStdout()
         except:
             return False
 
diff --git a/systemvm/debian/opt/cloud/bin/cs/CsDhcp.py b/systemvm/debian/opt/cloud/bin/cs/CsDhcp.py
index bcdba51..d795c13 100755
--- a/systemvm/debian/opt/cloud/bin/cs/CsDhcp.py
+++ b/systemvm/debian/opt/cloud/bin/cs/CsDhcp.py
@@ -80,7 +80,7 @@ class CsDhcp(CsDataBag):
             # DNS search order
             if gn.get_dns() and device:
                 sline = "dhcp-option=tag:interface-%s-%s,6" % (device, idx)
-                dns_list = [x for x in gn.get_dns() if not (not x)]
+                dns_list = [x for x in gn.get_dns() if x]
                 line = "dhcp-option=tag:interface-%s-%s,6,%s" % (device, idx, ','.join(dns_list))
                 self.conf.search(sline, line)
             # Gateway
diff --git a/tools/appliance/systemvmtemplate/scripts/definition.rb b/tools/appliance/systemvmtemplate/scripts/definition.rb
deleted file mode 100644
index 4f53cea..0000000
--- a/tools/appliance/systemvmtemplate/scripts/definition.rb
+++ /dev/null
@@ -1,95 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-
-arch = 'amd64'
-
-#
-# NOTE: Before changing the version of the debian image make
-# sure it is added to the userContent of jenkins.buildacloud.org
-# and the copy task is updated on the systemvm builds
-# This will prevent the inevitable build failure once the iso is
-# removed from the debian mirrors
-#
-architectures = {
-    :amd64 => {
-        :os_type_id => 'Debian_64',
-        :iso_file => 'debian-9.3.0-amd64-netinst.iso',
-        :iso_src => 'https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-9.3.0-amd64-netinst.iso',
-        :iso_md5 => '8775231d6f56a3d8f116eb64fe048f5cbd2ea0f8c092a1cb7608bcb4106f9c85cb69ce68f53bd381019ab40f1c0316843036daf3fd9107c81c58a240334cc747'
-    }
-}
-
-config = {
-    :cpu_count => '1',
-    :memory_size => '512',
-    :disk_size => '2100', :disk_format => 'VDI', :hostiocache => 'off',
-    :iso_download_timeout => '1000',
-    :boot_wait => '10',
-    :boot_cmd_sequence => [
-        '<Esc>',
-        'install ',
-        'preseed/url=http://%IP%:%PORT%/preseed.cfg ',
-        'debian-installer=en_US ',
-        'auto ',
-        'locale=en_US ',
-        'kbd-chooser/method=us ',
-        'netcfg/get_hostname=systemvm ',
-        'netcfg/get_domain=apache.org ',
-        'fb=false ',
-        'debconf/frontend=noninteractive ',
-        'console-setup/ask_detect=false ',
-        'console-keymaps-at/keymap=us ',
-        'keyboard-configuration/xkb-keymap=us ',
-        '<Enter>'
-    ],
-    :kickstart_port => '7122',
-    :kickstart_timeout => '1000',
-    :kickstart_file => 'preseed.cfg',
-    :ssh_login_timeout => '10000',
-    :ssh_user => 'cloud',
-    :ssh_password => 'cloud',
-    :ssh_key => '',
-    :ssh_host_port => '7222',
-    :ssh_guest_port => '22',
-    :sudo_cmd => "echo '%p'|sudo -S bash '%f'",
-    :shutdown_cmd => 'halt -p',
-    :postinstall_files => [
-        # basic minimal vm creation
-        'apt_upgrade.sh',
-        'configure_grub.sh',
-        'configure_locale.sh',
-        'configure_networking.sh',
-        'configure_acpid.sh',
-        # turning it into a systemvm
-        'install_systemvm_packages.sh',
-        'configure_conntrack.sh',
-        #'../../cloud_scripts_shar_archive.sh',
-        'configure_systemvm_services.sh',
-        'authorized_keys.sh',
-        'configure_persistent_config.sh',
-        # setup login stuff
-        'configure_login.sh',
-        # cleanup & space-saving
-        'cleanup.sh',
-        'finalize.sh'
-    ],
-    :postinstall_timeout => '10000'
-}
-
-config.merge! architectures[arch.to_sym]
-
-Veewee::Definition.declare(config)
diff --git a/tools/whisker/descriptor.xml b/tools/whisker/descriptor.xml
index 3fe1047..8cad773 100644
--- a/tools/whisker/descriptor.xml
+++ b/tools/whisker/descriptor.xml
@@ -2420,10 +2420,6 @@ Innovation Centre, 2006 (http://www.it-innovation.soton.ac.uk).
             name='Adiscon GmbH'
             url='http://www.adiscon.com/' />
         <organisation
-            id='person:patrick.debois'
-            name='Patrick Debois'
-            url='http://www.jedi.be/blog/' />
-        <organisation
         	id='dojofoundation.org'
         	name='The Dojo Foundation'
         	url='http://dojofoundation.org/' />
@@ -2643,31 +2639,6 @@ Copyright (c) 2010-2011 OpenStack, LLC.
 			</by-organisation>
 		</with-license>
     </within>
-    <within dir='tools/appliance/definitions/{devcloud,systemvmtemplate,systemvmtemplate64}'>
-        <with-license id='MIT'>
-            <copyright-notice>
-Copyright (c) 2010-2012 Patrick Debois
-            </copyright-notice>
-            <by-organisation id='person:patrick.debois'>
-                <resource name='base.sh' source='https://github.com/jedi4ever/veewee'
/>
-                <resource name='cleanup.sh' source='https://github.com/jedi4ever/veewee'
/>
-                <resource name='definition.rb' source='https://github.com/jedi4ever/veewee'
/>
-                <resource name='preseed.cfg' source='https://github.com/jedi4ever/veewee'
/>
-                <resource name='zerodisk.sh' source='https://github.com/jedi4ever/veewee'
/>
-            </by-organisation>
-        </with-license>
-    </within>
-    <within dir='tools/devcloud/src/deps/boxes/basebox-build'>
-        <with-license id='MIT'>
-            <copyright-notice>
-Copyright (c) 2010-2012 Patrick Debois
-            </copyright-notice>
-            <by-organisation id='person:patrick.debois'>
-                <resource name='definition.rb' source='https://github.com/jedi4ever/veewee'
/>
-                <resource name='preseed.cfg' source='https://github.com/jedi4ever/veewee'
/>
-            </by-organisation>
-        </with-license>
-    </within>
     <within dir='utils/src/org/apache/commons/httpclient/contrib/ssl'>
         <with-license id='ApacheLicenseVersion2'>
             <copyright-notice>

-- 
To stop receiving notification emails like this one, please contact
"commits@cloudstack.apache.org" <commits@cloudstack.apache.org>.

Mime
View raw message