Skip to content

Commit

Permalink
Flush LanItems#Items cache when importing AY profile. bnc#866742
Browse files Browse the repository at this point in the history
LanItems#Items should correspond exactly to the content of
NetworkInterfaces cache. So, it has to be dropped and reinitialized
according the new NetworkInterfaces' content.

It (only) partly addresses bnc#866742.
  • Loading branch information
mchf committed Sep 23, 2015
1 parent dbeeb1e commit 43f5b70
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/modules/LanItems.rb
Expand Up @@ -1096,6 +1096,8 @@ def Read
# @param [Hash] AY profile converted into hash
# @return [Boolean] on success
def Import(settings)
LanItems.Items = {}

NetworkInterfaces.Import("netcard", settings["devices"] || {})
NetworkInterfaces.List("netcard").each do |device|
AddNew()
Expand Down

0 comments on commit 43f5b70

Please sign in to comment.