<div dir="ltr">Hi Ruben,<div><br></div><div><div style="font-size:13px">The fieldnames you care about are the fields as they show up in the JSON that gets returned from the magnum-client methods inside the datasource driver, e.g. from these methods...</div><div style="font-size:13px"><br></div><div style="font-size:13px">self.magnum.cluster_template.list()<br></div><div style="font-size:13px">self.magnum.cluster.list()<br></div><div style="font-size:13px"><br></div><div style="font-size:13px">Several ways to check that you have the right fields..</div><div style="font-size:13px">1) Suppose your Murano driver is running inside of Congress, and you've created an instance of it. </div><div style="font-size:13px">$ openstack congress datasource create magnum magnum ...</div><div style="font-size:13px">$ openstack congress datasource list</div><div style="font-size:13px"><see your instance in the list></div><div style="font-size:13px">You know you have the right fields in the driver if you're getting data in the Murano datasource instance.</div><div><span style="font-size:13px">$ openstack congress datasource row list magnum cluster</span></div><div><div><span style="font-size:13px">$ openstack congress datasource row list magnum cluster_template</span></div><br class="inbox-inbox-Apple-interchange-newline"></div><div>2) If that doesn't work, check what JSON data magnum is returning on the CLI by adding the --debug parameter to the magnum CLI commands.</div><div>[I haven't used magnum's client, but it looks to be using the standard openstack client, so should support --debug.]</div><div><br></div><div>$ magnum cluster-template-list --debug </div><div style="font-size:13px"><br></div><div style="font-size:13px">You'll need to wade through the output to find the JSON that gets returned from the server.</div><div style="font-size:13px"><br></div><div style="font-size:13px">3) If you think you have the right field names in the congress translators, but you're still not seeing data in the Murano datasource instance, you'll probably want to look at the congress logs. It looks like you have the right log.DEBUG statements in there. One trick is to disable all the datasources in congress other than your own to minimize the logs you need to look through. Another is to change your log.DEBUG to log.WARNING temporarily so your messages show up more clearly in the log.</div><div style="font-size:13px"><br></div><div style="font-size:13px">You can look at logs from the command line with:</div><div style="font-size:13px">$ less -R /opt/stack/logs/congress.log<br></div><div style="font-size:13px"><p class="inbox-inbox-p1"><span class="inbox-inbox-s1">Or go into 'screen -x', go to the Congress window, and look at the output in real time. You'll want a tutorial on screen if you haven't used it.</span></p><p class="inbox-inbox-p1"><span class="inbox-inbox-s1"><br></span></p><p class="inbox-inbox-p1"><span class="inbox-inbox-s1">Tim</span></p><p class="inbox-inbox-p1"><span class="inbox-inbox-s1"><br></span></p></div><br><div class="gmail_quote"><div dir="ltr">On Wed, Nov 16, 2016 at 9:37 AM Ruben <<a href="mailto:r.manganiello1@studenti.unisa.it">r.manganiello1@studenti.unisa.it</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi everybody,<br class="gmail_msg">
first of all: Tim thanks for your help.<br class="gmail_msg">
<br class="gmail_msg">
I've read the code in python-magnumclient/magnumclient/v1/cluster_templates_shell.py and in python-magnumclient/magnumclient/v1/clusters_shell.py, so I've modify the translators in the magnum_driver according to _show_cluster_template(cluster_template) and _show_cluster(cluster) methods shown in these files.<br class="gmail_msg">
Are these the methods to be taken into account for the translation?<br class="gmail_msg">
Anyway I don't know if I made mistakes in the translation..<br class="gmail_msg">
<br class="gmail_msg">
I've some doubts because if I made the CLI command 'magnum cluster-template-list' I have:<br class="gmail_msg">
<br class="gmail_msg">
+--------------------------------------+----------------------+<br class="gmail_msg">
| uuid | name |<br class="gmail_msg">
+--------------------------------------+----------------------+<br class="gmail_msg">
| 8d25a1ed-faa6-4305-a6a1-6559708c805b | k8s-cluster-template |<br class="gmail_msg">
+--------------------------------------+----------------------+<br class="gmail_msg">
<br class="gmail_msg">
and if I made the CLI command 'magnum cluster-template-show k8s-cluster-template' I have:<br class="gmail_msg">
<br class="gmail_msg">
+-----------------------+--------------------------------------+<br class="gmail_msg">
| Property | Value |<br class="gmail_msg">
+-----------------------+--------------------------------------+<br class="gmail_msg">
| insecure_registry | - |<br class="gmail_msg">
| labels | {} |<br class="gmail_msg">
| updated_at | - |<br class="gmail_msg">
| floating_ip_enabled | True |<br class="gmail_msg">
| fixed_subnet | - |<br class="gmail_msg">
| master_flavor_id | my |<br class="gmail_msg">
| uuid | 8d25a1ed-faa6-4305-a6a1-6559708c805b |<br class="gmail_msg">
| no_proxy | - |<br class="gmail_msg">
| https_proxy | - |<br class="gmail_msg">
| tls_disabled | False |<br class="gmail_msg">
| keypair_id | testkey |<br class="gmail_msg">
| public | False |<br class="gmail_msg">
| http_proxy | - |<br class="gmail_msg">
| docker_volume_size | 7 |<br class="gmail_msg">
| server_type | vm |<br class="gmail_msg">
| external_network_id | public |<br class="gmail_msg">
| cluster_distro | fedora-atomic |<br class="gmail_msg">
| image_id | fedora-atomic-latest |<br class="gmail_msg">
| volume_driver | - |<br class="gmail_msg">
| registry_enabled | False |<br class="gmail_msg">
| docker_storage_driver | devicemapper |<br class="gmail_msg">
| apiserver_port | - |<br class="gmail_msg">
| name | k8s-cluster-template |<br class="gmail_msg">
| created_at | 2016-11-11T11:38:25+00:00 |<br class="gmail_msg">
| network_driver | flannel |<br class="gmail_msg">
| fixed_network | - |<br class="gmail_msg">
| coe | kubernetes |<br class="gmail_msg">
| flavor_id | m1.tiny |<br class="gmail_msg">
| master_lb_enabled | False |<br class="gmail_msg">
| dns_nameserver | 193.205.160.3 |<br class="gmail_msg">
+-----------------------+--------------------------------------+<br class="gmail_msg">
<br class="gmail_msg">
So fields that I see here are a litte bit different from fields in the methods above mentioned.<br class="gmail_msg">
Same thing for cluster.<br class="gmail_msg">
<br class="gmail_msg">
'magnum cluster-list'<br class="gmail_msg">
<br class="gmail_msg">
+--------------------------------------+-------------+------------+------------+--------------+---------------+<br class="gmail_msg">
| uuid | name | keypair_id | node_count | master_count | status |<br class="gmail_msg">
+--------------------------------------+-------------+------------+------------+--------------+---------------+<br class="gmail_msg">
| 1634beb9-25de-4cdd-bafa-67537069f0cc | k8s-cluster | testkey | 1 | 1 | CREATE_FAILED |<br class="gmail_msg">
+--------------------------------------+-------------+------------+------------+--------------+---------------+<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
'magnum cluster-show k8s-cluster'<br class="gmail_msg">
<br class="gmail_msg">
+---------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+<br class="gmail_msg">
| Property | Value |<br class="gmail_msg">
+---------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+<br class="gmail_msg">
| status | CREATE_FAILED |<br class="gmail_msg">
| cluster_template_id | 8d25a1ed-faa6-4305-a6a1-6559708c805b |<br class="gmail_msg">
| node_addresses | [] |<br class="gmail_msg">
| uuid | 1634beb9-25de-4cdd-bafa-67537069f0cc |<br class="gmail_msg">
| stack_id | 17f1248d-286a-4fd4-9639-af5773670f03 |<br class="gmail_msg">
| status_reason | Timed out |<br class="gmail_msg">
| created_at | 2016-11-11T11:39:33+00:00 |<br class="gmail_msg">
| updated_at | 2016-11-14T10:43:41+00:00 |<br class="gmail_msg">
| coe_version | - |<br class="gmail_msg">
| faults | {'0': 'CREATE aborted (Task create from TemplateResource "0" Stack "k8s-cluster-rdkwicqqt3vx-kube_masters-n5m56tavd65i" [f4327094-c170-4fb0-9371-1b07b81a7b69] Timed out)', 'kube_masters': 'CREATE aborted (Task create from ResourceGroup "kube_masters" Stack "k8s-cluster-rdkwicqqt3vx" [17f1248d-286a-4fd4-9639-af5773670f03] Timed out)', 'master_wait_condition': 'CREATE aborted (Task create from HeatWaitCondition "master_wait_condition" Stack "k8s-cluster-rdkwicqqt3vx-kube_masters-n5m56tavd65i-0-hrfz3e4pj3xc" [8f01b303-0f14-4bb6-8310-578352d62ab1] Timed out)'} |<br class="gmail_msg">
| keypair | testkey |<br class="gmail_msg">
| api_address | - |<br class="gmail_msg">
| master_addresses | [] |<br class="gmail_msg">
| create_timeout | 60 |<br class="gmail_msg">
| node_count | 1 |<br class="gmail_msg">
| discovery_url | <a href="https://discovery.etcd.io/d519d7710c20a38876439a2084a00607" rel="noreferrer" class="gmail_msg" target="_blank">https://discovery.etcd.io/d519d7710c20a38876439a2084a00607</a> |<br class="gmail_msg">
| master_count | 1 |<br class="gmail_msg">
| container_version | - |<br class="gmail_msg">
| name | k8s-cluster |<br class="gmail_msg">
+---------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+<br class="gmail_msg">
<br class="gmail_msg">
Anyway, I've added the code to review. I have a conflict, but I don't know how to resolve it.<br class="gmail_msg">
<br class="gmail_msg">
Ruben<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
__________________________________________________________________________<br class="gmail_msg">
OpenStack Development Mailing List (not for usage questions)<br class="gmail_msg">
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" rel="noreferrer" class="gmail_msg" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br class="gmail_msg">
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br class="gmail_msg">
</blockquote></div></div></div>