manageiq / inventory_refresh Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
When there were multiple strategies (topological and recursive) it made sense to have scanning separate but now it can live under topological_sort
The 90% case is that these are a single column (e.g. :ems_ref
or :uid_ems
) so allow the user to pass in a single value and wrap it in an array when building the collection.
--- a/lib/inventory_refresh/save_collection/saver/base.rb
+++ b/lib/inventory_refresh/save_collection/saver/base.rb
@@ -163,7 +163,7 @@ module InventoryRefresh::SaveCollection
# Record was found in the DB but not sent for saving, that means it doesn't exist anymore and we should
# delete it from the DB.
delete_record!(record) if inventory_collection.delete_allowed?
- else
+ elsif !inventory_collection.create_only?
# Record was found in the DB and sent for saving, we will be updating the DB.
update_record!(record, hash, inventory_object) if assert_referential_integrity(hash)
The create_only? option is honored by concurrent_safe_batch and batch save strategies but not by base.
extra_indexes
, alternate_indexes
, lookups
?# collection def
:secondary_refs = {:by_name => %i(name)}
# in parser
collection.lazy_find({:name => "foo"}, {:ref => :by_name})
A more ergnomic syntax would be
collection.lazy_find(:by_name => {:name => "foo"})
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.
Gemfile
activerecord "~>5.2.6"
activerecord "~>6.0.4"
activerecord "~>6.1.4"
.github/workflows/ci.yaml
actions/checkout v4
ruby/setup-ruby v1
paambaati/codeclimate-action v8
manageiq/postgresql 13
There are use cases where we want to assign default values to new records but do not overwrite these values on updated records e.g. MiqWidget Seeding on the enabled and visibility columns.
We're hitting an issue where we have to copy value from Flavor to Vm, but divide it by 2^20 prior saving. Something like:
persister.flavors.build(
...
:memory => flavor.memory_in_mb.megabytes # store in bytes
)
persister.hardwares.build(
...
:memory_mb => persister.flavors.find(flavor_ref).memory / 1.megabytes # convert to megabytes
)
Problem is that we currently have to use .find()
which may potentially result in ordering issues. Would it be possible to let .lazy_find()
accept a block where we could preprocess the value? Something like this would be fantastic:
persister.flavors.lazy_find(flavor_ref) { |flavor| flavor.memory / 1.megabyte }
/cc @agrare
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.