On Sun, Mar 02, 2014 at 11:56:16AM +0800, Jinquan Liu wrote:
>    Looping my working account mail...
>    --
> 
>    Best Regards
> 
>    Jinquan
>    At 2014-03-02 11:53:20,"Jinquan Liu" <liujq...@126.com> wrote:
> 
>    Hi dear sir,
> 
> 
>    I'm using your generateDS to generate python classes for vmware vcloud
>    API schema.  I did some testing, but found some issues.
> 

Jinquan,

Thank you for your report.  I appreciate the information and details
that you have provided.  I'll look into it this week.

I just now checked some of my past work files, notes, etc.  Looks
like I did some work and testing with vcloud and vloud.xsd, but it
was back in 2011.  That schema has likely changed since then.  I'll
do some more testing with the new version.  I was able to find the
1.5 version schemas at vmware.com.

Dave

> 
>    1. Some elements in "1.xml" are not serialized.
>    e.g. <NetworkConfigSection>, <LeaseSettingsSection>, etc.
> 
>    The parent <VApp> contains elements of Sections. But in my xml, they
>    may be occurred as elements like <NetworkConfigSection> whose type is
>    the inherited from Section_Type. So the name may not be !DEGSection!+-.
> 
>    <VApp xmlns="http://www.vmware.com/vcloud/v1.5";
>    xmlns:ovf="http://schemas.dmtf.org/ovf/envelope/1";
> 
>            xmlns:environment_1="http://schemas.dmtf.org/ovf/environment/1";
>    href="xs:anyURI" type="xs:string" id="xs:string"
>    operationKey="xs:string"
> 
>            name="xs:string" status="xs:int" deployed="xs:boolean"
>    ovfDescriptorUploaded="xs:boolean">
> 
>        ...
> 
>        <ovf:Section> ovf:Section_Type </ovf:Section>
> 
>        ...
> 
>    </VApp>
>    In the vcloud.py that generated from schema, I found below code. I
>    think it!-s not enough just use the tag name to judge the type. Do you
>    have some good idea?
> 
>    def buildChildren(self, child_, node, nodeName_, fromsubclass_=False):
> 
>            if nodeName_ == 'VAppParent':
> 
>                class_obj_ = self.get_class_obj_(child_, ReferenceType)
> 
>                obj_ = class_obj_.factory()
> 
>                obj_.build(child_)
> 
>                self.VAppParent = obj_
> 
>            elif nodeName_ == 'Section':
> 
>                class_obj_ = self.get_class_obj_(child_, Section_Type)
> 
>                obj_ = class_obj_.factory()
> 
>                obj_.build(child_)
> 
>                self.Section.append(obj_)
> 
>            elif nodeName_ == 'DateCreated':
> 
>                sval_ = child_.text
> 
>                dval_ = self.gds_parse_datetime(sval_)
> 
>                self.DateCreated = dval_
> 
>            super(AbstractVAppType, self).buildChildren(child_, node,
>    nodeName_, True)
> 
> 
>    2. I tried use !DEG!-aone-file-per-xsd!+- option to generate code, but
>    got issues as below:
> 
>    Traceback (most recent call last):
> 
>      File "generateDS.py", line 5, in <module>
> 
>        pkg_resources.run_script('generateDS==2.12b', 'generateDS.py')
> 
>      File "build\bdist.win32\egg\pkg_resources.py", line 488, in
>    run_script
> 
>      File "build\bdist.win32\egg\pkg_resources.py", line 1345, in
>    run_script
> 
>      File
>    "C:\Python27\lib\site-packages\generateds-2.12b-py2.7.egg\EGG-INFO\scri
>    pt
> 
>    s\generateDS.py", line 6286, in <module>
> 
> 
>      File
>    "C:\Python27\lib\site-packages\generateds-2.12b-py2.7.egg\EGG-INFO\scri
>    pt
> 
>    s\generateDS.py", line 6274, in main
> 
> 
>      File
>    "C:\Python27\lib\site-packages\generateds-2.12b-py2.7.egg\EGG-INFO\scri
>    pt
> 
>    s\generateDS.py", line 5918, in parseAndGenerate
> 
> 
>    IOError: [Errno 22] invalid mode ('r') or filename:
>    'http://www.w3.org/2001/xml.
> 
>    xsd'
> 
>    --
> 
>    Best Regards
> 
>    Jinquan

-- 

Dave Kuhlman
http://www.davekuhlman.org

------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
_______________________________________________
generateds-users mailing list
generateds-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/generateds-users

Reply via email to