theforeman/foreman

View on GitHub
developer_docs/architecture/hosts/images/vm_render_form_tab_diagram.svg

Summary

Maintainability
Test Coverage
<svg id="mermaid-1616516356132" width="100%" xmlns="http://www.w3.org/2000/svg" height="857" style="max-width: 1874px;" viewBox="-50 -10 1874 857"><style>#mermaid-1616516356132{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}#mermaid-1616516356132 .error-icon{fill:#552222;}#mermaid-1616516356132 .error-text{fill:#552222;stroke:#552222;}#mermaid-1616516356132 .edge-thickness-normal{stroke-width:2px;}#mermaid-1616516356132 .edge-thickness-thick{stroke-width:3.5px;}#mermaid-1616516356132 .edge-pattern-solid{stroke-dasharray:0;}#mermaid-1616516356132 .edge-pattern-dashed{stroke-dasharray:3;}#mermaid-1616516356132 .edge-pattern-dotted{stroke-dasharray:2;}#mermaid-1616516356132 .marker{fill:#333333;stroke:#333333;}#mermaid-1616516356132 .marker.cross{stroke:#333333;}#mermaid-1616516356132 svg{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;}#mermaid-1616516356132 .actor{stroke:hsl(259.6261682243,59.7765363128%,87.9019607843%);fill:#ECECFF;}#mermaid-1616516356132 text.actor &gt; tspan{fill:black;stroke:none;}#mermaid-1616516356132 .actor-line{stroke:grey;}#mermaid-1616516356132 .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333;}#mermaid-1616516356132 .messageLine1{stroke-width:1.5;stroke-dasharray:2,2;stroke:#333;}#mermaid-1616516356132 #arrowhead path{fill:#333;stroke:#333;}#mermaid-1616516356132 .sequenceNumber{fill:white;}#mermaid-1616516356132 #sequencenumber{fill:#333;}#mermaid-1616516356132 #crosshead path{fill:#333;stroke:#333;}#mermaid-1616516356132 .messageText{fill:#333;stroke:#333;}#mermaid-1616516356132 .labelBox{stroke:hsl(259.6261682243,59.7765363128%,87.9019607843%);fill:#ECECFF;}#mermaid-1616516356132 .labelText,#mermaid-1616516356132 .labelText &gt; tspan{fill:black;stroke:none;}#mermaid-1616516356132 .loopText,#mermaid-1616516356132 .loopText &gt; tspan{fill:black;stroke:none;}#mermaid-1616516356132 .loopLine{stroke-width:2px;stroke-dasharray:2,2;stroke:hsl(259.6261682243,59.7765363128%,87.9019607843%);fill:hsl(259.6261682243,59.7765363128%,87.9019607843%);}#mermaid-1616516356132 .note{stroke:#aaaa33;fill:#fff5ad;}#mermaid-1616516356132 .noteText,#mermaid-1616516356132 .noteText &gt; tspan{fill:black;stroke:none;}#mermaid-1616516356132 .activation0{fill:#f4f4f4;stroke:#666;}#mermaid-1616516356132 .activation1{fill:#f4f4f4;stroke:#666;}#mermaid-1616516356132 .activation2{fill:#f4f4f4;stroke:#666;}#mermaid-1616516356132:root{--mermaid-font-family:"trebuchet ms",verdana,arial,sans-serif;}#mermaid-1616516356132 sequence{fill:apa;}</style><g></g><g><line id="actor178" x1="75" y1="5" x2="75" y2="846" class="actor-line" stroke-width="0.5px" stroke="#999"></line><rect x="0" y="0" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="75" y="32.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle; font-size: 14px; font-weight: 400; font-family: Open-Sans, sans-serif;"><tspan x="75" dy="0">newHostForm</tspan></text></g><g><line id="actor179" x1="449" y1="5" x2="449" y2="846" class="actor-line" stroke-width="0.5px" stroke="#999"></line><rect x="374" y="0" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="449" y="32.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle; font-size: 14px; font-weight: 400; font-family: Open-Sans, sans-serif;"><tspan x="449" dy="0">HostsController</tspan></text></g><g><line id="actor180" x1="894" y1="5" x2="894" y2="846" class="actor-line" stroke-width="0.5px" stroke="#999"></line><rect x="819" y="0" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="894" y="32.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle; font-size: 14px; font-weight: 400; font-family: Open-Sans, sans-serif;"><tspan x="894" dy="0">ComputeResource</tspan></text></g><g><line id="actor181" x1="1170" y1="5" x2="1170" y2="846" class="actor-line" stroke-width="0.5px" stroke="#999"></line><rect x="1095" y="0" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="1170" y="32.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle; font-size: 14px; font-weight: 400; font-family: Open-Sans, sans-serif;"><tspan x="1170" dy="0">Host</tspan></text></g><g><line id="actor182" x1="1370" y1="5" x2="1370" y2="846" class="actor-line" stroke-width="0.5px" stroke="#999"></line><rect x="1295" y="0" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="1370" y="32.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle; font-size: 14px; font-weight: 400; font-family: Open-Sans, sans-serif;"><tspan x="1370" dy="0">_compute</tspan></text></g><g><line id="actor183" x1="1699" y1="5" x2="1699" y2="846" class="actor-line" stroke-width="0.5px" stroke="#999"></line><rect x="1624" y="0" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="1699" y="32.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle; font-size: 14px; font-weight: 400; font-family: Open-Sans, sans-serif;"><tspan x="1699" dy="0">_provider_/base</tspan></text></g><defs><marker id="arrowhead" refX="9" refY="5" markerUnits="userSpaceOnUse" markerWidth="12" markerHeight="12" orient="auto"><path d="M 0 0 L 10 5 L 0 10 z"></path></marker></defs><defs><marker id="crosshead" markerWidth="15" markerHeight="8" orient="auto" refX="16" refY="4"><path fill="black" stroke="#000000" stroke-width="1px" d="M 9,2 V 6 L16,4 Z" style="stroke-dasharray: 0, 0;"></path><path fill="none" stroke="#000000" stroke-width="1px" d="M 0,1 L 6,7 M 6,1 L 0,7" style="stroke-dasharray: 0, 0;"></path></marker></defs><defs><marker id="filled-head" refX="18" refY="7" markerWidth="20" markerHeight="28" orient="auto"><path d="M 18,7 L9,13 L14,7 L9,1 Z"></path></marker></defs><defs><marker id="sequencenumber" refX="15" refY="15" markerWidth="60" markerHeight="40" orient="auto"><circle cx="15" cy="15" r="6"></circle></marker></defs><text x="262" y="80" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">compute_resource_selected(host_params)</text><line x1="75" y1="111" x2="449" y2="111" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></line><g><rect x="444" y="111" fill="#EDF2AE" stroke="#666" width="10" height="650" rx="0" ry="0" class="activation0"></rect></g><text x="454" y="126" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">host=refresh_host</text><path d="M 454,157 C 514,147 514,187 454,177" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></path><text x="674" y="202" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">cp_attrs = compute_profile_attributes_for(host.cp_id)</text><line x1="454" y1="233" x2="894" y2="233" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></line><text x="812" y="248" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">compute_attributes=(cp_attrs)</text><line x1="454" y1="279" x2="1170" y2="279" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></line><text x="912" y="294" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">render(host, compute_resource)</text><line x1="454" y1="325" x2="1370" y2="325" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></line><g><rect x="1365" y="327" fill="#EDF2AE" stroke="#666" width="10" height="388" rx="0" ry="0" class="activation0"></rect></g><text x="1268" y="340" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">compute_object</text><line x1="1365" y1="371" x2="1170" y2="371" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></line><text x="1032" y="386" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">new_vm(compute_attributes)</text><line x1="1170" y1="417" x2="894" y2="417" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></line><g><rect x="889" y="419" fill="#EDF2AE" stroke="#666" width="10" height="118" rx="0" ry="0" class="activation0"></rect></g><text x="899" y="432" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">fog.new(vm_instance_defaults.merge(attrs))</text><path d="M 899,463 C 959,453 959,493 899,483" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></path><text x="1035" y="508" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">vm&lt;Fog::Server&gt;</text><line x1="899" y1="537" x2="1170" y2="537" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></line><text x="1268" y="552" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">vm</text><line x1="1170" y1="581" x2="1365" y2="581" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></line><text x="1537" y="596" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">render(compute_resource, host, vm)</text><line x1="1375" y1="627" x2="1699" y2="627" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></line><text x="1537" y="642" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">rendered</text><line x1="1699" y1="671" x2="1375" y2="671" class="messageLine1" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="stroke-dasharray: 3, 3; fill: none;"></line><text x="910" y="686" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">rendered</text><line x1="1365" y1="715" x2="454" y2="715" class="messageLine1" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="stroke-dasharray: 3, 3; fill: none;"></line><text x="260" y="730" text-anchor="middle" dominant-baseline="middle" alignment-baseline="middle" class="messageText" dy="1em" style="font-family: &quot;trebuchet ms&quot;, verdana, arial, sans-serif; font-size: 16px; font-weight: 400;">VM_tab_html_over_AJAX</text><line x1="444" y1="761" x2="75" y2="761" class="messageLine0" stroke-width="2" stroke="none" marker-end="url(#arrowhead)" style="fill: none;"></line><g><rect x="0" y="781" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="75" y="813.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle; font-size: 14px; font-weight: 400; font-family: Open-Sans, sans-serif;"><tspan x="75" dy="0">newHostForm</tspan></text></g><g><rect x="374" y="781" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="449" y="813.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle; font-size: 14px; font-weight: 400; font-family: Open-Sans, sans-serif;"><tspan x="449" dy="0">HostsController</tspan></text></g><g><rect x="819" y="781" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="894" y="813.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle; font-size: 14px; font-weight: 400; font-family: Open-Sans, sans-serif;"><tspan x="894" dy="0">ComputeResource</tspan></text></g><g><rect x="1095" y="781" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="1170" y="813.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle; font-size: 14px; font-weight: 400; font-family: Open-Sans, sans-serif;"><tspan x="1170" dy="0">Host</tspan></text></g><g><rect x="1295" y="781" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="1370" y="813.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle; font-size: 14px; font-weight: 400; font-family: Open-Sans, sans-serif;"><tspan x="1370" dy="0">_compute</tspan></text></g><g><rect x="1624" y="781" fill="#eaeaea" stroke="#666" width="150" height="65" rx="3" ry="3" class="actor"></rect><text x="1699" y="813.5" dominant-baseline="central" alignment-baseline="central" class="actor" style="text-anchor: middle; font-size: 14px; font-weight: 400; font-family: Open-Sans, sans-serif;"><tspan x="1699" dy="0">_provider_/base</tspan></text></g></svg>