tuned VM states and events
authorJiří Filipovič <fila@ics.muni.cz>
Fri, 3 Aug 2012 09:14:27 +0000 (09:14 +0000)
committerJiří Filipovič <fila@ics.muni.cz>
Fri, 3 Aug 2012 09:14:27 +0000 (09:14 +0000)
org.glite.lb.client/examples/job_status.c
org.glite.lb.client/src/EventAttrNames.pl
org.glite.lb.client/src/StatusAttrNames.pl
org.glite.lb.state-machine/src/intjobstat_supp.c
org.glite.lb.state-machine/src/process_event_virtual_machine.c
org.glite.lb.types/events.T
org.glite.lb.types/status.T

index 59f8413..b5c3356 100644 (file)
@@ -388,6 +388,9 @@ static void printstat(edg_wll_JobStat stat, int level)
                printf("%svm_image : %s\n", ind, stat.vm_image);
                printf("%svm_require : %s\n", ind, stat.vm_require);
                printf("%svm_usage : %s\n", ind, stat.vm_usage);
+               printf("%svm_name : %s\n", ind, stat.vm_name);
+               printf("%svm_id : %s\n", ind, stat.vm_id);
+               printf("%svm_phy_hostname : %s\n", ind, stat.vm_phy_hostname);
        }       
 
        printf("\n");   
index 7f5d7d4..abb03dd 100644 (file)
        RESOURCES
        IMAGE
        REQUIRE
-       HOSTVM
+       HOSTNAME
+       ID
 /;
index 82c89e2..ea4723a 100644 (file)
        VM_REQUIRE
        VM_STATE
        VM_USAGE
+       VM_ID
+       VM_NAME
+       VM_PHY_HOSTNAME
 /;
index 6f01118..e28b610 100644 (file)
@@ -581,6 +581,9 @@ char *enc_JobStat(char *old, edg_wll_JobStat* stat)
        if (ret) ret = enc_string(ret, stat->vm_usage);
        if (ret) ret = enc_string(ret, stat->vm_hostname);
        if (ret) ret = enc_string(ret, stat->vm_machine);
+       if (ret) ret = enc_string(ret, stat->vm_id);
+        if (ret) ret = enc_string(ret, stat->vm_name);
+       if (ret) ret = enc_string(ret, stat->vm_phy_hostname);
 
        return ret;
 }
@@ -694,6 +697,9 @@ edg_wll_JobStat* dec_JobStat(char *in, char **rest)
        if (tmp_in != NULL) stat->vm_usage = dec_string(tmp_in, &tmp_in);
        if (tmp_in != NULL) stat->vm_hostname = dec_string(tmp_in, &tmp_in);
        if (tmp_in != NULL) stat->vm_machine = dec_string(tmp_in, &tmp_in);
+       if (tmp_in != NULL) stat->vm_id = dec_string(tmp_in, &tmp_in);
+       if (tmp_in != NULL) stat->vm_name = dec_string(tmp_in, &tmp_in);
+       if (tmp_in != NULL) stat->vm_phy_hostname = dec_string(tmp_in, &tmp_in);
 
        *rest = tmp_in;
 
index ced31f1..3829ee4 100644 (file)
@@ -71,11 +71,16 @@ int processEvent_VirtualMachine(intJobStat *js, edg_wll_Event *e, int ev_seq, in
                        if (USABLE_DATA(res)) {
                                rep_cond(js->pub.vm_require, e->vMCreate.require);
                                rep_cond(js->pub.vm_image, e->vMCreate.image);
+                               rep_cond(js->pub.vm_id, e->vMCreate.id);
+                               rep_cond(js->pub.vm_name, e->vMCreate.name);
+                               rep_cond(js->pub.owner, e->vMCreate.owner);
+                               rep_cond(js->pub.vm_hostname, e->vMCreate.hostname);
+                               rep_cond(js->pub.destination, e->vMCreate.hostname);
                        }
                        break;
                case EDG_WLL_EVENT_VMHOST:
                        if (USABLE_DATA(res)) {
-                               rep_cond(js->pub.vm_hostname, e->vMHost.hostvm);
+                               rep_cond(js->pub.vm_phy_hostname, e->vMHost.hostname);
                                //XXX transfer to prolog/boot state?
                        }
                        break;
index abad712..49352a6 100644 (file)
 @type VMCreate                 create (register) virtual machine
        string image            machine image
        string require          machine requirements
+       string id               machine id
+       string name             machine name
+       string owner            machine owner
+       string hostname         hostname of VM
 
 @type VMHost
-       string hostvm           hostname of VM
+       string hostname         hostname of physical machine of VM
 
 @type VMRunning                        VM is running
 
index e93b31a..064dde8 100644 (file)
@@ -197,6 +197,9 @@ string      vm_require              VM requirement on physical machine
 string vm_usage                VM usage
 string vm_hostname             VM hostname
 string vm_machine              physical machine on which VM runs
+string vm_id                   VM id
+string         vm_name                 VM name
+string vm_phy_hostname         hostname of physical machine running VM
 
 _pad_  20