+}
+
+static int Host_set_property(lua_State* L)
+{
+ p_AS_attr p_as;
+ p_host_attr p_host;
+ unsigned int i,j;
+ const char* host_id ="";
+ const char* prop_id = "";
+ const char* prop_value = "";
+ if (lua_istable(L, -1)) {
+ // get Host id
+ lua_pushstring(L, "host");
+ lua_gettable(L, -2);
+ host_id = lua_tostring(L, -1);
+ lua_pop(L, 1);
+ // get Function Name
+ lua_pushstring(L, "prop_id");
+ lua_gettable(L, -2);
+ prop_id = lua_tostring(L, -1);
+ lua_pop(L, 1);
+ //get args
+ lua_pushstring(L,"prop_value");
+ lua_gettable(L, -2);
+ prop_value = lua_tostring(L,-1);
+ lua_pop(L, 1);
+ }
+ xbt_dynar_foreach(as_list_d, i, p_as)
+ {
+ xbt_dynar_foreach(p_as->host_list_d, j, p_host) {
+ if (p_host->id == host_id) {
+ xbt_dict_set(p_host->properties, prop_id, xbt_strdup(prop_value), free);
+ }
+ }
+ }
+ return 1;
+