Hey everyone,
The current Core and Aggregator versions are not working with each other. I started looking at it, but couldn't finish it today. Since I won't get to it before Wednesday July 7, here's what I found in case anybody wants to pick it up.
If not, I'll resume working on it on Wednesday.
1, The most recent deltacloud-core and deltacloud-client gems on rubygems.org don't work together.
Core serves the hardware profiles XML nodes as <hardware-profile> while the client library expects "hardware_profile".
2, This is fixed in the most HEAD of the core repo -- the client works with the core correctly.
However, some things in the client library API changed and that breaks Aggregator.
The attached patch fixes some of the problems.
Secondly, the core client adds a method `singularize` to the String class which conflicts with the singularization that Rails uses for its mapping of classes and tables.
I suggest that the `singularize` method in the core library be renamed to something else because it can't be used in Rails applications now.
Again, a simple patch included (though you may want to do it differently).
After you apply both patches (one on core, the other on aggregator), you need to uninstall the old delcatloud* gems and build the new ones from the sources.
It still doesn't work, but at least it's closer to being compatible.
Thomas
On 07/01/2010 07:17 PM, Tomas Sedovic wrote:
Hey everyone,
The current Core and Aggregator versions are not working with each other. I started looking at it, but couldn't finish it today. Since I won't get to it before Wednesday July 7, here's what I found in case anybody wants to pick it up.
If not, I'll resume working on it on Wednesday.
Hi, great work. I'll look on compatibility issues today and report a progress (if any) to this thread this evening.
Jan
On 07/02/2010 08:23 AM, Jan Provaznik wrote:
On 07/01/2010 07:17 PM, Tomas Sedovic wrote:
Hey everyone,
The current Core and Aggregator versions are not working with each other. I started looking at it, but couldn't finish it today. Since I won't get to it before Wednesday July 7, here's what I found in case anybody wants to pick it up.
If not, I'll resume working on it on Wednesday.
Hi, great work. I'll look on compatibility issues today and report a progress (if any) to this thread this evening.
Jan
Some notes about issues I found: major problem with new client lib is conflict with names of some methods/classes.
Client overrides some rails methods like classify, camelize, singularize,... I suggest to wrap it by method_defined?. Attached patch replaces Tomas core patch (singularize method rename).
Unfortunately another problem is class names conflict. Client dynamically adds classes (like HardwareProfile), which conflict with our model names. But I didn't figure out why, code in client seems to be correct on first look (see define_class method at the end) - it creates classes in DeltaCloud module. But in fact it overrides model class. Provider is then created, but hardware profiles properties are not saved.
I'll discuss it with Michal next Wednesday.
Jan
On 07/02/2010 05:31 PM, Jan Provaznik wrote:
On 07/02/2010 08:23 AM, Jan Provaznik wrote:
On 07/01/2010 07:17 PM, Tomas Sedovic wrote:
Hey everyone,
The current Core and Aggregator versions are not working with each other. I started looking at it, but couldn't finish it today. Since I won't get to it before Wednesday July 7, here's what I found in case anybody wants to pick it up.
If not, I'll resume working on it on Wednesday.
Hi, great work. I'll look on compatibility issues today and report a progress (if any) to this thread this evening.
Jan
Some notes about issues I found: major problem with new client lib is conflict with names of some methods/classes.
Client overrides some rails methods like classify, camelize, singularize,... I suggest to wrap it by method_defined?. Attached patch replaces Tomas core patch (singularize method rename).
Unfortunately another problem is class names conflict. Client dynamically adds classes (like HardwareProfile), which conflict with our model names. But I didn't figure out why, code in client seems to be correct on first look (see define_class method at the end) - it creates classes in DeltaCloud module. But in fact it overrides model class. Provider is then created, but hardware profiles properties are not saved.
I'll discuss it with Michal next Wednesday.
Jan
I sent patch in another thread (subject is "Core and Aggregator compatibility" too).
Jan
deltacloud-devel@lists.fedorahosted.org