app/models/deployed.rb
def to_h
        {
            id: @assembly.id,
            name: name,
            resource: {
                region: region,
                flavor: favourized
            },
            cattype: cattype,
            logo: logo,
            components: @assembly.components,
            tosca_type: @assembly.tosca_type,
            inputs: input,
            outputs: output,
            envs: envs_to_s,
            state: state,
            status: {
                message: status,
                predeploying: has_predeployed?
            },
            policies: @assembly.policies,
            network: {
                publicip: publicip,
                someip: someip
            },
            machine:  {
                vnc: vnc,
                monitor:  monitored_machine,
                security_help: security_help,
                sshkey: sshkey
            },
            container: {
                host: dockerhostip,
                monitor: monitored_container
            },
            created_at: @assembly.created_at
        }
    end
# data about one topic/assembly
# the stuff inside inputs/outputs are wrapped in individual keys
data about one topic/assembly
the stuff inside inputs/outputs are wrapped in individual keys
data about one topic / assembly the stuff inside inputs / outputs are wrapped in individual keys
def to_h
        {
            id: @assembly.id,
            name: name,
            resource: {
                region: region,
                flavor: favourized
            },
            cattype: cattype,
            logo: logo,
            components: @assembly.components,
            tosca_type: @assembly.tosca_type,
            inputs: input,
            outputs: output,
            envs: envs_to_s,
            state: state,
            status: {
                message: status,
                predeploying: has_predeployed?
            },
            policies: @assembly.policies,
            network: {
                publicip: publicip,
                someip: someip
            },
            machine:  {
                vnc: vnc,
                monitor:  monitored_machine,
                security_help: security_help,
                sshkey: sshkey
            },
            container: {
                host: dockerhostip,
                monitor: monitored_container
            },
            created_at: @assembly.created_at
        }
    end
def to_h { id : @assembly . id , name : name , resource : { region : region , flavor : favourized } , cattype : cattype , logo : logo , components : @assembly . components , tosca_type : @assembly . tosca_type , inputs : input , outputs : output , envs : envs_to_s , state : state , status : { message : status , predeploying : has_predeployed? } , policies : @assembly . policies , network : { publicip : publicip , someip : someip } , machine : { vnc : vnc , monitor : monitored_machine , security_help : security_help , sshkey : sshkey } , container : { host : dockerhostip , monitor : monitored_container } , created_at : @assembly . created_at } end
data about one topic/assembly
the stuff inside inputs/outputs are wrapped in individual keys
data about one topic / assembly the stuff inside inputs / outputs are wrapped in individual keys