Skip to content

Ticket/2.7.x/9879#154

Closed
nanliu wants to merge 1 commit intopuppetlabs:2.7.xfrom
nanliu:ticket/2.7.x/9879
Closed

Ticket/2.7.x/9879#154
nanliu wants to merge 1 commit intopuppetlabs:2.7.xfrom
nanliu:ticket/2.7.x/9879

Conversation

@nanliu
Copy link
Contributor

@nanliu nanliu commented Oct 4, 2011

This patch improves readability of puppet resource attribute display for
hash values.

Current output:

type { 'title':
  attribute => hashkeyhashvalue,
}

New output:

type { 'title':
  attribute => { hashkey => 'hashvalue' },
}

@joshcooper
Copy link
Contributor

Btw, Jacob had to implement something similar for the task scheduler on Windows. It's not committed yet, but you can see his pull request to see if it will produce the results you are looking for.

@nanliu
Copy link
Contributor Author

nanliu commented Oct 4, 2011

Do you happen to know the commit hash for Jacob's patch?

@nanliu
Copy link
Contributor Author

nanliu commented Oct 4, 2011

Found the commit and the other patch solved the issue with a different approach. I was trying to do multiline display for hash since I was writing a resource with a hash attribute that could have upwards of 90+ key/value, and also aligns => for readability.

f5_monitor { 'https_443':
  ensure                    => 'present',
  manual_resume_state       => 'STATE_DISABLED',
  template_destination      => '*:443',
  template_integer_property => { ITYPE_INTERVAL            => '5',
                                 ITYPE_PROBE_INTERVAL      => '0',
                                 ITYPE_PROBE_NUM_PROBES    => '0',
                                 ITYPE_PROBE_NUM_SUCCESSES => '0',
                                 ITYPE_PROBE_TIMEOUT       => '0',
                                 ITYPE_TIMEOUT             => '16',
                                 ITYPE_TIME_UNTIL_UP       => '0',
                                 ITYPE_UNSET               => '0',
                                 ITYPE_UP_INTERVAL         => '0' },
  template_state            => 'STATE_ENABLED',
  template_string_property  => { STYPE_CIPHER_LIST        => 'DEFAULT:+SHA:+3DES:+kEDH',
                                 STYPE_CLIENT_CERTIFICATE => '',
                                 STYPE_CLIENT_KEY         => '',
                                 STYPE_PASSWORD           => '',
                                 STYPE_RECEIVE            => '',
                                 STYPE_SEND               => 'GET /',
                                 STYPE_SSL_OPTIONS        => 'enabled',
                                 STYPE_USERNAME           => '' },
  template_transparent_mode => 'false',
}

I prefer the readability, but I'll leave it up to the eng team to decide whether or not to accept this. Thanks!

This patch improves readability of puppet resource attribute display for
hash values.

Current output:

    type { 'title':
      attribute => hashkeyhashvalue,
    }

New output:

    type { 'title':
      attribute => { hashkey => 'hashvalue' },
    }
@jhelwig
Copy link
Contributor

jhelwig commented Dec 8, 2011

This pull is waiting on some updates discussed in the Redmine ticket.

@slippycheeze
Copy link
Contributor

@nanliu - I wanted to follow up and see if you had a chance to update this in response to the feedback from @jhelwig?

@slippycheeze
Copy link
Contributor

@nanliu - this duplicates some of the work done in both the PMT and Faces APIs, and can't be merged. I am closing this pull request until the details discussed on the ticket get sorted out.

hlindberg pushed a commit to hlindberg/puppet that referenced this pull request Oct 16, 2014
Add PuppetDB 1.2 toc and external source
melissa pushed a commit to melissa/puppet that referenced this pull request Mar 30, 2018
(PCP-80) Show valid loglevels in help
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants