WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-api

Re: [Xen-API] Unlisted error message CREATE_UNSPECIFIED_ATTRIBUTE

To: Leonelli Mauro <m.leonelli@xxxxxxxx>
Subject: Re: [Xen-API] Unlisted error message CREATE_UNSPECIFIED_ATTRIBUTE
From: Christopher Winslett <christopherwinslett@xxxxxxxxx>
Date: Wed, 7 Oct 2009 11:18:30 -0500
Cc: "xen-api@xxxxxxxxxxxxxxxxxxx" <xen-api@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 07 Oct 2009 09:18:52 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type; bh=JEmPBo0IXC1c3sx780KcbGY9Yr/Q/a/ls4xmk4HIxtQ=; b=KInxN6v0cdvnDLEbYPx30qrOlPwO6lk/T3wBnFVePGLrY2rTz5xJyJK0F/TwOuTj1u 3Kotu+bRHDY6I59hEvYsB3H0U7hPIMqFsJnP/VkFechsCXsw77uCSBA0IX55p07mLd9k 2WqQD0MzHdO+rJ74T24y2QTbvTncyxRu44dqk=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=L2bQI1X0yUCr+w5ElMQb/Cm37Gh0IsAMxOAYsKWxdprDO5LRJ8Kgtj4zxI48oo+GuF qAJiynYoqazW447MKUrhvzsdMXu5npMHI0Jt/OsITQ74zUwt0kymSpbqVEYhYa++YrFI lBMAN1YZBHNkrb/ihFahbIIpvgDLK9mCq95DU=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <29193D68FFD49B4A879F7A0E51F5F28301477D132A1D@xxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-api-request@lists.xensource.com?subject=help>
List-id: Discussion of API issues surrounding Xen <xen-api.lists.xensource.com>
List-post: <mailto:xen-api@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-api>, <mailto:xen-api-request@lists.xensource.com?subject=unsubscribe>
References: <29193D68FFD49B4A879F7A0E51F5F28301477D132A1A@xxxxxxxxxxxxxxxxxxxxxxxxx> <96a7a7780910070831u83aa9d0nddef3e9e6c60501b@xxxxxxxxxxxxxx> <29193D68FFD49B4A879F7A0E51F5F28301477D132A1D@xxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-api-bounces@xxxxxxxxxxxxxxxxxxx
First off, networks don't take a "default_netmask" or "default_gateway".  They are simply VLANS connected to a PIF (physical interface) on the host.

I use Ruby for my demoing, and I've included a sample below.  If you can install Ruby, I've got a solution for finding answers.  Else, I'm out.  Of course on the following example, I've left out A LOT of possible steps, but you can see the basics.  Use the XEN Enterprise API documentation to find the commands.  After you install Ruby, run the following from command prompt:

# Run this from the command prompt, it will start the Interactive Ruby shell
irb

# Import the XMLRPC/Client library
require 'xmlrpc/client'

# For the following, insert the URL for your Connection
s = XMLRPC::Client.new2("https://localhost")

# Get your Session ID, use your API username and password
sid = s.call("session.login_with_password", "username", "password")["Value"] 

# Get a Network ID
network_id = s.call("network.get_all_records", sid)["Value"].keys.first

# Get the Network Information
s.call("network.get_record", sid, network_id)

# Create a New Newtork
new_network_id = s.call("network.create", sid, {:name_label => "Test Network", :name_description => "Testing - Please Delete Later", :other_config => {}})["Value"]

# Get New Network information
s.call("network.get_record", sid, new_network_id)

# Delete New Network
s.call("network.destroy", sid, new_network_id)


On Wed, Oct 7, 2009 at 10:35 AM, Leonelli Mauro <m.leonelli@xxxxxxxx> wrote:

Hi Christian,

unfortunately I don’t have any other information on the error because I’m using XenAPI xml-rpc from C#, I imagine.

 

Anyway here’s the code snippet. Haven’t found any other thread on that, I’m coding quick and dirty to find out how to make it work (think that green lines could be optional).

 

System.Collections.Hashtable hash = new System.Collections.Hashtable();

            hash.Add("name_label", "br69");

            hash.Add("name_description", "br69");

            hash.Add("default_netmask", "255.255.255.0");

            hash.Add("default_gateway", "10.40.3.1");

            hash.Add("other_config", null);

            XenAPI.Network.create(_session, new XenAPI.Network(hash));

 

ml

 

From: Christopher Winslett [mailto:christopherwinslett@xxxxxxxxx]
Sent: mercoledì 7 ottobre 2009 17.32
To: Leonelli Mauro
Cc: xen-api@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-API] Unlisted error message CREATE_UNSPECIFIED_ATTRIBUTE

 

What parameters are you passing?

 

Typically, when you get an error from the server, it will have more information than you've given.  For instance, if you pass an unspecified attribute, it will tell you the attribute that is unspecified.

 

cw

 

On Wed, Oct 7, 2009 at 10:27 AM, Leonelli Mauro <m.leonelli@xxxxxxxx> wrote:

Hi,

I’m trying to create a new XenAPI.Network  but keep on receiving the error CREATE_UNSPECIFIED_ATTRIBUTE

My final goal is to create different Virtual Interfaces each of them on a different bridge and it seems to me that the only way Is to create a different Network for each bridge I want to use, am I right?

 

Sincerely,

Mauro

 


--
The information transmitted is intended for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.


_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api




--
Christopher Winslett
christopherwinslett@xxxxxxxxx



--
The information transmitted is intended for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.

_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api




--
Christopher Winslett
christopherwinslett@xxxxxxxxx
_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api
<Prev in Thread] Current Thread [Next in Thread>