<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Models on CloudBolt Documentation</title>
		<link>https://docs.cloudbolt.io/docs/cmp/developer-resources/guide/models/</link>
		<description>Recent content in Models on CloudBolt Documentation</description>
		<generator>Hugo</generator>
		<language>en-us</language>
		
		
		
		
			<atom:link href="https://docs.cloudbolt.io/docs/cmp/developer-resources/guide/models/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Resource handler model</title>
				<link>https://docs.cloudbolt.io/docs/cmp/developer-resources/guide/models/resource-handlers/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://docs.cloudbolt.io/docs/cmp/developer-resources/guide/models/resource-handlers/</guid>
				<description>&lt;p&gt;Every resource handler is an instance of &lt;code&gt;resourcehandlers.models.ResourceHandler&lt;/code&gt;. Each supported technology subclasses it: a vCenter connection is a &lt;code&gt;VsphereResourceHandler&lt;/code&gt; and an AWS connection is an &lt;code&gt;AWSHandler&lt;/code&gt;. The base model uses &lt;strong&gt;&lt;a href=&#34;https://docs.cloudbolt.io/docs/cmp/developer-resources/guide/shell-plus/#hassubmodelsmixin&#34;&gt;HasSubModelsMixin&lt;/a&gt;&lt;/strong&gt;, meaning that a query against &lt;code&gt;ResourceHandler&lt;/code&gt; returns base instances. Call &lt;code&gt;cast()&lt;/code&gt; on one to get the subclass, with the fields and methods specific to that technology.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://docs.cloudbolt.io/img/cmp/developer-resources/guide/models/resource-handlers/resource-handler-object-model.png&#34; class=&#34;cb-image-link&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34; title=&#34;Open full-size image in a new tab&#34;&gt;&lt;img src=&#34;https://docs.cloudbolt.io/img/cmp/developer-resources/guide/models/resource-handlers/resource-handler-object-model.png&#34; alt=&#34;Diagram of resource handler subclasses, each paired with a TechnologyWrapper.&#34; loading=&#34;lazy&#34;&gt;&lt;span class=&#34;visually-hidden&#34;&gt; (opens full-size image in a new tab)&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;</description>
			</item>
			<item>
				<title>Environment model</title>
				<link>https://docs.cloudbolt.io/docs/cmp/developer-resources/guide/models/environments/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://docs.cloudbolt.io/docs/cmp/developer-resources/guide/models/environments/</guid>
				<description>&lt;p&gt;An environment is an instance of &lt;code&gt;infrastructure.models.Environment&lt;/code&gt;. It carries a single optional &lt;code&gt;resource_handler&lt;/code&gt;, so one environment represents one slice of one cloud or data center.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://docs.cloudbolt.io/img/cmp/developer-resources/guide/models/environments/environment-object-model.png&#34; class=&#34;cb-image-link&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34; title=&#34;Open full-size image in a new tab&#34;&gt;&lt;img src=&#34;https://docs.cloudbolt.io/img/cmp/developer-resources/guide/models/environments/environment-object-model.png&#34; alt=&#34;Diagram of an environment and the objects it relates to.&#34; loading=&#34;lazy&#34;&gt;&lt;span class=&#34;visually-hidden&#34;&gt; (opens full-size image in a new tab)&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;what-an-environment-links-to&#34;&gt;What an environment links to&lt;/h2&gt;&#xA;&lt;p&gt;Some of these links live on the environment, others on the related object.&lt;/p&gt;&#xA;&lt;div class=&#34;table-scroll&#34;&gt;&#xA;&lt;div class=&#34;table-responsive&#34;&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th&gt;Related to&lt;/th&gt;&#xA;          &lt;th&gt;Where the link lives&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Resource handler&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;Environment.resource_handler&lt;/code&gt;, a single foreign key.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Groups&lt;/td&gt;&#xA;          &lt;td&gt;On the group, as &lt;code&gt;Group.environments&lt;/code&gt;, labeled Available Environments. An empty list means the group is not constrained to particular environments.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Servers&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;Server.environment&lt;/code&gt;, protected. An environment with servers cannot be deleted.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;OS Builds&lt;/td&gt;&#xA;          &lt;td&gt;On the build, as &lt;code&gt;OSBuild.environments&lt;/code&gt;, which sets where the build is offered. Read it back from an environment as &lt;code&gt;environment.os_builds&lt;/code&gt;.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Networks&lt;/td&gt;&#xA;          &lt;td&gt;Networks are &lt;code&gt;ResourceNetwork&lt;/code&gt; objects, sub-typed per technology. An environment links to them through the options of the NET-type parameters &lt;code&gt;sc_nic_0&lt;/code&gt; through &lt;code&gt;sc_nic_9&lt;/code&gt;. An option is offered only when the resource handler has it and the group or environment also allows it.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Parameters&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;custom_fields&lt;/code&gt; for the parameters that apply, and &lt;code&gt;custom_field_options&lt;/code&gt; for their allowed values. The resource handler determines which technology parameters appear, so changing the handler clears their values.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Preconfigurations&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;preconfigurations&lt;/code&gt; for the preconfigurations offered in this environment, and &lt;code&gt;preconfiguration_options&lt;/code&gt; for their allowed value sets.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Provision engine, container orchestrator&lt;/td&gt;&#xA;          &lt;td&gt;The optional foreign keys &lt;code&gt;provision_engine&lt;/code&gt; and &lt;code&gt;container_orchestrator&lt;/code&gt;, for environments that provision through something other than the resource handler.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Data center, resource pool&lt;/td&gt;&#xA;          &lt;td&gt;The optional foreign keys &lt;code&gt;data_center&lt;/code&gt; and &lt;code&gt;resource_pool&lt;/code&gt;, which describe where in the provider the environment sits.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Tenant&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;tenant&lt;/code&gt; scopes the environment in a multi-tenant deployment.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;Quotas&lt;/td&gt;&#xA;          &lt;td&gt;&lt;code&gt;quota_set&lt;/code&gt;, required. Every environment is created with an empty quota set.&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;/div&gt;&#xA;&lt;/div&gt;&#xA;&lt;p&gt;Two fields override behavior set elsewhere:&lt;/p&gt;</description>
			</item>
			<item>
				<title>OS build model</title>
				<link>https://docs.cloudbolt.io/docs/cmp/developer-resources/guide/models/os-builds/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://docs.cloudbolt.io/docs/cmp/developer-resources/guide/models/os-builds/</guid>
				<description>&lt;p&gt;An OS build is an instance of &lt;code&gt;externalcontent.models.OSBuild&lt;/code&gt;. It lets a user pick Windows Server 2022 without knowing that it means one AMI in AWS and a different template in vCenter.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://docs.cloudbolt.io/img/cmp/developer-resources/guide/models/os-builds/os-build-object-model.png&#34; class=&#34;cb-image-link&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34; title=&#34;Open full-size image in a new tab&#34;&gt;&lt;img src=&#34;https://docs.cloudbolt.io/img/cmp/developer-resources/guide/models/os-builds/os-build-object-model.png&#34; alt=&#34;Diagram of one OS build mapped to a different image or template on each resource handler.&#34; loading=&#34;lazy&#34;&gt;&lt;span class=&#34;visually-hidden&#34;&gt; (opens full-size image in a new tab)&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;mapping-a-build-to-provider-images&#34;&gt;Mapping a build to provider images&lt;/h2&gt;&#xA;&lt;p&gt;Each pairing of an OS build with a technology that can provide it is an &lt;code&gt;OSBuildAttribute&lt;/code&gt;, whose &lt;code&gt;template_name&lt;/code&gt; field holds the provider&amp;rsquo;s identifier for the image or template. They have the global ID prefix &lt;code&gt;IMG&lt;/code&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Orders and jobs</title>
				<link>https://docs.cloudbolt.io/docs/cmp/developer-resources/guide/models/orders-and-jobs/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://docs.cloudbolt.io/docs/cmp/developer-resources/guide/models/orders-and-jobs/</guid>
				<description>&lt;p&gt;An &lt;code&gt;orders.models.Order&lt;/code&gt; holds one or more &lt;code&gt;OrderItem&lt;/code&gt; records, one per requested item. When the order is approved, Cloud Management Platform creates a &lt;code&gt;jobs.models.Job&lt;/code&gt; for each top-level item, and those jobs can create sub-jobs.&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://docs.cloudbolt.io/img/cmp/developer-resources/guide/models/orders-and-jobs/order-job-object-model.png&#34; class=&#34;cb-image-link&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34; title=&#34;Open full-size image in a new tab&#34;&gt;&lt;img src=&#34;https://docs.cloudbolt.io/img/cmp/developer-resources/guide/models/orders-and-jobs/order-job-object-model.png&#34; alt=&#34;Diagram of the order, order item, and job models and their relationships.&#34; loading=&#34;lazy&#34;&gt;&lt;span class=&#34;visually-hidden&#34;&gt; (opens full-size image in a new tab)&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;order-lifecycle&#34;&gt;Order lifecycle&lt;/h2&gt;&#xA;&lt;p&gt;An order&amp;rsquo;s state is the &lt;code&gt;Order.status&lt;/code&gt; field. It starts at &lt;code&gt;CART&lt;/code&gt;, and only an order still in the cart can be submitted.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
