File tree Expand file tree Collapse file tree 1 file changed +37
-0
lines changed
Expand file tree Collapse file tree 1 file changed +37
-0
lines changed Original file line number Diff line number Diff line change 1+ # Licensed under the Apache License, Version 2.0 (the "License"); you may
2+ # not use this file except in compliance with the License. You may obtain
3+ # a copy of the License at
4+ #
5+ # http://www.apache.org/licenses/LICENSE-2.0
6+ #
7+ # Unless required by applicable law or agreed to in writing, software
8+ # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
9+ # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
10+ # License for the specific language governing permissions and limitations
11+ # under the License.
12+
13+ """
14+ Example Find Command
15+
16+ For example:
17+ python -m examples.find openstack/network/v2_0/network.py \
18+ --data '{"id": "a1369557-748f-429c-bd3e-fc385aacaec7"}'
19+ """
20+
21+ import sys
22+
23+ from examples import common
24+ from examples import session
25+
26+
27+ def run_find (opts ):
28+ sess = session .make_session (opts )
29+ cls = common .find_resource_cls (opts )
30+ obj = cls .find (sess , opts .data )
31+ print (str (obj ))
32+ return
33+
34+
35+ if __name__ == "__main__" :
36+ opts = common .setup ()
37+ sys .exit (common .main (opts , run_find ))
You can’t perform that action at this time.
0 commit comments