VMware {code} Community
nandeesh
Contributor
Contributor

Chassis data store on restart

Hi ,

I am trying to retrieve all chassis objects on restart of vcenter server.

Hence I am putting each chassis object info (chassis name and server type) in file.Apart from these details do i need to store vimobjectRef.If yes, then how it will be retained on server restart?

When vcenter server is resarted,i am reading file content from file.

Using this chassis object info from file,i want to re-construct all the chassis object.How can I do so?

In this case for chassis object creation,the flow should it be from ui-service layer or can i create object in service layer itself(then how object context will be reachable to ui).

Since I am using object context for further reference.

Thanks in advance.


Tags (1)
0 Kudos
8 Replies
a_p_
Leadership
Leadership

Discussion moved from Community Website Help to VMware vCloud™ API

If you think another forum fits better, please let me know and I will move your question to it.

André

0 Kudos
nandeesh
Contributor
Contributor

This question is related to vsphere webclient sdk.Please move to appropriate forum.Help appreciated.

0 Kudos
a_p_
Leadership
Leadership

0 Kudos
laurentsd
VMware Employee
VMware Employee

nandeesh.

I already answered your previous question on that topic.  Let me know if anything is still unclear.

0 Kudos
nandeesh
Contributor
Contributor

Hi Laurentsd,

We have a requirement to retain the information after we reboot the vCenter Server.

For this reason we have introduced the DB to store the information. We have absolutely NO issue to store and fetch DB in the service layer.

We are fetching the DB info on click of “+”

We are referring the chasis sample code for our product.

The issue we are facing is how to translate info fetched from DB into creating  and populating in UI.

  1. Can we create an Object from the stored vimobjectRef? If Yes how do we create ? if NO what is the way to create and populate the UI(immediate load in ui).?

As with each objects associated tab, I am  sending context to perform backend operation and data population is happening in ui for that object.

  1. What should the flow, should it be from front end to back end OR from back end to front end ?
  2. Request you to please provide some sample code/suggestion for this situation.

Thanks a lot.

Thanks,

Nandeesh

0 Kudos
laurentsd
VMware Employee
VMware Employee

(I prefer to be called by my first name, Laurent.  Not by my forum pseudonym, thanks)

> Can we create an Object from the stored vimobjectRef?

I am assuming that "stored vimobjectRef" means the data you are storing in your DB.

In your case, creating an object in response to the user clicking the + button should be implemented by adding a new record in your DB.   I am assuming you are storing all the object properties that need to be persisted.

> What should the flow, should it be from front end to back end OR from back end to front end ?

The client is responsible for making requests to populate its views, lists, etc.  The user is always in control of the UI, the server doesn't dictate what views or objects to display, it just does it job of passing data back and forth based on the queries and service calls it receives.

Our SDK samples and doc describe those use cases, I don't have anything new at this time.  If a use case is still not clear, please be very precise in describing the problem, including screen-shots and specific object data.

0 Kudos
nandeesh
Contributor
Contributor

Thanks,

If I use stored vimobjectRef, how can I construct object from that?

Without storing vimobjectref ,is it possible to construct object?

Also how does ui will get refreshed with these objects.

Based on the UI query, If i try to create objects and load all the objects,then i assume it will slow down the ui.

Can I create an Object which can be recognized by VCener Server and vSphere UI using a data from the DB.

And can I send the data from Service Layer to the UI layer for getting it displayed on the UI. Since we need a

data that need to be sent from Service to UI that is stored in backend DB we need this functionality to be implemented.

I feel there might be some API which will internally modify the DB data to vimObjectRef or any object type that is being recognized by vCenter Server.

Can you please let me know whether our understanding is correct on this front.

0 Kudos
laurentsd
VMware Employee
VMware Employee

> If I use stored vimobjectRef, how can I construct object from that?

You can't.  You need to persist the object data not the reference.

> Based on the UI query, If i try to create objects and load all the objects,then i assume it will slow down the ui.

Your data adapter doesn't know and doesn't care where the query comes from and how the data is used by the UI. It's only job is to return data based on the querySpec parameter.

> Can I create an Object which can be recognized by VCener Server and vSphere UI using a data from the DB.

Data adapters are for returning data to the UI.  I am not sure what you mean by "recognized by vCenter server".  vCenter only manages vSphere objects, not custom objects like the chassis and racks of the SDK sample.

It looks like you are still confused about the Web Client architecture. Have another look at the Programming Guide PDF and the HTML docs in the SDK.  Run the samples while setting break-points in the service and data adapter code to understand what happens.

0 Kudos