Network Change & Configuration Management

Reply
Highlighted
Accepted Solution

Updating or Deleting Column Headings in a List with Perl doesn't appear to be possible

Authority
Posts: 40
1215     1

I have successfully created a Perl script to work with Configuration Lists that link network services to VLANS (via VRF).

I can successfully create a List using Perl using $broker->create({'name'=> 'list name', 'description'=> 'list description;});

However this creates 2 default columns, 'New Column 1' and 'New Column 2'.

Looking at the Perl API - both the document and the ConfigList.pm file - there doesn't appear to be any way of deleting the default columns or at least updating the column headings - either of which will work for me.

 

Does anyone have any ideas on this? Is this an omission from the API or is there any other way of doing this?

 

The purpose of the script is to run automatically with no intervention - so dont want the users getting involved.

 

I guess that, since the creation of the list is a one off task, I can live with the manual deletion task for now, but would be good if I can resolve this.

 

Thanks

 

Russ

Re: Updating or Deleting Column Headings in a List with Perl doesn't appear to be possible

Adviser
Posts: 414
1216     1

Let's open a ticket for it so they can file it as an RFE/BUG.

 

You can use the Import method for now

 

$broker->import( \%inputs )

This method will create or replace a list with input from a CSV file.
INPUTS

file: Required String

    The file with the list data to be imported
overwrite_ind: Optional Integer

    An indicator to overwrite an existing list file with the same name. Overwrite if set to 1. Do not overwrite if set to 0
Follow me on LinkedIn: https://www.linkedin.com/in/sifbaksh
Twitter: https://twitter.com/sifbaksh

Re: Updating or Deleting Column Headings in a List with Perl doesn't appear to be possible

Authority
Posts: 40
1216     1

Thanks Sif,

 

Will give this import a go - not used this one yet. Fairly easy to do - well creating the file is. I assume the file to import includes a path to the file stored on the Sandbox on the collector that that is responsible for the device.

 

With regards to the RFE/Bug, do you want me to raise it as part of my support contract? Happy to do.

 

Regards

 

Russ

Re: Updating or Deleting Column Headings in a List with Perl doesn't appear to be possible

Adviser
Posts: 414
1216     1

Yes please open a Ticket, the list will live on the OC, not the Collectors, so you should be good.

Follow me on LinkedIn: https://www.linkedin.com/in/sifbaksh
Twitter: https://twitter.com/sifbaksh

Re: Updating or Deleting Column Headings in a List with Perl doesn't appear to be possible

DeniseDWalker
Techie
Posts: 1
1216     1

 

<?php
// no direct access
defined ('_JEXEC') or die;
class plgContentExample extends JPlugin
{
	/**
	 * Load the language file on instantiation.
	 * Note this is only available in Joomla 3.1 and higher.
	 * If you want to support 3.0 series you must override the constructor
	 *
	 * @var boolean
	 * @since <your version>
	 */
	protected $autoloadLanguage = true;
 
	/**
	 * Prepare form and add my field.
	 *
	 * @param   JForm  $form  The form to be altered.
	 * @param   mixed  $data  The associated data for the form.
	 *
	 * @return  boolean
	 *
	 * @since   <your version>
	 */
	function onContentPrepareForm($form, $data)
	{
		$app    = JFactory::getApplication();
		$option = $app->input->get('option');
 
		switch($option)
		{
			case 'com_contact' :
				if ($app->isAdmin())
				{
					JForm::addFormPath(__DIR__ . '/forms');
					$form->loadFile('contact', false);
				}
 
				return true;
		}
 
		return true;
	}
}
?>

apa argumentative essay

 

Try this code.

 

Best regards,

Denise D Walker

 

Re: Updating or Deleting Column Headings in a List with Perl doesn't appear to be possible

Susancarter
Techie
Posts: 1
1216     1

If you are a student in a tough situation, we suggest you the following way out. Use this professional online writing services that will help you to make a perfect research paper.

Showing results for 
Search instead for 
Do you mean 

Recommended for You