{"id":20122,"date":"2023-01-26T04:18:43","date_gmt":"2023-01-26T04:18:43","guid":{"rendered":"https:\/\/www.booksofall.com\/tw\/?post_type=product&#038;p=20122"},"modified":"2023-01-26T06:39:42","modified_gmt":"2023-01-26T06:39:42","slug":"placement-documentation","status":"publish","type":"product","link":"https:\/\/www.booksofall.com\/tw\/placement-documentation\/","title":{"rendered":"Placement Documentation"},"content":{"rendered":"<p>The placement <a href=\"https:\/\/www.redhat.com\/en\/topics\/api\/what-are-application-programming-interfaces\">API<\/a> service was introduced in the 14.0.0 Newton release within the nova repository and extracted to the placement repository in the 19.0.0 Stein release. This is a <a href=\"https:\/\/www.redhat.com\/en\/topics\/api\/what-is-a-rest-api\">REST API<\/a> stack and data model used to track resource provider inventories and usages, along with different classes of resources. For example, a resource provider can be a compute node, a shared storage pool, or an IP allocation pool. <span style=\"font-size: 1rem;\">The placement service tracks the inventory and usage of each provider. For example, an instance created on a compute node may be a consumer of resources such as RAM and <a href=\"https:\/\/www.freecodecamp.org\/news\/what-is-cpu-meaning-definition-and-what-cpu-stands-for\/\">CPU<\/a> from a compute node resource provider, disk from an external shared storage pool resource provider and IP addresses from an external IP pool resource provider. <\/span><\/p>\n<p><span style=\"font-size: 1rem;\">The types of resources consumed are tracked as\u00a0<\/span><b style=\"font-size: 1rem;\">classes<\/b><span style=\"font-size: 1rem;\">. The service provides a set of standard resource classes (for example DISK_GB, MEMORY_MB, and VCPU) and provides the ability to define custom resource classes as needed. <\/span><\/p>\n<p><span style=\"font-size: 1rem;\">Each resource provider may also have a set of traits which describe qualitative aspects of the resource provider. Traits describe an aspect of a resource provider that cannot itself be consumed but a workload may wish to specify. For example, available disk may be <a href=\"https:\/\/www.techtarget.com\/searchstorage\/definition\/SSD-solid-state-drive\">solid state drives (SSD)<\/a>.<\/span><\/p>\n<h2><b>Chapter One &#8211; Usages<\/b><\/h2>\n<h3><b>1.1 Placement Usage <\/b><\/h3>\n<p><b>1.1.1 Tracking Resources\u00a0<\/b><\/p>\n<p>The placement service enables other projects to track their own resources. Those projects can register\/delete their own resources to\/from placement via the placement HTTP API.<\/p>\n<p>The placement service originated in the Nova project. As a result much of the functionality in placement was driven by nova\u2019s requirements. However, that functionality was designed to be sufficiently generic to be used by any service that needs to manage the selection and consumption of resources.<\/p>\n<p><b>How Nova Uses Placement<\/b><\/p>\n<p>Two processes, nova-compute and nova-scheduler, host most of nova\u2019s interaction with placement.<\/p>\n<p>The nova resource tracker in nova-compute is responsible for creating the resource provider record corresponding to the compute host on which the resource tracker runs, setting the inventory that describes the quantitative resources that are available for workloads to consume (e.g., <a href=\"https:\/\/www.datacenters.com\/news\/what-is-a-vcpu-and-how-do-you-calculate-vcpu-to-cpu\">VCPU<\/a>), and setting the traits that describe qualitative aspects of the resources (e.g., STORAGE_DISK_SSD).<\/p>\n<p>If other projects &#8212; for example, Neutron or Cyborg &#8212; wish to manage resources on a compute host, they should create resource providers as children of the compute host provider and register their own managed resources as inventory on those child providers. For more information, see the\u00a0<i>Modeling with Provider Trees<\/i>.<\/p>\n<p>The nova-scheduler is responsible for selecting a set of suitable destination hosts for a workload. It begins by formulating a request to placement for a list of allocation candidates. That request expresses quantitative and qualitative requirements, membership in aggregates, and in more complex cases, the topology of related resources. That list is reduced and ordered by filters and weighers within the sched- uler process. An allocation is made against a resource provider representing a destination, consuming a portion of the inventory set by the resource tracker.<\/p>\n<p><b>Modeling with Provider Trees<\/b><\/p>\n<p><b>Overview<\/b><\/p>\n<p>Placement supports modeling a hierarchical relationship between different resource providers. While a parent provider can have multiple child providers, a child provider can belong to only one parent provider. Therefore, the whole architecture can be considered as a &#8220;tree&#8221; structure, and the resource provider on top of the &#8220;tree&#8221; is called a &#8220;root provider&#8221;. (See the Nested Resource Providers spec for details.)<\/p>\n<p>Modeling the relationship is done by specifying a parent provider via the POST \/resource_providers operation when creating a resource provider.<\/p>\n<p><em><b>Note:\u00a0<\/b>If the parent provider hasn\u2019t been set, you can also parent a resource provider after the creation via the PUT \/resource_providers\/{uuid} operation. But re-parenting a resource provider is not supported.<\/em><\/p>\n<p>The resource providers in a tree &#8212; and sharing providers as described in the next section &#8212; can be returned in a single allocation request in the response of the GET \/allocation_candidates operation.<\/p>\n<p>This means that the placement service looks up a resource provider tree in which resource providers can\u00a0<i>collectively\u00a0<\/i>contain all of the requested resources. This document describes some case studies to explain how sharing providers, aggregates, and traits work if provider trees are involved in the GET \/allocation_candidates operation.<\/p>\n","protected":false},"excerpt":{"rendered":"<p><iframe style=\"width: 100%; height: 750px; border: none;\" src=\"https:\/\/online.visual-paradigm.com\/share\/book\/placement-documentation-189wu04q7o?p=1\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/p>\n","protected":false},"featured_media":20130,"template":"","meta":{"_yoast_wpseo_title":"","_yoast_wpseo_metadesc":"Do you know what is Placement API? It is a REST API stack and data model for tracking inventory and usage of resource providers. Learn more here!"},"product_brand":[],"product_cat":[286],"product_tag":[],"class_list":{"0":"post-20122","1":"product","2":"type-product","3":"status-publish","4":"has-post-thumbnail","6":"product_cat-openstack","8":"first","9":"instock","10":"shipping-taxable","11":"product-type-simple"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.1.1 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Placement Documentation - BooksOfAll Traditional Chinese<\/title>\n<meta name=\"description\" content=\"Do you know what is Placement API? It is a REST API stack and data model for tracking inventory and usage of resource providers. Learn more here!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.booksofall.com\/tw\/placement-documentation\/\" \/>\n<meta property=\"og:locale\" content=\"zh_TW\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Placement Documentation - BooksOfAll Traditional Chinese\" \/>\n<meta property=\"og:description\" content=\"Do you know what is Placement API? It is a REST API stack and data model for tracking inventory and usage of resource providers. Learn more here!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.booksofall.com\/tw\/placement-documentation\/\" \/>\n<meta property=\"og:site_name\" content=\"BooksOfAll Traditional Chinese\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-26T06:39:42+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.booksofall.com\/tw\/wp-content\/uploads\/sites\/3\/2023\/01\/Placement-Documentation.jpg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:image\" content=\"https:\/\/www.booksofall.com\/tw\/wp-content\/uploads\/sites\/3\/2023\/01\/Placement-Documentation.jpg\" \/>\n<meta name=\"twitter:label1\" content=\"\u9810\u4f30\u95b1\u8b80\u6642\u9593\" \/>\n\t<meta name=\"twitter:data1\" content=\"4 \u5206\u9418\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.booksofall.com\/tw\/placement-documentation\/\",\"url\":\"https:\/\/www.booksofall.com\/tw\/placement-documentation\/\",\"name\":\"Placement Documentation - BooksOfAll Traditional Chinese\",\"isPartOf\":{\"@id\":\"https:\/\/www.booksofall.com\/tw\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.booksofall.com\/tw\/placement-documentation\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.booksofall.com\/tw\/placement-documentation\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.booksofall.com\/tw\/wp-content\/uploads\/sites\/3\/2023\/01\/Placement-Documentation.jpg\",\"datePublished\":\"2023-01-26T04:18:43+00:00\",\"dateModified\":\"2023-01-26T06:39:42+00:00\",\"description\":\"Do you know what is Placement API? It is a REST API stack and data model for tracking inventory and usage of resource providers. Learn more here!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.booksofall.com\/tw\/placement-documentation\/#breadcrumb\"},\"inLanguage\":\"zh-TW\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.booksofall.com\/tw\/placement-documentation\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-TW\",\"@id\":\"https:\/\/www.booksofall.com\/tw\/placement-documentation\/#primaryimage\",\"url\":\"https:\/\/www.booksofall.com\/tw\/wp-content\/uploads\/sites\/3\/2023\/01\/Placement-Documentation.jpg\",\"contentUrl\":\"https:\/\/www.booksofall.com\/tw\/wp-content\/uploads\/sites\/3\/2023\/01\/Placement-Documentation.jpg\",\"width\":\"827\",\"height\":\"1169\",\"caption\":\"Placement Documentation\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.booksofall.com\/tw\/placement-documentation\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.booksofall.com\/tw\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Categories\",\"item\":\"https:\/\/www.booksofall.com\/tw\/categories\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Placement Documentation\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.booksofall.com\/tw\/#website\",\"url\":\"https:\/\/www.booksofall.com\/tw\/\",\"name\":\"BooksOfAll Traditional Chinese\",\"description\":\"Biggest IT eBooks library and learning resources - Free eBooks for programming, computing, artificial intelligence and more.\",\"publisher\":{\"@id\":\"https:\/\/www.booksofall.com\/tw\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.booksofall.com\/tw\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-TW\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.booksofall.com\/tw\/#organization\",\"name\":\"BooksOfAll Traditional Chinese\",\"url\":\"https:\/\/www.booksofall.com\/tw\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-TW\",\"@id\":\"https:\/\/www.booksofall.com\/tw\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.booksofall.com\/tw\/wp-content\/uploads\/sites\/3\/2022\/06\/booksofall-logo-2.png\",\"contentUrl\":\"https:\/\/www.booksofall.com\/tw\/wp-content\/uploads\/sites\/3\/2022\/06\/booksofall-logo-2.png\",\"width\":166,\"height\":30,\"caption\":\"BooksOfAll Traditional Chinese\"},\"image\":{\"@id\":\"https:\/\/www.booksofall.com\/tw\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Placement Documentation - BooksOfAll Traditional Chinese","description":"Do you know what is Placement API? It is a REST API stack and data model for tracking inventory and usage of resource providers. Learn more here!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.booksofall.com\/tw\/placement-documentation\/","og_locale":"zh_TW","og_type":"article","og_title":"Placement Documentation - BooksOfAll Traditional Chinese","og_description":"Do you know what is Placement API? It is a REST API stack and data model for tracking inventory and usage of resource providers. Learn more here!","og_url":"https:\/\/www.booksofall.com\/tw\/placement-documentation\/","og_site_name":"BooksOfAll Traditional Chinese","article_modified_time":"2023-01-26T06:39:42+00:00","og_image":[{"url":"https:\/\/www.booksofall.com\/tw\/wp-content\/uploads\/sites\/3\/2023\/01\/Placement-Documentation.jpg","type":"","width":"","height":""}],"twitter_card":"summary_large_image","twitter_image":"https:\/\/www.booksofall.com\/tw\/wp-content\/uploads\/sites\/3\/2023\/01\/Placement-Documentation.jpg","twitter_misc":{"\u9810\u4f30\u95b1\u8b80\u6642\u9593":"4 \u5206\u9418"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.booksofall.com\/tw\/placement-documentation\/","url":"https:\/\/www.booksofall.com\/tw\/placement-documentation\/","name":"Placement Documentation - BooksOfAll Traditional Chinese","isPartOf":{"@id":"https:\/\/www.booksofall.com\/tw\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.booksofall.com\/tw\/placement-documentation\/#primaryimage"},"image":{"@id":"https:\/\/www.booksofall.com\/tw\/placement-documentation\/#primaryimage"},"thumbnailUrl":"https:\/\/www.booksofall.com\/tw\/wp-content\/uploads\/sites\/3\/2023\/01\/Placement-Documentation.jpg","datePublished":"2023-01-26T04:18:43+00:00","dateModified":"2023-01-26T06:39:42+00:00","description":"Do you know what is Placement API? It is a REST API stack and data model for tracking inventory and usage of resource providers. Learn more here!","breadcrumb":{"@id":"https:\/\/www.booksofall.com\/tw\/placement-documentation\/#breadcrumb"},"inLanguage":"zh-TW","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.booksofall.com\/tw\/placement-documentation\/"]}]},{"@type":"ImageObject","inLanguage":"zh-TW","@id":"https:\/\/www.booksofall.com\/tw\/placement-documentation\/#primaryimage","url":"https:\/\/www.booksofall.com\/tw\/wp-content\/uploads\/sites\/3\/2023\/01\/Placement-Documentation.jpg","contentUrl":"https:\/\/www.booksofall.com\/tw\/wp-content\/uploads\/sites\/3\/2023\/01\/Placement-Documentation.jpg","width":"827","height":"1169","caption":"Placement Documentation"},{"@type":"BreadcrumbList","@id":"https:\/\/www.booksofall.com\/tw\/placement-documentation\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.booksofall.com\/tw\/"},{"@type":"ListItem","position":2,"name":"Categories","item":"https:\/\/www.booksofall.com\/tw\/categories\/"},{"@type":"ListItem","position":3,"name":"Placement Documentation"}]},{"@type":"WebSite","@id":"https:\/\/www.booksofall.com\/tw\/#website","url":"https:\/\/www.booksofall.com\/tw\/","name":"BooksOfAll Traditional Chinese","description":"Biggest IT eBooks library and learning resources - Free eBooks for programming, computing, artificial intelligence and more.","publisher":{"@id":"https:\/\/www.booksofall.com\/tw\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.booksofall.com\/tw\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-TW"},{"@type":"Organization","@id":"https:\/\/www.booksofall.com\/tw\/#organization","name":"BooksOfAll Traditional Chinese","url":"https:\/\/www.booksofall.com\/tw\/","logo":{"@type":"ImageObject","inLanguage":"zh-TW","@id":"https:\/\/www.booksofall.com\/tw\/#\/schema\/logo\/image\/","url":"https:\/\/www.booksofall.com\/tw\/wp-content\/uploads\/sites\/3\/2022\/06\/booksofall-logo-2.png","contentUrl":"https:\/\/www.booksofall.com\/tw\/wp-content\/uploads\/sites\/3\/2022\/06\/booksofall-logo-2.png","width":166,"height":30,"caption":"BooksOfAll Traditional Chinese"},"image":{"@id":"https:\/\/www.booksofall.com\/tw\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.booksofall.com\/tw\/wp-json\/wp\/v2\/product\/20122","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.booksofall.com\/tw\/wp-json\/wp\/v2\/product"}],"about":[{"href":"https:\/\/www.booksofall.com\/tw\/wp-json\/wp\/v2\/types\/product"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.booksofall.com\/tw\/wp-json\/wp\/v2\/media\/20130"}],"wp:attachment":[{"href":"https:\/\/www.booksofall.com\/tw\/wp-json\/wp\/v2\/media?parent=20122"}],"wp:term":[{"taxonomy":"product_brand","embeddable":true,"href":"https:\/\/www.booksofall.com\/tw\/wp-json\/wp\/v2\/product_brand?post=20122"},{"taxonomy":"product_cat","embeddable":true,"href":"https:\/\/www.booksofall.com\/tw\/wp-json\/wp\/v2\/product_cat?post=20122"},{"taxonomy":"product_tag","embeddable":true,"href":"https:\/\/www.booksofall.com\/tw\/wp-json\/wp\/v2\/product_tag?post=20122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}