MINOR: lua: add uuid to the Class Proxy

the proxy UUID parameter is not set in the Lua Proxy Class.
This patches adds it.
This commit is contained in:
Baptiste Assmann 2017-10-26 21:51:58 +02:00 committed by Willy Tarreau
parent 48b4bb4b09
commit 46c72551f3
2 changed files with 10 additions and 0 deletions

View File

@ -823,6 +823,10 @@ Proxy class
Contain the name of the proxy.
.. js:attribute:: Proxy.uuid
Contain the unique identifier of the proxy.
.. js:attribute:: Proxy.servers
Contain an array with the attached servers. Each server entry is an object of

View File

@ -781,6 +781,12 @@ int hlua_fcn_new_proxy(lua_State *L, struct proxy *px)
lua_pushstring(L, px->id);
lua_settable(L, -3);
/* Add proxy uuid. */
lua_pushstring(L, "uuid");
snprintf(buffer, sizeof(buffer), "%d", px->uuid);
lua_pushstring(L, buffer);
lua_settable(L, -3);
/* Browse and register servers. */
lua_pushstring(L, "servers");
lua_newtable(L);