How to get default component through jira-python - python

I have been trying to programatically retrieve the default component set for a JIRA project with little success.
Currently, I have tried
jira.createmeta('PROJ_NAME')
and
jira.project('PROJ_NAME')
Trying to understand the API output is troubling. I believe it might not be possible but I atleast want to confirm this before making this final assumption.
Is there an easy way to retrieve what component was set as the default in the jira-python api?
For reference:
https://jira-python.readthedocs.org/en/latest/

As far as I know - and I am pretty sure about that, it is not possible to define a default component for a project.
Maybe there are workarounds with post transition functions but this is not an out-of-the-box feature.
Hence it`s not possible to get this information through any API!

Related

login to obiee and execute SQL using python

I've tried various ways of extracting reports from Oracle Business Intelligence (not hosted locally, version 11g), and the best I've come up with so far is the pyobiee library here, which is pretty good: https://github.com/kazei92/pyobiee. I've managed to login and extract reports that I've already written, but in an ideal world I would be able to interrogate the SQL directly. I've tried this using the executeSQL function in pyobiee, but I can only manage to extract a column or two and then it can't do any more. I think I'm limited by my understanding of the SQL syntax which is not a familiar one (it's more logical, no GROUP BY requirement), and I can't find a decent summary of how to use it. Where I have found summaries, I've followed them and it doesn't work (https://docs.oracle.com/middleware/12212/biee/BIESQ/toc.htm#BIESQ102). Please can you advise where I can find a better summary of the logical SQL syntax? The other possibility is that there is something wrong with the pyobiee library (hasn't been maintained since August). I would be open to using pyodbc or cx_Oracle instead, but I can't work out how to login using these routes. Please can you advise?
The reason I'm taking this route is because my organisation has mapping tables that are not held in obiee and there is no prospect of getting them in there. So I'm working on extracting using python so that I can add the mapping tables in SQL server.
I advise you to rethink what you are doing. First of all the python is a wrapper around the OBI web services which in itself isn't wrong, but an additional layer of abstraction which hides most of the web services and functionalities. There are way more than three...
Second - the real question is "What exactly are you trying top achieve?". If you simply want data from the OBI server, then you can just as well get that over ODBC. No need for 50 additional technologies in the middle.
As far as LSQL is concerned: Yes, there is a reference: https://docs.oracle.com/middleware/12212/biee/BIESQ/BIESQ.pdf
BUT you will definitely need to know what you want to access since what's governing things is the RPD. A metadata layer. Not a database.

How do I efficiently understand a framework with sparse documentation?

I have the problem that for a project I need to work with a framework (Python), that has a poor documentation. I know what it does since it is the back end of a running application. I also know that no framework is good if the documentation is bad and that I should prob. code it myself. But, I have a time constraint. Therefore my question is: Is there a cooking recipe on how to understand a poorly documented framework?
What I tried until now is checking some functions and identify the organizational units in the framework but I am lacking a system to do it more effectively.
If I were you, with time constaraints, and bound to use a specific framework. I'll go in the following manner:
List down the use cases I desire to implement using the framework
Identify the APIs provided by the framework that helps me implement the use cases
Prototype the usecases based on the available documentation and reading
The prototyping is not implementing the entire use case, but to identify the building blocks around the case and implementing them. e.g., If my usecase is to fetch the Students, along with their courses, and if I were using Hibernate to implement, I would prototype the database accesss, validating how easily am I able to access the database using Hibernate, or how easily I am able to get the relational data by means of joining/aggregation etc.
The prototyping will help me figure out the possible limitations/bugs in the framework. If the limitations are more of show-stoppers, I will implement the supporting APIs myself; or I can take a call to scrap out the entire framework and write one for myself; whichever makes more sense.
You may also use python debugging library: pdb. After importing it with import pdb you may set traces in the body of functions and classes pdb.set_trace(). Then it will stop the execution of the program in the line and you may look at existing variables and processes.

Google Street View coordinate data python

I need to know which are the real coordinates for google street view for a GIVEN pair of coordinates using python.
In the google maps Python API there is not how to access to this information. (There is how to in the Javascript API)
I found a non-documented API that returns what I need, but since it seems to be illegal to use undocumented API's to get this information, is there another possibility without changing my programming language? Maybe connecting the Javascript with Python but I don't have idea how to make this.
Thank you!
The best solution is to use the command below to get the closest road:
google.maps.StreetViewService().getPanoramaByLocation()
And then use it to retrieve the image. Unfortunately, I don't know how to do that in Python...

How can I retrieve Proxmox node notes?

I am using proxmoxer to manipulate machines on ProxMox (create, delete etc).
Every time I am creating a machine, I provide a description which is being written in ProxMox UI in section "Notes".
I am wondering how can I retrieve that information?
Best would be if it can be done with ProxMox, but if there is not a way to do it with that Python module, I will also be satisfied to do it with plain ProxMox API call.
The description parameter is only a message to show in proxmox UI, and it's not related to any function
You could use https://github.com/baseblack/Proxmoxia to get started, I asked this very same question on the forum as I need to generate some reports from a legacy system with dozens of VMs (and descriptions).
Let me know if you still need this, perhaps we can collaborate on it.

Amazon Autoscaling trigger not working, how do I debug it?

I'm trying to use autoscaling to create new EC2 instances whenever average CPU load on existing instances goes high. Here's the situation:
I'm setting up autoscaling using this boto script (with keys and image names removed). http://balti.ukcod.org.uk/~francis/tmp/start_scaling_ptdaemon.nokeys.py
I've got min_size set to 2, and the AutoScalingGroup correctly creates an initial 2 instances, which both work fine. I'm pretty sure this means the LaunchConfiguration is right.
When load goes up to nearly 100% on both those two instances, nothing happens.
Some questions / thoughts:
Is there any way of debugging this? I can't find any API calls that give me detals of what Autoscaling is doing, or thinks it is doing. Are there any tools that give feedback either on what it is doing, or on whether it has set things up correctly?
It would be awesome if Autoscaling appeared in the AWS Console.
I'm using EU west availability zone. Is there any reason that should cause trouble with Autoscaling?
Is there any documentation of the "dimensions" parameter when creating a trigger? I have no idea what it means, and have just copied its fields from an example. I can't find any documentation about it that doesn't self-referentially say it is a "dimension", without explaining what that means or what the possible values are.
Thanks for any help!
I'm sure you've already found these and it would be good to use AWS tool first before the Python tool to get the idea.:)
http://ec2-downloads.s3.amazonaws.com/AutoScaling-2009-05-15.zip
http://docs.amazonwebservices.com/AutoScaling/latest/DeveloperGuide/
Cheers,
Rodney
Also, take a look at something like http://alestic.com/2011/11/ec2-schedule-instance for a simple example of how to use the tools with a demo script provided.

Categories