Dynamic Topics Lab Exercise

Introduction

This document is for the hands-on working lab for DevNet in Cisco Live US-Vegas. The attendee will use the sample scripts on the pxGrid client to illustrate the workings of Cisco Platform Exchange Grid (pxGrid) Dynamic Topics.

The pxGrid client will be a Centos 7 64-bit Linux server.

Dynamic Topics provide information exchange with pxGrid clients connected to the Grid (ISE pxGrid node).

A pxGrid client looking to publish information becomes the publisher, and publishes a topic to the Grid. This topic defines the topic name, query items, and action items that can be subscribed to by other pxGrid clients. Other pxGrid clients on the Grid can subscribe to this published topic and consume this information.

This attendee will learn Dynamic Topic concepts by using the sample scripts on the pxGrid client, and using the following use case:

A service for bidding on items in an auction is used. The inventory items will be updated with new items and the users need to be notified of the inventory change. Users need to be able to query the current bids on items. Users also need to be able to bid on items and eventually items will be sold.

There are three categories of users participating in this service:

  • Seller: Continuously updating the inventory and the bidding statuts.

  • Bidder: A user with bidding privileges who wants to buy an item and bids on it.

  • Watcher: Watches the on-going bids and new inventory items, but has no bidding privileges.

The process is as follows:

  • An Auction topic is set up by the pxGrid client publisher, sdk-01. The topic name, query information, and action items will be defined in the generic_publisher.conf file and used in the generic_client script to publish the topic.

  • The topic will be approved by the admin, and placed in the Action_Publish Group.

  • Query items available to the subscriber will be defined in the generic_subscriber.conf file. The pxGrid client sdk-01-sub will become the subscriber and able to consume inventory items and current bids.

Publisher

The pxGrid client, publisher, provides a new topic or modifies an existing one, and defines the topic. This topic metadata information includes: capability name, version, description, platform, query and action items, and is submitted to the ISE pxGrid node for approval. Once the topic is approved, three authorization groups are available for the Administrator for assigning privileges to the clients, including whether they will be allowed to publish subscribe, query and send action requests.

The pxGrid client, sdk01, publisher defines the Auction capability, includes the topic metadata information, and awaits approval from the admin. Once approved the topic will be successfully published and the pxGrid client, sdk01, will be placed in the Action_Publish group. If a pxGrid client now runs core_subscribe, the new capability will be displayed.

  1. Run the script below and enter the topic metadata information as shown in the table and in the code sample in the right hand panel.
Prompt Response
New capability? (y/n) y
Enter capability name Auction
Enter capability version 1.0
Enter capability description Auction Service
Enter vendor platform ABC Auction Service
Enter query name (<enter> to continue) GetInventoryItems
Enter query name (<enter> to continue) GetCurrentBids
Enter query name (<enter> to continue) Note: press Enter
Enter action name (<enter> to continue) BidOnItems

./propose_capability.sh -a 10.10.20.11 -u sdk01 -k alpha.jks -p cisco123 -t alpha_root.jks -q cisco123 -g Session -d pxGrid New Publisher

propose_capability.sh


------- properties -------

version=1.0.2.37

hostnames=10.10.20.11

username=sdk01

group=Basic

description=pxGrid

keystoreFilename=alpha.jks

keystorePassword=cisco123

truststoreFilename=alpha_root.jks

truststorePassword=cisco123

--------------------------

01:49:30.576 [Thread-1] INFO com.cisco.pxgrid.ReconnectionManager - Started

Connecting...

Connected

01:49:33.594 [Thread-1] INFO com.cisco.pxgrid.ReconnectionManager - Connected

New capability? (y/n): y

Enter capability name: Auction

Enter capability version: 1.0

Enter capability description: Auction Service

Enter vendor platform: ABC Auction Service

Enter query name (<enter> to continue): GetInventoryItems

Enter query name (<enter> to continue): GetCurrentBids

Enter query name (<enter> to continue):

Enter action name (<enter> to continue): BidOnItems

Enter action name (<enter> to continue):

Proposing new capability...

Press <enter> to disconnect...

Connection closed

01:52:35.387 [Thread-1] INFO com.cisco.pxgrid.ReconnectionManager - Stopped

[root@pxgridcent2 bin]#





















































































  1. Select Administration > pxGrid Services > Capabilities, note the Auction topic is in a Pending create state.

Select Administration > pxGrid Services > View by Capabilities

  1. Select the Auction topic, then Approve.

Select the Auction topic, the Approve

  1. Select Yes to approve the topic.

Select Yes to approve the topic

  1. The Auction topic is successfully created.

Auction topic is successfully created

  1. The new topic notification will appear when pxGrid clients issue a core-subscribe.

./core_subscribe.sh -a 10.10.20.11 -u core_user-01 -k alpha.jks -p cisco123 -t alpha_root.jks -q cisco123 -g Session -d pxGridClient

core_subscribe.sh


------- properties -------

version=1.0.2.37

hostnames=10.10.20.11

username=core_user-01

group=Session

description=pxGridClient

keystoreFilename=alpha.jks

keystorePassword=cisco123

truststoreFilename=alpha_root.jks

truststorePassword=cisco123

--------------------------

02:31:55.404 [Thread-1] INFO com.cisco.pxgrid.ReconnectionManager - Started

Connecting...

Connected

02:31:58.140 [Thread-1] INFO com.cisco.pxgrid.ReconnectionManager - Connected

getList: status=CREATED capability=TrustSecMetaData, version=1.0

getList: status=CREATED capability=EndpointProfileMetaData, version=1.0

getList: status=CREATED capability=IdentityGroup, version=1.0

getList: status=CREATED capability=Auction, version=1.0, description=Auction Service, platform=ABC Auction Service, operations=GetCurrentBids(R), GetInventoryItems(R), BidOnItems(W)

getList: status=CREATED capability=GridControllerAdminService, version=1.0

getList: status=CREATED capability=SessionDirectory, version=1.0

getList: status=CREATED capability=AdaptiveNetworkControl, version=1.0

getList: status=CREATED capability=EndpointProtectionService, version=1.0

getList: status=CREATED capability=Core, version=1.0

Capability name [, version] to query (or <enter> to quit) : Auction,1.0

topicStatus: status=ENABLED capability=Auction, version=1.0, description=Auction Service, platform=ABC Auction Service, operations=GetCurrentBids(R), GetInventoryItems(R), BidOnItems(W)

Capability name [, version] to query (or <enter> to quit) :  































































  1. Select Live Log to view a record of the Auction topic creation.

Select Live Log to view a record of the Auction topic creation

  1. Select Administration > pxGrid Services > sdk01 > Groups > Action_Publish > Save.

Select Administration > pxGrid Services > sdk01 > Auction Publish > Save

  1. The pxGrid client sdk01 should be the publisher and assigned to the Auction_Publish Client Group.

pxGrid client sdk01 should be the publisher and assigned to the Auction_Publish Client Group

  1. Determine the publisher who publishes the event by editing the publisher.conf file in the ../samples/conf folder.

Edit the publisher.conf file in the ../samples/conf folder to determine the publisher

  1. Change GENERIC_TOPIC_NAME from One to Auction and ensure GENERIC_CLIENT_MODE = “publisher”.

Change the values of GENERIC_TOPIC_NAME and GENERIC_CLIENT_MODE

  1. Run the generic_client script to publish the Auction topic.

Note: In the published metadata below, the topic name is Auction, the clientMode is set for PUBLISHER, and the published capability is Auction.

[root@pxgridcent2 bi]# ./generic_client.sh -a 10.10.20.11 -u sdk01 -k alpha.jks -p cisco123 -t alpha_root.jks -q cisco123 -c generic_publisher.properties

Run the generic_client script to publish the Auction topic

Initialized : GenericClient:

topicName=Auction

clientMode=PUBLISHER

sleepInterval=500

iterations=20

queryNameSet=[]

actionNameSet=[]

publishDataSet=[pub-notif-001, pub-notif-002, pub-notif-003]

requestDataSet=[]

responseDataSet=[resp-001, resp-002, resp-003, resp-004]

------- properties -------

version=1.0.2.37

hostnames=10.10.20.11

username=sdk01

group=Auction_Publish

description=null

keystoreFilename=alpha.jks

keystorePassword=cisco123

truststoreFilename=alpha_root.jks

truststorePassword=cisco123

--------------------------

03:23:53.057 [Thread-1] INFO com.cisco.pxgrid.ReconnectionManager - Started

Connecting...

Connected

03:23:55.833 [Thread-1] INFO com.cisco.pxgrid.ReconnectionManager - Connected

Publishing notification: GenericMessage:

messageType=NOTIFICATION

capabilityName=Auction

operationName=sampleNotification

body:

content:

contentTags=[NOTIF-TAG-201]

contentType=PLAIN_TEXT

value=NOTIFICATION[1464402236046]pub-notif-001

Publishing notification: GenericMessage:

messageType=NOTIFICATION

capabilityName=Auction

operationName=sampleNotification

body:

content:

contentTags=[NOTIF-TAG-201]

contentType=PLAIN_TEXT

value=NOTIFICATION[1464402236606]pub-notif-002

Publishing notification: GenericMessage:

messageType=NOTIFICATION

capabilityName=Auction

operationName=sampleNotification

body:

content:

contentTags=[NOTIF-TAG-201]

contentType=PLAIN_TEXT

value=NOTIFICATION[1464402237106]pub-notif-003

Publishing notification: GenericMessage:

messageType=NOTIFICATION

capabilityName=Auction

operationName=sampleNotification

body:

content:

contentTags=[NOTIF-TAG-201]

contentType=PLAIN_TEXT

value=NOTIFICATION[1464402237607]pub-notif-001

Publishing notification: GenericMessage:

messageType=NOTIFICATION

capabilityName=Auction

operationName=sampleNotification

body:

content:

contentTags=[NOTIF-TAG-201]

contentType=PLAIN_TEXT

value=NOTIFICATION[1464402238107]pub-notif-002

Publishing notification: GenericMessage:

messageType=NOTIFICATION

capabilityName=Auction

operationName=sampleNotification

body:

content:

contentTags=[NOTIF-TAG-201]

contentType=PLAIN_TEXT

value=NOTIFICATION[1464402238608]pub-notif-003

Publishing notification: GenericMessage:

messageType=NOTIFICATION

capabilityName=Auction

operationName=sampleNotification

body:

content:

contentTags=[NOTIF-TAG-201]

contentType=PLAIN_TEXT

value=NOTIFICATION[1464402239108]pub-notif-001

Publishing notification: GenericMessage:

messageType=NOTIFICATION

capabilityName=Auction

operationName=sampleNotification

body:

content:

contentTags=[NOTIF-TAG-201]

contentType=PLAIN_TEXT

value=NOTIFICATION[1464402239608]pub-notif-002

Publishing notification: GenericMessage:

messageType=NOTIFICATION

capabilityName=Auction

operationName=sampleNotification

body:

content:

contentTags=[NOTIF-TAG-201]

contentType=PLAIN_TEXT

value=NOTIFICATION[1464402240109]pub-notif-003

Publishing notification: GenericMessage:

messageType=NOTIFICATION

capabilityName=Auction

operationName=sampleNotification

body:

content:

contentTags=[NOTIF-TAG-201]

contentType=PLAIN_TEXT

value=NOTIFICATION[1464402240609]pub-notif-001

Publishing notification: GenericMessage:

messageType=NOTIFICATION

capabilityName=Auction

operationName=sampleNotification

body:

content:

contentTags=[NOTIF-TAG-201]

contentType=PLAIN_TEXT

value=NOTIFICATION[1464402241110]pub-notif-002

Publishing notification: GenericMessage:

messageType=NOTIFICATION

capabilityName=Auction

operationName=sampleNotification

body:

content:

contentTags=[NOTIF-TAG-201]

contentType=PLAIN_TEXT

value=NOTIFICATION[1464402241610]pub-notif-003

Publishing notification: GenericMessage:

messageType=NOTIFICATION

capabilityName=Auction

operationName=sampleNotification

body:

content:

contentTags=[NOTIF-TAG-201]

contentType=PLAIN_TEXT

value=NOTIFICATION[1464402242111]pub-notif-001

Publishing notification: GenericMessage:

messageType=NOTIFICATION

capabilityName=Auction

operationName=sampleNotification

body:

content:

contentTags=[NOTIF-TAG-201]

contentType=PLAIN_TEXT

value=NOTIFICATION[1464402242612]pub-notif-002

Publishing notification: GenericMessage:

messageType=NOTIFICATION

capabilityName=Auction

operationName=sampleNotification

body:

content:

contentTags=[NOTIF-TAG-201]

contentType=PLAIN_TEXT

value=NOTIFICATION[1464402243112]pub-notif-003

Publishing notification: GenericMessage:

messageType=NOTIFICATION

capabilityName=Auction

operationName=sampleNotification

body:

content:

contentTags=[NOTIF-TAG-201]

contentType=PLAIN_TEXT

value=NOTIFICATION[1464402243613]pub-notif-001

Publishing notification: GenericMessage:

messageType=NOTIFICATION

capabilityName=Auction

operationName=sampleNotification

body:

content:

contentTags=[NOTIF-TAG-201]

contentType=PLAIN_TEXT

value=NOTIFICATION[1464402244113]pub-notif-002

Publishing notification: GenericMessage:

messageType=NOTIFICATION

capabilityName=Auction

operationName=sampleNotification

body:

content:

contentTags=[NOTIF-TAG-201]

contentType=PLAIN_TEXT

value=NOTIFICATION[1464402244614]pub-notif-003

Publishing notification: GenericMessage:

messageType=NOTIFICATION

capabilityName=Auction

operationName=sampleNotification

body:

content:

contentTags=[NOTIF-TAG-201]

contentType=PLAIN_TEXT

value=NOTIFICATION[1464402245114]pub-notif-001

Publishing notification: GenericMessage:

messageType=NOTIFICATION

capabilityName=Auction

operationName=sampleNotification

body:

content:

contentTags=[NOTIF-TAG-201]

contentType=PLAIN_TEXT

value=NOTIFICATION[1464402245615]pub-notif-002

Press <enter> to disconnect...


































































































  1. The pxGrid client sdk01 is now publishing the Auction topic.

pxGrid client sdk01 is now publishing the Auction topic

Subscriber

  1. Configure the subscriber to query the published Auction topic on direct queries for GetInventoryItems and GetCurrentBids.
  1. Open the file.

Configure the subscriber to query the published Auction topic

  1. Modify the GENERIC_TOPIC_NAME from One to Auction.
  1. Modify the GENERIC_QUERY_NAME_SET to reflect GetInventoryItems,GetCurrentBids,BidOnItems.

  1. Run the generic client script for the pxgrid client subscriber sdk01-sub.

Note: The topic name is Auction, the clientMODE is set for SUBSCRIBER. Also notice that the pxGrid client can subscribe to the GetInventoryItems, GetCurrentBid, and BidOnItems query items. During the message exchanges with the publisher you will see the Auction capability and the GetInventoy, GetCurrentBids, BidonItems that the pxGrid client has subscribed to. The subscriber will not be authorized to bidonitems.

./generic_client.sh -a 10.10.20.11 -u sdk01-sub -k alpha.jks -p cisco123 -t alpha_root.jks -q cisco123 -c generic_subscriber.properties

generic_client.sh

Initialized : GenericClient:

topicName=Auction

clientMode=SUBSCRIBER

sleepInterval=500

iterations=20

queryNameSet=[GetInventoryItems, GetCurrentBids, BidOnItems]

actionNameSet=[]

publishDataSet=[]

requestDataSet=[req-001, req-002, req-003]

responseDataSet=[]

------- properties -------

version=1.0.2.37

hostnames=10.10.20.11

username=sdk01-sub

group=Auction_Subscribe

description=null

keystoreFilename=alpha.jks

keystorePassword=cisco123

truststoreFilename=alpha_root.jks

truststorePassword=cisco123

--------------------------

03:55:11.582 [Thread-1] INFO com.cisco.pxgrid.ReconnectionManager - Started

Connecting...

Connected

03:55:14.909 [Thread-1] INFO com.cisco.pxgrid.ReconnectionManager - Connected

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetInventoryItems

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404115137]req-001

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetInventoryItems

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464404115205]resp-001 - for request[QUERY[1464404115137]req-001]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404115715]req-002

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464404115751]resp-002 - for request[QUERY[1464404115715]req-002]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=BidOnItems

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404116272]req-003

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=null

operationName=null

body:

error=not authorized

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetInventoryItems

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404116813]req-001

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetInventoryItems

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464404116850]resp-003 - for request[QUERY[1464404116813]req-001]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404117354]req-002

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464404117387]resp-004 - for request[QUERY[1464404117354]req-002]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=BidOnItems

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404117892]req-003

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=null

operationName=null

body:

error=not authorized

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetInventoryItems

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404118432]req-001

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetInventoryItems

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464404118468]resp-001 - for request[QUERY[1464404118432]req-001]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404118976]req-002

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464404119014]resp-002 - for request[QUERY[1464404118976]req-002]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=BidOnItems

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404119519]req-003

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=null

operationName=null

body:

error=not authorized

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetInventoryItems

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404120064\]req-001

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetInventoryItems

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464404120093]resp-003 - for request[QUERY[1464404120064]req-001]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404120603]req-002

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464404120642]resp-004 - for request[QUERY[1464404120603]req-002]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=BidOnItems

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404121146]req-003

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=null

operationName=null

body:

error=not authorized

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetInventoryItems

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404121691]req-001

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetInventoryItems

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464404121741]resp-001 - for request[QUERY[1464404121691]req-001]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404122245]req-002

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464404122298]resp-002 - for request[QUERY[1464404122245]req-002]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=BidOnItems

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404122813]req-003

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=null

operationName=null

body:

error=not authorized

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetInventoryItems

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404123353]req-001

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetInventoryItems

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464404123393]resp-003 - for request[QUERY[1464404123353]req-001]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404123899]req-002

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464404123933]resp-004 - for request[QUERY[1464404123899]req-002]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=BidOnItems

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404124436]req-003

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=null

operationName=null

body:

error=not authorized

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetInventoryItems

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404124975]req-001

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetInventoryItems

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464404125008]resp-001 - for request[QUERY[1464404124975]req-001]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[QUERY-TAG-301]

contentType=PLAIN_TEXT

value=QUERY[1464404125513]req-002

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464404125544]resp-002 - for request[QUERY[1464404125513]req-002]

Press <enter> to disconnect...





































































































  1. Select Administration > pxGrid Services, the pxGrid client sdk01-sub has subscribed to the Auction topic.

  1. Authorize the subscriber to bid on action items: Modify Generic_Action_properties.

  1. Modify GENERIC_TOPIC_NAME from One to Auction.
  1. Modify GENERIC_ACTION_NAME_SET from acct-001….. to BidOnItems.

  1. Run the following script.

Note: The pxGrid client is now authorized to bid on items.

./generic_client.sh -a 10.10.20.11 -u sdk01-sub -k alpha.jks -p cisco123 -t alpha_root.jks -q cisco123 -c generic_action_client.properties

generic_client.sh

Initialized : GenericClient:

topicName=Auction

clientMode=ACTION

sleepInterval=500

iterations=20

queryNameSet=[]

actionNameSet=[GetCurrentBids]

publishDataSet=[]

requestDataSet=[req-act-001, req-act-002, req-act-003, req-act-004]

responseDataSet=[]

------- properties -------

version=1.0.2.37

hostnames=10.10.20.11

username=sdk01-sub

group=Auction_Action

description=null

keystoreFilename=alpha.jks

keystorePassword=cisco123

truststoreFilename=alpha_root.jks

truststorePassword=cisco123

--------------------------

23:31:07.883 [Thread-1] INFO com.cisco.pxgrid.ReconnectionManager - Started

Connecting...

Connected

23:31:10.514 [Thread-1] INFO com.cisco.pxgrid.ReconnectionManager - Connected

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[ACTION-TAG-301]

contentType=PLAIN_TEXT

value=ACTION[1464474670516]req-act-001

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464474670566]resp-003 - for request[ACTION[1464474670516]req-act-001]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[ACTION-TAG-301]

contentType=PLAIN_TEXT

value=ACTION[1464474671082]req-act-002

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464474671124]resp-004 - for request[ACTION[1464474671082]req-act-002]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[ACTION-TAG-301]

contentType=PLAIN_TEXT

value=ACTION[1464474671628]req-act-003

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464474671669]resp-001 - for request[ACTION[1464474671628]req-act-003]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[ACTION-TAG-301]

contentType=PLAIN_TEXT

value=ACTION[1464474672190]req-act-004

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464474672227]resp-002 - for request[ACTION[1464474672190]req-act-004]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[ACTION-TAG-301]

contentType=PLAIN_TEXT

value=ACTION[1464474672760]req-act-001

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464474672812]resp-003 - for request[ACTION[1464474672760]req-act-001]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[ACTION-TAG-301]

contentType=PLAIN_TEXT

value=ACTION[1464474673318]req-act-002

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464474673356]resp-004 - for request[ACTION[1464474673318]req-act-002]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[ACTION-TAG-301]

contentType=PLAIN_TEXT

value=ACTION[1464474673860]req-act-003

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464474673900]resp-001 - for request[ACTION[1464474673860]req-act-003]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[ACTION-TAG-301]

contentType=PLAIN_TEXT

value=ACTION[1464474674410]req-act-004

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464474674451]resp-002 - for request[ACTION[1464474674410]req-act-004]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[ACTION-TAG-301]

contentType=PLAIN_TEXT

value=ACTION[1464474674964]req-act-001

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464474675002]resp-003 - for request[ACTION[1464474674964]req-act-001]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[ACTION-TAG-301]

contentType=PLAIN_TEXT

value=ACTION[1464474675506]req-act-002

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464474675540]resp-004 - for request[ACTION[1464474675506]req-act-002]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[ACTION-TAG-301]

contentType=PLAIN_TEXT

value=ACTION[1464474676045]req-act-003

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464474676078]resp-001 - for request[ACTION[1464474676045]req-act-003]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[ACTION-TAG-301]

contentType=PLAIN_TEXT

value=ACTION[1464474676586]req-act-004

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464474676614]resp-002 - for request[ACTION[1464474676586]req-act-004]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[ACTION-TAG-301]

contentType=PLAIN_TEXT

value=ACTION[1464474677121]req-act-001

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464474677153]resp-003 - for request[ACTION[1464474677121]req-act-001]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[ACTION-TAG-301]

contentType=PLAIN_TEXT

value=ACTION[1464474677664]req-act-002

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464474677698]resp-004 - for request[ACTION[1464474677664]req-act-002]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[ACTION-TAG-301]

contentType=PLAIN_TEXT

value=ACTION[1464474678202]req-act-003

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464474678259]resp-001 - for request[ACTION[1464474678202]req-act-003]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[ACTION-TAG-301]

contentType=PLAIN_TEXT

value=ACTION[1464474678762]req-act-004

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464474678794]resp-002 - for request[ACTION[1464474678762]req-act-004]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[ACTION-TAG-301]

contentType=PLAIN_TEXT

value=ACTION[1464474679300]req-act-001

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464474679329]resp-003 - for request[ACTION[1464474679300]req-act-001]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[ACTION-TAG-301]

contentType=PLAIN_TEXT

value=ACTION[1464474679836]req-act-002

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464474679872]resp-004 - for request[ACTION[1464474679836]req-act-002]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[ACTION-TAG-301]

contentType=PLAIN_TEXT

value=ACTION[1464474680379]req-act-003

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464474680413]resp-001 - for request[ACTION[1464474680379]req-act-003]

Sending request: GenericMessage:

messageType=REQUEST

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[ACTION-TAG-301]

contentType=PLAIN_TEXT

value=ACTION[1464474680918]req-act-004

Received response: GenericMessage:

messageType=RESPONSE

capabilityName=Auction

operationName=GetCurrentBids

body:

content:

contentTags=[RESP-TAG-101]

contentType=PLAIN_TEXT

value=RESPONSE[1464474680956]resp-002 - for request[ACTION[1464474680918]req-act-004]

Press <enter> to disconnect...