Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - sirex

Pages: [1]
1
Installation and Upgrades / Re: Will aptitude updates break ebox?
« on: January 26, 2009, 11:04:44 am »
I'm not willing to say either way *for sure*, but normally a package will say "this package includes the file X which you also have and have altered, do you with to keep, remove, install theirs, view differences (etc etc)".

also, apt-get upgrade -s (simulation) might be handy to you, i don't know if that does file bashing checks or if its solely for package dependency simulation.

i suggest backing your altered files up as good practice anyhow, however.

2
virtual machine ?

3
The way or more precisely the moment when we fetch the options for a select type is broken in the current version and if you do what you are trying you end up with deep recursion. This is already fix in my development branch.


is this in svn trunk now ? - i just built the trunk modules and its still giving me this behavior leading to deep recursion

4
digging this up, as i could really do with asking.

is the source code for the unstable/unmaintained/unloved control center available ? - being able to see how it operated might really help me, even if its not fully functional.

5
do you mean, your mail server is allowing mail relay ? - or that you dont have authentication enabled for your smtp server ?

6
Installation and Upgrades / Re: autoUnique type, and parentRows question
« on: December 19, 2008, 03:37:20 pm »
blimey that one totally beat me :) thanks !

that dir code you gave (below) is pretty cool. I think i just about understand it,
  my @dirs = split('/', $self->model()->directory());
  my $parentRow = $self->model()->parent()->row($dirs[2]);

not entirely sure why you cant do
   $nodeId = $self->model()->row()->valueByName('nodeId');   

to access the sub model (which $self is pointing to), but if you're adding $self support in the future i wont worry about it too much.


7
Installation and Upgrades / Re: autoUnique type, and parentRows question
« on: December 19, 2008, 12:49:48 pm »
does this also mean that doing

$network = EBox::Global::modInstance('network');

in a populate function is going to cause issues ? i wouldnt think so, but

 ClientRawBase.pm:207 EBox::CGI::ClientRawBase::__ANON__ - Exception: Missing argument: module's name
No name provided on Module creation

I dont know how this error ties up to that line of code as the module name is given, but commenting that line removes the error.

its all very odd :)

8
Installation and Upgrades / Re: autoUnique type, and parentRows question
« on: December 18, 2008, 09:17:48 am »
sorry i've been ill a few days. Thank you for the workaround to the populate function (and it's good to see ebox development moving on in leaps and bounds)

yes, my printableValue and value are one and the same.

9
Installation and Upgrades / Re: autoUnique type, and parentRows question
« on: December 15, 2008, 12:43:54 pm »
the problem of not having $self available in the populate functions is *really* doing my head in !

in another example; i have one module that needs to contact 3 other modules from a populate function and ask them for an array to be returned from each, but it also needs to return an array of its own based on its own rows. I've tried a few ways to do it, which revolve around making a modInstance of itself, but then i get a deep recursion and ebox crashes.

(why is a populate function called at all on a modInstance ??? - its as if ebox treats the function as a constructor for the field that it must call).

10
Installation and Upgrades / Re: autoUnique type, and parentRows question
« on: December 15, 2008, 09:30:19 am »
thanks. :-) sixstone had mentioned the rowaddnotify function. i previously thought it was meant as an observer function for other modules. extra thanks for the code example  ! :)

11
Installation and Upgrades / autoUnique type, and parentRows question
« on: December 12, 2008, 12:46:11 pm »
currently working on two problems....

firstly, i have a module with a select type, that calls a function to populate it.

new EBox::Types::Select ('fieldName' => 'unicastIp', 'printableName' => __('Unicast IP'),   'populate' => \&_unicastChoice,   'editable' => 1),

with the mentioned function starting like this:

sub _unicastChoice
{
   my ($self) = @_;
   if ($self->row()->parentRow()->valueByName('isLocal')){


i get an error regarding $self being unassigned, but i've seen this syntax used in the openVPN module's DownloadClientBundle.pm file. The only difference i can see if that the function there isn't called as a populating function, but as a normal function->function call. Does this mean i cant access $self within a populating function of a select type ? Is there a workaround for this ?


second problem !

i have a (different) module that requires an ID type field for each row. it must be unique, and it must be lower than 254. I decided the easiest way to do this was just have a select type with a drop down menu of only one choice, and write a quick function that generates a random number (lower than 255) and then checks if the number is in use. If the number isn't in use, it fills the select box and returns it.

This works, except once i save the form i get an error that the option given (the only one in the select field choices) "isn't a member of the available set" (it then gives the "set" which is also just one number less than 255). I can only assume this is because the populate function is called again during save (no idea why it would be, though).

I'm pretty sure you can somehow call a function when a row is added and add the value directly as a hidden field, but i don't know how thats done and i couldn't find it in the V11/V12 documentation.

Better, imho would be the addition of an "autoUnique" field type, as i'm pretty sure a lot of modules must use Id type fields and doing manual checks every time for its uniqueness is a bit of a pain. In my case i don't think this will work as the number must be within 0 and 254 inclusive, but it would help in the future.

(as an aside: i was going just count how many rows i have and make the field rows+1, but then it occurred to me that when you delete a row this method will go pear shaped).

Thanks for your time.

12
do you know if multi user / filtering is planned at all ? -- if not can i request it ? (beers to whoever checks it in :)

the control center being diffrent might or might not matter to me, it'll depend on what the info is once its available - just wanted to know if its a waste of time configuring the modules to work with the current control center layout.

13
Installation and Upgrades / Few questions - filtering and control center
« on: December 04, 2008, 04:31:23 pm »
Is it possible to filter the configuration parameters for a module  (as in, the configuration parameter for the daemon the module controls) so that there is a layering effect. A basic user could only alter some details, and an advanced user could alter more. Can this be done with passwords / diffrent users / having a popup dialog asking you to enter a password of a user with higher privileges ?

Will the new control center (in 02/09 or so) alter from the current mechanism of the control center in any major way ? (still vpn, https, and SOAP?). Will the soap interfaces needed to communicate with it alter in any way ?


14
(reusing topic to keep forum clean)

- is anyone able to give a short summery of the status of ebox'es soap implementation ? - i read somewhere that it was in the planning stages

15
Installation and Upgrades / support for python module development ?
« on: August 11, 2008, 05:01:54 pm »
hello. -- i'm looking at creating a custom module for ebox, however i see ebox relies upon perl for writing the modules. Is there any ability to write these modules in python, or is there any plans for this to be possible in the future ?

The module would be fairly complicated and would need ongoing maintenance / development, so i'd like to avoid a language like perl, aside from the hassle of picking it up for this task.

Pages: [1]