Reply to Message

View discussion in a popup

Replying to:
amrainders
Enthusiast
Enthusiast

Hi Marco,

You have two options :-

  • You can find out the ids of the following computing resource from database directly. You need to look at CB_SERVER_PROPERTY table invCenter chargeback database. Once the computing resource ids are generated for a particular vCenter Chargeback installation they are fixed and will not change.
    1. Count of Networks-->SERVER_PROPERTY_NAME="Count Of Networks",PROPERTY_CATEGORY="vcloud"-->column SERVER_PROPERTY_VALUE will give you id
    2. NAT Service-->SERVER_PROPERTY_NAME="NAT Service",PROPERTY_CATEGORY="vcloud"-->column SERVER_PROPERTY_VALUE will give you id
    3. DHCP Service-->SERVER_PROPERTY_NAME="FIREWALL Service",PROPERTY_CATEGORY="vcloud"-->column SERVER_PROPERTY_VALUE will give you id
    4. Firewall Service-->SERVER_PROPERTY_NAME="DHCP Service",PROPERTY_CATEGORY="vcloud"-->column SERVER_PROPERTY_VALUE will give you id
    5. External Network Transfer-->SERVER_PROPERTY_NAME="External Network Transfer",PROPERTY_CATEGORY="vcloud"-->column SERVER_PROPERTY_VALUE will give you id
    6. External Network Receive-->SERVER_PROPERTY_NAME="External Network Receive",PROPERTY_CATEGORY="vcloud"-->column SERVER_PROPERTY_VALUE will give you id

  • Another option is to find out the computing resource ids using APIs (but as it is only one time effort, I think first approach should be better)

Call "Search, POST <Base_URL>/search" API, the input xml for calling this API will look like

<Request>
    <SearchQueries>
        <SearchQuery id="serverProperty">
            <Criteria type="AND">
                <Filter name="propertyCategory" type="EQUAL" value="vcloud" />
            </Criteria>
            <SortBy>
                <Params>
                    <Param index="1" order="ASC">serverPropertyName</Param>
                </Params>
            </SortBy>
            <Pagination>
                <FirstResultCount>0</FirstResultCount>
                <MaxResultCount>100</MaxResultCount>
            </Pagination>
        </SearchQuery>
    </SearchQueries>
</Request>
The response will return you all the properties having category as "vcloud", out of these properties you can filter out the properties relevant to you based on name (e.g. "Count of Networks") and get the computing resource id from the value.
I hope this helps.
-Amrainder

View solution in original post

Reply
0 Kudos