use /usr/bin/env python instead of /usr/bin/python
Change-Id: I64b60864ecb8981ac54ded15fee1f6ab43a5fba2
This commit is contained in:
parent
24f42cbf48
commit
d8fc11825a
@ -97,7 +97,7 @@ def print_values_server(val, server_id, type):
|
|||||||
<section xml:id="sdk_neutron_create_network">
|
<section xml:id="sdk_neutron_create_network">
|
||||||
<title>Create network</title>
|
<title>Create network</title>
|
||||||
<para>The following program creates a network:</para>
|
<para>The following program creates a network:</para>
|
||||||
<programlisting language="python">#!/usr/bin/python
|
<programlisting language="python">#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from neutronclient.v2_0 import client
|
from neutronclient.v2_0 import client
|
||||||
@ -126,7 +126,7 @@ finally:
|
|||||||
<section xml:id="sdk_neutron_list_networks">
|
<section xml:id="sdk_neutron_list_networks">
|
||||||
<title>List networks</title>
|
<title>List networks</title>
|
||||||
<para>The following program lists networks:</para>
|
<para>The following program lists networks:</para>
|
||||||
<programlisting language="python">#!/usr/bin/python
|
<programlisting language="python">#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from neutronclient.v2_0 import client
|
from neutronclient.v2_0 import client
|
||||||
@ -145,7 +145,7 @@ print_values(netw, 'networks')</programlisting>
|
|||||||
<section xml:id="sdk_neutron_create_port">
|
<section xml:id="sdk_neutron_create_port">
|
||||||
<title>Create ports</title>
|
<title>Create ports</title>
|
||||||
<para>The following program creates a port:</para>
|
<para>The following program creates a port:</para>
|
||||||
<programlisting language="python">#!/usr/bin/python
|
<programlisting language="python">#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from neutronclient.v2_0 import client
|
from neutronclient.v2_0 import client
|
||||||
@ -187,7 +187,7 @@ if server_detail != None:
|
|||||||
<section xml:id="sdk_neutron_list_ports">
|
<section xml:id="sdk_neutron_list_ports">
|
||||||
<title>List ports</title>
|
<title>List ports</title>
|
||||||
<para>The following program lists ports:</para>
|
<para>The following program lists ports:</para>
|
||||||
<programlisting language="python">#!/usr/bin/python
|
<programlisting language="python">#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from neutronclient.v2_0 import client
|
from neutronclient.v2_0 import client
|
||||||
@ -209,7 +209,7 @@ print_values(ports, 'ports')</programlisting>
|
|||||||
<title>List server ports</title>
|
<title>List server ports</title>
|
||||||
<para>The following program lists the ports for a
|
<para>The following program lists the ports for a
|
||||||
server:</para>
|
server:</para>
|
||||||
<programlisting language="python">#!/usr/bin/python
|
<programlisting language="python">#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from neutronclient.v2_0 import client
|
from neutronclient.v2_0 import client
|
||||||
@ -297,7 +297,7 @@ print("Execution Completed")</programlisting>
|
|||||||
</procedure>
|
</procedure>
|
||||||
<example>
|
<example>
|
||||||
<title>Create router: complete code listing</title>
|
<title>Create router: complete code listing</title>
|
||||||
<programlisting language="python">#!/usr/bin/python
|
<programlisting language="python">#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from neutronclient.v2_0 import client
|
from neutronclient.v2_0 import client
|
||||||
import novaclient.v1_1.client as nvclient
|
import novaclient.v1_1.client as nvclient
|
||||||
@ -377,7 +377,7 @@ print("Execution completed")</programlisting>
|
|||||||
</procedure>
|
</procedure>
|
||||||
<example>
|
<example>
|
||||||
<title>Delete network: complete code listing</title>
|
<title>Delete network: complete code listing</title>
|
||||||
<programlisting language="python">#!/usr/bin/python
|
<programlisting language="python">#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from neutronclient.v2_0 import client
|
from neutronclient.v2_0 import client
|
||||||
from credentials import get_credentials
|
from credentials import get_credentials
|
||||||
@ -442,7 +442,7 @@ print("Execution completed")</programlisting>
|
|||||||
</procedure>
|
</procedure>
|
||||||
<example>
|
<example>
|
||||||
<title>List routers: complete code listing</title>
|
<title>List routers: complete code listing</title>
|
||||||
<programlisting language="python">#!/usr/bin/python
|
<programlisting language="python">#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from neutronclient.v2_0 import client
|
from neutronclient.v2_0 import client
|
||||||
@ -490,7 +490,7 @@ print(sg)</programlisting>
|
|||||||
</procedure>
|
</procedure>
|
||||||
<example>
|
<example>
|
||||||
<title>List security groups: complete code listing</title>
|
<title>List security groups: complete code listing</title>
|
||||||
<programlisting language="python">#!/usr/bin/python
|
<programlisting language="python">#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from neutronclient.v2_0 import client
|
from neutronclient.v2_0 import client
|
||||||
@ -541,7 +541,7 @@ print(subnets)</programlisting>
|
|||||||
</procedure>
|
</procedure>
|
||||||
<example>
|
<example>
|
||||||
<title>List subnets: complete code listing</title>
|
<title>List subnets: complete code listing</title>
|
||||||
<programlisting language="python">#!/usr/bin/python
|
<programlisting language="python">#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from neutronclient.v2_0 import client
|
from neutronclient.v2_0 import client
|
||||||
|
@ -63,7 +63,7 @@ nova_client = Client(**credentials)</programlisting>
|
|||||||
</procedure>
|
</procedure>
|
||||||
<example>
|
<example>
|
||||||
<title>List servers: complete code listing</title>
|
<title>List servers: complete code listing</title>
|
||||||
<programlisting language="python">#!/usr/bin/python
|
<programlisting language="python">#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from credentials import get_nova_credentials_v2
|
from credentials import get_nova_credentials_v2
|
||||||
from novaclient.client import Client
|
from novaclient.client import Client
|
||||||
@ -131,7 +131,7 @@ print(nova_client.servers.list)</programlisting>
|
|||||||
</procedure>
|
</procedure>
|
||||||
<example>
|
<example>
|
||||||
<title>Create server: complete code listing</title>
|
<title>Create server: complete code listing</title>
|
||||||
<programlisting language="python">#!/usr/bin/python
|
<programlisting language="python">#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import time
|
import time
|
||||||
from credentials import get_nova_credentials_v2
|
from credentials import get_nova_credentials_v2
|
||||||
@ -208,7 +208,7 @@ for s in servers_list:
|
|||||||
</procedure>
|
</procedure>
|
||||||
<example>
|
<example>
|
||||||
<title>Delete: complete code listing</title>
|
<title>Delete: complete code listing</title>
|
||||||
<programlisting language="python">#!/usr/bin/python
|
<programlisting language="python">#!/usr/bin/env python
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
from credentials import get_nova_credentials_v2
|
from credentials import get_nova_credentials_v2
|
||||||
from novaclient.client import Client
|
from novaclient.client import Client
|
||||||
|
Loading…
Reference in New Issue
Block a user