Giter Club home page Giter Club logo

Comments (9)

djberg96 avatar djberg96 commented on July 21, 2024

I'm actually wondering now why we return a model object instead of the raw template there.

from azure-armrest.

bzwei avatar bzwei commented on July 21, 2024

@djberg96 Good point. This is the a new method added recently. Indeed we may not want to model it. Can you try to add it the exclude list in https://github.com/ManageIQ/azure-armrest/blob/master/lib/azure/armrest/model/base_model.rb#L211?

from azure-armrest.

bzwei avatar bzwei commented on July 21, 2024

Actually it is not the exclude list. https://github.com/ManageIQ/azure-armrest/blob/master/lib/azure/armrest/template_deployment_service.rb#L50 we should NOT model DeploymentTemplate.

from azure-armrest.

djberg96 avatar djberg96 commented on July 21, 2024

Perhaps it was originally a bad decision, but I'd like to keep backwards compatibility. Please see: #265

from azure-armrest.

bzwei avatar bzwei commented on July 21, 2024

@djberg96 although #265 addresses a potential issue for modeling, it does not solve the problem for deployment template. The template may not be deployed properly if the content has been changed.

We have to make the change here even if it breaks the backward compatibility.

from azure-armrest.

djberg96 avatar djberg96 commented on July 21, 2024

@bzwei Ah, true enough. Ok, I'll modify get_template as well then.

This shouldn't be a problem for ManageIQ since it's calling .to_s on it anyway.

from azure-armrest.

djberg96 avatar djberg96 commented on July 21, 2024

@bzwei Actually, that shouldn't modify the content, since the json is stored as its own attribute and __setobj__(@hash.dup) uses a dup.

from azure-armrest.

bzwei avatar bzwei commented on July 21, 2024

@djberg96 our current implementation of to_s is not correct because it does not pickup any changes through setter methods.

from azure-armrest.

djberg96 avatar djberg96 commented on July 21, 2024

Fixed by #266.

from azure-armrest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.