From 1ae8103a056cc0c13d4248a4a22a4cf2bcdb4373 Mon Sep 17 00:00:00 2001 From: Marc Harriss Date: Mon, 24 Jun 2019 10:10:51 +0200 Subject: [PATCH 01/13] Remove dockerfile from gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index f9936a7..7699c4c 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ locale/*.mo locale/*/*.edit.po locale/*/*.po.time_stamp locale/*/*.pox +Dockerfile From 2260e5f7c7937992075ccd03649b20e5d4459878 Mon Sep 17 00:00:00 2001 From: Marc Harriss Date: Mon, 24 Jun 2019 12:41:07 +0200 Subject: [PATCH 02/13] Add .travis.yml file to auto deploy gem --- .travis.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..b0545fd --- /dev/null +++ b/.travis.yml @@ -0,0 +1,20 @@ +language: ruby + +rvm: +- 2.6.3 + +branches: + only: + - master + +install: +- gem install bundler + +script: +- gem build foreman_gridscale.gemspec + +deploy: + provider: rubygems + api_key: $RUBYGEMS_APIKEY + gem: foreman_gridscale + gemspec: foreman_gridscale.gemspec From 9a74f9ac713b7a672fb7e6294844311030e520e0 Mon Sep 17 00:00:00 2001 From: Felix Kronlage Date: Sun, 28 Jul 2019 08:58:12 +0200 Subject: [PATCH 03/13] compare to false properly --- app/helpers/gridscale_images_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/helpers/gridscale_images_helper.rb b/app/helpers/gridscale_images_helper.rb index e7fbb97..3b70e5a 100644 --- a/app/helpers/gridscale_images_helper.rb +++ b/app/helpers/gridscale_images_helper.rb @@ -9,7 +9,7 @@ def gridscale_server_field(f) def select_ipv4(f, compute_resource) addresses = Array.new compute_resource.ips.each do |ip| - if ip.relations['servers'].empty? and ip.relations['loadbalancers'].empty? and ip.family ==4 and ip.failover = false + if ip.relations['servers'].empty? and ip.relations['loadbalancers'].empty? and ip.family ==4 and ip.failover == false addresses << ip end end @@ -29,7 +29,7 @@ def select_ipv4(f, compute_resource) def select_ipv6(f, compute_resource) addresses = Array.new compute_resource.ips.each do |ip| - if ip.relations['servers'].empty? and ip.relations['loadbalancers'].empty? and ip.family ==6 and ip.failover = false + if ip.relations['servers'].empty? and ip.relations['loadbalancers'].empty? and ip.family ==6 and ip.failover == false addresses << ip end end From e4efc85a740e6928ebb39d76c15e3224b203d80a Mon Sep 17 00:00:00 2001 From: Felix Kronlage Date: Fri, 9 Aug 2019 19:55:08 +0200 Subject: [PATCH 04/13] update Changelog while here add dates for previous releases --- CHANGELOG.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e308cc..4b24c4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,22 +1,26 @@ # Changelog -## [v1.0.3] +## [v1.X.X] (Unreleased) + +- fix IP-Selection (GH-1) + +## [v1.0.3] (Apr 29, 2019) - Update descriptions and links after moving the repository to GitHub. -## [v1.0.2] +## [v1.0.2] (Feb 8, 2019) - Allowed creating host to choose isoimage which available in gridscale user account - Failover IPs are now correctly filtered out - Targeting a correct URL to open VNC for a regular user -## [v1.0.1] +## [v1.0.1] (Dec 5, 2018) - Decresed dependency to foreman 1.15 - Missing URL field in `_gridscale.html.erb` This url field is needed for creating compute resource in foreman 1.15. -## [v1.0.0] +## [v1.0.0] (Nov 20, 2018) - Initial release of foreman-gridscale From 0abba3dff40f0c55cebaa2e787d0e9f820112261 Mon Sep 17 00:00:00 2001 From: Ruben Schuller Date: Fri, 23 Aug 2019 16:28:20 +0200 Subject: [PATCH 05/13] add select_nic method to gridscale fog-extension concern. NB: this currently creates an other error with my test setup, as fog-gridscale doesn't set the "interfaces" attribute, which is used by foreman here: https://github.com/theforeman/foreman/blob/c23a83afe9fcd6d2f25d261eb0c303a7cf337ffa/app/models/concerns/orchestration/compute.rb#L339 --- app/models/concerns/fog_extensions/gridscale/server.rb | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/models/concerns/fog_extensions/gridscale/server.rb b/app/models/concerns/fog_extensions/gridscale/server.rb index 6491769..9ec1ee9 100644 --- a/app/models/concerns/fog_extensions/gridscale/server.rb +++ b/app/models/concerns/fog_extensions/gridscale/server.rb @@ -57,7 +57,14 @@ def mac_addr :mac end - + def select_nic(fog_nics, nic) + # NB: fog_nics seems to be always nil here so this raises an exception. + # + # if we would have a list of interfaces in fog_nics, we would need to + # return the one from fog_nics we want to match to the foreman nic. + # foreman-xenserver uses fog_nics[0] here, so I'll just copy that for now. + fog_nics[0] + end end end end From 7a491fbd5c9a47219960b4b7686f15dfecb6e50d Mon Sep 17 00:00:00 2001 From: Ruben Schuller Date: Mon, 26 Aug 2019 17:21:02 +0200 Subject: [PATCH 06/13] remove comment about interfaces missing see according commit for fog-gridscale --- app/models/concerns/fog_extensions/gridscale/server.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/models/concerns/fog_extensions/gridscale/server.rb b/app/models/concerns/fog_extensions/gridscale/server.rb index 9ec1ee9..75a0efe 100644 --- a/app/models/concerns/fog_extensions/gridscale/server.rb +++ b/app/models/concerns/fog_extensions/gridscale/server.rb @@ -58,10 +58,6 @@ def mac_addr end def select_nic(fog_nics, nic) - # NB: fog_nics seems to be always nil here so this raises an exception. - # - # if we would have a list of interfaces in fog_nics, we would need to - # return the one from fog_nics we want to match to the foreman nic. # foreman-xenserver uses fog_nics[0] here, so I'll just copy that for now. fog_nics[0] end From f255d3d614a042740311c5b92597a636cd66d03b Mon Sep 17 00:00:00 2001 From: Ruben Schuller Date: Wed, 28 Aug 2019 11:07:37 +0200 Subject: [PATCH 07/13] add missing mac to provided_attributes of gs model --- app/models/foreman_gridscale/gridscale.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/foreman_gridscale/gridscale.rb b/app/models/foreman_gridscale/gridscale.rb index 6593203..2089f7d 100644 --- a/app/models/foreman_gridscale/gridscale.rb +++ b/app/models/foreman_gridscale/gridscale.rb @@ -35,7 +35,7 @@ def to_label end def provided_attributes - super.merge({}) + super.merge({:mac => :mac}) end def get_ip(ipaddr_uuid) From e3d80882d1a7e016c40cefa2699f0346fa7d5f1c Mon Sep 17 00:00:00 2001 From: Ruben Schuller Date: Thu, 29 Aug 2019 15:47:23 +0200 Subject: [PATCH 08/13] add attribute aliases for ip and ip6 --- app/models/concerns/fog_extensions/gridscale/server.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/concerns/fog_extensions/gridscale/server.rb b/app/models/concerns/fog_extensions/gridscale/server.rb index 75a0efe..091a89f 100644 --- a/app/models/concerns/fog_extensions/gridscale/server.rb +++ b/app/models/concerns/fog_extensions/gridscale/server.rb @@ -4,6 +4,8 @@ module Server extend ActiveSupport::Concern attr_accessor :object_uuid, :mac, :server_uuid, :interfaces_attributes, :ipv4_address, :ipv6_address + alias_attribute :ip, :ipv4_address + alias_attribute :ip6, :ipv6_address def state requires :status From 2e65ceb6c1ddb5da7e6c8bfcdf78bd7e7d5b4616 Mon Sep 17 00:00:00 2001 From: Felix Kronlage-Dammers Date: Thu, 29 Aug 2019 21:14:37 +0200 Subject: [PATCH 09/13] update Changelog --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b24c4d..3a4d89b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,9 @@ ## [v1.X.X] (Unreleased) -- fix IP-Selection (GH-1) +- Fix IP-Selection (GH-1) +- Add MAC to model (GH-2/GH-3) +- Display IPv4/IPv6 in interface tab (GH-4) ## [v1.0.3] (Apr 29, 2019) From e76e1a34b0f620249864b75a22a36b8ae3df10ce Mon Sep 17 00:00:00 2001 From: Felix Kronlage-Dammers Date: Thu, 29 Aug 2019 21:14:50 +0200 Subject: [PATCH 10/13] add Ruben Schuller to the list of contributors --- CONTRIBUTORS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 0ad0650..b52fbca 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -1,3 +1,3 @@ * Aldemuro Haris * Wouter Wijsman - +* Ruben Schuller From bb8289c0614cd6b2cb961ef3f7cdde8aef638801 Mon Sep 17 00:00:00 2001 From: Felix Kronlage-Dammers Date: Thu, 29 Aug 2019 21:15:08 +0200 Subject: [PATCH 11/13] two items crossed of the "known issues list" --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 282db09..1dd49e2 100644 --- a/README.md +++ b/README.md @@ -82,8 +82,6 @@ Go to Infrastructure > Compute resource and select the compute resource for grid * When creating a host, multiple network interfaces can be set to bootable. The gridscale platform does not support this, which is why only one of the interfaces will actually be set to bootable if this is the case * When creating a compute profile, the chosen network interface configuration is not saved * The Virtual Machines overview of a compute resource can take a long time to load -* The data shown in the VM tab of a host is not complete. More input about which information is useful is needed * Opening the console of a host in Foreman has not been implemented, but a link to gridscale is supplied * Acpi power off fails to shut down a system which did not boot -* MAC, IP4 and IP6 information is in the VM tab, not Interface From 3bb7471db645e38c7e11e227dce4aceb8c982418 Mon Sep 17 00:00:00 2001 From: Felix Kronlage-Dammers Date: Thu, 29 Aug 2019 22:31:52 +0200 Subject: [PATCH 12/13] bump version --- lib/foreman_gridscale/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/foreman_gridscale/version.rb b/lib/foreman_gridscale/version.rb index b864c64..9400154 100644 --- a/lib/foreman_gridscale/version.rb +++ b/lib/foreman_gridscale/version.rb @@ -1,3 +1,3 @@ module ForemanGridscale - VERSION = '1.0.3'.freeze + VERSION = '1.2.0'.freeze end From fe1168a5de0898a42b6a9734bb8e4d8945345bef Mon Sep 17 00:00:00 2001 From: Felix Kronlage-Dammers Date: Thu, 29 Aug 2019 22:32:08 +0200 Subject: [PATCH 13/13] finalise changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a4d89b..dd77a3d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## [v1.X.X] (Unreleased) +## [v1.2.0] (Aug 29, 2019) - Fix IP-Selection (GH-1) - Add MAC to model (GH-2/GH-3)