Commit ce346257 authored by Renato Figueiro Maia's avatar Renato Figueiro Maia

[OPENBUS-2682] (Lua) Adicionar suporte a exportação de dados em versões legadas (OpenBus 2.0)

- Novo serviço para conversão de autenticações compartilhadas (falta a conversão de cadeias).
- Arquivos IDL passam a ficar em pastas que imitam a hierarquia de pacotes da IDL para evitar colisão de nomes de arquivos IDL.

git-svn-id: https://subversion.tecgraf.puc-rio.br/engdist/openbus/sdk/lua/trunk@158827 ae0415b3-e90b-0410-900d-d0be9363c56b
parent 8d2b49d8
......@@ -110,9 +110,9 @@ local receiveBusRequest = BaseInterceptor.receiverequest
local unmarshalCredential = BaseInterceptor.unmarshalCredential
local unmarshalSignedChain = BaseInterceptor.unmarshalSignedChain
local oldidl = require "openbus.core.legacy.idl"
local LegacyAccessControlRepId = oldidl.types.services.access_control.AccessControl
local LegacyExportVersion = oldidl.const.data_export.CurrentVersion
local oldexporttypes = oldidl.types.data_export
local LegacyAccessControlRepId = oldidl.types.v2_0.services.access_control.AccessControl
local LegacyExportVersion = oldidl.const.v2_0.data_export.CurrentVersion
local oldexporttypes = oldidl.types.v2_0.data_export
local LegacyExportedCallChainRepId = oldexporttypes.ExportedCallChain
-- must be loaded after OiL is loaded because OiL is the one that installs
......
......@@ -69,23 +69,25 @@ local NoLoginCode = loginconst.NoLoginCode
local UnavailableBusCode = loginconst.UnavailableBusCode
local oldidl = require "openbus.core.legacy.idl"
local loadoldidl = oldidl.loadto
local LegacyCredentialContextId = oldidl.const.credential.CredentialContextId
local oldconst = oldidl.const.v2_0
local oldtypes = oldidl.types.v2_0
local LegacyCredentialContextId = oldconst.credential.CredentialContextId
assert(EncryptedBlockSize == oldidl.const.EncryptedBlockSize)
assert(idl.const.HashValueSize == oldidl.const.HashValueSize)
assert(EncryptedBlockSize == oldconst.EncryptedBlockSize)
assert(idl.const.HashValueSize == oldconst.HashValueSize)
local repids = {
CallChain = idl.types.services.access_control.CallChain,
CredentialData = idl.types.credential.CredentialData,
CredentialReset = idl.types.credential.CredentialReset,
LegacyCallChain = oldidl.types.services.access_control.CallChain,
LegacyCredentialData = oldidl.types.credential.CredentialData,
LegacyCredentialReset = oldidl.types.credential.CredentialReset,
LegacyCallChain = oldtypes.services.access_control.CallChain,
LegacyCredentialData = oldtypes.credential.CredentialData,
LegacyCredentialReset = oldtypes.credential.CredentialReset,
}
local VersionHeader = char(idl.const.MajorVersion,
idl.const.MinorVersion)
local LegacyVersionHeader = char(oldidl.const.MajorVersion,
oldidl.const.MinorVersion)
local LegacyVersionHeader = char(oldconst.MajorVersion,
oldconst.MinorVersion)
local SecretSize = 16
local NullChar = "\0"
......
......@@ -7,9 +7,9 @@ local luaidl = require "luaidl"
local parse = luaidl.parse
local idlspec = [[
#include "access_control.idl"
#include "offer_registry.idl"
#include "data_export.idl"
#include "tecgraf/openbus/core/v2_1/services/access_control.idl"
#include "tecgraf/openbus/core/v2_1/services/offer_registry.idl"
#include "tecgraf/openbus/core/v2_1/data_export.idl"
]]
local idlpath = os.getenv("OPENBUS_IDLPATH")
......
......@@ -20,19 +20,19 @@ for _, parsed in ipairs(parsed) do
end
local idl = {
types = types.tecgraf.openbus.core.v2_0,
const = const.tecgraf.openbus.core.v2_0,
throw = throw.tecgraf.openbus.core.v2_0,
types = types.tecgraf.openbus.core,
const = const.tecgraf.openbus.core,
throw = throw.tecgraf.openbus.core,
}
local ServiceFailure
do
local failure = idl.throw.services.ServiceFailure
local failure = idl.throw.v2_0.services.ServiceFailure
function ServiceFailure(fields)
fields.stacktrace = traceback()
return failure(fields)
end
idl.throw.services.ServiceFailure = ServiceFailure
idl.throw.v2_0.services.ServiceFailure = ServiceFailure
end
function idl.serviceAssertion(ok, errmsg, ...)
......
......@@ -7,6 +7,7 @@ local luaidl = require "luaidl"
local parse = luaidl.parse
local idlspec = [[
#include "tecgraf/openbus/core/v2_1/services/legacy_support.idl"
#include "access_control.idl"
#include "offer_registry.idl"
#include "data_export.idl"
......@@ -21,6 +22,7 @@ end
local Compiler = require "oil.corba.idl.Compiler"
local options = Compiler().defaults
options.incpath = {
idlpath.."/core",
idlpath.."/old",
idlpath.."/scs",
}
......
......@@ -38,21 +38,25 @@ LIBIDL= $(OPENBUSLIBIDL)/openbus.idl
LIBDEPENDENTIDL= $(OPENBUSLIBIDL)/corba.idl
NEWIDL= \
$(OPENBUSNEWIDL)/access_control.idl \
$(OPENBUSNEWIDL)/offer_registry.idl \
$(OPENBUSNEWIDL)/data_export.idl
$(OPENBUSNEWIDL)/tecgraf/openbus/core/v2_1/services/access_control.idl \
$(OPENBUSNEWIDL)/tecgraf/openbus/core/v2_1/services/offer_registry.idl \
$(OPENBUSNEWIDL)/tecgraf/openbus/core/v2_1/data_export.idl
NEWDEPENDENTIDL= \
$(OPENBUSNEWIDL)/core.idl \
$(OPENBUSNEWIDL)/credential.idl \
$(OPENBUSNEWIDL)/tecgraf/openbus/core/v2_1/core.idl \
$(OPENBUSNEWIDL)/tecgraf/openbus/core/v2_1/credential.idl \
$(OPENBUSSCSIDL)/scs.idl
OLDIDL= \
$(OPENBUSNEWIDL)/tecgraf/openbus/core/v2_1/services/legacy_support.idl \
$(OPENBUSOLDIDL)/access_control.idl \
$(OPENBUSOLDIDL)/offer_registry.idl \
$(OPENBUSOLDIDL)/data_export.idl
OLDDEPENDENTIDL= \
$(OPENBUSNEWIDL)/tecgraf/openbus/core/v2_1/services/access_control.idl \
$(OPENBUSNEWIDL)/tecgraf/openbus/core/v2_1/core.idl \
$(OPENBUSNEWIDL)/tecgraf/openbus/core/v2_1/credential.idl \
$(OPENBUSOLDIDL)/core.idl \
$(OPENBUSOLDIDL)/credential.idl \
$(OPENBUSSCSIDL)/scs.idl
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment