[omniORB] [help] [beginner] cannot run naming service examples
from python chapter 2 "The Basics"
Alistair Bayley
alistair at abayley.org
Thu Sep 1 17:29:55 BST 2011
On 31 August 2011 21:38, Duncan Grisby <duncan at grisby.org> wrote:
> On Wed, 2011-08-31 at 10:24 +1200, Alistair Bayley wrote:
>
>> I find it odd that this works:
>> InitRef = NameService=corbaname::127.0.0.1
>>
>> but this does not:
>> InitRef = NameService=corbaname::localhost
>>
>> To me they should be equivalent.
>
> They should be, yes. What is in /etc/hosts ?
127.0.0.1 localhost
127.0.1.1 abayley-desktop desktop
172.30.135.152 pyramid1
172.30.135.153 wsoss1
172.30.135.154 pyramid2
172.30.135.151 wsoss2
172.30.135.155 fms-poll-1
and then some ipv6 stuff.
> Can you upgrade to omniORB 4.1.6? That has better logging of name
> resolution, and has some changed logic around use of resolved names that
> may fix the issue.
Not easily. I prefer to use the distribution (ubuntu 10.04) packages,
and the machine I will deploy on has even older versions of python and
omniorb. I'm satisfied with using 127.0.0.1 for testing; when I deploy
to our dev environment, it all runs ok, so this problem is localised
top my machine.
BTW, how is one meant to construct python objects from IDL enums? I
have this IDL:
enum Status {ok, late, failed};
which generates this python code:
# enum Status
_0_fmsWatchdog.ok = omniORB.EnumItem("ok", 0)
_0_fmsWatchdog.late = omniORB.EnumItem("late", 1)
_0_fmsWatchdog.failed = omniORB.EnumItem("failed", 2)
_0_fmsWatchdog.Status = omniORB.Enum("IDL:fmsWatchdog/Status:1.0",
(_0_fmsWatchdog.ok, _0_fmsWatchdog.late, _0_fmsWatchdog.failed,))
_0_fmsWatchdog._d_Status = (omniORB.tcInternal.tv_enum,
_0_fmsWatchdog.Status._NP_RepositoryId, "Status",
_0_fmsWatchdog.Status._items)
_0_fmsWatchdog._tc_Status =
omniORB.tcInternal.createTypeCode(_0_fmsWatchdog._d_Status)
omniORB.registerType(_0_fmsWatchdog.Status._NP_RepositoryId,
_0_fmsWatchdog._d_Status, _0_fmsWatchdog._tc_Status)
How do I get from a Status value to the matching integer e.g.
fmsWatchdog.ok => 0 ?
Alistair
More information about the omniORB-list
mailing list