Hello community,

here is the log from the commit of package yast2-caasp for openSUSE:Factory 
checked in at 2019-08-22 15:02:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/yast2-caasp (Old)
 and      /work/SRC/openSUSE:Factory/.yast2-caasp.new.7948 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "yast2-caasp"

Thu Aug 22 15:02:41 2019 rev:10 rq:723922 version:4.2.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/yast2-caasp/yast2-caasp.changes  2019-07-31 
14:21:29.634542261 +0200
+++ /work/SRC/openSUSE:Factory/.yast2-caasp.new.7948/yast2-caasp.changes        
2019-08-22 15:22:10.278276967 +0200
@@ -1,0 +2,10 @@
+Wed Aug 14 16:11:04 UTC 2019 - [email protected]
+
+- MicroOS update [bsc#1135342]
+  - Add NTP configuration
+- Kubic Node dialog
+  - NTP configuration
+  - salt-minion configuration
+- 4.2.1
+
+-------------------------------------------------------------------

Old:
----
  yast2-caasp-4.2.0.tar.bz2

New:
----
  yast2-caasp-4.2.1.tar.bz2

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ yast2-caasp.spec ++++++
--- /var/tmp/diff_new_pack.0dAhPg/_old  2019-08-22 15:22:10.798276835 +0200
+++ /var/tmp/diff_new_pack.0dAhPg/_new  2019-08-22 15:22:10.806276833 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-caasp
-Version:        4.2.0
+Version:        4.2.1
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build

++++++ yast2-caasp-4.2.0.tar.bz2 -> yast2-caasp-4.2.1.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-caasp-4.2.0/package/yast2-caasp.changes 
new/yast2-caasp-4.2.1/package/yast2-caasp.changes
--- old/yast2-caasp-4.2.0/package/yast2-caasp.changes   2019-06-12 
11:53:56.000000000 +0200
+++ new/yast2-caasp-4.2.1/package/yast2-caasp.changes   2019-08-16 
09:54:30.000000000 +0200
@@ -1,4 +1,14 @@
 -------------------------------------------------------------------
+Wed Aug 14 16:11:04 UTC 2019 - [email protected]
+
+- MicroOS update [bsc#1135342]
+  - Add NTP configuration
+- Kubic Node dialog
+  - NTP configuration
+  - salt-minion configuration
+- 4.2.1
+
+-------------------------------------------------------------------
 Wed Jun 12 11:28:35 CEST 2019 - [email protected]
 
 - Enabling chrony-wait service too (bsc#1137196).
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-caasp-4.2.0/package/yast2-caasp.spec 
new/yast2-caasp-4.2.1/package/yast2-caasp.spec
--- old/yast2-caasp-4.2.0/package/yast2-caasp.spec      2019-06-12 
11:53:56.000000000 +0200
+++ new/yast2-caasp-4.2.1/package/yast2-caasp.spec      2019-08-16 
09:54:30.000000000 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           yast2-caasp
-Version:        4.2.0
+Version:        4.2.1
 Release:        0
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-caasp-4.2.0/src/clients/inst_kubic_minion_role.rb 
new/yast2-caasp-4.2.1/src/clients/inst_kubic_minion_role.rb
--- old/yast2-caasp-4.2.0/src/clients/inst_kubic_minion_role.rb 1970-01-01 
01:00:00.000000000 +0100
+++ new/yast2-caasp-4.2.1/src/clients/inst_kubic_minion_role.rb 2019-08-16 
09:54:30.000000000 +0200
@@ -0,0 +1,3 @@
+
+require "y2caasp/clients/kubic_minion_role_dialog"
+Y2Caasp::KubicMinionRoleDialog.new.run
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/yast2-caasp-4.2.0/src/clients/inst_microos_role.rb 
new/yast2-caasp-4.2.1/src/clients/inst_microos_role.rb
--- old/yast2-caasp-4.2.0/src/clients/inst_microos_role.rb      1970-01-01 
01:00:00.000000000 +0100
+++ new/yast2-caasp-4.2.1/src/clients/inst_microos_role.rb      2019-08-16 
09:54:30.000000000 +0200
@@ -0,0 +1,3 @@
+
+require "y2caasp/clients/microos_role_dialog"
+Y2Caasp::MicroOSRoleDialog.new.run
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-caasp-4.2.0/src/lib/y2caasp/clients/kubic_minion_role_dialog.rb 
new/yast2-caasp-4.2.1/src/lib/y2caasp/clients/kubic_minion_role_dialog.rb
--- old/yast2-caasp-4.2.0/src/lib/y2caasp/clients/kubic_minion_role_dialog.rb   
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-caasp-4.2.1/src/lib/y2caasp/clients/kubic_minion_role_dialog.rb   
2019-08-16 09:54:30.000000000 +0200
@@ -0,0 +1,101 @@
+# encoding: utf-8
+
+# 
------------------------------------------------------------------------------
+# Copyright (c) 2019 SUSE LLC
+#
+#
+# This program is free software; you can redistribute it and/or modify it under
+# the terms of version 2 of the GNU General Public License as published by the
+# Free Software Foundation.
+#
+# This program 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 General Public License for more 
details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, contact SUSE.
+#
+# To contact SUSE about this file by physical or electronic mail, you may find
+# current contact information at www.suse.com.
+# 
------------------------------------------------------------------------------
+
+require "cwm/dialog"
+require "y2caasp/widgets/kubic_admin_node"
+require "y2caasp/widgets/ntp_server"
+require "y2caasp/dhcp_ntp_servers"
+
+module Y2Caasp
+  # This library provides a simple dialog for setting
+  # the worker node specific settings:
+  #   - the admin node name
+  #   - the NTP server names
+  class KubicMinionRoleDialog < CWM::Dialog
+    include DhcpNtpServers
+
+    def initialize
+      textdomain "caasp"
+
+      Yast.import "Product"
+      Yast.import "ProductFeatures"
+      super
+    end
+
+    def title
+      # TRANSLATORS: dialog title
+      _("Kubic Node Configuration")
+    end
+
+    def contents
+      return @content if @content
+
+      @content = HSquash(
+        MinWidth(50,
+          VBox(
+            Y2Caasp::Widgets::KubicAdminNode.new,
+            VSpacing(2),
+            # preselect the servers from the DHCP response
+            Y2Caasp::Widgets::NtpServer.new(ntp_servers)
+          ))
+      )
+    end
+
+  private
+
+    #
+    # Propose the NTP servers from the DHCP response, fallback to a random
+    # machine from the ntp.org pool if enabled in control.xml.
+    #
+    # @return [Array<String>] proposed NTP servers, empty if nothing suitable 
found
+    #
+    def ntp_servers
+      # TODO: use Yast::NtpClient.ntp_conf if configured
+      # to better handle going back
+      servers = dhcp_ntp_servers
+      servers = ntp_fallback if servers.empty?
+
+      servers
+    end
+
+    #
+    # The fallback servers for NTP configuration
+    #
+    # @return [Array<String>] the fallback servers, empty if disabled in 
control.xml
+    #
+    def ntp_fallback
+      # propose the fallback when enabled in control file
+      return [] unless Yast::ProductFeatures.GetBooleanFeature("globals", 
"default_ntp_setup")
+
+      # copied from timezone/dialogs.rb:
+      base_products = Yast::Product.FindBaseProducts
+      host = if base_products.any? { |p| p["name"] =~ /openSUSE/i }
+        "opensuse"
+      else
+        # TODO: use a SUSE server when available in the future
+        "novell"
+      end
+
+      # propose a random pool server in range 0..3
+      ["#{rand(4)}.#{host}.pool.ntp.org"]
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-caasp-4.2.0/src/lib/y2caasp/clients/microos_role_dialog.rb 
new/yast2-caasp-4.2.1/src/lib/y2caasp/clients/microos_role_dialog.rb
--- old/yast2-caasp-4.2.0/src/lib/y2caasp/clients/microos_role_dialog.rb        
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-caasp-4.2.1/src/lib/y2caasp/clients/microos_role_dialog.rb        
2019-08-16 09:54:30.000000000 +0200
@@ -0,0 +1,27 @@
+require "yast"
+
+# so far the Kubic dialog is the same as in CaaSP,
+# just with different title and defaults
+require "y2caasp/clients/admin_role_dialog"
+
+module Y2Caasp
+  # This library provides a simple dialog for setting
+  # the kubeadm role specific settings:
+  #   - the NTP server names
+  class MicroOSRoleDialog < AdminRoleDialog
+    def initialize
+      textdomain "caasp"
+      super
+    end
+
+    #
+    # The dialog title
+    #
+    # @return [String] the title
+    #
+    def title
+      # TRANSLATORS: dialog title
+      _("NTP Configuration")
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-caasp-4.2.0/src/lib/y2caasp/widgets/kubic_admin_node.rb 
new/yast2-caasp-4.2.1/src/lib/y2caasp/widgets/kubic_admin_node.rb
--- old/yast2-caasp-4.2.0/src/lib/y2caasp/widgets/kubic_admin_node.rb   
1970-01-01 01:00:00.000000000 +0100
+++ new/yast2-caasp-4.2.1/src/lib/y2caasp/widgets/kubic_admin_node.rb   
2019-08-16 09:54:30.000000000 +0200
@@ -0,0 +1,88 @@
+# encoding: utf-8
+
+# 
------------------------------------------------------------------------------
+# Copyright (c) 2019 SUSE LLC
+#
+#
+# This program is free software; you can redistribute it and/or modify it under
+# the terms of version 2 of the GNU General Public License as published by the
+# Free Software Foundation.
+#
+# This program 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 General Public License for more 
details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, contact SUSE.
+#
+# To contact SUSE about this file by physical or electronic mail, you may find
+# current contact information at www.suse.com.
+# 
------------------------------------------------------------------------------
+
+require "yast"
+require "cwm/widget"
+require "installation/system_role"
+
+Yast.import "IP"
+Yast.import "Hostname"
+
+module Y2Caasp
+  module Widgets
+    # This widget is responsible of validate and store the introduced location
+    # which must be a valid IP or FQDN.
+    # bsc#1032057: old name: Controller Node, new name: Administration Node.
+    class KubicAdminNode < CWM::InputField
+      def initialize
+        textdomain "caasp"
+      end
+
+      def label
+        _("Kubic Admin Node")
+      end
+
+      def help
+        # TRANSLATORS: a help text for the kubic admin node input field
+        _("<h3>The Kubic Admin Node</h3>") +
+          # TRANSLATORS: a help text for the kubic admin node input field
+          _("<p>Enter the host name or the IP address of the kubic admin node 
" \
+              "to which this machine will be connected to.</p>")
+      end
+
+      # It stores the value of the input field if validates
+      #
+      # @see #validate
+      def store
+        # this is a role widget so a role must be selected before saving
+        raise("No role selected") unless role
+        role["kubic_admin_node"] = value
+      end
+
+      # The input field is initialized with previous stored value
+      def init
+        self.value = role["kubic_admin_node"] if role
+      end
+
+      # It returns true if the value is a valid IP or a valid FQDN, if not it
+      # displays a popup error.
+      #
+      # @return [Boolean] true if valid IP or FQDN
+      def validate
+        return true if Yast::IP.Check(value) || Yast::Hostname.CheckFQ(value)
+
+        Yast::Popup.Error(
+          # TRANSLATORS: error message for invalid administration node location
+          _("Not valid location for the kubic admin node, " \
+          "please enter a valid IP or Hostname")
+        )
+
+        false
+      end
+
+    private
+
+      def role
+        ::Installation::SystemRole.current_role
+      end
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-caasp-4.2.0/src/lib/y2system_role_handlers/kubic_lb_role_finish.rb 
new/yast2-caasp-4.2.1/src/lib/y2system_role_handlers/kubic_lb_role_finish.rb
--- 
old/yast2-caasp-4.2.0/src/lib/y2system_role_handlers/kubic_lb_role_finish.rb    
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/yast2-caasp-4.2.1/src/lib/y2system_role_handlers/kubic_lb_role_finish.rb    
    2019-08-16 09:54:30.000000000 +0200
@@ -0,0 +1,72 @@
+# encoding: utf-8
+
+# 
------------------------------------------------------------------------------
+# Copyright (c) 2019 SUSE LLC
+#
+#
+# This program is free software; you can redistribute it and/or modify it under
+# the terms of version 2 of the GNU General Public License as published by the
+# Free Software Foundation.
+#
+# This program 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 General Public License for more 
details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, contact SUSE.
+#
+# To contact SUSE about this file by physical or electronic mail, you may find
+# current contact information at www.suse.com.
+# 
------------------------------------------------------------------------------
+
+require "yast"
+require "y2caasp/cfa/minion_master_conf"
+
+# The kubic_*_finish.rb content is identical, it's only used
+# by different system roles. So if you change here something,
+# all other files have to be changed, too.
+
+module Y2SystemRoleHandlers
+  # Implement finish handler for the "kubic lb" role
+  class KubicLbRoleFinish
+    include Yast::Logger
+
+    def run
+      role = ::Installation::SystemRole.current_role
+
+      if !role
+        log.warn("Current role not found, not saving the config")
+        return
+      end
+
+      master = role["kubic_admin_node"]
+      log.info("The kubic admin node for this worker role is: #{master}")
+
+      configure_salt_minion(master)
+      enable_salt_minion_service
+    end
+
+  private
+
+    # Configure Salt minion
+    def configure_salt_minion(master)
+      master_conf = ::Y2Caasp::CFA::MinionMasterConf.new
+
+      begin
+        master_conf.load
+      rescue Errno::ENOENT
+        log.info("The minion master.conf file does not exist, it will be 
created")
+      end
+
+      # FIXME: the cobblersettings lense does not support dashes in the url
+      # without single quotes, we need to use a custom lense for salt conf.
+      # As Salt can use also 'url' just use in case of dashed.
+      master_conf.master = master
+      master_conf.save
+    end
+
+    def enable_salt_minion_service
+      ::Installation::Services.enabled << "salt-minion"
+    end
+  end
+end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/yast2-caasp-4.2.0/src/lib/y2system_role_handlers/kubic_worker_role_finish.rb
 
new/yast2-caasp-4.2.1/src/lib/y2system_role_handlers/kubic_worker_role_finish.rb
--- 
old/yast2-caasp-4.2.0/src/lib/y2system_role_handlers/kubic_worker_role_finish.rb
    1970-01-01 01:00:00.000000000 +0100
+++ 
new/yast2-caasp-4.2.1/src/lib/y2system_role_handlers/kubic_worker_role_finish.rb
    2019-08-16 09:54:30.000000000 +0200
@@ -0,0 +1,72 @@
+# encoding: utf-8
+
+# 
------------------------------------------------------------------------------
+# Copyright (c) 2019 SUSE LLC
+#
+#
+# This program is free software; you can redistribute it and/or modify it under
+# the terms of version 2 of the GNU General Public License as published by the
+# Free Software Foundation.
+#
+# This program 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 General Public License for more 
details.
+#
+# You should have received a copy of the GNU General Public License along with
+# this program; if not, contact SUSE.
+#
+# To contact SUSE about this file by physical or electronic mail, you may find
+# current contact information at www.suse.com.
+# 
------------------------------------------------------------------------------
+
+require "yast"
+require "y2caasp/cfa/minion_master_conf"
+
+# The kubic_*_finish.rb content is identical, it's only used
+# by different system roles. So if you change here something,
+# all other files have to be changed, too.
+
+module Y2SystemRoleHandlers
+  # Implement finish handler for the "kubic worker" role
+  class KubicWorkerRoleFinish
+    include Yast::Logger
+
+    def run
+      role = ::Installation::SystemRole.current_role
+
+      if !role
+        log.warn("Current role not found, not saving the config")
+        return
+      end
+
+      master = role["kubic_admin_node"]
+      log.info("The kubic admin node for this worker role is: #{master}")
+
+      configure_salt_minion(master)
+      enable_salt_minion_service
+    end
+
+  private
+
+    # Configure Salt minion
+    def configure_salt_minion(master)
+      master_conf = ::Y2Caasp::CFA::MinionMasterConf.new
+
+      begin
+        master_conf.load
+      rescue Errno::ENOENT
+        log.info("The minion master.conf file does not exist, it will be 
created")
+      end
+
+      # FIXME: the cobblersettings lense does not support dashes in the url
+      # without single quotes, we need to use a custom lense for salt conf.
+      # As Salt can use also 'url' just use in case of dashed.
+      master_conf.master = master
+      master_conf.save
+    end
+
+    def enable_salt_minion_service
+      ::Installation::Services.enabled << "salt-minion"
+    end
+  end
+end


Reply via email to