Comments (5)
Two things
- Does that query work in knife? (
knife search client 'name:test*'
) - Any reason you aren't using
result.object
?
from pychef.
Sorry it took so long to get back to you.
In answer to 1
Surprising only sort of. As seen below the knife search client 'name:staging*'
is a valid command but the result returned is unexpected. According to the doc (http://wiki.opscode.com/display/chef/Search) it should work (see the table at the top)
I reported this to Opscode.
Here is a session:
boyd@kitchen:/opt/feedmagnet 03:05:16 > knife search node "name:staging*"
2 items found
Node Name: staging
Environment: QA
FQDN: staging
IP: 50.57.66.212
Run List: role[deployment-host]
Roles: deployment-host
Recipes chef-client::config, chef-client::delete_validation, base, mysql, python, console-server, revealcloud, ntp
Platform: ubuntu 10.04
Node Name: stagingutil
Environment: QA
FQDN: stagingutil
IP: 50.57.65.178
Run List: role[magnet-host]
Roles: magnet-host
Recipes chef-client::config, chef-client::delete_validation, base, magnet-server, revealcloud, ntp
Platform: ubuntu 10.04
boyd@kitchen:/opt/feedmagnet 03:06:34 > knife search client "*:*" | grep staging
name: stagingutil
name: staging
boyd@kitchen:/opt/feedmagnet 03:06:56 > knife search client "name:staging*"
0 items found
Regarding 2
I think this is simply me still wrapping my head around Python. WHen I look at base.from_search I see that it is returning an object. However when I tried to work with the object I encountered errors I could not reconcile. When I got the name of the thing and then acquired the object (as above) all was happy.
If you have a code snippet handy to demonstrate what you are talking about, I would certainly appreciate it.
Thank you for your time Noah.
from pychef.
Is this against your own chef-server or Hosted Chef? If it is your own, double check that chef-expander is running. Also try running a full reindex using knife.
As for a code sample, this should be equivalent to the above:
for result in chef.Search('client', q="name:test*"):
print result.object
from pychef.
Regardless this doesn't sound like a PyChef issue if knife is showing the same anomalous results.
from pychef.
Noah:
Thanks for the quick reply.
THe problem was against hosted chef. I did file a support ticket last
night at the same time I do agree this is a chef issue not a PyChef issue
and I am sorry for the trouble.
Boyd
On Wed, Jun 20, 2012 at 3:09 AM, Noah Kantrowitz <
[email protected]
wrote:
Regardless this doesn't sound like a PyChef issue if knife is showing the
same anomalous results.
Reply to this email directly or view it on GitHub:
#10 (comment)
Best Regards
Boyd Hemphill
Chief Systems Architect
www.feedmagnet.com
[email protected]
(512) 470-6146
from pychef.
Related Issues (20)
- chef.fabric (and probably other places) are missing `from __future__ import absolute_import`
- pychef cannot find libeay32.dll on Windows HOT 13
- knife cookbook list? HOT 6
- knife job support? HOT 4
- How to uninstall pychef modules from OSX 10.11 EI Capitan HOT 1
- Allow setting of Node attributes at different precedence levels HOT 1
- Acl is not supported when using autoconfigure() HOT 1
- NodeAttributes.to_dict() only does a shallow merge
- Interrogate Roles HOT 2
- Not able to import chef on Python 3.4 HOT 4
- Chef Search Query Using Brackets Fails HOT 7
- str object does not have the buffer interface
- Unable to import pychef 0.3.0 on Python 2.7.13
- get node runs details using pychef HOT 2
- Unhelpful/Erroneous error on bad node search
- .chef/config.rb has been the default config for knife since Chef 12.0
- ChefAPI is hardcoded to ssl_verify=True
- AttributeError: 'ConnectionError' object has no attribute 'message' HOT 1
- Crash on macOS 10.15 Catalina due to libcrypto loading HOT 1
- Importing ABC directly from collections was deprecated and will be removed in Python 3.10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pychef.