Hi Ruben, 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...
self.magnum.cluster_template.list() self.magnum.cluster.list() Several ways to check that you have the right fields.. 1) Suppose your Murano driver is running inside of Congress, and you've created an instance of it. $ openstack congress datasource create magnum magnum ... $ openstack congress datasource list <see your instance in the list> You know you have the right fields in the driver if you're getting data in the Murano datasource instance. $ openstack congress datasource row list magnum cluster $ openstack congress datasource row list magnum cluster_template 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. [I haven't used magnum's client, but it looks to be using the standard openstack client, so should support --debug.] $ magnum cluster-template-list --debug You'll need to wade through the output to find the JSON that gets returned from the server. 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. You can look at logs from the command line with: $ less -R /opt/stack/logs/congress.log 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. Tim On Wed, Nov 16, 2016 at 9:37 AM Ruben <r.manganiel...@studenti.unisa.it> wrote: > Hi everybody, > first of all: Tim thanks for your help. > > 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. > Are these the methods to be taken into account for the translation? > Anyway I don't know if I made mistakes in the translation.. > > I've some doubts because if I made the CLI command 'magnum > cluster-template-list' I have: > > +--------------------------------------+----------------------+ > | uuid | name | > +--------------------------------------+----------------------+ > | 8d25a1ed-faa6-4305-a6a1-6559708c805b | k8s-cluster-template | > +--------------------------------------+----------------------+ > > and if I made the CLI command 'magnum cluster-template-show > k8s-cluster-template' I have: > > +-----------------------+--------------------------------------+ > | Property | Value | > +-----------------------+--------------------------------------+ > | insecure_registry | - | > | labels | {} | > | updated_at | - | > | floating_ip_enabled | True | > | fixed_subnet | - | > | master_flavor_id | my | > | uuid | 8d25a1ed-faa6-4305-a6a1-6559708c805b | > | no_proxy | - | > | https_proxy | - | > | tls_disabled | False | > | keypair_id | testkey | > | public | False | > | http_proxy | - | > | docker_volume_size | 7 | > | server_type | vm | > | external_network_id | public | > | cluster_distro | fedora-atomic | > | image_id | fedora-atomic-latest | > | volume_driver | - | > | registry_enabled | False | > | docker_storage_driver | devicemapper | > | apiserver_port | - | > | name | k8s-cluster-template | > | created_at | 2016-11-11T11:38:25+00:00 | > | network_driver | flannel | > | fixed_network | - | > | coe | kubernetes | > | flavor_id | m1.tiny | > | master_lb_enabled | False | > | dns_nameserver | 193.205.160.3 | > +-----------------------+--------------------------------------+ > > So fields that I see here are a litte bit different from fields in the > methods above mentioned. > Same thing for cluster. > > 'magnum cluster-list' > > > +--------------------------------------+-------------+------------+------------+--------------+---------------+ > | uuid | name | keypair_id | > node_count | master_count | status | > > +--------------------------------------+-------------+------------+------------+--------------+---------------+ > | 1634beb9-25de-4cdd-bafa-67537069f0cc | k8s-cluster | testkey | 1 > | 1 | CREATE_FAILED | > > +--------------------------------------+-------------+------------+------------+--------------+---------------+ > > > 'magnum cluster-show k8s-cluster' > > > +---------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ > | Property | Value > > > > > > > | > > +---------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ > | status | CREATE_FAILED > > > > > > > | > | cluster_template_id | 8d25a1ed-faa6-4305-a6a1-6559708c805b > > > > > > > | > | node_addresses | [] > > > > > > > | > | uuid | 1634beb9-25de-4cdd-bafa-67537069f0cc > > > > > > > | > | stack_id | 17f1248d-286a-4fd4-9639-af5773670f03 > > > > > > > | > | status_reason | Timed out > > > > > > > | > | created_at | 2016-11-11T11:39:33+00:00 > > > > > > > | > | updated_at | 2016-11-14T10:43:41+00:00 > > > > > > > | > | coe_version | - > > > > > > > | > | 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)'} | > | keypair | testkey > > > > > > > | > | api_address | - > > > > > > > | > | master_addresses | [] > > > > > > > | > | create_timeout | 60 > > > > > > > | > | node_count | 1 > > > > > > > | > | discovery_url | > https://discovery.etcd.io/d519d7710c20a38876439a2084a00607 > > > > > > > | > | master_count | 1 > > > > > > > | > | container_version | - > > > > > > > | > | name | k8s-cluster > > > > > > > | > > +---------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ > > Anyway, I've added the code to review. I have a conflict, but I don't know > how to resolve it. > > Ruben > > > > > __________________________________________________________________________ > OpenStack Development Mailing List (not for usage questions) > Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe > http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev >
__________________________________________________________________________ OpenStack Development Mailing List (not for usage questions) Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev